summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:50:47 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:50:47 +0900
commit07fdd091a491602cd6b311d7b31bf20bed691401 (patch)
tree1436172370a45714687122f914354ad167a2f528
parentf7d643cbb2184346b6f8d26091eb7eb38c6bbfe1 (diff)
downloadpygobject2-accepted/tizen_2.0/20130215.202605.tar.gz
pygobject2-accepted/tizen_2.0/20130215.202605.tar.bz2
pygobject2-accepted/tizen_2.0/20130215.202605.zip
-rw-r--r--AUTHORS8
-rw-r--r--COPYING504
-rw-r--r--ChangeLog2329
-rw-r--r--ChangeLog.pre-2.183608
-rw-r--r--INSTALL236
-rw-r--r--MANIFEST.in7
-rw-r--r--Makefile.am120
-rw-r--r--Makefile.in1082
-rw-r--r--NEWS460
-rw-r--r--PKG-INFO25
-rw-r--r--PKG-INFO.in25
-rw-r--r--README101
-rw-r--r--README.win3224
-rw-r--r--aclocal.m41596
-rw-r--r--codegen/Makefile.am31
-rw-r--r--codegen/Makefile.in555
-rw-r--r--codegen/README.defs351
-rw-r--r--codegen/__init__.py16
-rw-r--r--codegen/argtypes.py1043
-rwxr-xr-xcodegen/code-coverage.py44
-rwxr-xr-xcodegen/codegen.py1722
-rwxr-xr-xcodegen/createdefs.py17
-rw-r--r--codegen/definitions.py575
-rwxr-xr-xcodegen/defsconvert.py132
-rwxr-xr-xcodegen/defsgen.py737
-rw-r--r--codegen/defsparser.py153
-rw-r--r--codegen/docextract.py448
-rwxr-xr-xcodegen/docextract_to_xml.py139
-rwxr-xr-xcodegen/docgen.py766
-rwxr-xr-xcodegen/h2def.py631
-rwxr-xr-xcodegen/mergedefs.py26
-rwxr-xr-xcodegen/missingdefs.py17
-rwxr-xr-xcodegen/mkskel.py89
-rw-r--r--codegen/override.py285
-rw-r--r--codegen/pygobject-codegen-2.0.in11
-rw-r--r--codegen/reversewrapper.py912
-rwxr-xr-xcodegen/scanvirtuals.py54
-rwxr-xr-xcodegen/scmexpr.py143
-rwxr-xr-xcompile143
-rwxr-xr-xconfig.guess1501
-rw-r--r--config.h.in80
-rwxr-xr-xconfig.sub1705
-rwxr-xr-xconfigure16893
-rw-r--r--configure.ac244
-rwxr-xr-xdepcomp630
-rw-r--r--docs/Makefile.am195
-rw-r--r--docs/Makefile.in641
-rw-r--r--docs/html/class-gioappinfo.html210
-rw-r--r--docs/html/class-gioapplaunchcontext.html44
-rw-r--r--docs/html/class-gioasyncresult.html44
-rw-r--r--docs/html/class-giobufferedinputstream.html133
-rw-r--r--docs/html/class-giobufferedoutputstream.html62
-rw-r--r--docs/html/class-giocancellable.html61
-rw-r--r--docs/html/class-giodatainputstream.html223
-rw-r--r--docs/html/class-giodataoutputstream.html118
-rw-r--r--docs/html/class-giodrive.html117
-rw-r--r--docs/html/class-gioemblem.html46
-rw-r--r--docs/html/class-gioemblemedicon.html38
-rw-r--r--docs/html/class-giofile.html1436
-rw-r--r--docs/html/class-giofileattributeinfo.html11
-rw-r--r--docs/html/class-giofileenumerator.html126
-rw-r--r--docs/html/class-giofileicon.html21
-rw-r--r--docs/html/class-giofileinfo.html42
-rw-r--r--docs/html/class-giofileinputstream.html65
-rw-r--r--docs/html/class-giofilemonitor.html21
-rw-r--r--docs/html/class-giofileoutputstream.html84
-rw-r--r--docs/html/class-giofilterinputstream.html22
-rw-r--r--docs/html/class-giofilteroutputstream.html22
-rw-r--r--docs/html/class-gioicon.html81
-rw-r--r--docs/html/class-gioinputstream.html242
-rw-r--r--docs/html/class-gioloadableicon.html51
-rw-r--r--docs/html/class-giomemoryinputstream.html32
-rw-r--r--docs/html/class-giomemoryoutputstream.html40
-rw-r--r--docs/html/class-giomount.html242
-rw-r--r--docs/html/class-giomountoperation.html123
-rw-r--r--docs/html/class-giooutputstream.html19
-rw-r--r--docs/html/class-gioseekable.html55
-rw-r--r--docs/html/class-giosimpleasyncresult.html87
-rw-r--r--docs/html/class-giothemedicon.html42
-rw-r--r--docs/html/class-giounixinputstream.html37
-rw-r--r--docs/html/class-giounixoutputstream.html37
-rw-r--r--docs/html/class-giovolume.html176
-rw-r--r--docs/html/class-giovolumemonitor.html135
-rw-r--r--docs/html/class-glibmaincontext.html29
-rw-r--r--docs/html/class-glibmainloop.html38
-rw-r--r--docs/html/class-gobject.html176
-rw-r--r--docs/html/class-gobjectgboxed.html9
-rw-r--r--docs/html/class-gobjectginterface.html4
-rw-r--r--docs/html/class-gobjectgpointer.html8
-rw-r--r--docs/html/gio-class-reference.html1
-rw-r--r--docs/html/gio-constants.html414
-rw-r--r--docs/html/gio-functions.html74
-rw-r--r--docs/html/giounix-class-reference.html1
-rw-r--r--docs/html/glib-class-reference.html3
-rw-r--r--docs/html/glib-constants.html40
-rw-r--r--docs/html/glib-functions.html280
-rw-r--r--docs/html/gobject-class-reference.html2
-rw-r--r--docs/html/gobject-constants.html63
-rw-r--r--docs/html/gobject-functions.html134
-rw-r--r--docs/html/index.html6
-rw-r--r--docs/html/index.sgml532
-rw-r--r--docs/html/pygobject-introduction.html83
-rw-r--r--docs/html/pygobject.devhelp525
-rw-r--r--docs/reference/entities.docbook.in1
-rw-r--r--docs/reference/pygio-appinfo.xml894
-rw-r--r--docs/reference/pygio-applaunchcontext.xml194
-rw-r--r--docs/reference/pygio-asyncresult.xml117
-rw-r--r--docs/reference/pygio-bufferedinputstream.xml461
-rw-r--r--docs/reference/pygio-bufferedoutputstream.xml275
-rw-r--r--docs/reference/pygio-cancellable.xml290
-rw-r--r--docs/reference/pygio-classes.xml47
-rw-r--r--docs/reference/pygio-constants.xml1540
-rw-r--r--docs/reference/pygio-datainputstream.xml799
-rw-r--r--docs/reference/pygio-dataoutputstream.xml504
-rw-r--r--docs/reference/pygio-drive.xml546
-rw-r--r--docs/reference/pygio-emblem.xml232
-rw-r--r--docs/reference/pygio-emblemedicon.xml160
-rw-r--r--docs/reference/pygio-file.xml4534
-rw-r--r--docs/reference/pygio-fileattributeinfo.xml73
-rw-r--r--docs/reference/pygio-fileenumerator.xml488
-rw-r--r--docs/reference/pygio-fileicon.xml109
-rw-r--r--docs/reference/pygio-fileinfo.xml346
-rw-r--r--docs/reference/pygio-fileinputstream.xml214
-rw-r--r--docs/reference/pygio-filemonitor.xml128
-rw-r--r--docs/reference/pygio-fileoutputstream.xml257
-rw-r--r--docs/reference/pygio-filterinputstream.xml152
-rw-r--r--docs/reference/pygio-filteroutputstream.xml152
-rw-r--r--docs/reference/pygio-functions.xml395
-rw-r--r--docs/reference/pygio-icon.xml217
-rw-r--r--docs/reference/pygio-inputstream.xml730
-rw-r--r--docs/reference/pygio-loadableicon.xml198
-rw-r--r--docs/reference/pygio-memoryinputstream.xml151
-rw-r--r--docs/reference/pygio-memoryoutputstream.xml175
-rw-r--r--docs/reference/pygio-mount.xml961
-rw-r--r--docs/reference/pygio-mountoperation.xml726
-rw-r--r--docs/reference/pygio-outputstream.xml140
-rw-r--r--docs/reference/pygio-seekable.xml231
-rw-r--r--docs/reference/pygio-simpleasyncresult.xml317
-rw-r--r--docs/reference/pygio-themedicon.xml204
-rw-r--r--docs/reference/pygio-unixinputstream.xml202
-rw-r--r--docs/reference/pygio-unixoutputstream.xml202
-rw-r--r--docs/reference/pygio-volume.xml718
-rw-r--r--docs/reference/pygio-volumemonitor.xml844
-rw-r--r--docs/reference/pygiounix-classes.xml13
-rw-r--r--docs/reference/pyglib-classes.xml15
-rw-r--r--docs/reference/pyglib-constants.xml282
-rw-r--r--docs/reference/pyglib-functions.xml1047
-rw-r--r--docs/reference/pyglib-maincontext.xml152
-rw-r--r--docs/reference/pyglib-mainloop.xml202
-rw-r--r--docs/reference/pygobject-classes.xml17
-rw-r--r--docs/reference/pygobject-constants.xml390
-rw-r--r--docs/reference/pygobject-functions.xml889
-rw-r--r--docs/reference/pygobject-gboxed.xml68
-rw-r--r--docs/reference/pygobject-ginterface.xml38
-rw-r--r--docs/reference/pygobject-gpointer.xml42
-rw-r--r--docs/reference/pygobject-introduction.xml222
-rw-r--r--docs/reference/pygobject-ref.xml36
-rw-r--r--docs/reference/pygobject.xml1016
-rw-r--r--docs/style.css10
-rw-r--r--docs/xsl/common.xsl19
-rw-r--r--docs/xsl/devhelp.xsl154
-rw-r--r--docs/xsl/fixxref.py67
-rw-r--r--docs/xsl/fixxref.py.in67
-rw-r--r--docs/xsl/html.xsl285
-rw-r--r--docs/xsl/pdf-style.xsl11
-rw-r--r--docs/xsl/pdf.xsl259
-rw-r--r--docs/xsl/ref-html-style.xsl54
-rw-r--r--dsextras.py457
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/Makefile.in386
-rw-r--r--examples/option.py30
-rw-r--r--examples/properties.py31
-rw-r--r--examples/signal.py28
-rw-r--r--gio/Makefile.am116
-rw-r--r--gio/Makefile.in807
-rw-r--r--gio/__init__.py40
-rw-r--r--gio/gappinfo.override208
-rw-r--r--gio/gapplaunchcontext.override99
-rw-r--r--gio/gbufferedinputstream.override70
-rw-r--r--gio/gcancellable.override38
-rw-r--r--gio/gdatainputstream.override250
-rw-r--r--gio/gdrive.override347
-rw-r--r--gio/gfile.override2216
-rw-r--r--gio/gfileattribute.override153
-rw-r--r--gio/gfileenumerator.override184
-rw-r--r--gio/gfileinfo.override121
-rw-r--r--gio/gfileinputstream.override68
-rw-r--r--gio/gfileiostream.override68
-rw-r--r--gio/gfileoutputstream.override68
-rw-r--r--gio/gicon.override310
-rw-r--r--gio/ginputstream.override344
-rw-r--r--gio/gio-types.defs807
-rw-r--r--gio/gio.defs7465
-rw-r--r--gio/gio.override404
-rw-r--r--gio/giomodule.c205
-rw-r--r--gio/giostream.override68
-rw-r--r--gio/gmemoryinputstream.override91
-rw-r--r--gio/gmemoryoutputstream.override45
-rw-r--r--gio/gmount.override454
-rw-r--r--gio/goutputstream.override292
-rw-r--r--gio/gresolver.override312
-rw-r--r--gio/gsocket.override575
-rw-r--r--gio/gvolume.override237
-rw-r--r--gio/gvolumemonitor.override94
-rw-r--r--gio/pygio-utils.c208
-rw-r--r--gio/pygio-utils.h49
-rw-r--r--gio/unix-types.defs55
-rw-r--r--gio/unix.defs475
-rw-r--r--gio/unix.override62
-rw-r--r--gio/unixmodule.c52
-rw-r--r--glib/Makefile.am59
-rw-r--r--glib/Makefile.in787
-rw-r--r--glib/__init__.py25
-rw-r--r--glib/glibmodule.c896
-rw-r--r--glib/option.py350
-rw-r--r--glib/pygiochannel.c740
-rw-r--r--glib/pygiochannel.h29
-rw-r--r--glib/pyglib-private.h46
-rw-r--r--glib/pyglib-python-compat.h120
-rw-r--r--glib/pyglib.c577
-rw-r--r--glib/pyglib.h94
-rw-r--r--glib/pygmaincontext.c99
-rw-r--r--glib/pygmaincontext.h40
-rw-r--r--glib/pygmainloop.c354
-rw-r--r--glib/pygmainloop.h36
-rw-r--r--glib/pygoptioncontext.c312
-rw-r--r--glib/pygoptioncontext.h37
-rw-r--r--glib/pygoptiongroup.c270
-rw-r--r--glib/pygoptiongroup.h40
-rw-r--r--glib/pygsource.c723
-rw-r--r--glib/pygsource.h39
-rw-r--r--glib/pygspawn.c263
-rw-r--r--glib/pygspawn.h32
-rw-r--r--gobject/Makefile.am67
-rw-r--r--gobject/Makefile.in747
-rw-r--r--gobject/__init__.py117
-rw-r--r--gobject/constants.py83
-rw-r--r--gobject/ffi-marshaller.c194
-rw-r--r--gobject/ffi-marshaller.h31
-rw-r--r--gobject/gobjectmodule.c2659
-rw-r--r--gobject/propertyhelper.py298
-rw-r--r--gobject/pygboxed.c228
-rw-r--r--gobject/pygboxed.h27
-rw-r--r--gobject/pygenum.c356
-rw-r--r--gobject/pygenum.h27
-rw-r--r--gobject/pygflags.c491
-rw-r--r--gobject/pygflags.h27
-rw-r--r--gobject/pygi-external.h67
-rw-r--r--gobject/pyginterface.c122
-rw-r--r--gobject/pyginterface.h40
-rw-r--r--gobject/pygobject-private.h229
-rw-r--r--gobject/pygobject.c2326
-rw-r--r--gobject/pygobject.h636
-rw-r--r--gobject/pygparamspec.c397
-rw-r--r--gobject/pygparamspec.h31
-rw-r--r--gobject/pygpointer.c193
-rw-r--r--gobject/pygpointer.h27
-rw-r--r--gobject/pygtype.c1779
-rw-r--r--gobject/pygtype.h28
-rwxr-xr-xinstall-sh520
-rwxr-xr-xltmain.sh8406
-rw-r--r--m4/as-ac-expand.m440
-rw-r--r--m4/jhflags.m421
-rw-r--r--m4/libtool.m47360
-rw-r--r--m4/ltoptions.m4368
-rw-r--r--m4/ltsugar.m4123
-rw-r--r--m4/ltversion.m423
-rw-r--r--m4/lt~obsolete.m492
-rw-r--r--m4/python.m4257
-rwxr-xr-xmissing376
-rw-r--r--packaging/pygobject-rpmlintrc3
-rw-r--r--packaging/pygobject.changes2
-rw-r--r--packaging/pygobject.spec119
-rwxr-xr-xpy-compile146
-rw-r--r--pygobject-2.0-uninstalled.pc.in19
-rw-r--r--pygobject-2.0.pc.in22
-rw-r--r--pygobject_postinstall.py72
-rw-r--r--pygtk.py95
-rwxr-xr-xsetup.py272
-rw-r--r--tests/Makefile.am63
-rw-r--r--tests/Makefile.in569
-rw-r--r--tests/common.py48
-rw-r--r--tests/runtests.py44
-rw-r--r--tests/test-floating.c95
-rw-r--r--tests/test-floating.h60
-rw-r--r--tests/test-thread.c64
-rw-r--r--tests/test-thread.h22
-rw-r--r--tests/test-unknown.c113
-rw-r--r--tests/test-unknown.h40
-rw-r--r--tests/test_gicon.py111
-rw-r--r--tests/test_gio.py1137
-rw-r--r--tests/test_gobject.py29
-rw-r--r--tests/test_interface.py45
-rw-r--r--tests/test_mainloop.py53
-rw-r--r--tests/test_properties.py376
-rw-r--r--tests/test_signal.py393
-rw-r--r--tests/test_source.py100
-rw-r--r--tests/test_subprocess.py27
-rw-r--r--tests/test_unknown.py15
-rw-r--r--tests/testhelpermodule.c679
-rw-r--r--tests/testmodule.py21
301 files changed, 130126 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..4a37fe3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,8 @@
+Original Authors
+James Henstridge <james@daa.com.au>
+Johan Dahlin <johan@gnome.org>
+
+Current Maintainers
+Gustavo J A M Carneiro <gjc@gnome.org>
+Paul Pogonyshev <pogonyshev@gmx.net>
+Gian Mario Tagliaretti <gianmt@gnome.org>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..ae23fcf
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..fa99267
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2329 @@
+commit a7fa8b80406227a06cf18f8675dbc1f471283829
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 21 18:10:32 2010 +0200
+
+ Update NEWS and release PyGObject-2.21.3
+
+ NEWS | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 79acac7b86ec52cd3681d94d7f116314c3f00167
+Author: Ludovic L'Hours <ludovic.lhours@gmail.com>
+Date: Tue Jul 21 16:28:34 2009 +0200
+
+ Proper handling of null-ok in virtual methods
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=589253
+
+ codegen/codegen.py | 2 ++
+ codegen/reversewrapper.py | 18 +++++++++++++++---
+ 2 files changed, 17 insertions(+), 3 deletions(-)
+
+commit 259a4b08f009aa01451caed20dbb6e68b402da2a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 21 17:34:54 2010 +0200
+
+ Add *~ and *.orig to .gitignore
+
+ .gitignore | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 00a85f6a844714d1715e2f67431747d1a4cdacb1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 21 17:33:56 2010 +0200
+
+ Fall back to use the floating references API in glib if there isn't
+ a sinkfunc defined.
+
+ * tests/*: Add ref counting tests for floating objects
+ * gobject/gobjectmodule.c, gobject/pygobject.c: Fall back to
+ g_object_ref_sink
+ or g_object_ref if there isn't a sinkfunc defined. Make sure that
+ pygobject_sink gets called only once per GObject instance.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=583909
+
+ gobject/gobjectmodule.c | 2 -
+ gobject/pygobject.c | 50 +++++++++++++--------
+ gobject/pygobject.h | 1 +
+ tests/Makefile.am | 2 +
+ tests/test-floating.c | 95 ++++++++++++++++++++++++++++++++++++++++
+ tests/test-floating.h | 60 +++++++++++++++++++++++++
+ tests/test_gobject.py | 19 ++++++++-
+ tests/testhelpermodule.c | 109
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 8 files changed, 315 insertions(+), 23 deletions(-)
+
+commit e71238a699ae783fd1a59c8a76e3555d8066cf82
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 21 13:06:13 2010 +0200
+
+ Revert "Drop sinkfuncs."
+
+ This reverts commit 04627488220b4f2a16e11f8982af7866fea9f7eb.
+
+ gobject/gobjectmodule.c | 3 ++-
+ gobject/pygobject.c | 42 ++++++++++++++++++++++++++++++++++--------
+ gobject/pygobject.h | 1 -
+ 3 files changed, 36 insertions(+), 10 deletions(-)
+
+commit ec8d148eccbb3714093f21b595ea77ae4c7c3bce
+Author: Johan Dahlin <johan@gnome.org>
+Date: Sun Jun 20 10:49:55 2010 -0300
+
+ [giounix] Make it possible to compile on glib 2.20
+
+ gio/unix.override | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 433ee2aa029a1482961f478252a06492bd3498e6
+Author: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
+Date: Tue Jun 15 11:42:28 2010 +0200
+
+ Release the lock when potentially invoking Python code.
+
+ * gobject/pygobject.c: Release GIL lock when retrieving properties
+ and when clearing a PyGObject.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=530935
+
+ gobject/pygobject.c | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit d182630e1128fef6f1c2aea28ccd8da4bddd2c8f
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Thu Jun 10 20:23:13 2010 +0200
+
+ Post release version bump to 2.21.3
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c4e64d5d264593051b9a3131e4985a58e8e76f8b
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Thu Jun 10 20:21:13 2010 +0200
+
+ Update NEWS and release PyGObject-2.21.2
+
+ NEWS | 26 ++++++++++++++++++++++++++
+ 1 files changed, 26 insertions(+), 0 deletions(-)
+
+commit e0fe844d5fe8f7e26316f197444fd4143ed36adf
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Thu Jun 10 20:09:07 2010 +0200
+
+ Remove deleted files from the Makefile.
+
+ test_conversion.py
+ test_enum.py
+ test_gtype.py
+ test_subtype.py
+
+ tests/Makefile.am | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 495a301cb81c5e914bcef905999265604faa27fc
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Thu Jun 10 19:39:09 2010 +0200
+
+ Add myself to the maintainers list in the README
+
+ README | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 04627488220b4f2a16e11f8982af7866fea9f7eb
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Thu Jun 10 19:24:31 2010 +0200
+
+ Drop sinkfuncs.
+
+ * use g_object methods to sink floating refs instead of allowing
+ custom sink functions to be registered
+ * we now sink inside of pygobject_new_full to handle cases where
+ a library creates its own gobject via g_object_new and just
+ needs a python wrapper
+ - a previous patch had done the sink when creating the gobject,
+ since it needs to call pygobject_new_full to wrap the object,
+ this patch handles both cases (e.g. pygobject created object
+ and externally created gobject)
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=583909
+
+ gobject/gobjectmodule.c | 3 +--
+ gobject/pygobject.c | 42 ++++++++----------------------------------
+ gobject/pygobject.h | 1 +
+ 3 files changed, 10 insertions(+), 36 deletions(-)
+
+commit 87774a17bd607724a56e18c2eb1ac71b04b7079d
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Tue Jun 8 10:40:39 2010 +0200
+
+ Add myself to maintainers
+
+ MAINTAINERS | 4 ++++
+ pygobject.doap | 7 +++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 46c91a11d448e5e11d142d3362aff1483226bca4
+Author: Colin Walters <walters@verbum.org>
+Date: Wed May 5 13:54:27 2010 -0400
+
+ Clear error if we failed the import
+
+ Otherwise we leave the exception set which causes bizarre problems
+ later in unrelated code.
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=569885
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=617796
+
+ gobject/pygi-external.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit e203dc7c8f524c16aa52e15758dc3a2b09fbac75
+Author: John Ehresman <jpe@wingware.com>
+Date: Tue Apr 20 20:40:02 2010 -0400
+
+ Added missing , to keyword list of gio.GFile.set_attribute
+
+ gio/gresolver.override | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0b222f01ac9ceea1d127083623ad532ecc75bf7e
+Author: John Ehresman <jpe@wingware.com>
+Date: Tue Apr 20 20:37:12 2010 -0400
+
+ Fix arg conversion in gio.GFile.set_attribute
+
+ gio/gfile.override | 232
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 227 insertions(+), 5 deletions(-)
+
+commit a579ccc8bea90937bf970be3d461e2b650b0c7d6
+Author: John Ehresman <jpe@wingware.com>
+Date: Tue Apr 20 20:01:53 2010 -0400
+
+ Set constants under python 2.5 or before
+
+ gobject/gobjectmodule.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 11fa39a861abf679e01b5f0da97be93ae0adf0f0
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Sun Apr 18 20:22:21 2010 -0400
+
+ Doc Extractor: Use replacements that make sense for &...;
+ expressions.
+
+ * codegen/docextract_to_xml.py: Use &#35; and &#160; respectively
+ for
+ &num; (#) and &nbsp;. These are interpreted correctly in XML
+ and will
+ not make the parsing crash.
+
+ codegen/docextract_to_xml.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 695ac7bc5c60371a32538d690c7a15509f3c9637
+Author: John Stowers <john.stowers@gmail.com>
+Date: Fri Apr 16 14:36:11 2010 +1200
+
+ Add build docs for windows
+
+ Makefile.am | 1 +
+ README.win32 | 24 ++++++++++++++++++++++++
+ 2 files changed, 25 insertions(+), 0 deletions(-)
+
+commit e580da87f0b2fd36cb5d8008fb2fb0c3b01f456a
+Author: John Stowers <john.stowers@gmail.com>
+Date: Thu Apr 15 13:40:39 2010 +1200
+
+ Setup.py cosmetic tidy
+
+ * Remove local doc install, point to website instead
+ * link to versioned docs
+
+ pygobject_postinstall.py | 43
+ ++++++++++++++++++++++++++-----------------
+ setup.py | 39 ++++++++++++++-------------------------
+ 2 files changed, 40 insertions(+), 42 deletions(-)
+
+commit 69ecd506c83ddf180c6cc9a2a8dc753a02543959
+Author: John Stowers <john.stowers@gmail.com>
+Date: Sat Jul 25 14:12:30 2009 +1200
+
+ Fix crash when importing gio
+
+ Only seems to be necessary on windows, but
+ no harm on linux as multiple calls to init
+ are OK
+
+ gio/giomodule.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5d159a13d89587cba189a0ca3203ac003e2f1f2b
+Author: John Stowers <john.stowers@gmail.com>
+Date: Thu Apr 15 22:52:48 2010 +1200
+
+ Bug 589671 - Dont use generate-constants
+
+ This breaks the build using distutils, and it is
+ largely unneeded. Just add the G_XXX constants
+ to the module directly
+
+ gobject/Makefile.am | 16 +--------
+ gobject/constants.py | 83
+ ++++++++++++++++++++++++++++++++++++++++++
+ gobject/constants.py.in | 50 -------------------------
+ gobject/generate-constants.c | 44 ----------------------
+ gobject/gobjectmodule.c | 35 ++++++++++++++++++
+ setup.py | 2 +-
+ tests/runtests.py | 3 +-
+ 7 files changed, 121 insertions(+), 112 deletions(-)
+
+commit 6d7a3ab9ce352692d0faccbf106974d264fa953d
+Author: John Stowers <john.stowers@gmail.com>
+Date: Thu Apr 15 22:49:17 2010 +1200
+
+ Bug 589671 - Fix setup.py for windows build
+
+ * Building pyglib as a static private library
+ * Update to include new defs
+ * Modernise setup.py and add more util functions
+ to dsextras
+
+ dsextras.py | 32 ++++++++++++++++--
+ setup.py | 102
+ ++++++++++++++++++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 116 insertions(+), 18 deletions(-)
+
+commit d11ef47072acae5801ce25c68d1289e425eb9fc2
+Author: John Stowers <john.stowers@gmail.com>
+Date: Thu Apr 15 22:48:28 2010 +1200
+
+ Include pygsource.h
+
+ glib/pygiochannel.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 681832c3cd040433a488a400693b68f213bf7078
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Tue Apr 13 13:33:12 2010 -0400
+
+ codegen/docextract_to_xml.py: One more &...; replacement (&nbsp;).
+
+ * codegen/docextract_to_xml.py: Replace &nbsp; which also causes
+ errors with a regular space.
+
+ codegen/docextract_to_xml.py | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit bd4e7f2459e34957aaae59b9be807d6dff5ec1eb
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Tue Apr 13 12:28:10 2010 -0400
+
+ codegen/docextract_to_xml.py: Replace some &..; that cause errors.
+
+ * codegen/docextract_to_xml.py (escape_text): Replace some &..;
+ expressions that cause errors with more appropriate output.
+
+ codegen/docextract_to_xml.py | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit f00b9ce91fc9c3aabd4af4132fc112d9e415e12e
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Sun Apr 11 17:46:40 2010 -0400
+
+ codegen/docextract_to_xml.py: Handle C++ multi-line comments.
+
+ * codegen/docextract_to_xml.py (escape_text): Translate '/*'
+ and '*/'
+ in text to '/ *' and '* /' respectively so that comment errors
+ don't
+ show up when the descriptions that include C++ code with C++
+ multi-line comments are used in Doxygen blocks.
+
+ codegen/docextract_to_xml.py | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit a2fcdecbb5e109da5568084d7acb2332af83b6f5
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Sun Apr 11 16:15:01 2010 -0400
+
+ codegen/docextract.py: Stop final section processing on first
+ match.
+
+ * codegen/docextract.py (process_final_sections): Modify the final
+ section pattern matching for loop to stop on first match so
+ that it
+ doesn't match both a colon return ('Returns: ...') and a no colon
+ return ('Returns ...') which leads to annotation extraction
+ errors.
+
+ codegen/docextract.py | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 825fd305f03b726665edca34963978ce27448182
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Sun Apr 11 15:45:09 2010 -0400
+
+ Update doc extraction tool to handle GObjectIntrospection
+ annotations.
+
+ * codegen/docextract.py (FunctionDoc): Renamed class to GtkDoc.
+ (GtkDoc::annotations): Added a list field to store annotations
+ which
+ are 2-tuples of (name, value).
+ (GtkDoc::ret): Modified field to store the return description
+ along
+ with a list of annotations as described above.
+ (GtkDoc::params): Now holds a list of 3-tupples: name,
+ description and
+ annotations (as described above).
+ (GtkDoc::block_type): Add a field to tell if the comment block
+ is a
+ function block, signal block or property block.
+ (GtkDoc::set_type):
+ (GtkDoc::get_type): Add methods for setting/getting the block
+ type.
+ (GtkDoc::add_param): Modified to also accept a list of
+ annotations to
+ be added with the parameter.
+ (GtkDoc::add_annotation):
+ (GtkDoc::get_annotations): Added methods to add/get annotations
+ for
+ the comment block.
+ (GtkDoc::append_description): Renamed to append_to_description().
+ (GtkDoc::get_param_description): Removed unused method.
+ (GtkDoc::get_description): Added method to get block description.
+ (GtkDoc::add_return): Added method to add a return accepting
+ the first
+ line of the description and its annotations.
+ (GtkDoc::append_return): Renamed to append_to_return().
+ (Regular expressions):
+ - Made the names of the variables un-abbreviated.
+
+ - Added 'since', 'deprecated' and 'rename to' regular
+ expressions.
+
+ - Modified the return matching regular expression so that
+ it doesn't
+ match descriptions that begin with 'Returns ...'.
+ This improves
+ the docs of many function.
+
+ - Added signal and property comment block identifier matching
+ regular
+ expressions in case those are useful.
+
+ - Modified existing identifier matching regular expressions
+ (function,
+ signal, and property regular expressions) to properly parse
+ annotations. Also added a regular expression for extracting
+ annotations from the parameter and return descriptions.
+
+ - Refined the function name matching regular expression to
+ only accept
+ identifiers that begin with a lowercase letter. This eliminates
+ 'SECTION:' matches.
+
+ - Finally, grouped commonly related expressions like
+ return_pattern,
+ since_pattern, etc. into groups (in lists) so that matching
+ those
+ sections can be done using loops.
+
+ (Parsing algorithm): Modified the algorithm to use a functional
+ approach to parsing. Extra methods like skip_to_comment() and
+ processs_params() have been added and used in the parse_file()
+ function to now process the comment blocks.
+ (parse_dir): Added file processing output to stderr.
+ * codegen/docextract_to_xml.py (usage): Added function to
+ print out
+ the usage.
+ (print_annotations): Added function to print the given list of
+ annotations.
+ (options): Added --with-signals (-i), with-properties (-p) and
+ --with-annotation (-a) to the existing --source-dir (-s) option.
+
+ (algorithm): Now prints annotations, if specified. Also, prints
+ signals and properties correctly (using names like
+ Class::signal-one
+ for signals and Classs:property) with xml such as <signal
+ name="...">...</signal>. The return xml is slightly modified with
+ annotations but this would only be exhibited if annotation xml is
+ requested.
+
+ codegen/docextract.py | 439
+ +++++++++++++++++++++++++++++++++---------
+ codegen/docextract_to_xml.py | 87 ++++++--
+ 2 files changed, 414 insertions(+), 112 deletions(-)
+
+commit e9f7fd414e94595e40eb1ba0fc471ca69136d82f
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date: Thu Apr 8 11:52:25 2010 +0200
+
+ Docs: replace gio.IO_ERROR_* with gio.ERROR_*
+
+ Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+
+ docs/reference/pygio-file.xml | 58
+ +++++++++++++++++-----------------
+ docs/reference/pygio-inputstream.xml | 22 ++++++------
+ docs/reference/pygio-mount.xml | 10 +++---
+ 3 files changed, 45 insertions(+), 45 deletions(-)
+
+commit 4cbd9941c5705970a9f7a429e236e1203d3155a1
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Apr 5 18:10:42 2010 +0200
+
+ Bug 613341 - pygobject tests seem to require pygtk causing a circular
+ dependencies problem
+
+ move tests that require pygtk to pygtk itself
+
+ tests/test_conversion.py | 83 -------------
+ tests/test_enum.py | 234 -------------------------------------
+ tests/test_gtype.py | 112 ------------------
+ tests/test_subtype.py | 289
+ ----------------------------------------------
+ 4 files changed, 0 insertions(+), 718 deletions(-)
+
+commit 23fc0f615d87994acafd9d39e92dd92b587fc2eb
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Thu Jan 21 17:30:51 2010 +0100
+
+ Don't raise an error in _pygi_import if pygi support is disabled
+
+ http://bugzilla.gnome.org/show_bug.cgi?id=607674
+
+ gobject/pygboxed.c | 6 +-----
+ gobject/pygi-external.h | 1 -
+ gobject/pygobject.c | 6 +-----
+ gobject/pygpointer.c | 6 +-----
+ 4 files changed, 3 insertions(+), 16 deletions(-)
+
+commit 289d641775d1ea52d2a5379126b70b7fcee46683
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date: Sun Jan 10 21:01:59 2010 +0100
+
+ Initialize PyGPollFD_Type.fd_obj to NULL
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=606582
+
+ gio/gcancellable.override | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 4e2efa91d101bf755739e1cca8eee41eb0ad20fd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jan 4 08:35:14 2010 +0100
+
+ Bug 605937 - pygobject: Makefile.am sets $TMPDIR, disrupting distcc
+
+ Committed a patch from Kevin Pyle
+
+ Makefile.am | 27 +++++++++++++--------------
+ 1 files changed, 13 insertions(+), 14 deletions(-)
+
+commit 284a1e1c0143c95d3007cf58e6c248b5d11fb4d1
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun Jan 3 11:02:57 2010 +0100
+
+ Wrap gio.Cancellable.make_pollfd() and add a test
+
+ gio/Makefile.am | 1 +
+ gio/gcancellable.override | 37 +++++++++++++++++++++++++++++++++++++
+ gio/gio.override | 3 +++
+ tests/test_gcancellable.py | 15 +++++++++++++++
+ 4 files changed, 56 insertions(+), 0 deletions(-)
+
+commit 82d7bcbf37200ee2ef5892dd12bebd2f39965c56
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jan 2 23:15:56 2010 +0100
+
+ Make cancellable an optional parameter in many methods
+
+ gio/gio.defs | 102
+ +++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 51 insertions(+), 51 deletions(-)
+
+commit 49a078cd22d55dc33a03ecfda235d63955edc741
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jan 2 23:15:21 2010 +0100
+
+ Post release version bump to 2.21.2
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4f9f1f43ab4e2cfb204ffa0e257a34cfd95d84e2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jan 2 22:58:36 2010 +0100
+
+ Update NEWS and release PyGObject-2.21.1
+
+ NEWS | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 55 insertions(+), 0 deletions(-)
+
+commit c1f34be73bd186d7b4682dfef133da2c4229d213
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 20:25:35 2010 +0100
+
+ Wrap gio.Volume.eject_with_operation()
+
+ gio/gvolume.override | 54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 9b76fbff6f6897aaf26ed4644c1f19efc2826917
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 20:22:21 2010 +0100
+
+ gio.Mount.unmount_with_operation() fix a copy/paste leftover
+
+ gio/gmount.override | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6f459786dd641cd49d81eba403d940620f961cab
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 20:21:05 2010 +0100
+
+ Wrap gio.Mount.eject_with_operation()
+
+ gio/gmount.override | 54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit d4b5d1b4839364e5676eb2da28f1d21db7e2552d
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 20:15:38 2010 +0100
+
+ Wrap gio.Mount.unmount_mountable_with_operation()
+
+ gio/gmount.override | 54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit e919d47c2430451b436cec955e9b99237f97028c
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 18:22:46 2010 +0100
+
+ Wrap File.unmount_mountable_with_operation()
+
+ gio/gfile.override | 54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 5a614df9c5507d67f240462f7bf71b4cd411addf
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 18:14:11 2010 +0100
+
+ Wrap gio.File.stop_mountable()
+
+ gio/gfile.override | 52
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit 6af506647f36f2b825bc6556df5ee57fa7721906
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 18:10:49 2010 +0100
+
+ Wrap gio.File.start_mountable()
+
+ gio/gfile.override | 52
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit e700efc839fc0b651fc9794a1611190bffa80263
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 18:02:46 2010 +0100
+
+ Wrap gio.File.replace_readwrite_async()
+
+ gio/gfile.override | 55
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 55 insertions(+), 0 deletions(-)
+
+commit 92662f129fc728258fd5e34f53dcb081e3715017
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 17:00:26 2010 +0100
+
+ Wrap gio.File.poll_mountable()
+
+ gio/gfile.override | 41 +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 41 insertions(+), 0 deletions(-)
+
+commit 99902b786500948c3278779841e4db54223b9256
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 16:56:26 2010 +0100
+
+ Wrap gio.File.open_readwrite_async()
+
+ gio/gfile.override | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 44 insertions(+), 0 deletions(-)
+
+commit 8cff5d53183ae81364ac74a34a1d52e55e082eb4
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 16:50:15 2010 +0100
+
+ Wrap gio.File.eject_mountable_with_operation()
+
+ gio/gfile.override | 54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit ca436fe7785fd24b0f0e65f2f8c9fa6478277682
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 13:30:24 2010 +0100
+
+ Wrap gio.File.create_readwrite_async() and add a test
+
+ gio/gfile.override | 51
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gio.py | 24 ++++++++++++++++++++++++
+ 2 files changed, 75 insertions(+), 0 deletions(-)
+
+commit f72c5e451dfaeb01b3c3d9243fed2732d3620462
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 13:20:11 2010 +0100
+
+ Wrap gio.Drive.stop()
+
+ gio/gdrive.override | 52
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit 29043bade408338cefa13fb4b0c875aabd3ef05e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 13:00:42 2010 +0100
+
+ Wrap gio.Drive.start()
+
+ gio/gdrive.override | 52
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit dff374287bbecc8af782bbc726fad86c6c867754
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 12:45:29 2010 +0100
+
+ Add more remainders on missing methods of gio.Socket and related types
+
+ gio/gsocket.override | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit b8c7e996498bd72df551011af85ff05ef7335b4f
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 12:41:08 2010 +0100
+
+ Wrap gio.SocketListener.accept_socket_async|finish() and add a test
+
+ gio/gsocket.override | 86
+ +++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py | 24 +++++++++++++
+ 2 files changed, 108 insertions(+), 2 deletions(-)
+
+commit a5ae2d5ba3db34967fe07a3cc97b75df2793988c
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 12:28:53 2010 +0100
+
+ Wrap gio.SocketListener.accept_finish() and add a test
+
+ gio/gsocket.override | 44 ++++++++++++++++++++++++++++++++++++++++++--
+ tests/test_gsocket.py | 24 ++++++++++++++++++++++++
+ 2 files changed, 66 insertions(+), 2 deletions(-)
+
+commit a5ab26cc1bb3e9dd57e2fdb26ef5c02e8066d097
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 11:19:34 2010 +0100
+
+ Wrap gio.SocketListener.accept_async()
+
+ gio/gsocket.override | 42 ++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 42 insertions(+), 0 deletions(-)
+
+commit c9496b29ef9ef232020a4044577d2947353953a5
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jan 1 11:14:35 2010 +0100
+
+ Wrap gio.SocketListener.accept_socket() and add a test
+
+ gio/gsocket.override | 48
+ +++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py | 13 +++++++++++++
+ 2 files changed, 60 insertions(+), 1 deletions(-)
+
+commit 1aa5e301c49f11e1c5ef58de44b4b03f714d1a70
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 16:35:18 2009 +0100
+
+ Wrap gio.SocketListener.accept() and add a test
+
+ gio/gsocket.override | 46
+ +++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py | 13 +++++++++++++
+ 2 files changed, 58 insertions(+), 1 deletions(-)
+
+commit aaedcf166c78baf5449ef59d0ade4a29077fedc7
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 16:25:33 2009 +0100
+
+ Make cancellable optional in gio.SocketClient.connect_to_host()
+
+ gio/gio.defs | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3829d7667b19126fb74562b28d271e616b154c99
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 15:25:10 2009 +0100
+
+ Wrap gio.SocketListener.add_address() and add a test
+
+ gio/gsocket.override | 57
+ ++++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py | 9 +++++++
+ 2 files changed, 65 insertions(+), 1 deletions(-)
+
+commit 5bec72f34ea75bc56158cae5c39d61a2a4e7e601
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 10:19:47 2009 +0100
+
+ Add more remainders on missing methods of gio.Socket and related types
+
+ gio/gsocket.override | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit b08b20f2b1a57bcbf400d6fe8e87cf052bdb719d
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 10:16:18 2009 +0100
+
+ Wrap gio.SocketClient.connect_to_service_async()
+
+ gio/gsocket.override | 47
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 47 insertions(+), 0 deletions(-)
+
+commit 116ea1bfe32946e67aa54eb8dc7b977e57f254c2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 10:10:43 2009 +0100
+
+ Wrap gio.SocketClient.connect_to_host_async()
+
+ gio/gsocket.override | 48
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 9c930910505d5b9001b8cec17ff98fadeaa799e2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 31 09:59:46 2009 +0100
+
+ Wrap gio.SocketClient.connect_async()
+
+ gio/gsocket.override | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 45 insertions(+), 0 deletions(-)
+
+commit dff024256295c15e49888ad9d5fef74a7746edd7
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 23:44:25 2009 +0100
+
+ Wrap gio.SocketAddressEnumerator.next_async() and add a test
+
+ gio/gsocket.override | 42 ++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gsocket.py | 16 ++++++++++++++++
+ 2 files changed, 58 insertions(+), 0 deletions(-)
+
+commit e2330bd0d6cbc49b0ecb27b30e3b0593935ce229
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 23:43:14 2009 +0100
+
+ Add a missing object gio.InetSocketAddress new in GIO 2.22
+
+ gio/gio-types.defs | 7 +++++++
+ gio/gio.defs | 31 +++++++++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+), 0 deletions(-)
+
+commit 6040b33467ea381c6cb02f6a5efc0745fa8fa47b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 22:54:47 2009 +0100
+
+ Make cancellable optional for gio.SocketAddressEnumerator.next()
+
+ gio/gio.defs | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b19f59790b9de943d69b6c5e483928e0443c3d20
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 22:17:44 2009 +0100
+
+ Add a remainder of the Socket methods that needs manual wrapping still
+
+ gio/gsocket.override | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 771a7c3fdef7b2e98e509293a8376a81c1282286
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 17:20:35 2009 +0100
+
+ Wrap gio.Socket.condition_wait() and add a test
+
+ gio/gsocket.override | 27 +++++++++++++++++++++++++++
+ tests/test_gsocket.py | 6 +++++-
+ 2 files changed, 32 insertions(+), 1 deletions(-)
+
+commit 50960656815b0897a5ebe5f011537b8dcbdc857e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 16:21:49 2009 +0100
+
+ Wrap gio.Socket.condition_check() and add a test
+
+ gio/Makefile.am | 1 +
+ gio/gio.override | 1 +
+ gio/gsocket.override | 41 +++++++++++++++++++++++++++++++++++++++++
+ tests/test_gsocket.py | 21 +++++++++++++++++++++
+ 4 files changed, 64 insertions(+), 0 deletions(-)
+
+commit de7a359e81792ae8573ac944455ea289985449ed
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 14:07:52 2009 +0100
+
+ Wrap gio.Resolver.lookup_service_finish() and add a test
+
+ gio/gresolver.override | 37 +++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py | 13 +++++++++++++
+ 2 files changed, 50 insertions(+), 0 deletions(-)
+
+commit 308421789ce849040d645077c41c80b6e2e65e83
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 14:00:22 2009 +0100
+
+ Wrap gio.Resolver.lookup_service_async()
+
+ gio/gresolver.override | 48
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 9d56ce775f56fff1b1ef3c75843c0583e39f75c3
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Dec 30 11:11:32 2009 +0100
+
+ Wrap gio.Resolver.lookup_service() and add a test
+
+ gio/gresolver.override | 42 ++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py | 5 +++++
+ 2 files changed, 47 insertions(+), 0 deletions(-)
+
+commit 7fc71f490494dae73a5264869a97a9d30814930e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 22:12:50 2009 +0100
+
+ Wrap gio.Resolver.lookup_by_address_async() and add a test
+
+ gio/gresolver.override | 46
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py | 14 ++++++++++++++
+ 2 files changed, 60 insertions(+), 0 deletions(-)
+
+commit c91656dbe56f07d3ebbad5113467c22427cf212a
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 21:41:30 2009 +0100
+
+ Wrap gio.Resolver.lookup_by_name_finish() and add a test
+
+ gio/gresolver.override | 82
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py | 16 ++++++++-
+ 2 files changed, 96 insertions(+), 2 deletions(-)
+
+commit 45b477342fa1c2435917c6d97745ad57665c4734
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 17:15:44 2009 +0100
+
+ Wrap gio.Drive.eject_with_data()
+
+ gio/gdrive.override | 54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 635227480f9659a1f91ab1ec12536d3ed012a976
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 17:06:52 2009 +0100
+
+ Deprecate old gio.Drive methods
+
+ gio/gdrive.override | 7 ++++++-
+ gio/gio.defs | 1 +
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 3c0cbc95af29b1e192ed4b5963e96e39c70b349c
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 13:51:54 2009 +0100
+
+ Small fix in the header
+
+ gio/gdrive.override | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7589128515b79d836365247dc876538c6352da23
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 12:40:50 2009 +0100
+
+ Wrap gio.Resolver.lookup_by_name() and add a couple of tests
+
+ gio/Makefile.am | 1 +
+ gio/gio.override | 1 +
+ gio/gresolver.override | 57
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py | 21 +++++++++++++++++
+ 4 files changed, 80 insertions(+), 0 deletions(-)
+
+commit 604d2bf220b1fefa415baaedbdb2882dbaf9e07e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 12:39:13 2009 +0100
+
+ Make cancellable an optional parameter in
+ gio.Resolver.lookup_by_address()
+
+ gio/gio.defs | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 00029145f4cd10759b37b38fb9f72435bf26b28b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 10:15:14 2009 +0100
+
+ Strip g_ prefix for many other functions
+
+ gio/gio.defs | 94
+ +++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 47 insertions(+), 47 deletions(-)
+
+commit 56d5dfc4fd862e32c19f944a0feb7a00a9154f06
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 10:12:53 2009 +0100
+
+ Strip g_prefix from InetAddress functions
+
+ gio/gio.defs | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1d360301d51a587a36a59f5d62e354484bbd2b31
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 10:03:59 2009 +0100
+
+ Fix function name gio.resolver_get_default()
+
+ Strip the g_ prefix from function name
+
+ gio/gio.defs | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0fe00109c4f6fc27cbaae9b0a24ecfac71355d2f
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Dec 29 09:54:05 2009 +0100
+
+ Wrap gio.FileIOStream.query_info_async() and add a test
+
+ gio/Makefile.am | 1 +
+ gio/gfileiostream.override | 68
+ ++++++++++++++++++++++++++++++++++++++++++++
+ gio/gio.override | 1 +
+ tests/test_gio.py | 18 +++++++++++
+ 4 files changed, 88 insertions(+), 0 deletions(-)
+
+commit 86783c695f3641b9491962e8f95a4dcb91f4017c
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date: Tue Dec 29 13:08:29 2009 +0100
+
+ Register enums and flags in PyGI if needed
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=603534
+
+ gobject/pygenum.c | 20 ++++++++++++++------
+ gobject/pygflags.c | 19 +++++++++++++------
+ 2 files changed, 27 insertions(+), 12 deletions(-)
+
+commit b90c01cff5ff5cb2796182f2ffd7b5248eaeed6a
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Dec 28 22:41:54 2009 +0100
+
+ Wrap GIOStream.close_async() and add a test
+
+ gio/Makefile.am | 1 +
+ gio/gio.override | 1 +
+ gio/giostream.override | 68
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gio.py | 21 +++++++++++++++
+ 4 files changed, 91 insertions(+), 0 deletions(-)
+
+commit 0bff01bcee73a0e0d18342331136119c4e8bf151
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Dec 28 22:39:09 2009 +0100
+
+ Make cancellable an optional parameter in GFile.create_readwrite()
+
+ gio/gio.defs | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1cabd733cde269ce3164834933f4a226673ecb0b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Dec 28 21:39:50 2009 +0100
+
+ Remove a duplicate entry in gio.defs
+
+ gio/gio.defs | 9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 9ac372ad0bcfdec4bb1c96bc152246542a59a9b1
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Dec 28 21:37:49 2009 +0100
+
+ Wrap gio.FileInfo.set_modification_time and add a test
+
+ gio/gfileinfo.override | 33 ++++++++++++++++++++++++++++++++-
+ tests/test_gio.py | 7 ++++++-
+ 2 files changed, 38 insertions(+), 2 deletions(-)
+
+commit 7bc2673f92138b1804d8eba091942d14d8884f90
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Dec 28 18:28:03 2009 +0100
+
+ Wrap gio.EmblemedIcon.get_emblems() and add a test
+
+ gio/gicon.override | 14 ++++++++++++++
+ tests/test_gicon.py | 7 +++++++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 3d5056ad766d6856d8d6459fe9b377de2f0fd172
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Dec 26 22:27:48 2009 +0100
+
+ Update Enums and Flags with new API
+
+ gio/gio-types.defs | 153
+ ++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 149 insertions(+), 4 deletions(-)
+
+commit 62a9d660a4a2d5fab1d57c6c96c984ff02d25ccd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Dec 25 18:06:39 2009 +0100
+
+ Post release version bump to 2.21.1
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2bd92cba5b028f0f78c35ecb34e648e95248f9d3
+Author: Bastian Winkler <buz@netbuz.org>
+Date: Fri Aug 14 15:10:26 2009 +0200
+
+ Fix handling of uchar in pyg_value_from_pyobject
+
+ Set the value by g_value_set_uchar and allow to use integer types
+ from python.
+
+ gobject/pygtype.c | 15 +++++++++++----
+ 1 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 867536c6734e606d045760837ed22583da06566e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Dec 18 10:50:09 2009 +0100
+
+ Update NEWS and README, release pygobject 2.21.0
+
+ NEWS | 18 ++++++++++++++++++
+ README | 6 +++---
+ 2 files changed, 21 insertions(+), 3 deletions(-)
+
+commit f50fbd24fa61863aaefa4ae1e12e0b314ecd43ae
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Dec 18 10:31:48 2009 +0100
+
+ Add pygi-external.h into Makefile SOURCES
+
+ gobject/Makefile.am | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 108c03b78f04b4bcfe066a6cb4d941e172bd32fe
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Dec 18 01:20:34 2009 +0100
+
+ Bug 598435 - No wrapping for g_find_program_in_path ()
+
+ glib/glibmodule.c | 20 ++++++++++++++++++++
+ 1 files changed, 20 insertions(+), 0 deletions(-)
+
+commit d3d5cb3a4a2c2cb2bd0c2571304d59e19bc08452
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 17 21:54:36 2009 +0100
+
+ Wrap new API added in GIO-UNIX 2.22
+
+ gio/unix-types.defs | 22 ++++++++++
+ gio/unix.defs | 115
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ gio/unix.override | 8 ++++
+ 3 files changed, 144 insertions(+), 1 deletions(-)
+
+commit c87c8a81947a68507e8f3bcaf8e0e969b3e5331b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 17 21:52:11 2009 +0100
+
+ Bump required glib version to 2.22.4
+
+ I've committed a patch to glib which will be released in the stable
+ branch.
+ Without the patch the unix module will fail, so I'm forced to bump.
+
+ configure.ac | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit b630c8d4b1e55938dac89729768c4a877b305215
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Dec 17 02:24:45 2009 +0100
+
+ Properly define Connectable as interface type and not object type
+
+ gio/gio-types.defs | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 38e89942d29f2a1dba47ab4a8d5edc84322707cd
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Mon Nov 30 00:10:56 2009 +0100
+
+ Suppress warnings about format conversion
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=603355
+
+ gobject/generate-constants.c | 32 ++++++++++++++++----------------
+ 1 files changed, 16 insertions(+), 16 deletions(-)
+
+commit e24d155dd7b4a5b9c25c054137d1370c369d3192
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date: Sat Nov 28 18:45:54 2009 +0000
+
+ Add the missing limit constants from glibconfig.h
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=603244
+
+ gobject/generate-constants.c | 17 ++++++++++++++++-
+ 1 files changed, 16 insertions(+), 1 deletions(-)
+
+commit 3a295cb7ffaaaf29c71b8833cf0ee5ec7ceaa909
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Nov 28 18:48:49 2009 +0100
+
+ Fix bad name when rebuilding the unix source module
+
+ gio/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a8cbb6fb72dbe6630d1265b18095c9a96f496b86
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Nov 28 18:47:26 2009 +0100
+
+ Wrap new API added in GIO 2.22
+
+ gio/gio-types.defs | 138 ++++
+ gio/gio.defs | 2012
+ +++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 2144 insertions(+), 6 deletions(-)
+
+commit 5c010fe673d9bd01c27c8d7d312064665275888c
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Mon Nov 23 22:39:12 2009 +0100
+
+ Remove the girepository module
+
+ Makefile.am | 2 +-
+ configure.ac | 17 -
+ girepository/Makefile.am | 54 --
+ girepository/__init__.py | 24 -
+ girepository/bank-argument.c | 379 ------------
+ girepository/bank-info.c | 1194
+ ------------------------------------
+ girepository/bank-repository.c | 236 -------
+ girepository/bank.c | 155 -----
+ girepository/bank.h | 80 ---
+ girepository/btypes.py | 300 ---------
+ girepository/importer.py | 51 --
+ girepository/module.py | 224 -------
+ girepository/overrides/Gdk.py | 14 -
+ girepository/overrides/Gtk.py | 8 -
+ girepository/repository.py | 51 --
+ tests/test_girepository.py | 386 ------------
+ 16 files changed, 1 insertions(+), 3174 deletions(-)
+
+commit d67d5afb5115c1d8294415b2e1a82af2c737ba17
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sun Nov 22 18:23:02 2009 +0200
+
+ Ignore one more file.
+
+ .gitignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 408b2186aea58a41ec26b9d0ca29ecd42df5ef7e
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sun Nov 22 18:22:23 2009 +0200
+
+ Fix wrong minimum checking in float properties
+
+ Bug #587637. Test the fix.
+
+ gobject/propertyhelper.py | 5 +++--
+ tests/test_properties.py | 6 ++++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 602afea88c338a38327cd84e08703c5daa384ec6
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Tue Nov 10 22:32:33 2009 +0200
+
+ Move threads_init() function from 'gobject' to 'glib'
+
+ Retain in original place for backward compatibility, but remove it
+ from the docs.
+
+ docs/reference/pygobject-functions.xml | 36
+ ++++++-------------------------
+ glib/glibmodule.c | 16 ++++++++++++++
+ 2 files changed, 23 insertions(+), 29 deletions(-)
+
+commit 6a69288941e65312fe82649ec72d2f21b2dc618f
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Sat Nov 7 23:42:07 2009 +0100
+
+ Create instances by calling tp_alloc rather than PyObject_NEW
+
+ PyObject_NEW calls a generic allocator and should only be called by
+ tp_new, knowing
+ that the type's free function agrees. In pyg_boxed_new, we may
+ allocate
+ PyGBoxed subtypes, so the subtype's allocation function must be
+ called instead.
+
+ gobject/pygboxed.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 000f7c36e667c6e078e3370769ea868e56a1b4ee
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Sat Nov 7 16:43:35 2009 +0100
+
+ Add capabilities to import wrappers from pygi
+
+ At instance creation for boxed and pointers, at lookup for objects,
+ when the gtype has no wrapper yet, a wrapper may be imported from
+ pygi.
+
+ The feature is turned on at configure time by --enable-pygi.
+
+ Because we couldn't create a circular build dependency, PyGI's import
+ function and
+ API definition had to be copied in this tree.
+
+ configure.ac | 8 +++++
+ gobject/pygboxed.c | 10 +++++++
+ gobject/pygi-external.h | 66
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ gobject/pygobject.c | 10 +++++++
+ gobject/pygpointer.c | 11 ++++++++
+ 5 files changed, 105 insertions(+), 0 deletions(-)
+
+commit bfd3100a580b8bea9db25b8bb7443fb8c3dbe1cc
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Sat Nov 7 13:23:53 2009 +0100
+
+ Fix girpository build setup
+
+ configure.ac | 21 ++++++----
+ girepository/Makefile.am | 13 +++---
+ m4/introspection.m4 | 92
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 111 insertions(+), 15 deletions(-)
+
+commit 421c03b1c5b69f90c778663df901b45ca3ee8ba5
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date: Fri Nov 6 19:17:36 2009 +0100
+
+ Make GType.pytype aware of the interface, enum, flags, pointer and
+ boxed wrappers
+
+ gobject/pygtype.c | 39 +++++++++++++++++++++++++++++++++------
+ 1 files changed, 33 insertions(+), 6 deletions(-)
+
+commit a9c168c58cc6a449b51653417bf3f58bdd41457c
+Author: Philippe Normad <phil@base-art.net>
+Date: Wed Oct 21 18:01:16 2009 +0200
+
+ pygmainloop: fix use of PySignal_WakeUpFD API for nested loops
+
+ Fixes bug #481569
+
+ glib/pygmainloop.c | 95
+ +++++++++++++++++++++++++++------------------------
+ 1 files changed, 50 insertions(+), 45 deletions(-)
+
+commit c6a5750379354c12e2599b3c73b4f9a23fd39114
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Sep 25 20:12:21 2009 +0200
+
+ Post release version bump to 2.21.0
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 33920eb013628a5e22b7b32403fb965ae3210f47
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Sep 23 21:52:04 2009 +0200
+
+ Update NEWS and release 2.20.0
+
+ NEWS | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 66b12f7d2f54143ea80b4f8aec863b26800363d6
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed Sep 23 21:51:43 2009 +0200
+
+ Bump version to 2.20.0
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7bf87338a026ac82f908aa5fddf2bfea2daf6617
+Author: Brian Cameron <Brian.Cameron@sun.com>
+Date: Wed Sep 23 12:11:50 2009 -0500
+
+ Updated uninstalled.pc file so that it contains the right paths for
+ defsdir files and codegen files. See bug #596023.
+
+ pygobject-2.0-uninstalled.pc.in | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d042402b7c649b2bed7f20038eb82518ec7cc9b3
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Tue Sep 22 22:02:27 2009 +0300
+
+ Plug reference leak of GSource in pyg_main_loop_init()
+
+ Bug #579406, second change.
+
+ glib/pygmainloop.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 640be8109d066e85ed77c810830a5f73c750415b
+Author: Frédéric Péters <fpeters@0d.be>
+Date: Sun Aug 30 16:46:02 2009 +0200
+
+ Specify programming language in .devhelp file
+
+ This add a new language attribute (hardcoded to python) in the
+ .devhelp
+ file that is produced when using ref-html-style.xsl.
+
+ docs/xsl/devhelp.xsl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c888b5ca722fcad6a03de585606c677c2969ebd6
+Author: Paolo Borelli <pborelli@gnome.org>
+Date: Thu Aug 13 21:32:07 2009 +0200
+
+ Allow to use automake 1.11
+
+ autogen.sh | 13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 30deaba4bd1e199aab75cb346ee9237237807fbd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Aug 11 22:19:50 2009 +0200
+
+ Update README
+
+ README | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit af165d350d0d1bb493be5140bf84376d3da1e4d8
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Aug 11 22:16:52 2009 +0200
+
+ Update AUTHORS
+
+ AUTHORS | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 5f9f87f276b97964b525a501d8584ea8b4d8bfd2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Aug 11 22:11:43 2009 +0200
+
+ Add myself and Paul as maintainers
+
+ MAINTAINERS | 8 ++++++++
+ pygobject.doap | 14 ++++++++++++++
+ 2 files changed, 22 insertions(+), 0 deletions(-)
+
+commit 3bfae47fbcb5523d91fb2d1ed7ea347eeddd1775
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Aug 11 20:52:44 2009 +0200
+
+ Update NEWS release 2.19.0
+
+ NEWS | 29 +++++++++++++++++++++++++++++
+ 1 files changed, 29 insertions(+), 0 deletions(-)
+
+commit e82a1841f31ad54dd50569d0d45290713409e0bf
+Author: John Finlay <finlay@moeraki.com>
+Date: Tue Aug 11 00:04:31 2009 -0700
+
+ Add macros to help with Python list to/from GList/GSList conversions.
+
+ gobject/pygobject.h | 242
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 241 insertions(+), 1 deletions(-)
+
+commit f1fad96da2c531fbd3218923baa4fe806a2942d4
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Aug 8 21:37:54 2009 +0200
+
+ Bug 590063 – GFileInfo.list_attributes should accept None/NULL
+
+ gio/gfileinfo.override | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b7907cf6ff6ccf8d38b5206f09f5c864c205e5de
+Author: Johan Dahlin <johan@gnome.org>
+Date: Fri Jul 24 14:30:37 2009 -0300
+
+ Remove myself as a maintainer
+
+ MAINTAINERS | 4 ----
+ pygobject.doap | 7 -------
+ 2 files changed, 0 insertions(+), 11 deletions(-)
+
+commit be6eb21320b4688bcfcd8cbea33f7be29a76f2a2
+Author: John Finlay <finlay@moeraki.com>
+Date: Wed Jul 8 15:47:44 2009 -0700
+
+ * codegen/defsgen.py (clean_patterns): Strip out Windows
+ DLL API macros.
+
+ codegen/defsgen.py | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2214cad3529979e29342a7e1fdc2915b90ce9c10
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 23 21:18:23 2009 +0200
+
+ Fix the gio.unix namespace in docs
+
+ docs/Makefile.am | 2 ++
+ docs/reference/pygio-classes.xml | 2 --
+ docs/reference/pygio-unixinputstream.xml | 26
+ +++++++++++++-------------
+ docs/reference/pygio-unixoutputstream.xml | 26
+ +++++++++++++-------------
+ docs/reference/pygiounix-classes.xml | 13 +++++++++++++
+ docs/reference/pygobject-ref.xml | 1 +
+ 6 files changed, 42 insertions(+), 28 deletions(-)
+
+commit c0acaedfe7f4e488a490e07e3184f0709e1fadc2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 22 23:13:36 2009 +0200
+
+ Add docs for gio functions (mostly for content types)
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-functions.xml | 395
+ ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 398 insertions(+), 0 deletions(-)
+
+commit ebddee47fb7f3e06f9e0a7a14b9532d5cf8a3881
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun Jun 21 18:35:56 2009 +0200
+
+ Add docs for gio.Unix[In|Out]putStream classes
+
+ docs/Makefile.am | 4 +
+ docs/reference/pygio-classes.xml | 2 +
+ docs/reference/pygio-unixinputstream.xml | 202
+ +++++++++++++++++++++++++++++
+ docs/reference/pygio-unixoutputstream.xml | 202
+ +++++++++++++++++++++++++++++
+ 4 files changed, 410 insertions(+), 0 deletions(-)
+
+commit 5b71e58117c85634d95d08449eb54079b246e5be
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sun Jun 21 16:50:03 2009 +0300
+
+ Document that many functions got moved gobject -> glib
+
+ docs/reference/pygobject-functions.xml | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit b270dc43f2cef5260b0bbc71356fd8e6a2b7f754
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jun 20 19:23:25 2009 +0200
+
+ Add docs for class gio.DataOutputStream
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-dataoutputstream.xml | 504
+ +++++++++++++++++++++++++++++
+ 3 files changed, 507 insertions(+), 0 deletions(-)
+
+commit 549313fc4886fa3deb31761de6f5400708165d86
+Author: Murray Cumming <murrayc@murrayc.com>
+Date: Thu Jun 18 18:48:37 2009 +0200
+
+ Allow h2def.py to work when there are tabs or multiple spaces after
+ the struct keyword.
+
+ codegen/h2def.py | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 5c36ef20dca8cd1793f2d3e88949675299097f40
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 15 23:02:34 2009 +0200
+
+ Add dpcs for class gio.DataInputStream
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-constants.xml | 66 +++
+ docs/reference/pygio-datainputstream.xml | 799
+ ++++++++++++++++++++++++++++++
+ 4 files changed, 868 insertions(+), 0 deletions(-)
+
+commit a8b36c343c6850af929c1d5a930f923831b4e637
+Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
+Date: Mon Jun 15 23:25:01 2009 +0300
+
+ Fix build when builddir is not the same as srcdir
+
+ Bug #585817.
+
+ girepository/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9d9ae97b8a49836ec1f3b8d6529bafe1cc06d4d7
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Mon Jun 15 23:19:47 2009 +0300
+
+ Make gio.Emblem constructor new-style
+
+ Add optional 'origin' parameter. Expand gio.Emblem documentation and
+ mark gio.emblem_new_with_origin as sort-of-deprecated.
+
+ docs/reference/pygio-emblem.xml | 51
+ +++++++++++++++++++++++++++++++++++++-
+ gio/gio.defs | 5 ++-
+ 2 files changed, 52 insertions(+), 4 deletions(-)
+
+commit 268e1681fd5b46e6412d3a8db84f3f1cb02fdbde
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jun 13 14:44:47 2009 +0200
+
+ Add docs for gio.BufferedOutputStream class
+
+ docs/Makefile.am | 96 +++++-----
+ docs/reference/pygio-bufferedoutputstream.xml | 275
+ +++++++++++++++++++++++++
+ docs/reference/pygio-classes.xml | 1 +
+ 3 files changed, 325 insertions(+), 47 deletions(-)
+
+commit a6e25aaa7c8f27d62f2917b06728d7ccfcd46416
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jun 13 14:38:34 2009 +0200
+
+ Fix gio.BufferedInputStream docs
+
+ Added the constructor reference and fixed a typo in properties header
+
+ docs/reference/pygio-bufferedinputstream.xml | 34
+ ++++++++++++++++++++++++-
+ 1 files changed, 32 insertions(+), 2 deletions(-)
+
+commit a9b13b60a5aad726d7d7dd7fdc5153b1561fb591
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat Jun 13 01:25:06 2009 +0200
+
+ Add docs for gio.BufferedInputStream
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-bufferedinputstream.xml | 431
+ ++++++++++++++++++++++++++
+ docs/reference/pygio-classes.xml | 1 +
+ 3 files changed, 434 insertions(+), 0 deletions(-)
+
+commit 7766daa59b0e2b85413cee368bf2ebd2afe198e1
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sun May 31 18:25:47 2009 +0300
+
+ Cleanup GIO overrides to use Python function/method names
+
+ Also move several gio.Mount overrides over from 'gio.override' to
+ existing 'gmount.override'. Part of bug #584289.
+
+ gio/gfile.override | 20 ++--
+ gio/gfileenumerator.override | 6 +-
+ gio/ginputstream.override | 2 +-
+ gio/gio.override | 204
+ ------------------------------------------
+ gio/gmount.override | 204
+ ++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 218 insertions(+), 218 deletions(-)
+
+commit 07e9c18dc092f6546230168b6b69c1b3454e120a
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sun May 31 18:56:55 2009 +0300
+
+ Make codegen report errors using Python function/method names
+
+ Part of bug #584289.
+
+ codegen/codegen.py | 9 +++++----
+ codegen/definitions.py | 10 +++++++++-
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 235fde85d015382f2ba38b21968e82b3ac0b6612
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri Jun 12 00:12:17 2009 +0200
+
+ Fix object type in gio.BufferedInputStream_fill_async
+
+ gio/gbufferedinputstream.override | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 407b0e909056f15960e6a4e549896d786ce0a0b2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 9 00:08:21 2009 +0200
+
+ Wrap gio.BufferedInputStream.fill_async
+
+ Wrap the method gio.BufferedInputStream.fill_async and add a test
+
+ gio/Makefile.am | 1 +
+ gio/gbufferedinputstream.override | 70
+ +++++++++++++++++++++++++++++++++++++
+ gio/gio.override | 1 +
+ tests/test_gio.py | 25 +++++++++++++
+ 4 files changed, 97 insertions(+), 0 deletions(-)
+
+commit b7c96b41b287685fe57504e0add3a6f16e649975
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 8 15:42:40 2009 +0200
+
+ Add gio.BufferedOutputStream which was forgotten in the types
+ definition
+
+ gio/gio-types.defs | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 3666f75af4ef2c8e038116aee5afada59d59f689
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 8 14:20:02 2009 +0200
+
+ Add docs for gio.MemoryOutputStream
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-memoryoutputstream.xml | 175
+ +++++++++++++++++++++++++++
+ 3 files changed, 178 insertions(+), 0 deletions(-)
+
+commit 6eb5e3988cbddb4afb3d5747364d6eb80370bb78
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 8 13:30:15 2009 +0200
+
+ Split overrides for gio.MemoryOutputStream
+
+ gio/Makefile.am | 1 +
+ gio/gio.override | 1 +
+ gio/gmemoryoutputstream.override | 45
+ ++++++++++++++++++++++++++++++++++++++
+ gio/goutputstream.override | 24 --------------------
+ 4 files changed, 47 insertions(+), 24 deletions(-)
+
+commit dfbdf23633a772e78b47b0e7b0c3e3b87855d9ff
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 8 11:45:11 2009 +0200
+
+ Wrap gio.memory_input_stream_new_from_data
+
+ Add the wrapper for gio.memory_input_stream_new_from_data including
+ docs and a test.
+
+ docs/Makefile.am | 4 +-
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-memoryinputstream.xml | 151
+ ++++++++++++++++++++++++++++
+ gio/Makefile.am | 1 +
+ gio/ginputstream.override | 34 ------
+ gio/gio.override | 1 +
+ gio/gmemoryinputstream.override | 91 +++++++++++++++++
+ tests/test_gio.py | 4 +
+ 8 files changed, 252 insertions(+), 35 deletions(-)
+
+commit fcc3cb0e167789746a1a9db0cba54ea7a97c7259
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date: Mon Jun 8 19:15:24 2009 +0200
+
+ Fixes whitespaces style issues with girepository.
+
+ girepository/Makefile.am | 2 +-
+ girepository/bank-repository.c | 67
+ +++++++++++++++++++--------------------
+ girepository/bank.h | 2 +-
+ girepository/btypes.py | 6 ++--
+ girepository/module.py | 2 +-
+ 5 files changed, 39 insertions(+), 40 deletions(-)
+
+commit fb4b2c8cdad2853e6bfe9526529e3a3ab052c5e0
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date: Fri Jun 5 19:03:59 2009 +0200
+
+ Removes the header but the modeline in test_girepository.py.
+
+ tests/test_girepository.py | 26 +-------------------------
+ 1 files changed, 1 insertions(+), 25 deletions(-)
+
+commit abe4828f52c7eb3a08f5b592e7ced1e97a58ef5c
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date: Wed Jun 3 10:47:58 2009 +0200
+
+ Adds overrides modules from PyBank.
+
+ girepository/Makefile.am | 3 +++
+ girepository/importer.py | 3 +--
+ girepository/overrides/Gdk.py | 14 ++++++++++++++
+ girepository/overrides/Gtk.py | 8 ++++++++
+ 4 files changed, 26 insertions(+), 2 deletions(-)
+
+commit c12964e6a3354d8063355225c94e6d21d621e08b
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date: Tue Jun 2 23:40:41 2009 +0200
+
+ Disables the tests that fail in tests/test_girepository.py.
+
+ tests/test_girepository.py | 242
+ +++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 182 insertions(+), 60 deletions(-)
+
+commit a4469a3f7d32a25156bae5e7aef9ec4ae5f6e140
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date: Tue Jun 2 23:03:26 2009 +0200
+
+ Imports test_girepository.py from former PyBank's
+ everything_unittest.py.
+
+ tests/test_girepository.py | 288
+ ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 288 insertions(+), 0 deletions(-)
+
+commit e4f2a5ef8734cf40cf8345d442612db1f6c62d5a
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date: Thu May 28 17:45:11 2009 +0200
+
+ Introduces the girepository module from the former PyBank.
+
+ INSTALL | 69 ++-
+ Makefile.am | 2 +-
+ configure.ac | 12 +
+ girepository/Makefile.am | 52 ++
+ girepository/__init__.py | 24 +
+ girepository/bank-argument.c | 379 +++++++++++++
+ girepository/bank-info.c | 1194
+ ++++++++++++++++++++++++++++++++++++++++
+ girepository/bank-repository.c | 237 ++++++++
+ girepository/bank.c | 155 ++++++
+ girepository/bank.h | 80 +++
+ girepository/btypes.py | 300 ++++++++++
+ girepository/importer.py | 52 ++
+ girepository/module.py | 224 ++++++++
+ girepository/repository.py | 51 ++
+ 14 files changed, 2799 insertions(+), 32 deletions(-)
+
+commit f5ab5046fe9b67ec5e8fc64679e1a3d01787af7e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 2 18:28:22 2009 +0200
+
+ Fix the docs for gio.FilterOutputStream
+
+ docs/reference/pygio-filteroutputstream.xml | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit fded60d8376fc45d19bf6cd8be6b927cc3f2e8c6
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 2 18:27:00 2009 +0200
+
+ Add gio.FilterOutputStream docs
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-filteroutputstream.xml | 152
+ +++++++++++++++++++++++++++
+ 3 files changed, 155 insertions(+), 0 deletions(-)
+
+commit e2c31f916967229b6547e68013628ce0082cf875
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 2 13:29:59 2009 +0200
+
+ Add gio.FilterInputStream docs
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-filterinputstream.xml | 152
+ ++++++++++++++++++++++++++++
+ 3 files changed, 155 insertions(+), 0 deletions(-)
+
+commit 49a467eee445bc75554db0374006722ac075194b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 2 11:33:20 2009 +0200
+
+ Add API appeared in 2.20 but not marked as such in gio docs
+
+ gio/gio.defs | 30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+), 0 deletions(-)
+
+commit 180c157f2a20b7d2dd9af05bfb5f515fd23870a0
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 2 10:41:26 2009 +0200
+
+ Wrap gio.FileOutputStream.query_info_async
+
+ Add the wrapper for gio.FileOutputStream.query_info_async
+ including docs and a test.
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-fileoutputstream.xml | 257
+ +++++++++++++++++++++++++++++
+ gio/Makefile.am | 3 +-
+ gio/gfileoutputstream.override | 68 ++++++++
+ gio/gio.override | 1 +
+ tests/test_gio.py | 27 +++
+ 7 files changed, 358 insertions(+), 1 deletions(-)
+
+commit 4673577d1f6c3d54423808dd575987092fb05ad2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue Jun 2 10:17:41 2009 +0200
+
+ Fix gio.FileInputStream docs
+
+ Add implemented interface section and remove a method description
+
+ docs/reference/pygio-fileinputstream.xml | 25 +++++++++----------------
+ 1 files changed, 9 insertions(+), 16 deletions(-)
+
+commit 1e1cad02879d514745b5233658654cbe944530a5
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 1 22:54:26 2009 +0200
+
+ Fix the method name
+
+ gio/gfileinputstream.override | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit f605811afe8c91f121e89b6f9ec28c70b62f4110
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon Jun 1 22:40:56 2009 +0200
+
+ Wrap gio.FileInputStream.query_async
+
+ Add the wrapper for gio.FileInputStream.query_async including docs and
+ a test.
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-fileinputstream.xml | 221
+ ++++++++++++++++++++++++++++++
+ gio/Makefile.am | 1 +
+ gio/gfileinputstream.override | 68 +++++++++
+ gio/gio.override | 1 +
+ tests/test_gio.py | 27 ++++
+ 7 files changed, 321 insertions(+), 0 deletions(-)
+
+commit 08623e54a426377c1504b5c364aabae5a17f8ad8
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sun May 31 17:43:16 2009 +0300
+
+ Install executable codegen parts with executing permissions
+
+ Also add shebang where it was missing. Bug #583979.
+
+ codegen/Makefile.am | 23 ++++++++++++-----------
+ codegen/code-coverage.py | 2 ++
+ codegen/codegen.py | 2 ++
+ codegen/defsconvert.py | 2 ++
+ 4 files changed, 18 insertions(+), 11 deletions(-)
+
+commit 833d4da202bcfcb01a414f8aec4b751ec8e1ccb2
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sat May 30 16:57:49 2009 +0300
+
+ Wrap gio.DataInputStream.read_line_async and read_until_async
+
+ Wrap the functions and their corresponding *_finish() functions.
+ Create 'gdatainputstream.override' for these and move two existing
+ functions there. Add unit tests. Re-enable synchronous read_line
+ unit test and adjust it for new official GIO behavior. Bug #584285.
+
+ gio/Makefile.am | 1 +
+ gio/gdatainputstream.override | 250
+ +++++++++++++++++++++++++++++++++++++++++
+ gio/ginputstream.override | 65 -----------
+ gio/gio.defs | 4 +-
+ gio/gio.override | 1 +
+ tests/test_gio.py | 51 ++++++++-
+ 6 files changed, 300 insertions(+), 72 deletions(-)
+
+commit 2cb569c0ced49f9ed5ca83292d5f15c837066688
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sat May 30 17:24:15 2009 +0300
+
+ Fix gio.OutputStream.splice_async
+
+ Bug #584290.
+
+ gio/goutputstream.override | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit e43fa429f6b4019a432acb481bbc07c8201cc46d
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Wed May 27 21:19:27 2009 +0300
+
+ Code maintenance: ignore one more file created by unit tests
+
+ tests/.gitignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 76e9dc74ac706a9207f9d31f887d6e38df2a678f
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon May 25 20:20:38 2009 +0200
+
+ Update the docs with new 2.20 API
+
+ docs/reference/pygio-appinfo.xml | 115 ++++++++++++++++++++++++++++
+ docs/reference/pygio-icon.xml | 99 +++++++++++++++++++++++-
+ docs/reference/pygio-mount.xml | 156
+ ++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 367 insertions(+), 3 deletions(-)
+
+commit 8e40d71ac23deb7d91789486ee8cad440a6be1dd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon May 25 01:33:08 2009 +0200
+
+ Add gio 2.20 API
+
+ add the new API added in gio 2.20, some needs to be wrapped manually
+
+ gio/gio.defs | 106
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gio/unix.defs | 48 +++++++++++++++++++++----
+ 2 files changed, 146 insertions(+), 8 deletions(-)
+
+commit 0d08df42514fba6abc896814abfee0d2d083c29e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon May 25 00:14:21 2009 +0200
+
+ Post release version bump 2.19.0
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit edfb09e3de7baf294b3beba84b4ecb94e1f16764
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 24 23:56:29 2009 +0200
+
+ Update NEWS, release 2.18.0
+
+ NEWS | 14 ++++++++++++++
+ configure.ac | 4 ++--
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+commit e0648ea435e0b309cdd5bb0ebe56d4534efd26e4
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 24 22:18:40 2009 +0200
+
+ Add documentation for the gio.OutputStream class
+
+ The docs for this class are not completed, missing methods
+ descriptions.
+ The index is complete though, it will be completed once all the
+ classes
+ are in place so we can ship a (almost) complete reference.
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 3 +-
+ docs/reference/pygio-outputstream.xml | 140
+ +++++++++++++++++++++++++++++++++
+ 3 files changed, 144 insertions(+), 1 deletions(-)
+
+commit 11524cdf6472d9115a812ce431f6767aec5627bc
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 24 22:12:04 2009 +0200
+
+ Wrap gio.OutputStream.splice_async()
+
+ wrap gio.OutputStream.splice_async() and add a test.
+
+ gio/goutputstream.override | 58
+ +++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gio.py | 20 +++++++++++++++
+ 2 files changed, 77 insertions(+), 1 deletions(-)
+
+commit 82ad6b8c8ea4d6694126f5e0e67b826717e38f19
+Author: Emilio Pozuelo Monfort <pochu@ubuntu.com>
+Date: Sun May 24 22:55:16 2009 +0300
+
+ Add Python version into installed libpyglib name
+
+ Do this now, while no-one (as far as we know) links to the library
+ besides PyGObject itself. Bug #550235.
+
+ configure.ac | 2 ++
+ gio/Makefile.am | 2 +-
+ glib/Makefile.am | 10 +++++-----
+ gobject/Makefile.am | 2 +-
+ 4 files changed, 9 insertions(+), 7 deletions(-)
+
+commit 59da8cd24ea390b6c983995833ec6b0e5d028b35
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 24 11:44:24 2009 +0200
+
+ Wrap gio.OutputStream.flush_async()
+
+ wrap gio.OutputStream.flush_async() and add a test.
+
+ gio/goutputstream.override | 47
+ +++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gio.py | 11 ++++++++++
+ 2 files changed, 57 insertions(+), 1 deletions(-)
+
+commit 84ab6178ed0033f69932df5bc73c86bdff80c953
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 17 17:29:37 2009 +0200
+
+ Add documentation for the gio.FileMonitor class
+
+ The docs for this class are not completed, missing methods
+ descriptions.
+ The index is complete though, it will be completed once all the
+ classes
+ are in place so we can ship a (almost) complete reference.
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-filemonitor.xml | 128
+ ++++++++++++++++++++++++++++++++++
+ 3 files changed, 131 insertions(+), 0 deletions(-)
+
+commit 629496a5617d30e4dfa494b05a62c85a6af77b9a
+Author: Josselin Mouette <joss@malsain.org>
+Date: Sun May 17 18:03:44 2009 +0300
+
+ Use 'Requires.private' for libffi in '.pc' files
+
+ Correction for patch in bug #550231.
+
+ pygobject-2.0-uninstalled.pc.in | 3 ++-
+ pygobject-2.0.pc.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 90cd8b7c4a25cd2ecb751f8337b401c98538272b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Wed May 13 21:54:39 2009 +0200
+
+ Add wrapper for gio.FileAttributeMatcher
+
+ added a boxed type for gio.FileAttributeMatcher which has been
+ forgotten while
+ wrapping the gio API. This should probably be done in gio itself.
+
+ gio/gfileinfo.override | 24 ++++++++++++++++++++++--
+ gio/gio-types.defs | 7 +++++++
+ gio/gio.override | 2 ++
+ 3 files changed, 31 insertions(+), 2 deletions(-)
+
+commit e707447d9313f2f2ecba395cfe3682d5a5e859f4
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Wed May 13 22:06:25 2009 +0300
+
+ Mark relevant glib.IOChannel methods as METH_NOARGS
+
+ Additionally fix glib.IOChannel.set_close_on_unref: was marked
+ METH_NOARGS but actually accepted arguments. Fixes bug #582427.
+
+ glib/pygiochannel.c | 83
+ ++++++++++++--------------------------------------
+ 1 files changed, 20 insertions(+), 63 deletions(-)
+
+commit 002915e5f458fec5a89766a54e8119a70a80caa7
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Tue May 12 20:37:24 2009 +0200
+
+ Add documentation for the gio.FileInfo class
+
+ The docs for this class are not completed, missing methods
+ descriptions.
+ The index is complete though, it will be completed once all the
+ classes
+ are in place so we can ship a (almost) complete reference.
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-fileinfo.xml | 346
+ +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 349 insertions(+), 0 deletions(-)
+
+commit 8cd25c871609580425c6c4c9e5bc6ec8d40862a1
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sat May 9 16:46:04 2009 +0300
+
+ Retire hand-written ChangeLog; autocreate from Git history
+
+ Basically copied over from GLib source tree.
+
+ ChangeLog | 3606
+ ---------------------------------------------------
+ ChangeLog.pre-2.18 | 3608
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Makefile.am | 32 +
+ 3 files changed, 3640 insertions(+), 3606 deletions(-)
+
+commit 23556bdbcf9cf06db866901fb822dd78a9043648
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat May 9 00:03:05 2009 +0200
+
+ Fix a bug in InputStream.skip_async
+
+ use the count argument instead of buffer_size which is always zero
+
+ gio/ginputstream.override | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ed6b06315c17441b41c001d38537c904b8fe18de
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat May 9 00:02:33 2009 +0200
+
+ Add docs for the gio.InputStream class
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-inputstream.xml | 730
+ ++++++++++++++++++++++++++++++++++
+ 3 files changed, 733 insertions(+), 0 deletions(-)
+
+commit d58322b84d47da7905f95b43e9e0daf9f7c4b507
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Mon May 4 23:40:28 2009 +0200
+
+ Wrap gio.InputStream.skip_async()
+
+ wrap gio.InputStream.skip_async() and add a test.
+
+ gio/ginputstream.override | 50
+ ++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gio.py | 20 ++++++++++++++++++
+ 2 files changed, 69 insertions(+), 1 deletions(-)
+
+commit 2311187824d1b48a996ee2620fd3c9a63e3edd66
+Author: Siavash Safi <siavash@siavashs.org>
+Date: Mon May 4 15:46:49 2009 +0430
+
+ Add -n --namespace option and the code to remove
+ dll API in headers, Added documentation
+
+ Patch from bug #579275
+
+ ChangeLog | 8 +++
+ codegen/h2def.py | 133
+ ++++++++++++++++++++++++++++++++++++++++++++----------
+ 2 files changed, 117 insertions(+), 24 deletions(-)
+
+commit 442ec5bb997bb7dab55baeea6e54e79d3ce0d3c1
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Sat May 2 23:54:52 2009 +0300
+
+ Properly mark glib.get_user_special_dir() as a keywords method
+
+ Fixes bug #581082.
+
+ glib/glibmodule.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f466dca880cc6ea68b9fe236943eea7a07d33520
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 3 11:03:25 2009 +0200
+
+ Add docs for the gio.LoadableIcon class
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-loadableicon.xml | 198
+ +++++++++++++++++++++++++++++++++
+ 3 files changed, 201 insertions(+), 0 deletions(-)
+
+commit eab4ebf7f6c82580b61205f34e1cfe535aeada60
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sun May 3 01:21:55 2009 +0200
+
+ Add docs for the gio.ThemedIcon class
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-themedicon.xml | 204
+ +++++++++++++++++++++++++++++++++++
+ 3 files changed, 207 insertions(+), 0 deletions(-)
+
+commit 22d7de8b620055f14b30f9c3c99160c8b4ebe672
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Sat May 2 12:25:19 2009 +0200
+
+ post release version bump to 2.17.1
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 282ac3c76e1e3513bd76f819f320ec56aba15d9e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri May 1 23:40:31 2009 +0200
+
+ Fix the class title
+
+ docs/reference/pygio-mountoperation.xml | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d8b70dec1e5c09b73ae277f4f5b246315841fb8e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Fri May 1 22:24:33 2009 +0200
+
+ Add docs for the gio.MountOperation class
+
+ docs/Makefile.am | 2 +
+ docs/reference/pygio-classes.xml | 1 +
+ docs/reference/pygio-constants.xml | 107 +++++
+ docs/reference/pygio-mountoperation.xml | 726
+ +++++++++++++++++++++++++++++++
+ 4 files changed, 836 insertions(+), 0 deletions(-)
+
+commit fceea8e843e880f0469e454df23141e7dd2bc0cf
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date: Thu Apr 30 22:13:06 2009 +0200
+
+ Update NEWS, release 2.17.0
+
+ NEWS | 93
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 93 insertions(+), 0 deletions(-)
+
+commit 47389217d1a65a8e3f404d486c508cf5d3164756
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Thu Apr 30 22:47:19 2009 +0300
+
+ Fix memory leak in gio.File.query_info_async()
+
+ After the recent patch it would leak exception data if old argument
+ order was used. Properly decref the objects.
+
+ gio/gfile.override | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ChangeLog.pre-2.18 b/ChangeLog.pre-2.18
new file mode 100644
index 0000000..2fb8ef4
--- /dev/null
+++ b/ChangeLog.pre-2.18
@@ -0,0 +1,3608 @@
+=== ChangeLog discontinued ===
+
+2009-05-04 Siavash Safi <siavash@siavashs.org>
+
+ Bug 579275 – Patch which removes dll api in headers and adds
+ a namespace option
+
+ * codegen/h2def.py: Add -n --namespace option and the code to remove
+ dll API in headers, Added documentation
+
+2009-04-17 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 568499 – CellRendererPixbuf stock-size property has wrong type
+
+ * gobject/pygtype.c (pyg_enum_get_value): Also accept long
+ integers.
+
+2009-04-15 Götz Waschk <waschk@mandriva.org>
+
+ Bug 550231 – missing dep on libffi in pygobject-2.0.pc
+
+ * configure.ac: Define `LIBFFI_PC' subst.
+
+ * pygobject-2.0.pc.in:
+ * pygobject-2.0-uninstalled.pc.in: Use it.
+
+2009-04-15 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 555613 – gio.VolumeMonitor segfaults
+
+ * gio/gvolumemonitor.override (_wrap_g_volume_monitor_tp_new): New
+ function, return the singleton object.
+
+2009-04-14 James Westby <jw+debian@jameswestby.net>
+
+ Bug 573753 – DeprecationWarning under python 2.6
+
+ * codegen/definitions.py (ReturnType.__init__): Don't pass
+ 'type_name' argument to super __init__.
+
+2009-04-14 Krzesimir Nowak <krnowak@svn.gnome.org>
+
+ Bug 576566 – several scripts from codegen directory are not
+ distributed
+
+ * codegen/Makefile.am (codegen_PYTHON): List several missing
+ scripts.
+
+2009-04-14 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: (_wrap_g_file_copy_async) change argument order
+ to keep it consistent with the other methods.
+
+2009-04-13 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 578870 – memory leak in gio.File.copy_async
+
+ * gio/gio.override (PyGIONotify): Add 'slaves' field.
+ (pygio_notify_new_slave): New function.
+ (pygio_notify_reference_callback): Recurse for slaves, if any.
+ (pygio_notify_free): Likewise.
+
+ * gio/gfile.override (file_progress_callback_marshal): Use new
+ chaining functionality to avoid leaking the second PyGIONotify
+ structure. Rename 'callback' as 'progress_callback' for clarity.
+
+2009-04-12 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs: (g_file_monitor) should accept None
+ for cancellable and set the default flag to G_FILE_MONITOR_NONE.
+
+2009-04-09 Jonathan Matthew <jonathan@d14n.org>
+
+ Bug 575781 – pyg_notify_free needs to ensure it has GIL before calling
+ Py_XDECREF
+
+ * gio/gio.override: Ensure we're holding the GIL before potentially
+ destroying the callback and data.
+
+2009-04-05 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override:
+ (_wrap_g_file_set_display_name_async) Wrap new GFile method.
+
+ * tests/test_gio.py: Test the above methods.
+
+2009-04-05 Tristan Hill <stan@saticed.me.uk>
+
+ reviewed by: Gustavo J. A. M. Carneiro.
+
+ * glib/pygoptioncontext.c (pyg_option_get_context): Add a
+ semi-private method to return the option context C object from an
+ option context wrapper. Used in gnome-python for fixing Bug
+ #507174.
+
+2009-04-05 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygtype.c (pyg_value_from_pyobject): Bug 577999 –
+ converting a negative long Python value to a GUINT64 GValue
+ doesn't error out as it should.
+
+2009-04-04 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override:
+ (_wrap_g_file_set_attributes_async)
+ (_wrap_g_file_set_attributes_finish) Wrap new GFile methods.
+
+ * tests/test_gio.py: Test the above methods.
+
+2009-03-31 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override:
+ (_wrap_g_file_query_filesystem_info_async) Fix a typo.
+
+2009-03-31 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override:
+ (_wrap_g_file_query_filesystem_info_async) Wrap new GFile method.
+
+2009-03-31 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs: Add missing g_file_query_filesystem_info_async and
+ g_file_query_filesystem_info_finish
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: (_wrap_g_file_mount_mountable)
+ Swap kwargs names to reflect the code.
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: (_wrap_g_file_mount_enclosing_volume)
+ Swap kwargs names to reflect the code.
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override:
+ (_wrap_g_file_find_enclosing_mount_async) Wrap new GFile method.
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override:
+ (_wrap_g_file_eject_mountable) Wrap new GFile method.
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: (_wrap_g_file_copy) revert previous commit.
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: (_wrap_g_file_copy) callback cannot be optional.
+
+2009-03-29 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gvolume.override: (_wrap_g_volume_mount) should accept None
+ for mount_operation.
+
+2009-03-29 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gvolume.override: Swap kwargs names to reflect the code.
+
+2009-03-29 Tobias Mueller <tobiasmue@gnome.org>
+
+ * ltihooks.py:
+ * pygtk.py:
+ * COPYING:
+ * gobject/pygparamspec.h:
+ * gobject/pygpointer.c:
+ * gobject/ffi-marshaller.h:
+ * gobject/pygtype.c:
+ * gobject/__init__.py:
+ * gobject/pygpointer.h:
+ * gobject/pygtype.h:
+ * gobject/pygflags.c:
+ * gobject/pyginterface.c:
+ * gobject/pygflags.h:
+ * gobject/pygboxed.c:
+ * gobject/gobjectmodule.c:
+ * gobject/pygenum.c:
+ * gobject/pyginterface.h:
+ * gobject/pygboxed.h:
+ * gobject/pygobject.c:
+ * gobject/constants.py.in:
+ * gobject/pygenum.h:
+ * gobject/propertyhelper.py:
+ * gobject/pygparamspec.c:
+ * gobject/ffi-marshaller.c:
+ * glib/pygmainloop.c:
+ * glib/pygoptioncontext.h:
+ * glib/pygmainloop.h:
+ * glib/pyglib-private.h:
+ * glib/__init__.py:
+ * glib/pygoptiongroup.c:
+ * glib/pygspawn.c:
+ * glib/pygmaincontext.c:
+ * glib/pygoptiongroup.h:
+ * glib/pygspawn.h:
+ * glib/pygmaincontext.h:
+ * glib/option.py:
+ * glib/pygsource.c:
+ * glib/glibmodule.c:
+ * glib/pygiochannel.h:
+ * glib/pygsource.h:
+ * glib/pyglib.c:
+ * glib/pyglib.h:
+ * glib/pyglib-python-compat.h:
+ * glib/pygoptioncontext.c:
+ * gio/gfileinfo.override:
+ * gio/gappinfo.override:
+ * gio/__init__.py:
+ * gio/gfileattribute.override:
+ * gio/gvolume.override:
+ * gio/gio.override:
+ * gio/ginputstream.override:
+ * gio/goutputstream.override:
+ * gio/unix.override:
+ * gio/gfile.override:
+ * gio/gvolumemonitor.override:
+ * gio/gapplaunchcontext.override:
+ * gio/giomodule.c:
+ * gio/gfileenumerator.override:
+ * gio/pygio-utils.c:
+ * gio/unixmodule.c:
+ * gio/pygio-utils.h:
+ * gio/gicon.override:
+ Update the address of the FSF, by replacing old bits of the address
+ with new ones.
+ Fixes bug 577134
+
+2009-03-29 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs: Add g_volume_should_automount
+
+2009-03-28 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/pygio-utils.[hc]: (strv_to_pylist) (pylist_to_strv) add a couple
+ of convinence functions to convert from/to a python list and an array
+ of strings.
+
+ * gio/Makefile.am
+ * gio/gdrive.override:
+ * gio/gio.override: Strip GDrive overrides and
+ wrap g_drive_enumerate_identifiers
+
+ * tests/test_gio.py:
+ * gio/gvolume.override: wrap g_volume_enumerate_identifiers
+
+ * gio/gio.defs: add missing g_drive_get_identifier and
+ g_drive_enumerate_identifiers
+
+2009-03-22 Mark Lee <marklee@svn.gnome.org>
+
+ Bug 559001 – Allow setting pytype wrapper class
+
+ initial patch by: John Ehresman <jpe@wingware.com>
+
+ * gobject/pygtype.c (_wrap_g_type_wrapper__set_pytype): New function.
+
+ * tests/test_gtype.py (GTypeTest.assertPyType),
+ (GTypeTest.setInvalidPyType), (GTypeTest.testPyType),
+ (GTypeTest.testInvalidPyType): Two new testcases to test the above,
+ with accompanying helper methods.
+
+2009-03-22 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs: Add g_file_enumerator_get_container, new in 2.18
+
+2009-03-22 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfileenumerator.override (_wrap_g_file_enumerator_close_async)
+ wrap new method.
+
+ * tests/test_gio.py (TestGFileEnumerator.testCloseFilesAsync):
+ Test the above.
+
+2009-03-09 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * docs/reference/Changelog: Create a dedicated Changelog for the docs
+ and move the latest entries in there.
+
+2009-02-20 James Henstridge <james@jamesh.id.au>
+
+ * ltihooks.py: pull in changes from pygtk (updating license header
+ from GPL to LGPL).
+
+2009-02-18 Andre Klapper <a9016009@gmx.de>
+
+ * gobject/pygobject.h:
+ Change comment to avoid false positives when grep'ing for
+ deprecated gtk functions
+
+2009-02-17 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * gio/gfile.override, gio/gio.defs, gio/gio.override: Bug 556250
+ again. I screwed up and gave misinformation about how to fix it.
+ It must be pyg_begin/end_allow_threads, pyg_block/unblock_threads
+ is only to be used for async callbacks.
+
+2009-02-10 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 556250 – non-async functions don't release python locks before
+ calling blocking C functions
+
+ * gio/gio.override:
+ * gio/gfile.override:
+ * gio/gio.defs: release the thread lock.
+
+2009-02-10 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs:
+ * gio/gio-types.defs:
+ * gio/unix.defs: Add 2.18 gio API.
+
+2009-02-08 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 568427 – "gio.Error: Too many open files" without too many
+ open files
+
+ * gobject/pygtype.c (_wrap_g_type_wrapper__get_name):
+ * gobject/gobjectmodule.c (get_type_name_for_class):
+ * gobject/pygobject.c (build_parameter_list), (PyGProps_length):
+ * gio/gfileinfo.override (_wrap_g_file_info_list_attributes):
+ * gio/gio.override (_wrap_g_content_type_guess):
+ * gio/gfile.override (_wrap__file_init), (_wrap_g_file_load_contents)
+ (_wrap_g_file_load_contents_finish): Remove some memory leaks.
+
+ * gio/gio.defs: add (caller-owns-return #t) all over the place to
+ prevent memory leaks.
+
+ patch contributed by Paul Pogonyshev, Paolo Borelli and
+ Gian Mario Tagliaretti.
+
+2009-02-06 Murray Cumming <murrayc@murrayc.com>
+
+ * codegen/h2def.py DefsWriter::write_enum_defs(): Prevent an exception
+ when the prefix is empty.
+
+2009-01-29 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 569350 – Inconsistent use of tabs and spaces in pygtk.py
+
+ * pygtk.py: Replace all tabs with spaces.
+
+2009-01-29 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 567792 – gio.InputStream.read_async can cause memory
+ corruption
+
+ * gio/gio.override (py_decref_callback): Remove (unused now).
+ (pygio_notify_allocate_buffer, pygio_notify_attach_to_result)
+ (pygio_notify_get_attached): New functions.
+ (async_result_callback_marshal): Attach to the result object if
+ asked and then don't free self. Fix reference leak (spotted by
+ Gustavo).
+
+ * gio/ginputstream.override (async_result_callback_marshal_read):
+ Remove. Use new attachment functionality in
+ async_result_callback_marshal() instead.
+ (_wrap_g_input_stream_read_async): Use the new functions (also
+ those mentioned in the cleanup log below).
+ (_wrap_g_input_stream_read_finish): Use the new functions.
+
+2009-01-27 Daniel Elstner <danielk@openismus.com>
+
+ * codegen/docextract_to_xml.py (escape_text): Do not escape the
+ ampersand "&" in entity references (bug #568485). Replace some
+ unusual entity references in the output with their literal values.
+
+2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 566571 – gtk.Buildable interface method override is not
+ recognized
+
+ * gobject/gobjectmodule.c (pyg_type_add_interfaces): New function,
+ break out code repetition out of pyg_type_register().
+
+ * tests/test_subtype.py
+ (TestSubType.test_gtk_buildable_virtual_method): New test
+ case (inactive).
+
+2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 566706 – cleanup GIO overrides
+
+ * gio/gio.override (pygio_notify_new)
+ (pygio_notify_using_optional_callback)
+ (pygio_notify_callback_is_valid_full)
+ (pygio_notify_callback_is_valid)
+ (pygio_notify_reference_callback): New functions.
+ (pygio_notify_free): Rename from pygio_free_notify() and extend.
+ (async_result_callback_marshal): Warn if new `referenced' field is
+ not set (programming error).
+ (_wrap_g_drive_eject, _wrap_g_drive_poll_for_media)
+ (_wrap_g_mount_unmount, _wrap_g_mount_eject)
+ (_wrap_g_mount_remount): Lots of cleanup: use new functions
+ instead of repeating code, unify and fix error handling.
+
+ * gio/gfile.override (_wrap_g_file_read_async)
+ (_wrap_g_file_load_contents_async)
+ (_wrap_g_file_enumerate_children_async)
+ (_wrap_g_file_mount_mountable, _wrap_g_file_unmount_mountable)
+ (_wrap_g_file_mount_enclosing_volume, _wrap_g_file_copy)
+ (_wrap_g_file_copy_async, _wrap_g_file_move)
+ (_wrap_g_file_append_to_async, _wrap_g_file_create_async)
+ (_wrap_g_file_replace_async, _wrap_g_file_query_info_async)
+ (_wrap_g_file_replace_contents_async): Similar cleanup.
+
+ * gio/gfileenumerator.override
+ (_wrap_g_file_enumerator_next_files_async): Similar cleanup.
+
+ * gio/gicon.override (_wrap_g_loadable_icon_load_async): Similar
+ cleanup.
+
+ * gio/ginputstream.override (_wrap_g_input_stream_close_async):
+ Similar cleanup.
+
+ * gio/goutputstream.override (_wrap_g_output_stream_write_async)
+ (_wrap_g_output_stream_close_async): Similar cleanup.
+
+ * gio/gvolume.override (_wrap_g_volume_mount)
+ (_wrap_g_volume_eject): Similar cleanup.
+
+ * tests/test_gio.py (TestFile.test_copy_async): Fix the test.
+
+2009-01-09 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_type_register): Add a comment
+ explaining why the two for loops for registering interfaces.
+
+2009-01-07 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 566744 – _wrap_g_input_stream_read_async() argument parsing
+ has incorrect keyword args
+
+ * gio/ginputstream.override (_wrap_g_input_stream_read_async): Fix
+ keyword list to be in sync with positional arguments.
+
+2009-01-06 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 566737 – Bad -I ordering can break build
+
+ * Makefile.am:
+ * gobject/Makefile.am:
+ * gio/Makefile.am:
+ * tests/Makefile.am:
+ Commit a patch from [dmacks at netspace dot org]
+
+2009-01-04 Mads Chr. Olesen <gnome-bugzilla@shiyee.dk>
+
+ * gio/gio.defs (gio.File.copy_async, gio.File.copy_finish): Define
+ methods.
+
+ * gio/gfile.override (_wrap_g_file_copy_async): New function.
+
+ * tests/test_gio.py (TestFile.test_copy_async): Test the methods.
+
+2009-01-04 Przemysław Grzegorczyk <pgrzegorczyk@gmail.com>
+
+ Bug 563714 – GNOME Goal: Clean up GLib and GTK+ includes
+
+ * gobject/generate-constants.c:
+ * glib/pygspawn.c: Only include toplevel <glib.h>.
+
+2009-01-04 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 564018 – pygobject libtool-2.2 patch
+
+ * configure.ac: Apply the patch provided by Cygwin Ports
+ maintainer.
+
+2009-01-04 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * configure.ac: Branch, bump version to 2.17.0.
+
+=== 2.16.0 ===
+2008-12-24 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547119 – gobject.timeout_add_seconds() not found in docs
+
+ * docs/reference/pyglib-functions.xml (glib.timeout_add_seconds):
+ Describe.
+
+2008-12-21 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 564102 – _wrap_g_output_stream_write_async not adding a
+ reference to the buffer passed
+
+ * gio/gio.override (pygio_notify_copy_buffer): New function.
+ (pygio_free_notify): Free new `buffer' field if it is set.
+
+ * gio/goutputstream.override (_wrap_g_output_stream_write_async):
+ Copy the buffer with new pygio_notify_copy_buffer() and use the
+ copy for g_output_stream_write_async() call.
+
+ * gio/gfile.override (_wrap_g_file_replace_contents_async): Same
+ as for _wrap_g_output_stream_write_async().
+
+2008-12-03 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * glib/pyglib.c (pyglib_error_check): Test if `domain' is not-null
+ before using it (avoids segfaults, see bug #561826).
+
+2008-10-31 John Finlay <finlay@moeraki.com>
+
+ * codegen/__init__.py (__all__): Add defsgen to __all__ list.
+
+ * codegen/h2def.py (find_enum_defs): Strip out # directives from
+ enum defintions.
+ (clean_func): Change ' * G_CONST_RETURN * ' to '** '
+
+ * codegen/Makefile.am (codegen_PYTHON): Add defsgen.py
+
+ * codegen/defsgen.py (typecode): Use the passed in prefix as a
+ hint when creating a typecode.
+ (split_prefix,write_enum_defs,_write_obj_helper): Add function to
+ use passed in prefix as a hint when splitting an object name into
+ module and name.
+
+ * codegen/h2def.py (DefsWriter.write_enum_defs): Make sure the
+ prefix ends with a _ i.e. really handle the GDK_FONT_FONT,
+ GDK_FONT_FONTSET case.
+
+2008-09-12 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/goutputstream.override
+ (g_output_stream_write_all): use gsize instead of gssize.
+
+2008-09-10 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 530935 – pygobject_set_properties doesnt release the GIL
+
+ * gobject/pygobject.c (pygobject_set_properties): Reuse
+ set_property_from_pspec() which release GIL for us. Also make
+ sure that g_object_thaw_notify() is called even after error.
+
+2008-09-09 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 549517 – add __repr__ to gio.Drive, gio.Mount and gio.Volume
+
+ * gio/gio.override (_wrap_g_drive_tp_repr, _wrap_g_mount_tp_repr):
+ New functions.
+
+ * gio/gvolume.override (_wrap_g_volume_tp_repr): New function.
+
+2008-09-09 Loïc Minier <lool@dooz.org>
+
+ Bug 551227 – Missing AC_CONFIG_MACRO_DIR([m4])
+
+ * configure.ac: Add AC_CONFIG_MACRO_DIR.
+
+2008-09-08 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 551056 – make codegen not import when corresponding argument
+ types are not registered
+
+ * codegen/override.py (import_pat): Add support for optional 'for'
+ clause.
+ (Overrides.__parse_override): Handle it.
+
+ * codegen/codegen.py (SourceWriter.write_imports)
+ (SourceWriter.write_object_imports): Adapt for changes in
+ get_imports() return value.
+ (is_registered_object): New function.
+
+2008-09-07 Frederic Peters <fpeters@0d.be>
+
+ * gio/gfile.override (_wrap_g_file_load_contents)
+ (_wrap_g_file_load_contents_finish): Fix typos breaking
+ compilation (bug #551212).
+
+2008-09-07 Jonathan Matthew <jonathan@d14n.org>
+
+ Bug 551059 – GFile load_contents methods chop data at first \0
+
+ * gio/gfile.override:
+ Use 's#' (length specified) rather than 's' when constructing
+ result values in load_contents and load_contents_finish.
+
+2008-09-03 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ Post release version bump
+
+=== 2.15.4 ===
+2008-09-03 Johan Dahlin <johan@gnome.org>
+
+ * NEWS: Update
+
+2008-09-03 Loïc Minier <lool@dooz.org>
+
+ * gobject/pygpointer.c: (pyg_register_pointer):
+ Fix typo (s/&type/type) introduced in r886 causing weird crashes on
+ x86-64; bug #550463.
+
+2008-09-01 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * codegen/argtypes.py: add G_TYPE_CLOSURE boxed type in codegen.
+
+2008-08-31 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ Post release version bump
+
+=== 2.15.3 ===
+2008-08-31 Johan Dahlin <johan@gnome.org>
+
+ * NEWS: Update
+
+2008-08-30 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * glib/pyglib.h: * gobject/pygobject.c: Fix memory problems
+ reported by valgrind due to invalid tp_basicsize in
+ PyGPropsDescr_Type. Closes #549945.
+
+2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 549191 – Constructor of gtk.TreeView raises TypeError when
+ model is None
+
+ * gobject/pygtype.c (pyg_value_from_pyobject): Handle None in
+ G_TYPE_INTERFACE branch.
+
+2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 549351 – an unitialized variable in PyGLib
+
+ * glib/pygmainloop.c (pyg_main_loop_init): Initialize
+ `is_running'.
+
+2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547633 – cannot create new threads when pygtk is used
+
+ * glib/pyglib.c (_pyglib_notify_on_enabling_threads): New
+ function.
+ (pyglib_enable_threads): Invoke all callbacks added with new
+ _pyglib_notify_on_enabling_threads().
+
+ * gobject/gobjectmodule.c (pyg_note_threads_enabled): New
+ function (callback for new _pyglib_notify_on_enabling_threads()).
+ (PYGLIB_MODULE_START): Initialize
+ 'pygobject_api_functions.threads_enabled' and also watch for
+ thread being enabled later on.
+
+2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547088 – wrap g_content_types_get_registered()
+
+ * gio/gio.override (_wrap_g_drive_get_volumes): Fix refleak.
+ (_wrap_g_content_types_get_registered): New function.
+
+ * gio/gfileenumerator.override (_wrap_g_file_enumerator_next_files_finish):
+ Fix refleak.
+
+ * gio/gvolumemonitor.override (_wrap_g_volume_monitor_get_connected_drives):
+ Fix refleak.
+ (_wrap_g_volume_monitor_get_volumes): Likewise.
+ (_wrap_g_volume_monitor_get_mounts): Likewise.
+
+2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547494 – gio.InputStream.read() looks broken
+
+ * gio/gio.defs (gio.InputStream.read_part): Rename from read(),
+ document.
+ (gio.InputStream.read): Rename from read_all(), document.
+ (gio.OutputStream.write_part): Rename from write(), document.
+ (gio.OutputStream.write): Rename from write_all(), document.
+
+ * gio/ginputstream.override (_wrap_g_input_stream_read): Fix
+ several bugs.
+ (_wrap_g_input_stream_read_all): New function.
+
+ * gio/goutputstream.override (_wrap_g_output_stream_write_all):
+ New function.
+
+ * tests/test_gio.py (TestInputStream.testRead): Add more tests.
+ (TestInputStream.test_read_part): New test.
+ (TestInputStream._read_in_loop): New helper method.
+ (TestOutputStream.test_write_part): New test.
+
+2008-08-16 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gio/gfile.override (_wrap_g_file_enumerate_children_async): Fix
+ keywords getting out of sync with actual argument order.
+
+2008-08-13 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547495 – wrap four important asynchronous methods in gio.Drive
+ and gio.Mount
+
+ * gio/gio.defs (gio.Drive.eject, gio.Drive.poll_for_media)
+ (gio.Mount.remount): Document.
+
+ * gio/gio.override (_wrap_g_drive_eject)
+ (_wrap_g_drive_poll_for_media, _wrap_g_mount_eject)
+ (_wrap_g_mount_remount): New functions.
+
+2008-08-12 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547484 – wrap gio.DataInputStream.read_line and ...read_until
+
+ * tests/test_gio.py (TestDataInputStream): New test case.
+
+ * gio/gio.defs (gio.DataInputStream.read_line)
+ (gio.DataInputStream.read_until): Document.
+
+ * gio/ginputstream.override (_wrap_g_data_input_stream_read_line)
+ (_wrap_g_data_input_stream_read_until): New functions.
+
+2008-08-12 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547354 – wrap a few memory stream methods
+
+ * gio/ginputstream.override (_wrap_g_memory_input_stream_add_data):
+ New function.
+
+ * gio/gio.defs (gio.MemoryOutputStream.get_contents): Rename from
+ get_data() to avoid name clash.
+
+ * gio/goutputstream.override (_wrap_g_memory_output_stream_new)
+ (_wrap_g_memory_output_stream_get_data): New functions.
+
+ * tests/test_gio.py (TestMemoryInputStream)
+ (TestMemoryOutputStream): New test cases.
+
+2008-08-12 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gio/gio.override: Ignore `g_io_module*' and `g_io_scheduler_*'.
+
+2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 540376 – No TypeError raised when type is None
+
+ * gobject/gobjectmodule.c (pyg_signal_new): Add check on second
+ argument type.
+
+ * tests/test_signal.py (TestSignalCreation): New test case.
+
+2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547104 – improve type wrapper creation
+
+ * gio/gappinfo.override (_wrap_g_app_info_tp_richcompare)
+ (_wrap_g_app_info_tp_repr): New functions.
+
+ * tests/test_gio.py (TestAppInfo.test_eq): New test.
+
+2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547104 – improve type wrapper creation
+
+ * gobject/pygobject.c (pygobject_register_class): Use new
+ pygobject_inherit_slots() to propagate custom slots in normal
+ types too.
+ (pygobject_inherit_slots): New function, break out of
+ pygobject_new_with_interfaces() and rewrite a bit.
+ (pygobject_find_slot_for): Add new argument that can forbid
+ overriding non-NULL slots.
+
+ * gio/gicon.override (pygio_do_icon_richcompare): Remove, the code
+ is now directly in _wrap_g_icon_tp_richcompare().
+ (_wrap_g_file_icon_tp_richcompare, _wrap_g_file_icon_tp_hash)
+ (_wrap_g_themed_icon_tp_richcompare, _wrap_g_themed_icon_tp_hash):
+ Remove, duplicating code in this way is not needed anymore.
+
+2008-08-10 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 546120 – make gio.File more Pythonic
+
+ * gio/gfile.override (_wrap_g_file_tp_richcompare)
+ (_wrap_g_file_tp_hash, _wrap_g_file_tp_repr): New functions.
+
+ * tests/test_gio.py (TestFile.test_eq, TestFile.test_hash): New
+ tests.
+
+2008-08-10 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 547104 – improve runtime type wrapper creation
+
+ * gobject/pygobject.c (pygobject_new_with_interfaces): Use new
+ pygobject_find_slot_for() for `tp_richcompare', `tp_compare`,
+ `tp_hash', `tp_iter', `tp_repr', `tp_str' and `tp_print'.
+ (pygobject_find_slot_for): New static function.
+
+2008-08-10 Jonathan Matthew <jonathan@d14n.org>
+
+ Bug 547134 – fix docstring line length
+
+ * gio/gio.defs:
+ Fix docstring line lengths so they don't wrap across lines in an 80
+ column terminal.
+
+2008-08-10 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs:
+ Add GFile.query_default_handler which was missing from the defs.
+
+2008-08-10 Jonathan Matthew <jonathan@d14n.org>
+
+ Bug 547067 – add File.replace_contents, replace_contents_async,
+ replace_contents_finish.
+
+ * gio/gfile.override:
+ * gio/gio.defs:
+ * tests/test_gio.py:
+ Add overrides, docs, and tests for File.replace_contents,
+ replace_contents_async, and replace_contents_finish.
+
+2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * tests/test_gicon.py (TestThemedIcon.test_constructor): Fix to
+ not use `use_default_fallbacks' property (it's new).
+
+2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 546135 – GIcon and implementations improvements
+
+ * gio/gio.defs (g_file_icon_new): Change from method of gio.File
+ to constructor of gio.FileIcon.
+
+ * tests/test_gicon.py (TestIcon.test_eq, Test_Eq.test_hash)
+ (TestLoadableIcon.setUp): Adapt accordingly.
+ (TestFileIcon): New test case.
+
+2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 546591 – File.copy progress_callback does not work
+
+ * gio/gfile.override (file_progress_callback_marshal): Use
+ PyObject_CallFunction() instead of PyEval_CallFunction(). Use "K"
+ instead of "k" (the latter is not correct for 32-bit platforms).
+ Don't free 'notify' here.
+ (_wrap_g_file_copy): Free 'notify'.
+ (_wrap_g_file_move): Likewise.
+
+ * gio/gio.override (pygio_free_notify): New function.
+ (async_result_callback_marshal): Use it.
+
+ * tests/test_gio.py (TestFile.test_copy_progress.progress): New
+ test.
+
+2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 546135 – GIcon and implementations improvements
+
+ * gio/gio.defs (gio.LoadableIcon.load)
+ (gio.LoadableIcon.load_async, gio.LoadableIcon.load_finish):
+ Document.
+
+ * gio/Makefile.am:
+ * gio/gicon.override: New file: parts of 'gio.override', three
+ methods of gio.LoadableIcon and gio.ThemedIcon constructor.
+
+ * gio/gio.override: Move over all icon-related overrides to
+ 'gicon.override'.
+
+ * tests/Makefile.am:
+ * tests/test_gicon.py: New file: parts of 'test_gio.py' and
+ several new gio.Icon tests.
+
+ * tests/test_gio.py (TestThemedIcon): Move over to
+ 'test_gicon.py'.
+
+2008-08-07 Jonathan Matthew <jonathan@d14n.org>
+
+ Bug 546734 – Missing Py_INCREFs for some file async methods
+
+ * gio/gfile.override:
+ Increment refcounts on callbacks and callback data for
+ append_to_async, create_async, replace_async, query_info_async and
+ load_contents_async as for all other async methods.
+
+2008-08-06 Johan Dahlin <johan@gnome.org>
+
+ * gio/gfile.override:
+ * gio/gio.defs:
+ Move the progress callback for move/copy so it's consistent with
+ the documentation and positional arguments. Update documentation as well
+
+2008-08-06 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib.c (pyglib_enable_threads):
+ * gobject/gobjectmodule.c (pyg_threads_init),
+ (pygobject_enable_threads):
+ Add a pygobject_enable_threads wrapper around pyglib_threads_enable
+ and return 0/-1 which existing gobject based applications expect.
+
+2008-08-06 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib.c (pyglib_init):
+ return in case of error instead of trying to access the internal
+ types.
+
+2008-08-06 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gio/gio.override: Add 'pygio_do_icon_richcompare' prototype to
+ header.
+ (_wrap_g_file_icon_tp_repr, _wrap_g_themed_icon_tp_repr): Fix
+ return value type in signature.
+
+2008-08-05 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ Bug 546135 – GIcon and implementations improvements
+
+ * gio/gio-types.defs (FileIcon): New 'define-object'.
+
+ * gio/gio.override (pygio_do_icon_richcompare)
+ (_wrap_g_icon_tp_richcompare, _wrap_g_icon_tp_hash)
+ (_wrap_g_file_icon_tp_richcompare, _wrap_g_file_icon_tp_hash)
+ (_wrap_g_file_icon_tp_repr, _wrap_g_themed_icon_tp_richcompare)
+ (_wrap_g_themed_icon_tp_hash, _wrap_g_themed_icon_tp_repr): New
+ functions.
+
+2008-08-03 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 546046 – Wrap GFile.replace_async and query_info_async
+
+ * tests/test_gio.py:
+ * gio/gfile.override:
+ * gio/gio.defs:
+ Wrap GFile.replace_async and query_info_async with docs and test.
+
+2008-08-03 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * glib/pyglib.h:
+ * glib/pyglib.c (pyglib_enable_threads): Change return value from
+ 'gboolean' to 'int' and changed semantics to Pythonic: restores
+ backwards compatibility.
+
+ * gobject/gobjectmodule.c (pyg_threads_init): Treat return value
+ accordingly (bug #544946).
+
+2008-08-02 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 546020 – Wrap GFile.create_async
+
+ * tests/test_gio.py:
+ * gio/gfile.override:
+ * gio/gio.defs:
+ Wrap GFile.create_async with docs and test
+
+2008-08-02 Johan Dahlin <johan@gnome.org>
+
+ * codegen/docgen.py:
+ Remove SGML support, require python 2.4, modernize,
+ PEP-8ify. Make it run on gio.
+
+ * codegen/definitions.py:
+ Make property iterable
+
+ * gio/gio.defs:
+ Include the gio-types.defs file.
+
+2008-08-02 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (pyglib_set_prgname):
+ * glib/pygoptioncontext.c (pyg_option_context_init),
+ (pyg_option_context_set_help_enabled),
+ (pyg_option_context_set_ignore_unknown_options),
+ (pyg_option_context_set_main_group),
+ (pyg_option_context_add_group):
+ * glib/pygoptiongroup.c (arg_func), (pyg_option_group_add_entries),
+ (pyg_option_group_set_translation_domain),
+ (pyg_option_group_compare), (pyglib_option_group_register_types):
+ Fix compilation warnings, clean up style and indentation.
+
+2008-08-02 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 545959 – Wrap GFile.append_to_async
+
+ * tests/test_gio.py:
+ * gio/gfile.override:
+ * gio/gio.defs:
+ Wrap GFile.append_to_async with docs and test
+
+2008-08-02 Johan Dahlin <johan@gnome.org>
+
+ * gio/gfileinfo.override:
+ * gio/gio.override:
+ * glib/glibmodule.c (pyglib_get_current_time):
+ * glib/pyglib.c (pyglib_float_from_timeval):
+ * glib/pyglib.h:
+ Add pyglib_float_from_timeval and use it
+
+2008-08-02 Johan Dahlin <johan@gnome.org>
+
+ * docs/Makefile.am:
+ * docs/reference/pyglib-constants.xml:
+ * docs/reference/pyglib-functions.xml:
+ * docs/reference/pyglib-maincontext.xml:
+ * docs/reference/pyglib-mainloop.xml:
+ * docs/reference/pygobject-classes.xml:
+ * docs/reference/pygobject-constants.xml:
+ * docs/reference/pygobject-functions.xml:
+ * docs/reference/pygobject-maincontext.xml:
+ * docs/reference/pygobject-mainloop.xml:
+ Separate the glib and gobject bindings in the manual.
+
+2008-08-02 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ Bug 545920 – Wrap GFile.query_writable_namespaces
+
+ * tests/test_gio.py:
+ * gio/gfile.override:
+ * gio/gio.defs:
+ Wrap GFile.query_writable_namespaces with docs and test
+
+2008-08-02 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.defs:
+ * gio/gfile.override:
+ * tests/test_gio.py:
+ Wrap gio.File.move
+
+2008-08-02 Johan Dahlin <johan@gnome.org>
+
+ * gio/Makefile.am:
+ * gio/gfile.override:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * gio/gvolume.override:
+ Wrap gio.Volume.mount and gio.Volume.eject
+
+2008-08-01 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gio.defs:
+ Add docstring for gio.FileInfo.list_attributes
+
+2008-08-01 Johan Dahlin <johan@gnome.org>
+
+ Bug 545861 – g_file_info_get_modification_time is missing
+ * gio/gfileinfo.override:
+ * gio/gio.defs:
+ * tests/test_gio.py:
+ Wrap, add test and documentation
+
+2008-08-01 Johan Dahlin <johan@gnome.org>
+
+ Bug 545846 – g_vfs_get_supported_uri_schemes is missing
+
+ * gio/gio.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Wrap, add test and documentation
+
+2008-08-01 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (pyglib_set_application_name):
+ Use %r instead of %s, this is not python!
+
+2008-07-31 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (pyglib_set_prgname)
+ (pyglib_set_application_name): Use METH_O instead of METH_VARARGS.
+ (_glib_functions): Add doc strings for idle_add, timeout_add,
+ timeout_add_seconds, io_add_watch, child_watch_add, source_remove,
+ main_depth and main_context_default.
+
+2008-07-29 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * tests/test_gio.py:
+ * gio/gfileattribute.override:
+ * gio/gio.override:
+ * gio/gio.defs:
+ * gio/gfile.override:
+ * gio/Makefile.am: Wrap new object gio.FileAttributeInfo,
+ g_file_set_attribute and g_file_query_settable_attributes methods.
+
+2008-07-29 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/unix-types.defs: Wrap gio.unix.DesktopAppInfo
+
+ * gio/gappinfo.override:
+ * gio/gio.override:
+ * gio/gio.defs:
+ * gio/gapplaunchcontext.override:
+ * gio/Makefile.am: Wrap g_app_info_launch_uris,
+ g_app_info_launch, g_app_launch_context_get_display and
+ g_app_launch_context_get_startup_notify_id
+
+ * gio/pygio-utils.c:
+ * gio/pygio-utils.h: Add a couple of useful function to reduce the
+ code in wrapped methods.
+
+2008-07-29 Johan Dahlin <johan@gnome.org>
+
+ * examples/gio/downloader.py:
+ * gio/giomodule.c (init_gio):
+ Add gio.FILE_ATTRIBUTE_* constants and update the examples to use them.
+
+2008-07-29 Johan Dahlin <johan@gnome.org>
+
+ * examples/gio/downloader.py:
+ Add a new example
+
+ * gio/ginputstream.override:
+ Use a string internally instead of a PyStringObject when
+ in read_async. Create a new python string in finish and
+ honor the number of bytes read.
+
+2008-07-28 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib-python-compat.h:
+ * gobject/pygobject-private.h:
+ Move all compatibility into the same place, fixes build
+ on python 2.4.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * glib/option.py:
+ Remove tabs. Use sys.exc_info()[1] to fetch the exception value
+
+ * gobject/__init__.py:
+ * gobject/propertyhelper.py:
+ Import gobject._gobject instead of just gobject.
+
+ * gobject/Makefile.am:
+ * gobject/constants.py.in:
+ * gobject/generate-constants.c (main):
+ Don't add long suffix if python >= 3.0
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib-python-compat.h:
+ * gobject/gobjectmodule.c (pyg_object_new),
+ (pyg__install_metaclass):
+ * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_init),
+ (pyg_register_boxed):
+ * gobject/pygenum.c (pyg_enum_reduce):
+ * gobject/pyginterface.c (pyg_interface_init),
+ (pyg_register_interface):
+ * gobject/pygobject.c (pygobject_get_inst_data),
+ (pygobject_register_class), (pygobject_new_with_interfaces),
+ (pygobject_dealloc), (pygobject_repr), (pygobject_emit),
+ (pygobject_chain_from_overridden), (pygobject_weak_ref_notify):
+ * gobject/pygparamspec.c (pygobject_paramspec_register_types):
+ * gobject/pygpointer.c (pyg_pointer_dealloc), (pyg_pointer_init),
+ (pyg_register_pointer):
+ * gobject/pygtype.c (pyg_type_from_object),
+ (pyg_value_array_from_pyobject), (pyg_value_from_pyobject),
+ (pyg_object_descr_doc_get):
+ Use the Py_TYPE macro everywhere.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib-python-compat.h:
+ Add a Py_TYPE macro for accessing ob_type.
+ * glib/glibmodule.c (pyglib_register_constants):
+ * gobject/gobjectmodule.c (pygobject__g_instance_init),
+ (pyg_integer_richcompare):
+ * gobject/pygenum.c (pyg_enum_repr), (pyg_enum_from_gtype),
+ (pyg_enum_add), (pyg_enum_get_value_name),
+ (pyg_enum_get_value_nick):
+ * gobject/pygflags.c (pyg_flags_repr), (pyg_flags_from_gtype),
+ (pyg_flags_add), (pyg_flags_and), (pyg_flags_or), (pyg_flags_xor),
+ (pyg_flags_get_first_value_name), (pyg_flags_get_first_value_nick),
+ (pyg_flags_get_value_names), (pyg_flags_get_value_nicks):
+ Use Py_TYPE and PyLong macros to access struct fields
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_param_spec_from_object),
+ (add_properties), (pyg_signal_new), (pyg_signal_list_ids),
+ (pyg_signal_lookup), (pyg_signal_query):
+ * gobject/pygenum.c (pyg_enum_richcompare), (pyg_enum_new),
+ (pyg_enum_from_gtype), (pyg_enum_add), (pyg_enum_reduce),
+ (pygobject_enum_register_types):
+ * gobject/pygflags.c (pyg_flags_richcompare), (pyg_flags_new),
+ (pyg_flags_from_gtype), (pyg_flags_add), (pyg_flags_and),
+ (pyg_flags_or), (pyg_flags_xor), (pygobject_flags_register_types):
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c (pygobject_disconnect_by_func),
+ (pygobject_handler_block_by_func),
+ (pygobject_handler_unblock_by_func), (pygobject_get_refcount):
+ * gobject/pygparamspec.c (pyg_param_spec_getattr):
+ * gobject/pygtype.c (_wrap_g_type_wrapper__get_depth),
+ (pyg_type_from_object), (pyg_enum_get_value),
+ (pyg_flags_get_value), (pyg_value_from_pyobject),
+ (pyg_value_as_pyobject):
+ Use _PyLong macros.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * gobject/pygboxed.c (pygobject_boxed_register_types):
+ * gobject/pygenum.c (pygobject_enum_register_types):
+ * gobject/pygflags.c (pygobject_flags_register_types):
+ * gobject/pygobject.c (pygobject_object_register_types):
+ * gobject/pygparamspec.c (pygobject_paramspec_register_types):
+ * gobject/pygpointer.c (pygobject_pointer_register_types):
+ * gobject/pygtype.c (pygobject_type_register_types):
+ Use PYGLIB_DEFINE_TYPE macro and move struct field initialization
+ to the registration methods.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib-python-compat.h:
+ Add _PyUnicode_Type macro
+
+ * gobject/gobjectmodule.c (pyg_type_name), (pyg_type_from_name),
+ (_pyg_signal_accumulator), (add_signals), (add_properties),
+ (get_type_name_for_class), (pyg_signal_list_names),
+ (pyg_signal_name), (pyg_signal_query), (pyg_object_new),
+ (pyg_add_emission_hook), (pyg_remove_emission_hook):
+ * gobject/pygboxed.c (pyg_boxed_repr):
+ * gobject/pygenum.c (pyg_enum_repr), (pyg_enum_add),
+ (pyg_enum_get_value_name), (pyg_enum_get_value_nick):
+ * gobject/pygflags.c (pyg_flags_repr), (pyg_flags_add),
+ (pyg_flags_get_first_value_name), (pyg_flags_get_first_value_nick),
+ (pyg_flags_get_value_names), (pyg_flags_get_value_nicks):
+ * gobject/pygobject.c (build_parameter_list), (PyGProps_getattro),
+ (PyGProps_setattro), (pygobject_register_class), (pygobject_repr),
+ (pygobject_init), (pygobject_get_properties),
+ (pygobject_set_properties), (pygobject_connect),
+ (pygobject_connect_after), (pygobject_connect_object),
+ (pygobject_connect_object_after), (pygobject_emit),
+ (pygobject_stop_emission), (pygobject_disconnect_by_func),
+ (pygobject_handler_block_by_func),
+ (pygobject_handler_unblock_by_func),
+ (pygobject_object_register_types):
+ * gobject/pygparamspec.c (pyg_param_spec_repr),
+ (pyg_param_spec_getattr):
+ * gobject/pygpointer.c (pyg_pointer_repr):
+ * gobject/pygtype.c (pyg_type_wrapper_repr),
+ (_wrap_g_type_wrapper__get_name), (pyg_type_from_object),
+ (pyg_enum_get_value), (pyg_flags_get_value),
+ (pyg_value_from_pyobject), (pyg_value_as_pyobject),
+ (object_doc_descr_get), (_pyg_strv_from_gvalue),
+ (_pyg_strv_to_gvalue):
+
+ Use _PyUnicode_* macros in the gobject module
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c (PYGLIB_MODULE_START):
+ * gobject/pygobject-private.h:
+ Use glib macros to define the module, update export regexp.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/pygboxed.c (pygobject_boxed_register_types):
+ * gobject/pygboxed.h:
+ * gobject/pygenum.c (pygobject_enum_register_types):
+ * gobject/pygenum.h:
+ * gobject/pygflags.c (pygobject_flags_register_types):
+ * gobject/pygflags.h:
+ * gobject/pygpointer.c (pygobject_pointer_register_types):
+ * gobject/pygpointer.h:
+ Split out quark and type registration to the respective
+ implementation source files, add headers.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c (pygobject_register_api),
+ (pygobject_register_constants), (pygobject_register_features),
+ (pygobject_register_version_tuples), (pygobject_register_warnings),
+ (init_gobject):
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c (pyobject_copy), (pyobject_free),
+ (pygobject_object_register_types):
+ * gobject/pygtype.c (_pyg_strv_from_gvalue), (_pyg_strv_to_gvalue),
+ (pygobject_type_register_types):
+ * gobject/pygtype.h:
+ Move off a bit more to separate functions, cleaning up the init_glib
+ a bit more.
+
+2008-07-27 Johan Dahlin <johan@gnome.org>
+
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c:
+ * gobject/pygparamspec.c (pygobject_paramspec_register_types):
+ * gobject/pygparamspec.h:
+ * gobject/pygtype.c:
+ Move paramspec registration to a separate file, add a header
+ for the internal API.
+
+2008-07-27 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gobject/pygtype.c (pyg_enum_get_value): Issue warning if 'obj'
+ is a PyGEnum of wrong type, i.e. not matching 'enum_type' (bug
+ #503771).
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ reviewed by: <delete if not using a buddy>
+
+ * glib/pyglib-python-compat.h:
+ * glib/pyglib.h:
+ Make a few macros public
+
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/pyginterface.c (pyg_interface_init),
+ (pyg_interface_free), (pyg_register_interface),
+ (pyg_register_interface_info), (pyg_lookup_interface_info),
+ (pygobject_interface_register_types):
+ * gobject/pyginterface.h:
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c:
+ Move GInterface wrapper into its own file
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/Makefile.am:
+ Also export PyInit_glib
+ * glib/__init__.py:
+ import glib._glib instead of just _glib
+ * glib/pyglib-python-compat.h:
+ * glib/pygoptioncontext.c (pyg_option_context_parse):
+ * glib/pygsource.c (source_repr), (pyg_source_attach),
+ (pyg_source_get_priority), (pyg_source_set_priority),
+ (pyg_source_get_id), (pyg_source_prepare), (pyg_poll_fd_repr):
+ * glib/pygspawn.c (pyg_pid_close), (pyg_pid_free), (pyg_pid_new),
+ (pyglib_spawn_async), (pyglib_spawn_register_types):
+ Go over the rest and replace missing symbols on python3.
+ the glib module successfully compiles and runs now.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/pygiochannel.c (py_io_channel_shutdown),
+ (py_io_channel_set_buffer_size), (py_io_channel_get_buffer_size),
+ (py_io_channel_set_buffered), (py_io_channel_get_buffered),
+ (py_io_channel_set_encoding), (py_io_channel_get_encoding),
+ (py_io_channel_read_chars), (py_io_channel_write_chars),
+ (py_io_channel_write_lines), (py_io_channel_flush),
+ (py_io_channel_set_flags), (py_io_channel_get_flags),
+ (py_io_channel_get_buffer_condition),
+ (py_io_channel_set_close_on_unref), (py_io_channel_add_watch),
+ (py_io_channel_win32_poll), (py_io_channel_win32_make_pollfd),
+ (py_io_channel_read_line), (py_io_channel_read_lines),
+ (py_io_channel_seek), (py_io_channel_init):
+ * glib/pyglib.c (pyglib_gerror_exception_check):
+ * glib/pygoptioncontext.c (pyg_option_context_init):
+ * glib/pygoptiongroup.c (check_if_owned):
+ * glib/pygsource.c (pyg_idle_init), (pyg_timeout_init),
+ (pyg_poll_fd_init):
+ gobject -> glib
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/pygmaincontext.c (pyglib_maincontext_register_types):
+ * glib/pygmainloop.c (pyg_main_loop_init),
+ (pyglib_mainloop_register_types):
+ * glib/pygoptioncontext.c (pyg_option_context_set_main_group),
+ (pyglib_option_context_register_types):
+ * glib/pygoptiongroup.c (pyglib_option_group_register_types):
+ * glib/pygspawn.c (pyglib_spawn_register_types):
+ Convert the pid/mainloop/maincontext/optiongroup/optioncontext.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/pygsource.c (pyglib_source_register_types):
+ Convert the source objects to use macros, saves ~150 lines of code!
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (get_handler_priority), (pyglib_idle_add),
+ (pyglib_timeout_add), (pyglib_timeout_add_seconds),
+ (pyglib_io_add_watch), (pyglib_child_watch_add),
+ (pyglib_markup_escape_text), (pyglib_main_depth),
+ (pyglib_filename_from_utf8), (pyglib_get_application_name),
+ (pyglib_get_prgname), (PYGLIB_MODULE_START):
+ * glib/pygiochannel.c (py_io_channel_next),
+ (py_io_channel_shutdown), (py_io_channel_get_buffer_size),
+ (py_io_channel_get_buffered), (py_io_channel_get_encoding),
+ (py_io_channel_read_chars), (py_io_channel_write_chars),
+ (py_io_channel_write_lines), (py_io_channel_flush),
+ (py_io_channel_set_flags), (py_io_channel_get_flags),
+ (py_io_channel_get_buffer_condition), (py_io_channel_win32_poll),
+ (py_io_channel_read_line), (py_io_channel_read_lines),
+ (py_io_channel_seek), (pyglib_iochannel_register_types):
+ * glib/pyglib-private.h:
+ * glib/pyglib-python-compat.h:
+ * glib/pyglib.c (pyglib_init), (pyglib_error_check),
+ (pyglib_gerror_exception_check),
+ (pyglib_register_exception_for_domain):
+ Add macros for supporting additional python versions.
+ Start using them for the glib module. Tested on python 2.5 and 3.0.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ * m4/python.m4:
+ Add macros which are compatible with python > 2.6.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ Post release version bump
+
+=== 2.15.2 ===
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * NEWS: Update
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * gobject/Makefile.am (_gobject_la_SOURCES): Build fix, remove
+ extra \
+
+ * examples/gio/directory-async.py:
+ * gio/Makefile.am:
+ * gio/giomodule.c (init_gio):
+ * glib/pyglib.c (pyglib_error_check),
+ (pyglib_register_exception_for_domain):
+ * glib/pyglib.h:
+ * tests/test_gio.py:
+ Add a new API for registering exceptions for a GError domain.
+ Register a new exception for G_IO_ERROR, update tests
+ and examples to use the new exception.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/pygoptioncontext.c (pyg_option_context_set_main_group),
+ (pyg_option_context_add_group):
+ Send in a PyObject instead of a PyGOptionGroup object.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/Makefile.am:
+ * glib/glibmodule.c (pyglib_register_constants), (init_glib):
+ * glib/option.py:
+ * glib/pyglib.c (pyglib_init),
+ (pyglib_option_group_transfer_group), (pyglib_option_group_new),
+ (pyglib_option_context_new):
+ * glib/pyglib.h:
+ * glib/pygoptioncontext.c (pyg_option_context_parse),
+ (pyg_option_context_set_main_group),
+ (pyg_option_context_add_group),
+ (pyglib_option_context_register_types):
+ * glib/pygoptioncontext.h:
+ * glib/pygoptiongroup.c (arg_func),
+ (pyglib_option_group_register_types):
+ * glib/pygoptiongroup.h:
+ * gobject/Makefile.am:
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/option.py:
+ * gobject/pygobject-private.h:
+ * gobject/pygoptioncontext.c:
+ * gobject/pygoptiongroup.c:
+ Move option over from gobject to glib.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * tests/common.py:
+ * tests/test_conversion.py:
+ * tests/test_enum.py:
+ * tests/test_interface.py:
+ * tests/test_option.py:
+ * tests/test_source.py:
+ * tests/test_subprocess.py:
+ * tests/test_subtype.py:
+ * tests/test_thread.py:
+ * tests/test_unknown.py:
+ Run pyflakes on the testsuite, remove unused imports
+ and reorganize others.
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (pyglib_register_constants), (init_glib):
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c (init_gobject):
+ Move over glib constants to gobject
+ * tests/test_gio.py:
+ * tests/test_mainloop.py:
+ * tests/test_source.py:
+ * tests/test_subprocess.py:
+ * tests/test_thread.py:
+ Update tests to refer to glib when appropriate
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * README:
+ * configure.ac:
+ Bump required glib version to 2.10
+
+2008-07-26 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (child_watch_dnotify),
+ (pyglib_child_watch_add):
+ * glib/pygiochannel.c (pyg_iowatch_data_free),
+ (py_io_channel_add_watch):
+ * glib/pygspawn.c (_pyg_spawn_async_callback),
+ (pyglib_spawn_async):
+ Use g_slice_new instead of g_new
+
+2008-07-25 Johan Dahlin <johan@gnome.org>
+
+ * gobject/Makefile.am:
+ * tests/Makefile.am:
+ Make distcheck pass
+
+2008-07-25 Johan Dahlin <johan@gnome.org>
+
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/pygobject-private.h:
+ Remove private structures which moved to pyglib.
+
+2008-07-24 Johan Dahlin <johan@gnome.org>
+
+ Bug 544600 – pygobject building failed since 839 revision,
+ error : "Py_ssize_t" undeclared
+
+ * glib/pyglib-private.h: Add backward compatibility macros for
+ python 2.4.
+
+ * gio/gfile.override:
+ * gio/gfileenumerator.override:
+ * gio/ginputstream.override:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * gio/goutputstream.override:
+ * tests/test_gio.py:
+ Wrap gio.File.copy, add tests and documentation.
+ Rename PyGAsyncRequestNotify to PyGIONotify and reuse it.
+
+2008-07-23 Johan Dahlin <johan@gnome.org>
+
+ * glib/pyglib.c (_pyglib_destroy_notify):
+ Rename the function too, not just the prototype!
+
+2008-07-21 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (pyglib_idle_add), (pyglib_timeout_add),
+ (pyglib_timeout_add_seconds), (pyglib_io_add_watch):
+ * glib/pyglib-private.h:
+ * glib/pyglib.c (pyglib_destroy_notify), (_pyglib_handler_marshal):
+ * glib/pyglib.h:
+ * glib/pygsource.c (pyg_source_set_callback):
+ Make pyglib_destroy_notify and pyglib_handler_marshal private.
+ Add a few public prototypes.
+
+2008-07-21 Johan Dahlin <johan@gnome.org>
+
+ * glib/glibmodule.c (pyglib_idle_add), (pyglib_timeout_add),
+ (pyglib_timeout_add_seconds), (pyglib_io_add_watch),
+ (pyglib_source_remove), (pyglib_child_watch_add),
+ (pyglib_markup_escape_text), (pyglib_get_current_time),
+ (pyglib_main_depth), (pyglib_filename_display_name),
+ (pyglib_filename_display_basename), (pyglib_filename_from_utf8),
+ (pyglib_get_application_name), (pyglib_set_application_name),
+ (pyglib_get_prgname), (pyglib_set_prgname), (pyglib_register_api),
+ (pyglib_register_error):
+ Mark as static, rename from pyg_* -> pyglib_*. Fill in api struct,
+ rename struct and remove function suffix.
+
+2008-07-21 Johan Dahlin <johan@gnome.org>
+
+ * glib/Makefile.am:
+ * glib/glibmodule.c (pyg_idle_add), (pyg_timeout_add),
+ (pyg_timeout_add_seconds), (pyg_io_add_watch),
+ (pyglib_register_api), (pyglib_register_error),
+ (pyglib_register_version_tuples), (init_glib):
+ * glib/pygiochannel.c (py_io_channel_next),
+ (py_io_channel_shutdown), (py_io_channel_set_encoding),
+ (py_io_channel_read_chars), (py_io_channel_write_chars),
+ (py_io_channel_write_lines), (py_io_channel_flush),
+ (py_io_channel_set_flags), (py_io_channel_read_line),
+ (py_io_channel_read_lines), (py_io_channel_seek),
+ (py_io_channel_init), (pyglib_iochannel_register_types):
+ * glib/pygiochannel.h:
+ * glib/pyglib-private.h:
+ * glib/pyglib.c (pyglib_threads_enabled),
+ (pyglib_gil_state_ensure), (pyglib_gil_state_release),
+ (pyglib_enable_threads), (pyglib_block_threads),
+ (pyglib_unblock_threads), (pyglib_set_thread_block_funcs),
+ (pyglib_handler_marshal), (pyglib_destroy_notify):
+ * glib/pyglib.h:
+ * glib/pygsource.c (pyg_source_set_callback),
+ (pyglib_source_register_types):
+ * glib/pygsource.h:
+ * glib/pygspawn.c (pyglib_spawn_register_types):
+ * glib/pygspawn.h:
+ * gobject/Makefile.am:
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c (pyg_set_thread_block_funcs),
+ (init_gobject):
+ * gobject/pygiochannel.c:
+ * gobject/pygobject-private.h:
+ * gobject/pygsource.c:
+ Move over Source, IOChannel, Idle, Timeout and PollFD to glib from
+ gobject.
+ Clean up and add a bit of new api for glib.
+
+2008-07-21 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ Use yes/no instead of true/false. Avoid bashism.
+ Fix another logic bug, and let's hope I didn't break anything
+
+2008-07-20 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * configure.ac (pygobject_CODEGEN_DEFINES): Fix libffi check
+ logic.
+
+2008-07-20 Johan Dahlin <johan@gnome.org>
+
+ * glib/Makefile.am:
+ * glib/glibmodule.c (pyglib_main_context_default), (init_glib):
+ * glib/pyglib.c (pyglib_init), (pyglib_threads_enabled),
+ (pyglib_main_context_new):
+ * glib/pyglib.h:
+ * glib/pygmaincontext.c (_wrap_g_main_context_iteration),
+ (pyglib_maincontext_register_types):
+ * glib/pygmaincontext.h:
+ * glib/pygmainloop.c (pyg_signal_watch_prepare),
+ (pyg_signal_watch_check), (pyg_main_loop_new),
+ (_wrap_g_main_loop_get_context), (_wrap_g_main_loop_run),
+ (pyglib_mainloop_register_types):
+ * glib/pygmainloop.h:
+ * gobject/Makefile.am:
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c (pyg_destroy_notify), (pyobject_free),
+ (pyg_object_set_property), (pyg_object_get_property),
+ (_pyg_signal_accumulator), (pygobject__g_instance_init),
+ (pyg_handler_marshal), (pygobject_gil_state_ensure),
+ (pygobject_gil_state_release), (marshal_emission_hook),
+ (_log_func), (init_gobject):
+ * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_new):
+ * gobject/pygenum.c (pyg_enum_add):
+ * gobject/pygflags.c (pyg_flags_add):
+ * gobject/pygiochannel.c (pyg_iowatch_marshal):
+ * gobject/pygmaincontext.c:
+ * gobject/pygmainloop.c:
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c (pygobject_data_free), (pyg_toggle_notify),
+ (pygobject_new_with_interfaces), (pygobject_weak_ref_notify):
+ * gobject/pygobject.h:
+ * gobject/pygoptiongroup.c (destroy_g_group), (arg_func):
+ * gobject/pygpointer.c (pyg_pointer_new):
+ * gobject/pygsource.c (pyg_source_get_context),
+ (pyg_source_prepare), (pyg_source_check), (pyg_source_dispatch),
+ (pyg_source_finalize):
+ * gobject/pygtype.c (pyg_closure_invalidate),
+ (pyg_closure_marshal), (pyg_signal_class_closure_marshal):
+ * tests/common.py:
+
+ Move maincontext and mainloop over to glib.
+ Update the threadstate api to use the variant in glib.
+
+2008-07-20 Johan Dahlin <johan@gnome.org>
+
+ * glib/Makefile.am:
+ * gobject/Makefile.am:
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c (pyg_threads_init), (pyg_error_check),
+ (pyg_gerror_exception_check), (init_gobject):
+ * gobject/option.py:
+ Install the glib module, the helper library and the headers.
+ Use it from gobject and remove the old glib specific code from there.
+
+2008-07-20 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ * gobject/Makefile.am:
+ Use pkg-config to check for libffi again.
+
+2008-07-20 Johan Dahlin <johan@gnome.org>
+
+ * glib/Makefile.am:
+ * glib/glibmodule.c (pyg_main_context_default):
+ * glib/pyglib.c (pyglib_gerror_exception_check):
+ * glib/pyglib.h:
+ Rename helper library to libpyglib-2.0.
+ Move over pyg_gerror_exception_check as well.
+
+2008-07-20 Johan Dahlin <johan@gnome.org>
+
+ * Makefile.am:
+ * configure.ac:
+ * glib/Makefile.am:
+ * glib/__init__.py:
+ * glib/glibmodule.c (pyg_destroy_notify), (get_handler_priority),
+ (pyg_handler_marshal), (pyg_idle_add), (pyg_timeout_add),
+ (pyg_timeout_add_seconds), (iowatch_marshal), (pyg_io_add_watch),
+ (pyg_source_remove), (pyg_main_context_default),
+ (child_watch_func), (child_watch_dnotify), (pyg_child_watch_add),
+ (pyg_markup_escape_text), (pyg_get_current_time), (pyg_main_depth),
+ (pyg_filename_display_name), (pyg_filename_display_basename),
+ (pyg_filename_from_utf8), (pyg_get_application_name),
+ (pyg_set_application_name), (pyg_get_prgname), (pyg_set_prgname),
+ (pyg_register_api), (pyg_register_error),
+ (pyg_register_version_tuples), (init_glib):
+ * glib/pyglib-private.h:
+ * glib/pyglib.c (pyglib_init), (pyglib_init_internal),
+ (pyglib_gil_state_ensure), (pyglib_gil_state_release),
+ (pyglib_enable_threads), (pyglib_gil_state_ensure_py23),
+ (pyglib_gil_state_release_py23), (pyglib_error_check):
+ * glib/pyglib.h:
+ * glib/pygspawn.c (pyg_pid_close), (pyg_pid_free),
+ (pyg_pid_tp_init), (pyg_pid_new), (_pyg_spawn_async_callback),
+ (pyglib_spawn_async), (pyg_spawn_register_types):
+ * glib/pygspawn.h:
+ Add glib bindings, currently not installed or used.
+ Add some internal API and move over a couple of functions
+ from the gobject module. Still very much a work in progress.
+
+2008-07-19 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.override:
+ Ignore a bunch of functions which are not relevant.
+
+2008-07-19 Johan Dahlin <johan@gnome.org>
+
+ * gio/gfile.override:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Bind gio.Mount.unmount, gio.File.mount_mountable,
+ gio.File.unmount_mountable and gio.File.mount_enclosing_volume.
+ Add documents and tests.
+
+2008-07-19 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.override: Set module name back to
+ gio, as setting it to gio._gio breaks pydoc.
+
+ * gio/gio.defs:
+ Use property based constructors when possible.
+
+2008-07-19 Johan Dahlin <johan@gnome.org>
+
+ * examples/gio/directory-async.py:
+ * gio/gfileenumerator.override:
+ * gio/gio.defs:
+ * tests/test_gio.py:
+ Wrap gio.FileEnumerator.next_files_async/next_files_done.
+ Update the example to use them instead of the synchronous versions,
+ add documentation and tests.
+
+2008-07-19 Johan Dahlin <johan@gnome.org>
+
+ * examples/gio/directory-async.py:
+ Only fetch name, saves a couple of syscalls.
+ * gio/gio.override:
+ Set name to gio._gio so pychecker/pydoc works.
+
+2008-07-18 Johan Dahlin <johan@gnome.org>
+
+ * examples/gio/directory-async.py:
+ * gio/gfile.override:
+ * gio/gfileenumerator.override:
+ * gio/gio.defs:
+ * tests/test_gio.py:
+ Wrap gio.File.enumerate_children_async, add tests, docstring
+ and an example.
+ Also document gio.File.enumerate while we're at it.
+
+2008-07-18 Johan Dahlin <johan@gnome.org>
+
+ * gio/gfile.override:
+ Use %zd instead of %d since it's a Py_ssize_t and not an int.
+
+2008-07-18 Johan Dahlin <johan@gnome.org>
+
+ * gio/pygio-utils.h:
+ define NO_IMPORT_PYGOBJECT before including pygobject.h
+
+2008-07-18 Johan Dahlin <johan@gnome.org>
+
+ * gio/giomodule.c (init_gio):
+ Require pygobject 2.15.2
+
+2008-07-17 Johan Dahlin <johan@gnome.org>
+
+ * gio/giomodule.c (init_gio):
+ Add a pygio_version module attribute
+ (DL_EXPORT): The module is called gio._gio, not just _gio.
+
+2008-07-17 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio-types.defs:
+ Rename gio.IOErrorEnum to gio.ErrorEnum
+
+2008-07-17 Johan Dahlin <johan@gnome.org>
+
+ * gio/giomodule.c (init_gio):
+ Add gio.ERROR which maps to the G_IO_ERROR quark.
+
+2008-07-17 Johan Dahlin <johan@gnome.org>
+
+ * gio/giomodule.c (init_gio):
+ Use the prefix G_IO_ for stripping constants instead of just G_
+ * gobject/gobjectmodule.c (pyg_constant_strip_prefix):
+ Check so the fist part of name and strip_prefix are the same,
+ if they don't, just strip of the part of strip_prefix which
+ matches.
+
+ This removes the initial IO_* prefix for some constants in gio.
+ Eg, gio.IO_ERROR_* -> gio.ERROR_*
+
+2008-07-16 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac: Post release version bump
+
+=== 2.15.1 ===
+2008-07-16 Johan Dahlin <johan@gnome.org>
+
+ * NEWS: Update
+
+2008-07-15 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * codegen/pygobject-codegen-2.0.in: Rename from
+ 'pygtk-codegen-2.0.in'.
+
+ * configure.ac:
+ * codegen/Makefile.am: Update accordingly.
+
+2008-07-15 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac: Post release version bump
+
+=== 2.15.0 ===
+2008-07-15 Johan Dahlin <johan@gnome.org>
+
+ New version
+
+ * NEWS: Update
+
+ * tests/Makefile.am:
+ Make sure we can distcheck the gio module properly
+
+2008-07-15 Johan Dahlin <johan@gnome.org>
+
+ Bug 450659 – h2def.py - export 'typedef struct' object definitions not
+ working
+
+ * codegen/h2def.py:
+ Patch by Lauro Moura
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 471559 – add AM_PROG_CC_C_O to configure.ac for recent automake
+
+ * configure.ac:
+ Patch by Tim Mooney
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 448173 – use python-config to get python includes
+
+ * configure.ac:
+ Really close the by, patch by Matthias Klose
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 378704 – OptionParser.parse_args() returns unexpected results
+
+ * gobject/option.py:
+ Patch by Johannes Hölzl
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 491773 – autoconf failure: .m4 files cannot be found
+
+ * Makefile.am:
+ Patch by macks@netspace.org
+
+2008-07-14 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: wrap File.load_contents_async and
+ File.load_contents_finish
+
+ * gio/gio.defs: Add docstring for the above methods.
+
+ * tests/test_gio.py: Add a test for the above methods.
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 487523 – Add xslfiles variable to .pc.in files
+
+ * pygobject-2.0-uninstalled.pc.in:
+ Add xslfiles variable, patch by Damien Carbery
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.defs:
+ Remove g_file_input_stream_seek and g_file_output_stream_seek,
+ they already implement the seekable interface.
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ Bug 504337 - crash bug in gobject.Timeout and gobject.Idle
+
+ * gobject/pygsource.c:
+ * tests/test_source.py:
+ Fix crash in Timeout and Idle, patch by Bryan Silverthorn.
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ * codegen/argtypes.py:
+ Map GSeekType to an int
+
+ * gio/gfileinfo.override:
+ * gio/ginputstream.override:
+ * gio/goutputstream.override:
+ Add comments for missing API
+
+2008-07-14 Johan Dahlin <johan@gnome.org>
+
+ * gio/Makefile.am:
+ * gio/gfile.override:
+ * gio/ginputstream.override:
+ * gio/gio.override:
+ * gio/goutputstream.override:
+ * gio/pygio-utils.c (pygio_check_cancellable):
+ * gio/pygio-utils.h:
+ Refactor cancellable check to a utility function, avoids
+ plenty of code duplication.
+
+2008-07-14 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * codegen/definitions.py (ReturnType): New class.
+ (MethodDefBase.__init__): Make 'self.ret' a 'ReturnType' instance,
+ not string. Accept 'optional' flag.
+
+ * codegen/argtypes.py (ArgMatcher.get_reverse_ret): Test if
+ 'ptype' has true 'optional' attribute and copy it to 'props' then.
+
+ * codegen/reversewrapper.py (ReturnType.support_optional): New
+ class field, False by default.
+ (GObjectReturn.support_optional, GObjectReturn.write_decl)
+ (GObjectReturn.write_conversion): Support optional return.
+
+ * pygobject-2.0.pc.in: Add 'codegendir' variable.
+ * codegen/pygtk-codegen-2.0.in: Make 'codegendir' refer to
+ PyGObject's codegen, not PyGTK's one --- the latter will be
+ removed (first part of bug #542821).
+
+2008-07-08 Murray Cumming <murrayc@murrayc.com>
+
+ * codegen/h2def.py: clean_func(): Strip GSEAL out, to avoid us
+ thinking that there are many functions called GSEAL (merge from
+ PyGTK).
+
+2008-01-29 Olivier Crete <tester@tester.ca>
+
+ * codegen/h2def.py (DefsWriter.__init__): Fix copy-paste
+ typos (merge from PyGTK).
+
+2008-07-11 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gio/gfile.override: wrap File.load_contents, fix a typo.
+
+ * gio/gio.defs: Add docstring for File.load_contents.
+
+ * tests/test_gio.py: Add a test for the above method.
+
+2008-07-09 Juha Sahakangas <voas0113@saunalahti.fi>
+
+ * gobject/gobjectmodule.c (pyg_io_add_watch): Fix error message
+ referencing wrong argument.
+
+2008-06-29 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_markup_escape_text): text_size
+ should be Py_ssize_t instead of int.
+ Bug 540696 – gobject.markup_escape_text() causes python to segfault.
+
+2008-06-28 Johan Dahlin <jdahlin@async.com.br>
+
+ * docs/reference/pygobject.xml:
+ Document GObject.handler_block_by_func/handler_unblock_by_func
+
+2008-06-17 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/gio-types.defs:
+ * tests/test_gio.py:
+ Sort out confusion between interfaces and objects, add test.
+ Fixes #538601
+
+2008-06-09 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gobject/pygobject.c (pygobject_copy, pygobject_deepcopy): New
+ functions, unconditionally raise TypeError.
+ (pygobject_methods): Hook them up. (bug #482370)
+
+2008-05-31 Johan Dahlin <johan@gnome.org>
+
+ * setup.py: set FFI_LIBS to '', since this is mostly used on win32.
+
+2008-05-30 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (init_gobject): Call PyType_Ready for
+ PyGParamSpec_Type, and add it to the module dict.
+
+2008-05-23 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/gio.defs:
+ Add default values for all GSeekType variables.
+
+2008-05-21 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_spawn_async): Accept None for the
+ child_setup parameter of gobject.spawn_async(). Also check that
+ it is callable.
+
+2008-04-27 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gobject/pygenum.c (pyg_enum_richcompare): Fix: raise warning as
+ exception if asked by PyErr_Warn().
+
+ * gobject/pygflags.c (pyg_flags_richcompare): Don't return NULL
+ after warning; more useful warning message.
+
+ (#480424, borrowing code by Mark Doffman)
+
+2008-04-21 Johan Dahlin <johan@gnome.org>
+
+ * codegen/h2def.py: Update link to defs format discussion
+
+2008-04-15 Johan Dahlin <johan@gnome.org>
+
+ * gobject/gobjectmodule.c (init_gobject): Set
+ gobject.GObject.__module__ to gobject._gobject, this
+ helps pylint to check public methods of GObject subclasses
+
+ * tests/Makefile.am (tests):
+ * tests/test_gobject.py (TestGObjectAPI.testGObjectModule):
+ Add a test for this
+
+ (#523821, Simon Schampijer)
+
+2008-04-11 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/gio.defs (write_async): document.
+ Add default values to all flags parameters.
+
+2008-04-11 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.defs (read_async, read): document.
+ Set io_priority default to G_PRIORITY_DEFAULT.
+
+2008-04-11 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/gfile.override:
+ * gio/ginputstream.override:
+ * gio/goutputstream.override:
+ * tests/test_gio.py:
+ Move around the order of the callback argument to async methods,
+ so it comes before priority and cancellable, which can have default
+ values.
+
+2008-04-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/Makefile.am:
+ * gio/__init__.py:
+ * gio/gappinfo.override:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Implement GAppInfo constructor, add tests.
+
+2008-04-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/Makefile.am:
+ * gio/gfileinfo.override:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Wrap GFileInfo.list_attributes(), add tests and
+ set the default of GFileQueryInfoFlags args to G_FILE_QUERY_INFO_NONE.
+
+2008-04-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/option.py: Fix a typo
+ * tests/test_option.py:
+ Update the tests after the latest "refactoring".
+ The testsuite should run fine now again, finally.
+
+2008-04-08 Johan Dahlin <johan@gnome.org>
+
+ * tests/test_gio.py (TestOutputStream.testWriteAsyncError):
+ (TestInputStream._testCloseAsync.callback):
+ Disable these tests until we can figure why they freeze during
+ make check.
+
+2008-04-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/gio.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Add bindings for content_type_guess.
+ Based on patch by Thomas Leonard (#525113)
+
+2008-04-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/gio-types.defs:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Add basic support for GThemedIcon, based on patch by
+ Thomas Leonard (#521883)
+
+2008-04-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygsource.c:
+ * tests/test_source.py:
+ Unbreak Source.prepare (#523075, Bryan Silverthorn)
+
+2008-04-08 Johan Dahlin <johan@gnome.org>
+
+ * gio/gfile.override (_wrap__install_file_meta): Fix a couple of
+ silly typos and use gio.File instead of GFile in exceptions.
+
+2008-04-07 Johan Dahlin <johan@gnome.org>
+
+ * gio/__init__.py:
+ * gio/gfile.override:
+ * gio/gio-types.defs:
+ * gio/gio.override:
+ * tests/test_gio.py:
+ Make gio.File() (calling on an interface) a factory for creating
+ files. Add tests and a docstring.
+
+2008-04-07 Johan Dahlin <johan@gnome.org>
+
+ * gio/Makefile.am (pygiodir): Install gio in the right location
+
+2008-04-06 Johan Dahlin <johan@gnome.org>
+
+ * tests/test_gio.py: Add tests for recently added features.
+
+ * gio/goutputstream.override:
+ (_wrap_g_output_stream_write_asyn,_wrap_g_output_stream_close_async):
+ * gio/ginputstream.override (async_result_callback_marshal_read):
+ Add wrappers.
+
+ * gio/gio.override: Ignore vararg functions and remove a couple
+ of left overs in the generic marshaller.
+
+ * gio/gio.defs: Remove g_file_output_stream_truncate,
+ g_file_output_stream_tell and g_file_input_stream_tell
+
+ * Makefile.am:
+ * gio/gfileenumerator.override (_wrap_g_file_enumerator_tp_iter):
+ Implement the python iteration protocol on GFileEnumerator
+
+ * codegen/argtypes.py (arg): Add goffset to the int64 arg type
+
+2008-04-02 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gobject/pygenum.c: bug #428732
+ (pyg_enum_new): Fix two wrong assertions about '__enum_values__'
+ size and contents.
+ (pyg_enum_reduce): New function (based on patch by Phil Dumont).
+ (pyg_enum_methods): Hook it up.
+
+2008-03-24 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gobject/pygenum.c (pyg_enum_richcompare): Don't return NULL
+ after warning; more useful warning message (bug #519631).
+
+2008-03-22 Johan Dahlin <johan@gnome.org>
+
+ * gio/ginputstream.override:
+ * gio/gio.override:
+ * tests/test_gio.py:
+
+ Make read_finish() return the string, remove the get_buffer method.
+ This is more pythonic, as it mimics the normal read() behavior of
+ python.
+ Update the tests and use a separate marshaller for read.
+
+2008-03-21 Johan Dahlin <johan@gnome.org>
+
+ * gobject/__init__.py:
+ * tests/test_properties.py:
+ Allow gobject.property work with subclasses. Add tests.
+
+ (#523352, Tomeu Vizoso)
+
+2008-03-10 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac: Require gio and giounix 2.15.7.
+
+2008-03-09 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio-types.defs:
+ * gio/gio.defs:
+ * tests/test_gio.py:
+ Update to SVN of gio:
+ g_file_contains_file -> g_file_has_prefix
+ can_seek and can_truncate are now only on the GSeekable interface
+ Add tests
+
+ (#521207, Thomas Leonard)
+
+2008-03-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * gio/ginputstream.override:
+ Pass in l instead of i to PyArg_ParseTupleAndKeywords when
+ parsing a long. Fixes the build on 64-bit systems.
+ (#521165, Thomas Leonard)
+
+2008-03-02 Johan Dahlin <johan@gnome.org>
+
+ * Makefile.am: Dist .m4 files.
+ (#496011, Ed Catmur)
+
+2008-03-02 Paul Pogonyshev <pogonyshev@gmx.net>
+
+ * gobject/gobjectmodule.c (REGISTER_TYPE): Never override customly
+ set 'tp_new' and 'tp_alloc'.
+
+2008-02-01 Dan Winship <danw@gnome.org>
+
+ * pygobject-2.0.pc.in (defsdir): Add this so other bindings can
+ find gio.defs
+
+2008-01-21 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.override (async_result_callback_marshal):
+ Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF.
+
+ * gio/Makefile.am:
+ * gio/ginputstream.override:
+ * gio/goutputstream.override:
+ * gio/gvolumemonitor.override:
+ * gio/gfile.override:
+ * tests/test_gio.py:
+ Implement and test GFile.read_async. Use try/finally to always quit
+ the mainloop, even if the test fail.
+ Update source comment headers.
+
+2008-01-20 Johan Dahlin <johan@gnome.org>
+
+ * tests/test_gio.py (TestVolumeMonitor): New test
+
+ * gio/Makefile.am:
+ * gio/ginputstream.override:
+ * gio/gio.override:
+ * gio/giomodule.c:
+ * gio/goutputstream.override:
+ * gio/gvolumemonitor.override:
+ * gio/unix.override:
+ * gio/unixmodule.c:
+
+ Split out overrides into more files. Fix up module description in
+ comments
+
+2008-01-20 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.override (_wrap_g_simple_async_result_get_buffer): Add
+ a new method, to fetch the buffer
+ (_wrap_g_input_stream_read_async): Save a reference to the buffer.
+ * tests/test_gio.py (TestInputStream.testReadAsync.callback):
+ Check the content
+
+ * tests/test_gio.py (TestInputStream.testReadAsyncError):
+ New function to test error condition of async read.
+
+ * gio/gio.override (async_result_callback_marshal): Grab a reference
+ to callback/data.
+
+2008-01-19 Johan Dahlin <johan@gnome.org>
+
+ * gio/gio.override (_wrap_g_output_stream_write): Impl.
+ * gio/gio.override:
+ * gio/unix.defs:
+ Add GUnixInputStream type and methods
+
+ * tests/common.py:
+ * tests/test_gio.py:
+ Add GIO tests.
+
+ * gio/gio.override (_wrap_g_app_info_get_all_for_type),
+ (_wrap_g_app_info_get_all),
+ (_wrap_g_drive_get_volumes): Implement.
+
+ * gio/gio.override (async_result_callback_marshal): New marshaller
+ for async results
+ (_wrap_g_input_stream_read_async): Impl.
+ * gio/gio-types.defs: Add SimpleAsyncRequest
+ * gio/giomodule.c: Register enums/constants
+
+ * gio/gio.override: Fix a silly bug so it possible to read files
+ larger than 8192 bytes.
+
+ * gio/gio.defs: Set null-ok for all cancelable as well.
+
+ * gio/__init__.py: set gio.unix to None if it's not available
+
+ * gio/gio.override: Implement InputStream.read efficiently without
+ copying the strings, based on the standard libararys file.read()
+ implementation.
+
+ * gio/gio-types.defs (Cancellable): Add wrapper.
+
+ * gio/gio.defs (replace): Do not require cancellable argument
+ to be specified, default to NULL if not.
+
+ * Makefile.am:
+ * codegen/Makefile.am:
+ * codegen/README.defs:
+ * codegen/__init__.py:
+ * codegen/argtypes.py:
+ * codegen/code-coverage.py:
+ * codegen/codegen.py:
+ * codegen/createdefs.py:
+ * codegen/definitions.py:
+ * codegen/defsconvert.py:
+ * codegen/defsgen.py:
+ * codegen/defsparser.py:
+ * codegen/docextract.py:
+ * codegen/docextract_to_xml.py:
+ * codegen/docgen.py:
+ * codegen/h2def.py:
+ * codegen/mergedefs.py:
+ * codegen/missingdefs.py:
+ * codegen/mkskel.py:
+ * codegen/override.py:
+ * codegen/pygtk-codegen-2.0.in:
+ * codegen/reversewrapper.py:
+ * codegen/scanvirtuals.py:
+ * codegen/scmexpr.py:
+
+ * configure.ac:
+ * gio/Makefile.am:
+ * gio/__init__.py:
+ * gio/gio-types.defs:
+ * gio/gio.defs:
+ * gio/gio.override:
+ * gio/giomodule.c: (init_gio):
+ * gio/unix-types.defs:
+ * gio/unix.defs:
+ * gio/unix.override:
+ * gio/unixmodule.c: (initunix):
+
+ Import codegen from pygtk.
+ Add initial gio and gio.unix bindings.
+
+2008-01-11 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac: Don't link against libffi if we cannot find libffi
+ on the system. (#496006, Ed Catmur)
+
+2008-01-03 Johan Dahlin <johan@gnome.org>
+
+ Reviewed by: Gustavo
+
+ * configure.ac:
+ * gobject/pygmainloop.c (pyg_signal_watch_prepare): Optinally
+ use PySignal_SetWakeupFd to avoid having to do a timeout to find
+ out if there are any pending signals from python.
+ Fixes #481569
+
+ * configure.ac (CPPFLAGS):
+ Include -Wall and -Werror when checking for PySignal_SetWakeupFd
+
+2008-01-02 Sebastian Rittau <srittau@jroger.in-berlin.de>
+
+ * gobject/gobjectmodule.c
+ * gobject/gobjectmodule.c (pyg_get_application_name)
+ (pyg_get_prgname): Add wrappers for g_get_application_name and
+ g_get_prgname.
+
+2007-11-30 Rafael Villar Burke <pachi@rvburke.com>
+
+ * docs/reference/pygobject.xml: Add props attribute
+
+2007-11-24 Paolo Borelli <pborelli@katamail.com>
+
+ * gobject/gobjectmodule.c (pyg_type_register): check for NULL before
+ dereferencing.
+
+2007-11-24 Paolo Borelli <pborelli@katamail.com>
+
+ * gobject/gobjectmodule.c (pyg_type_register): do not use a
+ potentially uninitialized variable. Bug #499334.
+
+2007-11-12 Johan Dahlin <johan@gnome.org>
+
+ * gobject/option.py (OptionParser.parse_args):
+ Set the default value of old_args to 0, so we don't end
+ up slicing with None. Fixes #496278 (Vincent Untz)
+
+2007-11-06 Johan Dahlin <johan@gnome.org>
+
+ * gobject/option.py (OptionParser.parse_args): Merge in values
+ from all groups to the global option group. Slice up args
+ so it doesn't return too much.
+
+ * tests/test_option.py: Refactor to be unittesty,
+ Add new tests to test what options returns.
+
+2007-11-05 Johan Dahlin <johan@gnome.org>
+
+ * gobject/pygobject.h:
+ * gobject/gobjectmodule.c:
+ Add pyg_option_group_new to the public API
+
+ * configure.ac: Branch, bump version to 2.15.0.
+
+2007-10-16 Damien Carbery <damien.carbery@sun.com>
+
+ reviewed by: Johan Dahlin.
+
+ * pygobject-2.0-uninstalled.pc.in: uninstalled.pc file missing
+ 'datadir' value. Fixes #486876.
+
+2007-09-16 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * configure.ac: Post-relase version bump.
+
+=== 2.14.0 ===
+2007-09-16 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * configure.ac: Bump version to 2.14.0.
+
+ * NEWS: Update NEWS for next release.
+
+2007-09-06 John Finlay <finlay@moeraki.com>
+
+ * docs/xsl/fixxref.py.in: Remove DATADIR substitution since it now
+ gets substituted as ${prefix}/share which doesn't work in a Python
+ script.
+
+2007-08-27 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/propertyhelper.py (property.__metaclass__.__repr__): Avoid
+ exporting the metaclass, just define it where it will be used.
+
+ * gobject/__init__.py (GObjectMeta._install_properties):
+ Refactor a bit to make sure that it is possible to use in subclasses,
+ fixes #470718 (Marco Giusti)
+
+2007-08-27 Marco Giusti <marco.giusti@gmail.com>
+
+ reviewed by: Gustavo J. A. M. Carneiro
+
+ * gobject/propertyhelper.py:
+ * tests/test_properties.py:
+ Bug 470230 – check for default value in boolean type is wrong.
+
+2007-08-27 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * tests/Makefile.am,
+ * gobject/Makefile.am: Remove -D_XOPEN_SOURCE=600
+ -D__EXTENSIONS__, no longer needed.
+
+ * configure.ac: Don't add -std=c9x CFLAG on Solaris. Fixes
+ #339924 again.
+
+ * gobject/pygtype.c (pyg_type_wrapper_repr): Typecast self->type
+ to (unsigned long int) to fix a compilation warning.
+
+2007-08-14 Ed Catmur <ed@catmur.co.uk>
+
+ reviewed by: Gustavo J. A. M. Carneiro
+
+ * gobject/pygobject.c (pygobject_new_full, pygobject_clear),
+ (pygobject_get_dict): Bug 466082 – pygobject_new_full not fully
+ initialising PyGObject, chaos results.
+
+2007-08-13 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * tests/test_subtype.py (TestSubType.testGetDict): Add unit test
+ exercising a bug when GObject.__dict__ is accessed directly.
+
+2007-07-08 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pygobject_functions)
+ (pyg_timeout_add_seconds): Wrap g_timeout_add_seconds,
+ conditionally compiled if glib version >= 2.13.5.
+
+2007-07-08 Johannes Hölzl <johannes.hoelzl@gmx.de>
+
+ reviewed by: Gustavo Carneiro
+
+ * gobject/gobjectmodule.c (build_gerror, init_gobject): Work
+ around the deprecation warning of BaseException.message in Python
+ 2.6+ affecting GError exceptions. Fixes #342948.
+
+2007-07-07 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * configure.ac: Post-release version bump.
+
+=== 2.13.2 ===
+2007-07-07 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * NEWS: Update.
+
+2007-07-07 Damien Carbery <damien.carbery@sun.com>
+
+ reviewed by: Gustavo Carneiro.
+
+ * configure.ac: Bug 339924 – pygobject doesn't compile on opensolaris.
+
+2007-04-30 Johannes Hölzl <johannes.hoelzl@gmx.de>
+
+ * gobject/gobjectmodule.c (init_gobjectmodule),
+ * gobject/pygoptiongroup.c (arg_func),
+ * gobject/option.py (OptionParser._parse_args, OptionGroup._to_goptiongroup),
+ * tests/test_option.py: OptParse-Exceptions in GOption-callbacks
+ are now convertet into an GError. GError from the
+ GOptionGroup.run is convertet into an OptParse-Exception.
+ Fixes #342948.
+
+2007-07-06 Ed Catmur <ed@catmur.co.uk>
+
+ * gobject/pygtype.c (pyg_param_gvalue_from_pyobject),
+ (pyg_param_gvalue_as_pyobject): Applied patch from Ed Catmur to
+ support G_TYPE_VALUE boxed args/signals, and add a test, Fixes
+ #351072
+
+2007-07-06 Carlos Martin <inean@users.sf.net>
+
+ * tests/test_gtype.py:
+ * tests/testhelpermodule.c: add test for #351072
+
+2007-07-04 Murray Cumming <murrayc@murrayc.com>
+
+ * gobject/pygobject.c: (pygobject_switch_to_toggle_ref):
+ * gobject/pygobject.h: Rename the private struct field to
+ private_flags, because private is a C++ keyword, so this broke
+ builds of some C++ applications, such as Glom.
+
+2007-07-02 Sebastian Granjoux <seb.sfo@free.fr>
+
+ reviewed by: Johan Dahlin
+
+ * gobject/gobjectmodule.c: (pyg_gerror_exception_check):
+ * tests/test_gtype.py:
+ * tests/testhelpermodule.c: (_wrap_test_gerror_exception):
+
+ Fix a bug in pyg_error_exception_check, add a test, Fixes #449879
+
+2007-06-17 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygobject.h: Add a flags field to PyGObject; uses
+ structure space formerly occupied by the now stale "GSList
+ *closures" field.
+
+ * gobject/pygobject.c (pygobject_switch_to_toggle_ref): Do nothing
+ if the wrapper is already in toggle reference mode. Closes #447271.
+
+ * tests/test_subtype.py: Test case for #447271.
+
+2007-06-17 Sebastien Bacher <seb128@ubuntu.com>
+
+ * m4/python.m4: use python-config to get python includes
+ (Closes #448173)
+
+2007-06-16 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/propertyhelper.py,
+ * tests/test_properties.py: Support type=GObject or
+ type=TYPE_OBJECT in the new properties API.
+
+2007-06-06 Yevgen Muntyan <muntyan@tamu.edu>
+
+ OK'd by Johan
+
+ * gobject/generate-constants.c: Return 0 from main().
+
+ * gobject/Makefile.am: use generate-constants$(EXEEXT) instead
+ of generate-constants in the constants.py target rule.
+
+2007-05-30 Yevgen Muntyan <muntyan@tamu.edu>
+
+ reviewed by: Gustavo Carneiro
+
+ * autogen.sh: Allow running autogen.sh from outside $srcdir.
+
+2007-05-09 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * tests/Makefile.am (INCLUDES): Idem.
+
+ * gobject/Makefile.am (INCLUDES): Add -D_XOPEN_SOURCE=600 and
+ -D__EXTENSIONS__ to make it compile with c99 and Sun C compiler.
+
+ Fixes #339924: gnome-python doesn't compile on opensolaris.
+
+2007-05-02 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac: Post-release version bump.
+
+=== 2.13.1 ===
+2007-05-02 Johan Dahlin <jdahlin@async.com.br>
+
+ * pygobject-2.0-uninstalled.pc.in: Add libdir.
+ Fixes #435132 (Luca Ferretti)
+
+2007-05-01 Johan Dahlin <johan@gnome.org>
+
+ * gobject/propertyhelper.py:
+ * tests/test_properties.py:
+
+ Store property values in the descriptor per instance, add a test.
+
+ * examples/properties.py:
+ * gobject/Makefile.am:
+ * gobject/__init__.py:
+ * gobject/constants.py.in:
+ * gobject/generate-constants.c: (main):
+ * gobject/propertyhelper.py:
+ * tests/Makefile.am:
+ * tests/test_enum.py:
+ * tests/test_interface.py:
+ * tests/test_properties.py:
+
+ Add a property helper, fixes #338098
+
+2007-04-30 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * tests/common.py (importModules): Import testhelper first so that
+ g_thread_init is called before init_pygobject.
+
+ * tests/testhelpermodule.c (inittesthelper): Call g_thread_init
+ before init_pygobject.
+
+ * tests/test_subtype.py (TestSubType.testDescriptor): Unit test
+ for the bug below.
+
+ * gobject/pygobject.c (pygobject_setattro): Account for the case
+ when attribute setting doesn't actually create an instance
+ dictionary, in which case pygobject_switch_to_toggle_ref would be
+ called twice, thereby causing gobject error.
+ Fixes #434659
+
+2007-04-29 James Livingstone <doclivingstone@gmail.com>
+
+ reviewed by: Johan Dahlin <johan@gnome.org>
+
+ * gobject/pygtype.c: (pyg_value_from_pyobject):
+ * tests/test_signal.py:
+
+ Add a missing else to avoid throwing a TypeError.
+ Includes a test written by Ed Catmur.
+ Fixes #374653
+
+2007-04-29 Johan Dahlin <johan@gnome.org>
+
+ * gobject/pygtype.c: (pyg_value_array_from_pyobject):
+ * tests/test_gtype.py:
+ * tests/testhelpermodule.c: (_wrap_test_value_array):
+
+ Treat None in a GValueArray as pointer/NULL, patch by
+ Ed Catmur, fixes #352209.
+
+2007-04-29 Loïc Minier <lool+gnome@via.ecp.fr>
+
+ reviewed by: Johan Dahlin <johan@gnome.org>
+
+ * autogen.sh:
+
+ Use dirname $0 instead of pwd to compute srcdir in autogen,
+ fixes #409234
+
+2007-04-29 Damien Carbery <damien.carbery@sun.com>
+
+ reviewed by: Johan Dahlin <johan@gnome.org>
+
+ * tests/test-unknown.c: (test_interface_iface_method):
+
+ Do not return in a void function, fixes #385127
+
+2007-04-29 Johan Dahlin <johan@gnome.org>
+
+ * gobject/pygflags.c: (pyg_flags_from_gtype):
+ Fix leak, patch by Daniel Berrange. Fixes #428726 (Phil Dumont)
+
+2007-04-29 Damien Carbery <damien.carbery@sun.com>
+
+ reviewed by: Johan Dahlin <johan@gnome.org>
+
+ * configure.ac:
+ * pygobject-2.0-uninstalled.pc.in:
+
+ Add an uninstalled pkg-config file, fixes #385129
+
+2007-04-29 Johan Dahlin <johan@gnome.org>
+
+ * README:
+ * configure.ac:
+ * gobject/Makefile.am:
+ * gobject/ffi-marshaller.c: (g_value_to_ffi_type),
+ (g_value_from_ffi_type), (g_cclosure_marshal_generic_ffi):
+ * gobject/ffi-marshaller.h:
+ * gobject/gobjectmodule.c: (create_signal), (init_gobject):
+ * pygobject-2.0.pc.in:
+ * tests/test_signal.py:
+ * tests/testhelpermodule.c: (test1_callback),
+ (test1_callback_swapped), (test2_callback), (test3_callback),
+ (test4_callback), (test_float_callback), (test_double_callback),
+ (test_string_callback), (test_object_callback), (connectcallbacks),
+ (_wrap_connectcallbacks), (inittesthelper):
+
+ Add a generic CClosure marshaller based on ffi.
+ This makes it possible to connect to signals on PyGObjects from C.
+ libffi is now an optional dependency
+ Fixes #353816 (Edward Hervey)
+
+2007-04-23 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * configure.ac: Post-release version bump.
+
+=== 2.13.0 ===
+2007-04-23 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * configure.ac: Bump version to 2.13.0.
+
+ * tests/test_properties.py (TestProperties.testMulti): Unit test
+ for get/set_properties.
+
+2007-04-23 Gian Mario Tagliaretti <gianmt@gnome.org>
+
+ * gobject/pygobject.c: Implemented pygobject_set_properties and
+ pygobject_get_properties in order to set multiple properties using
+ keyword arguments. Fixes 403212
+
+ * docs/reference/pygobject.xml: Docs for the above new methods.
+
+2007-04-14 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c, gobject/pygobject.h: Add a new
+ pyg_gerror_exception_check API. Fixes #425242.
+
+ * gobject/gobjectmodule.c (pyg_set_application_name)
+ (pyg_set_prgname): Add wrappers for g_set_application_name and
+ g_set_prgname. Patch by Havoc Pennington. Fixes #415853.
+
+ * gobject/pygobject.h: Bug #419379: Modernize init_pygobject: use
+ static inline functions instead of macros.
+
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c (pygobject_data_free, pygobject_data_new),
+ (pygobject_get_inst_data, pyg_toggle_notify),
+ (pygobject_switch_to_toggle_ref),
+ (pygobject_register_wrapper_full, pygobject_register_wrapper),
+ (pygobject_new_full, pygobject_unwatch_closure),
+ (pygobject_watch_closure, pygobject_dealloc, pygobject_repr),
+ (pygobject_traverse, pygobject_clear, pygobject_weak_ref),
+ (pygobject_setattro, pygobject_weak_ref_traverse),
+ (pygobject_weak_ref_notify, pygobject_weak_ref_clear),
+ (pygobject_weak_ref_dealloc, pygobject_weak_ref_new),
+ (pygobject_weak_ref_unref, pygobject_weak_ref_call):
+ * gobject/pygobject.h:
+ * gobject/pygtype.c (gclosure_from_pyfunc):
+ * tests/test_subtype.py:
+ Bug #320428: Break PyGObject<->GObject reference cycle (patch
+ v7.1; thanks John Ehresman for the help with this patch).
+
+2007-03-17 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygobject.c (pygobject_emit): Fix %ld vs int warning.
+ (pygobject_chain_from_overridden): Idem.
+
+2007-03-06 Richard Hult <richard@imendio.com>
+
+ * configure.ac: Fix the docs option so that it's possible to disable
+ building the docs.
+
+2007-03-03 Edward Hervey <edward@fluendo.com>
+
+ * gobject/pygobject.c: (set_property_from_pspec):
+ Release the GIL when calling g_object_set_property, since setting a
+ property might trigger some code that might come back in python land.
+ Fixes #395048
+
+2007-01-09 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * configure.ac: Turn the option --disable-docs into --enable-docs.
+ * docs/Makefile.am: Tread --enable-docs like --enable-gtk-doc in
+ gtk+, i.e. do not ever build docs unless requested, but always
+ install them if they are found already built.
+
+2006-12-14 Kjartan Maraas <kmaraas@gnome.org>
+
+ * autogen.sh: Make this work with automake 1.10 too.
+
+2006-11-18 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac: Post release version bump
+
+=== 2.12.3 ===
+2006-11-18 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS: Update
+
+ * gobject/pygoptiongroup.c (pyg_option_group_dealloc):
+ * tests/test_option.py (TestOption.testBadConstructor):
+ Make sure an exception is raised when we pass in invalid arguments
+ to the optiongroup constructor, add a test. #364576 (Laszlo Pandy)
+
+ * gobject/pygobject.c (pygobject_register_class): set __module__ on
+ gobject derived types, fixes #376099 (Osmo Salomaa)
+
+2006-11-18 Yevgen Muntyan <muntyan@tamu.edu>
+
+ reviewed by: Johan Dahlin <johan@gnome.org>
+
+ * gobject/gobjectmodule.c: (create_property):
+ * gobject/pygparamspec.c: (pyg_param_spec_getattr):
+ * tests/test_properties.py:
+
+ Avoid truncating in pyg_param_spec_getattr, add test for all non-float
+ numeric types. Fixes #353943
+
+2006-11-18 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygtype.c (gclosure_from_pyfunc): Use PyObject_Cmp instead
+ of comparing function closure addresses, which makes it possible
+ to use any callable and not just functions.
+ Fixes #375589 (Dima)
+
+2006-10-13 John Finlay <finlay@moeraki.com>
+
+ * docs/Makefile.am (HTML_FILES): Remove
+ html/pygobject-reference-copyright.html.
+ Fixes #361906 (Marc-Andre Lureau)
+
+2006-10-11 John Finlay <finlay@moeraki.com>
+
+ * docs/reference/pygobject-introduction.xml: Remove Copyright and
+ License section.
+
+ * docs/reference/pygobject-ref.xml: Remove author info
+
+2006-10-05 Cedric Gustin <cedric.gustin@gmail.com>
+
+ * dsextras.py (Template) (TemplateExtension): Add
+ py_ssize_t_clean flag to be passed to codegen.SourceWriter.
+
+2006-10-04 Cedric Gustin <cedric.gustin@gmail.com>
+
+ * Makefile.am: Add pygobject_postinstall.py to EXTRA_DIST.
+
+2006-10-03 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac: Post release version bump
+
+=== 2.12.2 ===
+2006-10-03 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS:
+ * configure.ac: 2.12.2
+
+2006-10-03 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c: (add_signals), (add_properties),
+ (pyg_signal_new), (pyg_object_new), (get_handler_priority),
+ (pyg_io_add_watch), (pyg_spawn_async), (pyg_add_emission_hook),
+ (pyg_remove_emission_hook), (pyg_filename_from_utf8),
+ (_pyg_strv_to_gvalue):
+ * gobject/pygiochannel.c: (py_io_channel_write_chars),
+ (py_io_channel_write_lines):
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c: (PyGProps_length), (pygobject_init),
+ (pygobject_connect), (pygobject_connect_after),
+ (pygobject_connect_object), (pygobject_connect_object_after),
+ (pygobject_disconnect), (pygobject_handler_is_connected),
+ (pygobject_handler_block), (pygobject_handler_unblock),
+ (pygobject_emit), (pygobject_chain_from_overridden):
+ * gobject/pygoptioncontext.c: (pyg_option_context_parse):
+ * gobject/pygtype.c: (pyg_value_from_pyobject):
+
+ Python 2.5 and 64 bits fixes (Py_ssize_t), closes bug #338487.
+
+ * gobject/pygenum.c (pyg_enum_repr): Const warning fix.
+
+2006-09-29 Johan Dahlin <jdahlin@async.com.br>
+
+ * pygtk.py: LGPL, not GPL header
+
+2006-09-24 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygobject.h (init_pygobject_check): Add parentheses
+ "around && within ||" to please gcc.
+
+2006-09-21 Cedric Gustin <cedric.gustin@gmail.com>
+
+ * dsextras.py: Catch ImportError exception when codegen is not
+ available: disable Template and TemplateExtension, redirect the
+ user to the pygtk installer and raise a NameError
+ exception. check_date has also been rewritten and now uses
+ distutils.dep_util.newer_group(). defs files can also be built
+ using createdefs by passing tuples as keyword argument to Template
+ (see for example the gdk and gtk templates in setup.py).
+ * setup.py: Changed the way the VERSION macro is defined on win32.
+ Also install the html reference documentation, the xsl files and
+ fixxref.
+ * pygobject_postinstall.py: Set the value of DATADIR in
+ fixxref.py. Add functions to install shortcuts in the Start menu
+ to the reference manual (currently disabled: see bug #353849).
+
+2006-09-16 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * tests/test_signal.py (TestEmissionHook.testCallbackReturnFalse)
+ (TestEmissionHook.testCallbackReturnTrue)
+ (TestEmissionHook.testCallbackReturnTrueButRemove): Add a few more
+ emission hook tests.
+
+ * gobject/gobjectmodule.c (pyg_add_emission_hook): One too many
+ DECREF on 'extra_args'.
+
+2006-09-12 John Ehresman <jpe@wingware.com>
+
+ * gobject/pygobject.h (init_pygobject_check): Declare variables
+ at start of code block
+
+2006-09-06 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygmainloop.c (pyg_signal_watch_prepare): Increase the timeout
+ to 1000ms instead of 100.
+
+=== 2.12.1 ===
+2006-09-04 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygobject.h (_PYGOBJECT_H_): Corrected version check,
+ (Sebastian Dröge, #354364)
+
+ * configure.ac: Post release version bump
+
+=== 2.12.0 ===
+2006-09-04 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS:
+ * configure.ac: 2.12.0
+
+2006-08-28 Johan Dahlin <jdahlin@async.com.br>
+
+ * docs/Makefile.am: Install html files regardless even when passing
+ in --disable-docs, fixes #353159 (Matthias Clasen)
+
+2006-08-27 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * configure.ac: Post-release version bump.
+
+=== 2.11.4 ===
+2006-08-27 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * NEWS: Update.
+
+ * gobject/gobjectmodule.c (pyg_type_register): Correct a bug in
+ the code that checks if parent already implements an interface or not.
+
+ * tests/test-unknown.c (test_interface_base_init),
+ (test_interface_get_type): Add a property to the interface, for
+ better testing.
+ (test_unknown_get_property),
+ (test_unknown_set_property, test_unknown_class_init): Add a
+ property to the class as required by the interface.
+
+ * tests/test_interface.py: More thorough interface testing, with
+ properties and test both the case of implementing an interface
+ from scratch, and re-implementing and interface that a parent
+ already implements.
+
+2006-08-27 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pygobject__g_instance_init): If
+ necessary, attach the GObject to the PyGObject here.
+ (pygobject_constructv): Cope with the fact that wrapper->obj may
+ have already been set due to the change above.
+
+ * tests/test_signal.py: Add test case fixed by the changes above,
+ basically calling self.emit() inside do_set_property called
+ implicitly by the constructor due to a CONSTRUCT property.
+
+ Fixes bug 353039: "Failure in signal emission during
+ do_set_property invoked from constructor".
+
+2006-08-26 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_type_register): Fix type
+ registration once more to account for all corner cases. This time
+ we register interfaces in two stages: first, before properties and
+ signals are registered, we register the interfaces that are
+ already implemented in the parent type and are being overridden;
+ second, after registration of properties and signals, we register
+ the remaining interfaces.
+
+2006-08-21 Johan Dahlin <jdahlin@async.com.br>
+
+ * docs/Makefile.am (EXTRA_DIST): Remove build_stamp, include generated .html
+ in the distributed tarball. Remove builddate.xml, reference directory and fixxref.py
+ dependencies to avoid regenerating the tarball when it's not needed.
+
+ * configure.ac: Post release version bump
+
+=== 2.11.3 ===
+2006-08-21 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS: Update
+
+ * Makefile.am:
+ * docs/Makefile.am:
+ Always install the xsl files & css files, regardless if the
+ documentation was actually built or not. Also clean it up considerably.
+
+2006-08-17 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_type_register): Move the interface
+ registration code up, to run before properties and signals
+ registration, because glib doesn't allow us to add interfaces
+ after the first call to g_class_ref.
+
+2006-08-16 John Finlay <finlay@moeraki.com>
+
+ * docs/reference/pygobject-functions.xml: Update docs for
+ gobject functions.
+
+2006-08-15 Murray Cumming <murrayc@murrayc.com>
+
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.h:
+ Replace uses of typename with type_name, because that is a
+ reserved C++ keyword. This was breaking compilation of Glom
+ due its use in the new type_register_custom function pointer in
+ pygobject.h.
+
+2006-08-12 John Finlay <finlay@moeraki.com>
+
+ * pygobject-2.0.pc.in: Add reference to installed pygobject docs
+ * docs/Makefile.am: Add install of style.css
+ * docs/xsl/html.xsl: Define stylesheet as style.css
+ * docs/style.css: Add.
+
+2006-08-10 John Finlay <finlay@moeraki.com>
+
+ * docs/reference/entities.docbook.in:
+ * docs/reference/pygobject-ref.xml:
+ * docs/Makefile.am:
+ * configure.ac:
+ Use builddate.xml for the builddate entity and have builddate.xml be
+ updated when the docs are built not during configure time.
+
+2006-08-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac: Post release version bump.
+
+=== 2.11.2 ===
+2006-08-08 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS: Update
+
+2006-08-07 Johan Dahlin <jdahlin@async.com.br>
+
+ * docs/Makefile.am ($(HTML_DATA)): Fix parallel build
+ (#350225, Ed Catmur)
+
+2006-08-06 Johan Dahlin <johan@gnome.org>
+
+ * m4/as-expand.m4: New file to workaround automake silliness
+
+ * docs/xsl/fixxref.py.in: New script
+
+ * docs/Makefile.am (XSLFILES): Add fixxref.py script, moved in from
+ PyGTK.
+
+ * docs/xsl/html.xsl: Do not use shade.verbatim, set the background
+ color and border as a normal html tag to avoid an external
+ stylesheet.
+
+2006-08-04 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac: Post release version bump
+
+=== 2.11.1 ===
+2006-08-04 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS: Update
+
+ * README: Update, some s/PyGTK/PyGObject/
+
+ * configure.ac:
+ * docs/Makefile.am:
+ * docs/reference/.cvsignore:
+ * docs/reference/entities.docbook.in:
+ * docs/reference/pygobject-ref.xml:
+ Clean up the build date/version mess I created.
+ Now it's created during configure time and properly included in
+ the docbook files. Also make sure distcheck passes
+
+2006-08-04 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * configure.in: Add hack to disable libtool checking for g++ and
+ g77 (copied from libglade).
+
+2006-07-29 John Finlay <finlay@moeraki.com>
+
+ * gobject/pygobject.h (pyg_param_gvalue_from_pyobject): Fix define
+ to point to the correct function pointer field.
+
+2006-07-29 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygflags.c (pyg_flags_add): idem.
+
+ * gobject/pygenum.c (pyg_enum_add): Give a more explicit error
+ message when the gtype is not an enum.
+
+2006-07-25 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygobject.h (init_pygobject_check): Add a macro to easily
+ check the installed pygobject version.
+
+ * gobject/pygflags.c (pyg_flags_add)
+ * gobject/pygenum.c (pyg_enum_add): Duplicate the string before
+ sending it to python. Fixes GCC warnings.
+
+2006-07-24 John Finlay <finlay@moeraki.com>
+
+ * gobject/pygflags.c (pyg_flags_get_first_value_name)
+ (pyg_flags_get_first_value_nick): Avoid segfault when
+ g_flags_get_first_value returns NULL.
+
+2006-07-20 John Finlay <finlay@moeraki.com>
+
+ * docs/Makefile.am: Make version.xml dependent on config.h
+ Make builddate.xml dependent on REFERENCE_DEPS. Add builddate.xml to
+ build_stamp and pdf dependencies. Add pdf files to cleanup.
+
+2006-07-20 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac:
+ * docs/Makefile.am:
+ * docs/reference/.cvsignore:
+ * docs/reference/version.xml.in:
+ Generate builddate.xml and version.xml at build time instead on
+ configure time, add proper dependencies.
+
+2006-07-19 John Finlay <finlay@moeraki.com>
+
+ * docs/Makefile.am: Use more portable date generator.
+
+ * docs/xsl/ref-html-style.xsl: Add book to list of indexed items.
+
+ * docs/xsl/html.xsl: Output xref links for unknown links.
+
+ * docs/xsl/ref-html-style.xsl: Include refsect1 and refsect2 in
+ indexed items but only if they have ids.
+
+ * configure.ac (AC_CONFIG_FILES) : Add docs/reference/version.xml
+
+ * docs/reference/pygobject-ref.xml: Add pygobject-introduction.xml
+ and version and builddate entities. Remove commented out items.
+
+ * docs/Makefile.am: Add reference/pygobject-introduction.xml and
+ reference/version.xml.in
+
+2006-07-18 Johan Dahlin <johan@gnome.org>
+
+ * docs/Makefile.am (HTMLdir): Install book in $datadir/gtk-doc/html
+
+2006-07-13 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/gobjectmodule.c: (pyg_type_from_name),
+ (get_type_name_for_class):
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c: (pygobject_new_with_interfaces),
+ (pygobject_lookup_class), (pygobject_emit):
+ * gobject/pygobject.h:
+ * gobject/pygtype.c: (_wrap_g_type_from_name),
+ (pyg_type_from_object), (pyg_type_register_custom_callback),
+ (pyg_type_get_custom), (_pyg_type_from_name):
+ Add infrastructure for lazy type registration, fixes #346947
+
+2006-07-13 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * m4/python.m4: Properly quote AM_CHECK_PYMOD definition.
+
+ * gobject/pygoptioncontext.c (pyg_option_context_parse): Fix mem
+ leak.
+
+2006-07-12 Johan Dahlin <jdahlin@async.com.br>
+
+ * Makefile.am:
+ * configure.ac:
+ * docs/.cvsignore:
+ * docs/Makefile.am:
+ * docs/common.xsl:
+ * docs/devhelp.xsl:
+ * docs/html.xsl:
+ * docs/pdf-style.xsl:
+ * docs/pdf.xsl:
+ * docs/ref-html-style.xsl:
+ * docs/reference/.cvsignore:
+ * docs/reference/pygobject-classes.xml:
+ * docs/reference/pygobject-constants.xml:
+ * docs/reference/pygobject-functions.xml:
+ * docs/reference/pygobject-gboxed.xml:
+ * docs/reference/pygobject-ginterface.xml:
+ * docs/reference/pygobject-gpointer.xml:
+ * docs/reference/pygobject-maincontext.xml:
+ * docs/reference/pygobject-mainloop.xml:
+ * docs/reference/pygobject-ref.xml:
+ * docs/reference/pygobject.xml:
+ Import GObject part of John Finlay's PyGTK Reference Manual, copy
+ over infrastructure from the pygtk-web module.
+
+2006-07-12 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * configure.ac: Post-release version bump to 2.11.1.
+
+=== PyGObject 2.11.0 ===
+2006-07-09 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_type_register): Make interface_data
+ point to the python type before adding the interface to the new
+ type. This should fix interface implementation (actually I
+ thought such code had already been added earlier but can't find it
+ now and it is obviously needed...)
+ (pyg_type_register): move the code that needs g_type_class_ref
+ until after interface registration (more code that I already wrote
+ in the past but got lost).
+
+2006-07-05 John Finlay <finlay@moeraki.com>
+
+ * gobject/pygiochannel.c (py_io_channel_init): Fix message typo.
+
+2006-06-28 Cedric Gustin <cedric.gustin@gmail.com>
+
+ * dsextras.py (InstallData): Set datarootdir in .pc file.
+
+ * pygobject_postinstall.py (replace_prefix): Do not parse
+ pygtk-codegen-2.0 as it is part of pygtk.
+
+ * setup.py: Create gobject extension as gobject._gobject. Add
+ pygoptioncontext.c and pygoptiongroup.c to the list of source
+ files. Add option.py to the module files. Changed name of
+ distutils package from pygtk to pygobject.
+
+2006-06-24 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_filename_from_utf8): Wrap
+ g_filename_from_utf8.
+
+ * tests/test_signal.py (TestClosures.testGString): Add unit test
+ for signals using the type TYPE_GSTRING.
+
+ * gobject/pygtype.c (pyg_value_as_pyobject)
+ (pyg_value_from_pyobject): Implement conversion code for the type
+ G_TYPE_GSTRING.
+
+ * gobject/gobjectmodule.c (pyg_filename_display_basename)
+ (pyg_filename_display_name): Add bindings for
+ g_filename_display_basename and g_filename_display_name.
+ (init_gobject): Add a TYPE_GSTRING definition.
+
+ * gobject/pygobject.h,
+ * gobject/pygobject-private.h: Make pyg_constant_strip_prefix
+ receive and return const gchar*, to indicate it does not change
+ the string. Unfortunately since PyModule_AddIntConst is broken in
+ python < 2.5 this introduces const warnings elsewhere :-(
+
+ * gobject/gobjectmodule.c (pyg_flags_add_constants)
+ (pyg_enum_add_constants): Fix const warnings.
+
+2006-06-23 John Finlay <finlay@moeraki.com>
+
+ * gobject/gobjectmodule.c (pyg_object_class_list_properties)
+ (pyg_signal_list_ids, pyg_signal_lookup, pyg_signal_query): Add
+ support for retrieving signal and propertie info from interface types.
+
+2006-06-04 Johan Dahlin <johan@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_spawn_async)
+ (pyg_signal_new): Fix two leaks in error cases, found by
+ Coverity.
+
+2006-05-28 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * tests/test_subtype.py: Uncomment Johan's "subsubtype" test case.
+
+ * gobject/gobjectmodule.c (pygobject__g_instance_init): Pass the
+ g_class to pygobject_new_full, because during the instance init
+ function instances are temporarily assigned the parent's GType.
+
+ * gobject/pygobject-private.h,
+ * gobject/pygobject.c (pygobject_new_full): Make
+ pygobject_new_full accept an optional g_class parameter; If
+ present, the GType is extracted from the class instead of from the
+ instance.
+
+2006-05-20 Yevgen Muntyan <muntyan@tamu.edu>
+
+ reviewed by: Gustavo Carneiro
+
+ * gobject/pygobject.c (pygobject_init, pygobject_get_property),
+ (pygobject_set_property): Bug 341174: Be more specific in
+ set/get_property error messages.
+
+2006-05-07 Yevgen Muntyan <muntyan@tamu.edu>
+
+ reviewed by: Gustavo Carneiro
+
+ * gobject/gobjectmodule.c (_log_func, add_warning_redirection),
+ (remove_handler, disable_warning_redirections, init_gobject):
+ * gobject/pygobject.h: Add new pyg_add_warning_redirection and
+ pyg_disable_warning_redirections APIs (bug #323786 again).
+
+2006-05-07 Johan Dahlin <johan@gnome.org>
+
+ * Makefile.am (CLEANFILES): Remove pygtk.py, it's not
+ auto-generated any longer. Thanks to Kjartan for noticing.
+
+2006-05-07 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygoptioncontext.c:
+ s/sizeof(PyGMainContext)/sizeof(PyGOptionContext)/ (copy-paste error).
+
+2006-05-01 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_pid_close): Add a close() method
+ to the GPid wrapper.
+
+ * gobject/gobjectmodule.c (pyg_pid_free, pyg_pid_new),
+ (pyg_spawn_async, init_gobject): Wrap GPid in an object whose
+ destructor calls g_spawn_close_pid. Fixes #340160.
+
+2006-04-29 Johannes Hölzl <johannes.hoelzl@gmx.de>
+
+ reviewed by: Johan Dahlin <jdahlin@async.com.br>
+
+ * examples/Makefile.am:
+ * examples/option.py:
+ * gobject/Makefile.am:
+ * gobject/gobjectmodule.c: (init_gobject):
+ * gobject/option.py:
+ * gobject/pygobject-private.h:
+ * gobject/pygoptioncontext.c: (pyg_option_context_init),
+ (pyg_option_context_dealloc), (pyg_option_context_parse),
+ (pyg_option_context_set_help_enabled),
+ (pyg_option_context_get_help_enabled),
+ (pyg_option_context_set_ignore_unknown_options),
+ (pyg_option_context_get_ignore_unknown_options),
+ (pyg_option_context_set_main_group),
+ (pyg_option_context_get_main_group),
+ (pyg_option_context_add_group), (pyg_option_context_compare),
+ (pyg_option_context_new):
+ * gobject/pygoptiongroup.c: (check_if_owned), (destroy_g_group),
+ (pyg_option_group_init), (pyg_option_group_dealloc), (arg_func),
+ (pyg_option_group_add_entries),
+ (pyg_option_group_set_translation_domain),
+ (pyg_option_group_compare), (pyg_option_group_transfer_group),
+ (pyg_option_group_new):
+ * tests/test_option.py:
+
+ Add support for GOption, fixes #163645
+
+2006-04-29 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygtype.c (gclosure_from_pyfunc):
+
+ * gobject/pygobject.c (pygobject_disconnect_by_func)
+ (pygobject_handler_block_by_func)
+ (pygobject_handler_unblock_by_func):
+
+ * tests/test_signal.py (TestEmissionHook._callback):
+
+ Fix #154845, add tests and a private method.
+
+2006-04-23 John Ehresman <jpe@wingware.com>
+
+ reviewed by: Gustavo
+
+ * Makefile.am:
+ * pygtk.py:
+ * pygtk.py.in:
+ Bug 338945: Make pygtk.py relocatable
+
+2006-04-18 John Ehresman <jpe@wingware.com>
+
+ * dsextras.py: Add compiler / linker flags from pkgconfig-2.0.pc
+ by default, with an override mechanism. Filter out -lc & -lm if
+ compiling with msvc.
+
+ * setup.py: Change C extension name to _gobject and don't use the
+ pkgconfig-2.0.pc when compiling
+
+2006-04-15 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/__init__.py (_PyGObject_API): Copy _PyGObject_API from
+ gobject._gobject into gobject in order to preserve binary
+ compatibility with 3rd party modules.
+
+ * gobject/pygobject.h (init_pygobject): Import gobject, gobject._gobject.
+
+ * gobject/Makefile.am: Fix pygobject installation dir: install
+ both _gobject.la and __init__.py into
+ $(pyexecdir)/gtk-2.0/gobject.
+
+2006-04-11 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/gobjectmodule.c (init_gobject):
+ * gobject/__init__.py:
+ Move over almost all GType constants from C to Python.
+
+2006-04-11 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c (_wrap_pyg_type_register),
+ (pyg__install_metaclass, init_gobject): GObjectMeta now moved to
+ python-land (__init__.py).
+
+ * gobject/pygobject-private.h:
+ * gobject/pygobject.c (pygobject_register_class):
+ PyGObject_MetaType is now a pointer, not structure.
+
+ * gobject/gobjectmodule.c (_wrap_pyg_type_register): Add optional
+ type name parameter.
+
+ * tests/common.py (importModule): Include original exception
+ string in the raised SystemExit.
+
+2006-04-11 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/.cvsignore:
+ * gobject/Makefile.am:
+ * gobject/__init__.py:
+ * gobject/gobjectmodule.c: (init_gobject):
+ * gobject/pygobject.h:
+ * tests/Makefile.am:
+ * tests/common.py:
+
+ Turn gobject into a package; move _gobject to gobject._gobject and
+ add gobject/__init__.py. Update macros and testsuite.
+
+2006-04-11 Johan Dahlin <jdahlin@async.com.br>
+
+ * configure.ac: Post release version bump
+
+=== PyGObject 2.10.1 ===
+2006-04-11 Johan Dahlin <jdahlin@async.com.br>
+
+ * NEWS: Update
+
+2006-04-11 Andy Wingo <wingo@pobox.com>
+
+ reviewed by: Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/gobjectmodule.c (create_property): Parse unsigned int64
+ constraints in param spec declaration using the "K" ParseTuple
+ format unit, not L -- allows the full range of the datatype to be
+ parsed. K format unit added in python 2.3.
+
+2006-04-01 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * tests/test_properties.py: Add test for #335854.
+
+ * pygtk.py.in (require): For version == '2.0', use a hardcoded
+ pygtk path, recorded during build.
+
+ * gobject/gobjectmodule.c (_pyg_strv_to_gvalue): Don't allow
+ arbitrary sequences, only tuple or list, since a string is a
+ sequence too.
+ (pyg_object_new): Add a bit more detail to the exception string.
+
+2006-01-16 Johan Dahlin <johan@gnome.org>
+
+ * Makefile.am: Include dsextras.py in the dist and install it.
+
+2006-03-19 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygobject.c (pygobject_new_with_interfaces): Remove
+ comment "It will currently not filter out interfaces already
+ implemented by it parents.", since it is no longer true since
+ 2006-01-13.
+
+=== PyGObject 2.10.0 ===
+2006-01-16 Johan Dahlin <johan@gnome.org>
+
+ * NEWS: Update
+
+2006-03-09 Michael Smith <msmith@fluendo.com>
+
+ reviewed by: Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/pygenum.c: (pyg_enum_new), (pyg_enum_from_gtype),
+ (pyg_enum_add):
+ * gobject/pygflags.c: (pyg_flags_new), (pyg_flags_from_gtype),
+ (pyg_flags_add):
+ Plug a couple of leaks, fixes #334027.
+
+2006-01-19 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac (export_dynamic):
+ * Makefile.am (egg):
+ Add a make egg target
+
+2006-01-16 Johan Dahlin <johan@gnome.org>
+
+ * configure.ac: Post release version bump
+
+=== PyGObject 2.9.1 ===
+2006-01-16 Johan Dahlin <johan@gnome.org>
+
+ * NEWS: Update
+
+2006-01-15 Christopher Aillon <caillon@redhat.com>
+
+ * gobject/gobjectmodule.c (pyg_strv_to_gvalue):
+ Don't call g_value_init since the other *_to_gvalue
+ methods expect an already inited GValue
+
+2006-01-14 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/gobjectmodule.c (iowatch_marshal): Warn if io callback
+ returns None: almost always this is an error.
+
+2006-01-13 Gustavo J. A. M. Carneiro <gjc@gnome.org>
+
+ * gobject/pygobject.c (pygobject_register_class): Change strategy
+ a bit: don't ignore bases; use but augment it with missing bases
+ extracted in runtime.
+
+ * gobject/pygobject.c (pygobject_register_class): Don't use the
+ passed in 'bases' parameter; instead find out in runtime the bases
+ for any given gtype.
+ (pyg_type_get_bases, pygobject_new_with_interfaces): Refactor code
+ that dynamically discovers bases into a separate function;
+ Override tp_dealloc, tp_alloc, tp_free, tp_traverse, and tp_clear,
+ inherit them again from the parent type, since type_new inside
+ Python core sets them to hardcoded functions subtype_xxx. Also
+ call py_parent_type->ob_type, instead of fixed &PyType_Type.
+ (pygobject_clear): Change a g_message to g_warning.
+
+2006-01-13 Johan Dahlin <jdahlin@async.com.br>
+
+ * gobject/gobjectmodule.c: (pyg_io_add_watch),
+ (marshal_emission_hook), (pyg_add_emission_hook),
+ (pyg_remove_emission_hook):
+ * gobject/pygobject.c:
+ * tests/test_signal.py:
+
+ Add add/remove_emission_hook and tests. Fixes #325977
+
+2006-01-11 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * gobject/gobjectmodule.c (_pyg_signal_accumulator),
+ (create_signal, pyg_signal_accumulator_true_handled),
+ (initgobject): Bug 155380 -- Add support for signal accumulators.
+
+ * tests/runtests.py: Add 'test_enum', 'test_conversion' to
+ SKIP_FILES, since they depend on pygtk modules so don't work
+ anymore. This should be eventually fixed, though.
+
+ * tests/test_signal.py: Test signal accumulators.
+
+ * gobject/pygtype.c (object_doc_descr_get): Reorder
+ properties/signals documentation more nicely: signals + properties
+ from each type are presented, with types ranging from the leaf
+ types to the base types.
+
+ * configure.ac: Branch, bump version to 2.9.1.
+
+=== PyGObject 2.8.0 ===
+2006-01-09 Johan Dahlin <jdahlin@async.com.br>
+
+ * MANIFEST.in:
+ * Makefile.am:
+ * tests/Makefile.am:
+
+ Make dist/distcheck work again
+
+2006-01-09 Johan Dahlin <jdahlin@async.com.br>
+
+ * setup.py: Add distutils support
+
+ * dsextras.py (get_m4_define): Check for configure.ac aswell.
+
+ * .cvsignore:
+ * AUTHORS:
+ * COPYING:
+ * INSTALL:
+ * Makefile.am:
+ * PKG-INFO.in:
+ * README:
+ * autogen.sh:
+ * configure.ac:
+ * examples/.cvsignore:
+ * examples/Makefile.am:
+ * gobject/gobjectmodule.c: (initgobject):
+ * m4/jhflags.m4:
+ * m4/python.m4:
+ * pygobject-2.0.pc.in:
+ * tests/Makefile.am:
+ * tests/common.py:
+ * tests/leak.glade:
+ * tests/runtests.py:
+ * tests/test_actiongroup.py:
+ * tests/test_dialog.py:
+ * tests/test_gdk.py:
+ * tests/test_gdkevent.py:
+ * tests/test_glade.py:
+ * tests/test_gtype.py:
+ * tests/test_liststore.py:
+ * tests/test_radiobutton.py:
+ * tests/test_signal.py:
+ * tests/test_subtype.py:
+ * tests/test_textview.py:
+ * tests/test_thread.py:
+ * tests/testhelpermodule.c: (test_type_get_type),
+ (_wrap_test_g_object_new):
+ * tests/testmodule.py:
+
+ Split out PyGObject from PyGTK.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..23e5f25
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script). Here is a another example:
+
+ /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..002138a
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,7 @@
+include ChangeLog AUTHORS COPYING NEWS README
+include MANIFEST.in
+include gobject/pygobject.h gobject/pygobject-private.h
+include pygtk.py pygobject-2.0.pc.in
+include dsextras.py
+recursive-include examples *.py
+global-exclude */CVS/* .cvsignore
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f68b338
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,120 @@
+ACLOCAL_AMFLAGS = -I m4
+AUTOMAKE_OPTIONS = 1.7
+
+SUBDIRS = docs codegen glib gobject gio examples tests
+
+PLATFORM_VERSION = 2.0
+
+CLEANFILES =
+EXTRA_DIST = \
+ MANIFEST.in \
+ README.win32 \
+ pygobject-$(PLATFORM_VERSION).pc.in \
+ PKG-INFO \
+ PKG-INFO.in \
+ setup.py \
+ pygobject_postinstall.py \
+ pygtk.py \
+ dsextras.py \
+ ChangeLog.pre-2.18 \
+ m4/as-ac-expand.m4 \
+ m4/jhflags.m4 \
+ m4/python.m4
+
+BUILT_EXTRA_DIST = \
+ ChangeLog
+
+INCLUDES = -I$(top_srcdir)/gobject $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+
+# pkg-config files
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
+
+# python modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpyexec_PYTHON = dsextras.py
+pkgpyexec_LTLIBRARIES =
+
+# python
+pyexec_PYTHON = pygtk.py
+pyexec_LTLIBRARIES =
+
+# linker flags
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+# install pth file.
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(pythondir)
+ echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+install-exec-local:
+ $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
+ echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+uninstall-local:
+ rm -f $(DESTDIR)$(pythondir)/pygtk.pth $(DESTDIR)$(pyexecdir)/pygtk.pth
+
+EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM).egg
+
+egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
+egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
+ rm -fr $(EGG_TMPDIR)
+ echo $(EGG_NAME)
+ $(MKDIR_P) $(EGG_TMPDIR)
+ $(MKDIR_P) $(EGG_TMPDIR)/EGG-INFO
+ $(MAKE) -C gobject install-pkgpyexecLTLIBRARIES pkgpyexecdir=$(EGG_TMPDIR)
+ $(INSTALL) dsextras.py $(EGG_TMPDIR)
+ rm -fr $(EGG_TMPDIR)/gobject.la
+ $(INSTALL) PKG-INFO $(EGG_TMPDIR)/EGG-INFO
+ echo "gobject.so" >> $(EGG_TMPDIR)/EGG-INFO/native_libs.txt
+ ( echo "gobject" ; echo "dsextras.py" ) >> $(EGG_TMPDIR)/EGG-INFO/top_level.txt
+ cd $(EGG_TMPDIR) && zip -rq $(EGG_NAME) .
+ mv $(EGG_TMPDIR)/$(EGG_NAME) .
+ rm -fr $(EGG_TMPDIR)
+
+doc-dist:
+ mkdir pygobject
+ cp -r docs/html/*.html pygobject
+ cp -r docs/html/*.sgml pygobject
+ cp -r docs/html/*.devhelp pygobject
+ cp -r docs/style.css pygobject
+ tar cfz $(PACKAGE)-docs.tar.gz pygobject
+ rm -fr pygobject
+
+release-tag:
+ @ROOT=`svn info --xml|egrep ^"<url>"|cut -d\> -f2|cut -d\< -f1`; \
+ SVNVERSION=`echo $(VERSION)|sed s/\\\./_/g`;\
+ echo "* Tagging $(VERSION)"; \
+ svn cp -m "Tag $(VERSION)" \
+ $$ROOT \
+ svn+ssh://johan@svn.gnome.org/svn/pygobject/tags/PYGOBJECT_$$SVNVERSION
+
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ @echo Creating $@
+ @if test -d "$(srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
+ && mv -f $@.tmp $@ \
+ || ($(RM) $@.tmp; \
+ echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+ (test -f $@ || echo git-log is required to generate this file >> $@)); \
+ else \
+ test -f $@ || \
+ (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+ echo A git checkout and git-log is required to generate this file >> $@); \
+ fi
+
+
+distclean-local:
+ if test $(srcdir) = .; then :; else \
+ rm -f $(BUILT_EXTRA_DIST); \
+ fi
+
+dist-hook: $(BUILT_EXTRA_DIST)
+ files='$(BUILT_EXTRA_DIST)'; \
+ for f in $$files; do \
+ if test -f $$f; then d=.; else d=$(srcdir); fi; \
+ rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..000c547
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,1082 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(pkgpyexec_PYTHON) \
+ $(pyexec_PYTHON) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/PKG-INFO.in $(srcdir)/config.h.in \
+ $(srcdir)/pygobject-2.0-uninstalled.pc.in \
+ $(srcdir)/pygobject-2.0.pc.in $(top_srcdir)/configure \
+ $(top_srcdir)/docs/reference/entities.docbook.in \
+ $(top_srcdir)/docs/xsl/fixxref.py.in AUTHORS COPYING ChangeLog \
+ INSTALL NEWS compile config.guess config.sub depcomp \
+ install-sh ltmain.sh missing py-compile
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = pygobject-2.0.pc pygobject-2.0-uninstalled.pc \
+ docs/reference/entities.docbook docs/xsl/fixxref.py PKG-INFO
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+ "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+ "$(DESTDIR)$(pkgconfigdir)"
+LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+py_compile = $(top_srcdir)/py-compile
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = -I m4
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+
+# python modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+SUBDIRS = docs codegen glib gobject gio examples tests
+PLATFORM_VERSION = 2.0
+CLEANFILES =
+EXTRA_DIST = \
+ MANIFEST.in \
+ README.win32 \
+ pygobject-$(PLATFORM_VERSION).pc.in \
+ PKG-INFO \
+ PKG-INFO.in \
+ setup.py \
+ pygobject_postinstall.py \
+ pygtk.py \
+ dsextras.py \
+ ChangeLog.pre-2.18 \
+ m4/as-ac-expand.m4 \
+ m4/jhflags.m4 \
+ m4/python.m4
+
+BUILT_EXTRA_DIST = \
+ ChangeLog
+
+INCLUDES = -I$(top_srcdir)/gobject $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+
+# pkg-config files
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
+pkgpyexec_PYTHON = dsextras.py
+pkgpyexec_LTLIBRARIES =
+
+# python
+pyexec_PYTHON = pygtk.py
+pyexec_LTLIBRARIES =
+
+# linker flags
+common_ldflags = -module -avoid-version $(am__append_1)
+EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM).egg
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu 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: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(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: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+pygobject-2.0.pc: $(top_builddir)/config.status $(srcdir)/pygobject-2.0.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pygobject-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pygobject-2.0-uninstalled.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+docs/reference/entities.docbook: $(top_builddir)/config.status $(top_srcdir)/docs/reference/entities.docbook.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+docs/xsl/fixxref.py: $(top_builddir)/config.status $(top_srcdir)/docs/xsl/fixxref.py.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+PKG-INFO: $(top_builddir)/config.status $(srcdir)/PKG-INFO.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \
+ }
+
+uninstall-pkgpyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \
+ done
+
+clean-pkgpyexecLTLIBRARIES:
+ -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES)
+ @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
+ }
+
+uninstall-pyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
+ done
+
+clean-pyexecLTLIBRARIES:
+ -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
+ @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-pkgpyexecPYTHON: $(pkgpyexec_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+ @list='$(pkgpyexec_PYTHON)'; dlist=; list2=; test -n "$(pkgpyexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpyexecdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpyexecdir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pkgpyexecdir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pkgpyexecdir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-pkgpyexecPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgpyexec_PYTHON)'; test -n "$(pkgpyexecdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$fileso
+install-pyexecPYTHON: $(pyexec_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+ @list='$(pyexec_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyexecdir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyexecdir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-pyexecPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyexec_PYTHON)'; test -n "$(pyexecdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$fileso
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__cd) '$(distuninstallcheck_dir)' \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-pkgpyexecLTLIBRARIES \
+ clean-pyexecLTLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-exec-local install-pkgpyexecLTLIBRARIES \
+ install-pkgpyexecPYTHON install-pyexecLTLIBRARIES \
+ install-pyexecPYTHON
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-local uninstall-pkgconfigDATA \
+ uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
+ uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool clean-pkgpyexecLTLIBRARIES \
+ clean-pyexecLTLIBRARIES ctags ctags-recursive dist dist-all \
+ dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-libtool distclean-local distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA \
+ install-pkgpyexecLTLIBRARIES install-pkgpyexecPYTHON \
+ install-ps install-ps-am install-pyexecLTLIBRARIES \
+ install-pyexecPYTHON install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-local uninstall-pkgconfigDATA \
+ uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
+ uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON
+
+
+# install pth file.
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(pythondir)
+ echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+install-exec-local:
+ $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
+ echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+uninstall-local:
+ rm -f $(DESTDIR)$(pythondir)/pygtk.pth $(DESTDIR)$(pyexecdir)/pygtk.pth
+
+egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
+egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
+ rm -fr $(EGG_TMPDIR)
+ echo $(EGG_NAME)
+ $(MKDIR_P) $(EGG_TMPDIR)
+ $(MKDIR_P) $(EGG_TMPDIR)/EGG-INFO
+ $(MAKE) -C gobject install-pkgpyexecLTLIBRARIES pkgpyexecdir=$(EGG_TMPDIR)
+ $(INSTALL) dsextras.py $(EGG_TMPDIR)
+ rm -fr $(EGG_TMPDIR)/gobject.la
+ $(INSTALL) PKG-INFO $(EGG_TMPDIR)/EGG-INFO
+ echo "gobject.so" >> $(EGG_TMPDIR)/EGG-INFO/native_libs.txt
+ ( echo "gobject" ; echo "dsextras.py" ) >> $(EGG_TMPDIR)/EGG-INFO/top_level.txt
+ cd $(EGG_TMPDIR) && zip -rq $(EGG_NAME) .
+ mv $(EGG_TMPDIR)/$(EGG_NAME) .
+ rm -fr $(EGG_TMPDIR)
+
+doc-dist:
+ mkdir pygobject
+ cp -r docs/html/*.html pygobject
+ cp -r docs/html/*.sgml pygobject
+ cp -r docs/html/*.devhelp pygobject
+ cp -r docs/style.css pygobject
+ tar cfz $(PACKAGE)-docs.tar.gz pygobject
+ rm -fr pygobject
+
+release-tag:
+ @ROOT=`svn info --xml|egrep ^"<url>"|cut -d\> -f2|cut -d\< -f1`; \
+ SVNVERSION=`echo $(VERSION)|sed s/\\\./_/g`;\
+ echo "* Tagging $(VERSION)"; \
+ svn cp -m "Tag $(VERSION)" \
+ $$ROOT \
+ svn+ssh://johan@svn.gnome.org/svn/pygobject/tags/PYGOBJECT_$$SVNVERSION
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ @echo Creating $@
+ @if test -d "$(srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
+ && mv -f $@.tmp $@ \
+ || ($(RM) $@.tmp; \
+ echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+ (test -f $@ || echo git-log is required to generate this file >> $@)); \
+ else \
+ test -f $@ || \
+ (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+ echo A git checkout and git-log is required to generate this file >> $@); \
+ fi
+
+distclean-local:
+ if test $(srcdir) = .; then :; else \
+ rm -f $(BUILT_EXTRA_DIST); \
+ fi
+
+dist-hook: $(BUILT_EXTRA_DIST)
+ files='$(BUILT_EXTRA_DIST)'; \
+ for f in $$files; do \
+ if test -f $$f; then d=.; else d=$(srcdir); fi; \
+ rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..cee8732
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,460 @@
+2.21.3 21-Jan-2010
+ - Proper handling of null-ok in virtual methods (Ludovic L'Hours)
+ - Fall back to use the floating references API in glib if there isn't a sinkfunc defined. (Tomeu Vizoso)
+ - Revert "Drop sinkfuncs." (Tomeu Vizoso)
+ - [giounix] Make it possible to compile on glib 2.20 (Johan Dahlin)
+ - Release the lock when potentially invoking Python code. (Sjoerd Simons)
+
+2.21.2 10-Jan-2010
+ - Drop sinkfuncs. (Tomeu Vizoso)
+ - Clear error if we failed the import (Colin Walters)
+ - Added missing , to keyword list of gio.GFile.set_attribute (John Ehresman)
+ - Fix arg conversion in gio.GFile.set_attribute (John Ehresman)
+ - Set constants under python 2.5 or before (John Ehresman)
+ - Doc Extractor: Use replacements that make sense for &...; expressions. (José Alburquerque)
+ - Add build docs for windows (John Stowers)
+ - Setup.py cosmetic tidy (John Stowers)
+ - Fix crash when importing gio (John Stowers)
+ - Bug 589671 - Dont use generate-constants (John Stowers)
+ - Bug 589671 - Fix setup.py for windows build (John Stowers)
+ - Include pygsource.h (John Stowers)
+ - codegen/docextract_to_xml.py: One more &...; replacement (&nbsp;). (José Alburquerque)
+ - codegen/docextract_to_xml.py: Replace some &..; that cause errors. (José Alburquerque)
+ - codegen/docextract_to_xml.py: Handle C++ multi-line comments. (José Alburquerque)
+ - codegen/docextract.py: Stop final section processing on first match. (José Alburquerque)
+ - Update doc extraction tool to handle GObjectIntrospection annotations. (José Alburquerque)
+ - Docs: replace gio.IO_ERROR_* with gio.ERROR_* (Paul Bolle)
+ - Bug 613341 - pygobject tests seem to require pygtk causing a circular (Gian Mario)
+ - Don't raise an error in _pygi_import if pygi support is disabled (Simon van der Linden)
+ - Initialize PyGPollFD_Type.fd_obj to NULL (Tomeu Vizoso)
+ - Bug 605937 - pygobject: Makefile.am sets $TMPDIR, disrupting distcc (Gian Mario)
+ - Wrap gio.Cancellable.make_pollfd() and add a test (Gian Mario)
+ - Make cancellable an optional parameter in many methods (Gian Mario)
+
+2.21.1 02-Jan-2010
+ - Wrap gio.Volume.eject_with_operation (Gian Mario)
+ - Wrap gio.Mount.eject_with_operation (Gian Mario)
+ - Wrap gio.Mount.unmount_mountable_with_operation (Gian Mario)
+ - Wrap File.unmount_mountable_with_operation (Gian Mario)
+ - Wrap gio.File.stop_mountable (Gian Mario)
+ - Wrap gio.File.start_mountable (Gian Mario)
+ - Wrap gio.File.replace_readwrite_async (Gian Mario)
+ - Wrap gio.File.poll_mountable (Gian Mario)
+ - Wrap gio.File.open_readwrite_async (Gian Mario)
+ - Wrap gio.File.eject_mountable_with_operation (Gian Mario)
+ - Wrap gio.File.create_readwrite_async (Gian Mario)
+ - Wrap gio.Drive.stop (Gian Mario)
+ - Wrap gio.Drive.start (Gian Mario)
+ - Wrap gio.SocketListener.accept_socket_async|finish (Gian Mario)
+ - Wrap gio.SocketListener.accept_finish (Gian Mario)
+ - Wrap gio.SocketListener.accept_async (Gian Mario)
+ - Wrap gio.SocketListener.accept_socket (Gian Mario)
+ - Wrap gio.SocketListener.accept (Gian Mario)
+ - Make cancellable optional in gio.SocketClient.connect_to_host
+ (Gian Mario)
+ - Wrap gio.SocketListener.add_address (Gian Mario)
+ - Wrap gio.SocketClient.connect_to_service_async (Gian Mario)
+ - Wrap gio.SocketClient.connect_to_host_async (Gian Mario)
+ - Wrap gio.SocketClient.connect_async (Gian Mario)
+ - Wrap gio.SocketAddressEnumerator.next_async (Gian Mario)
+ - Add a missing object gio.InetSocketAddress new in GIO 2.22
+ (Gian Mario)
+ - Make cancellable optional for gio.SocketAddressEnumerator.next
+ (Gian Mario)
+ - Wrap gio.Socket.condition_wait (Gian Mario)
+ - Wrap gio.Socket.condition_check (Gian Mario)
+ - Wrap gio.Resolver.lookup_service_finish (Gian Mario)
+ - Wrap gio.Resolver.lookup_service_async (Gian Mario)
+ - Wrap gio.Resolver.lookup_service (Gian Mario)
+ - Wrap gio.Resolver.lookup_by_address_async (Gian Mario)
+ - Wrap gio.Resolver.lookup_by_name_finish (Gian Mario)
+ - Wrap gio.Drive.eject_with_data (Gian Mario)
+ - Deprecate old gio.Drive methods (Gian Mario)
+ - Wrap gio.Resolver.lookup_by_name (Gian Mario)
+ - Make cancellable optional in gio.Resolver.lookup_by_address
+ (Gian Mario)
+ - Strip g_ prefix for many other functions (Gian Mario)
+ - Strip g_ prefix from InetAddress functions (Gian Mario)
+ - Fix function name gio.resolver_get_default (Gian Mario)
+ - Wrap gio.FileIOStream.query_info_async (Gian Mario)
+ - Register enums and flags in PyGI if needed (Tomeu Vizoso, #603534)
+ - Wrap gio.IOStream.close_async (Gian Mario)
+ - Make cancellable optional in GFile.create_readwrite (Gian Mario)
+ - Remove a duplicate entry in gio.defs (Gian Mario)
+ - Wrap gio.FileInfo.set_modification_time (Gian Mario)
+ - Wrap gio.EmblemedIcon.get_emblems (Gian Mario)
+ - Update Enums and Flags with new API (Gian Mario)
+ - Fix handling of uchar in pyg_value_from_pyobject (Bastian Winkler)
+
+2.21.0 18-dec-2009
+ - pygmainloop: fix use of PySignal_WakeUpFD API for nested loops
+ (Philippe Normad, #481569)
+ - Add capabilities to import wrappers from pygi (Simon van der Linden)
+ - Move threads_init() function from 'gobject' to 'glib' (Paul)
+ - Fix wrong minimum checking in float properties (Paul, #587637)
+ - Wrap new API added in GIO 2.22 (Gian Mario)
+ - Fix bad name when rebuilding the unix source module (Gian Mario)
+ - Add the missing limit constants from glibconfig.h
+ (Tomeu Vizoso, #603244)
+ - Suppress warnings about format conversion
+ (Simon van der Linden, #603355)
+ - Properly define Connectable as interface type and not object type
+ (Gian Mario)
+ - Wrap new API added in GIO-UNIX 2.22 (Gian Mario)
+ - Wrap g_find_program_in_path (Gian Mario, #598435)
+ - Add pygi-external.h into Makefile SOURCES (Gian Mario)
+
+2.20.0 23-sep-2009
+ - Allow to use automake 1.11 (Paolo Borelli)
+ - Specify programming language in .devhelp file (Frédéric Péters)
+ - Plug reference leak of GSource in pyg_main_loop_init (Paul)
+ - Updated uninstalled.pc file (Brian Cameron)
+
+2.19.0 10-aug-2009
+ - Add macros to help with Python list to/from GList/GSList conversions.
+ (John Finlay)
+ - GIO docs practically completed (Gian)
+ - GFileInfo.list_attributes should accept None/NULL (Gian)
+ - Strip out Windows DLL API macros (John Finlay)
+ - Document that many functions got moved gobject -> glib (Paul)
+ - Allow h2def.py to work when there are tabs or multiple spaces after
+ the struct keyword. (Murray Cumming)
+ - Fix build when builddir is not the same as srcdir
+ (Theppitak Karoonboonyanan)
+ - Make gio.Emblem constructor new-style (Paul)
+ - Cleanup GIO overrides to use Python function/method names (Paul)
+ - Make codegen report errors using Python function/method names (Paul)
+ - Fix object type in gio.BufferedInputStream_fill_async (Gian)
+ - Wrap gio.BufferedInputStream.fill_async (Gian)
+ - Add gio.BufferedOutputStream which was forgotten in the types (Gian)
+ - Split overrides for gio.MemoryOutputStream (Gian)
+ - Wrap gio.memory_input_stream_new_from_data (Gian)
+ - Introduces the girepository module from the former PyBank
+ (Simon van der Linden)
+ - Add API appeared in 2.20 but not marked as such in gio docs (Gian)
+ - Wrap gio.FileOutputStream.query_info_async (Gian)
+ - Wrap gio.FileInputStream.query_async (Gian)
+ - Install executable codegen parts with executing permissions (Paul)
+ - Wrap gio.DataInputStream.read_line_async and read_until_async (Paul)
+ - Fix gio.OutputStream.splice_async (Paul)
+ - Add GIO 2.20 API and update docs (Gian)
+
+2.18.0 24-may-2009
+ - Improve gio docs with some more classes (Gian)
+ - Wrap gio.OutputStream.splice_async() (Gian)
+ - Add Python ver into installed libpyglib name (Emilio Pozuelo Monfort)
+ - Wrap gio.OutputStream.flush_async() (Gian)
+ - Use 'Requires.private' for libffi in '.pc' files (Josselin Mouette)
+ - Add wrapper for gio.FileAttributeMatcher (Gian)
+ - Mark relevant glib.IOChannel methods as METH_NOARGS (Paul)
+ - Retire hand-written ChangeLog; autocreate from Git history (Paul)
+ - Wrap gio.InputStream.skip_async() (Gian)
+ - Add in codegen -n --namespace option and the code to remove dll
+ API in headers, added documentation (Siavash Safi)
+ - Properly mark glib.get_user_special_dir() as a keywords method (Paul)
+
+2.17.0 30-apr-2009
+ - Write a good part of the docs for gio (Gian)
+ - Wrap g_mount_guess_content_type g_mount_guess_content_type_finish
+ g_mount_guess_content_type_sync (Gian, #580802)
+ - Swap first two arguments of gio.File.query_info_async (Paul, #580490)
+ - Fix a crash in pyg_type_add_interfaces (Paul, #566571)
+ - Remove an empty structure, use sizeof(PyObject)
+ instead (Paul, #560591)
+ - Wrap four g_get_user_*_dir() functions (Paul, #575999)
+ - Remove 'ltihooks.py' as using deprecated Python module (Paul)
+ - Code maintenance: add .gitignore files (Paul)
+ - CellRendererPixbuf stock-size property has wrong type (Paul, #568499)
+ - Add a doap file after git migration (Johan Dahlin)
+ - missing dep on libffi in pygobject-2.0.pc (Götz Waschk, #550231)
+ - g_volume_monitor_tp_new new function, return the singleton object.
+ (Paul, #555613)
+ - Remove a DeprecationWarning under python 2.6 (James Westby, #573753)
+ - several scripts from codegen directory are not distributed
+ (Krzesimir Nowak)
+ - g_file_copy_async change argument order to keep it consistent with the
+ other methods (Gian)
+ - memory leak in gio.File.copy_async (Paul Pogonyshev, #578870)
+ - g_file_monitor should accept None for cancellable and set the default
+ flag to G_FILE_MONITOR_NONE (Gian)
+ - pyg_notify_free needs to ensure it has GIL before calling Py_XDECREF
+ (Jonathan Matthew)
+ - Wrap g_file_set_display_name_async (Gian)
+ - Add a semi-private method to return the option context C object from
+ an option context wrapper (Tristan Hill)
+ - Converting a negative long Python value to a GUINT64 GValue doesn't
+ error out as it should (Gustavo J. A. M. Carneiro, #577999)
+ - Wrap g_file_set_attributes_async and
+ g_file_set_attributes_finish (Gian)
+ - g_file_query_filesystem_info_async fix a typo (Gian)
+ - Wrap g_file_query_filesystem_info_async (Gian)
+ - Add missing g_file_query_filesystem_info_async and
+ g_file_query_filesystem_info_finish (Gian)
+ - Wrap g_file_eject_mountable (Gian)
+ - g_file_copy callback cannot be optional (Gian)
+ - Swap various kwargs names to reflect the code (Gian)
+ - Update the address of the FSF (Tobias Mueller, #577134)
+ - Add g_volume_should_automount (Gian)
+ - Wrap g_drive_enumerate_identifiers and g_volume_enumerate_identifiers
+ (Gian)
+ - Add a couple of convinence functions to convert from/to a python list
+ and an array of strings (Gian)
+ - Allow setting pytype wrapper class (Mark Lee, John Ehresman, #559001)
+ - Wrap g_file_enumerator_close_async (Gian Mario Tagliaretti)
+
+2.16.1 22-feb-2009
+ - Apply the patch provided by Cygwin Ports maintainer
+ (Paul Pogonyshev, #564018)
+ - Bad -I ordering can break build, patch from [dmacks netspace org]
+ (Gian Mario Tagliaretti, #566737)
+ - Fix keyword list to be in sync with positional arguments
+ (Paul, #566744)
+ - Add a comment explaining why the two for loops for registering
+ interfaces (Gustavo Carneiro)
+ - Huge cleanup of GIO overrides (Paul, #566706)
+ - gtk.Buildable interface method override is not recognized
+ (Paul, #566571)
+ - Do not escape the ampersand "&" in entity references. Replace some
+ unusual entity references in the output with their literal values.
+ (Daniel Elstner, #568485)
+ - gio.InputStream.read_async can cause memory corruption.
+ (Paul, #567792)
+ - Inconsistent use of tabs and spaces in pygtk.py (Paul, #569350)
+ - Huge fix of memory leaks in GIO (Paul, Paolo Borelli, Gian, #568427)
+ - non-async functions don't release python locks before calling
+ blocking C functions (Gian, Gustavo, #556250)
+ - Change comment to avoid false positives when grep'ing for deprecated
+ gtk functions (Andre Klapper)
+ - ltihooks.py updating license header from GPL to LGPL
+ (James Henstridge)
+
+2.16.0 04-jan-2009
+ - gobject.timeout_add_seconds() not found in docs
+ (Paul Pogonyshev, #547119)
+ - _wrap_g_output_stream_write_async not adding a reference to the
+ buffer passed (Paul, #564102)
+ - gio.VolumeMonitor segfaults (Gian Mario Tagliaretti, #555613)
+ - Test if `domain' is not-null before using it to avoids segfaults
+ (Paul, #561826)
+ - g_output_stream_write_all use gsize instead of gssize (Gian)
+ - add __repr__ to gio.Drive, gio.Mount and gio.Volume
+ (Paul, #530935)
+ - Missing AC_CONFIG_MACRO_DIR([m4]) (Loïc Minier, #551227)
+ - Make codegen not import when corresponding argument types are not
+ registered (Paul, #551056)
+ - Fix typos breaking compilation (Frederic Peters #551212)
+ - GFile load_contents methods chop data at first \0
+ (Jonathan Matthew, #551059)
+
+2.15.4 3-sep-2008
+ - Fix typo in GPointer type registration (Loïc Minier,#550463)
+ - support G_TYPE_CLOSURE in codegen (Gian)
+
+2.15.3 31-aug-2008
+ - Beginning of porting to 3.0. glib & gobject module ported.
+ - Wrap g_app_info_* functions (Gian)
+ - Wrap gio.FileAttributeInfo (Gian)
+ - Wrap g_vfs_get_supported_uri_schemes (Johan, #545846)
+ - Wrap g_file_info_get_modification_time (Johan, #545861)
+ - Wrap gio.Volume.mount/eject (Johan)
+ - Wrap gio.File.move (Johan)
+ - Wrap gio.query_writable_namespaces (Gian, #545920)
+ - Separate glib & gobject documentation
+ - Wrap GFile.append_to_async (Gian, #545959)
+ - Wrap GFile.create_async (Gian, #546020)
+ - Change return value from 'gboolean' to 'int' and changed semantics
+ to Pythonic (Paul, #544946)
+ - Wrap GFile.replace_async and query_info_async (Gian, #546046)
+ - GIcon and implementations improvements (Paul, #546135)
+ - Improve __repr__ and richcompare for gio classes (Paul)
+ - Missing Py_INCREFs for some file async methods (Jonathan Matthew, #546734)
+ - File.copy progress_callback does not work (Paul, #546591)
+ - add File.replace_contents, replace_contents_async, replace_contents_finish.
+ (Jonathan Matthew, #547067)
+ - Add GFile.query_default_handler (Gian)
+ - fix docstring line length (Jonathan Matthew, #547134)
+ - improve runtime type wrapper creation (Paul, #547104)
+ - make gio.File more Pythonic (Paul, #546120)
+ - No TypeError raised when type is None (Paul, #540376)
+ - wrap a few memory stream methods (Paul, #547354)
+ - wrap gio.DataInputStream.read_line and ...read_until (Paul, #547484)
+ - wrap four important asynchronous methods in gio.Drive and gio.Mount
+ (Paul, #547495)
+ - gio.InputStream.read() looks broken (Paul, #547494)
+ - wrap g_content_types_get_registered() (Paul, #547088)
+ - cannot create new threads when pygtk is used (Paul, #547633)
+ - an unitialized variable in PyGLib (Paul, #549351)
+ - Constructor of gtk.TreeView raises TypeError when model is None
+ (Paul, #549191)
+ - Fix memory problems reported by valgrind due to invalid tp_basicsize in
+ PyGPropsDescr_Type. (Gustavo, #549945)
+
+2.15.2 26-jul-2008
+ - New module: glib, which contains the parts of the old
+ gobject bindings which are in the glib library.
+ MainLoop/MainContext/Sources/GOption and a few others has now moved.
+ - Add a new installed library libpyglib-2.0, which contains the extension
+ API for third-part modules instead of relying on macros which accesses
+ struct fields.
+ - Add bindings for gio.File.enumerate_children_async,
+ gio.FileEnumerator.next_files_async, gio.Mount.mount,
+ gio.File.mount_mountable, gio.File.mount_enclosing_volume,
+ gio.File.unmount_mountable, gio.File.copy.
+ - Add a new api for mapping a GError domain to an exception and register
+ an exception for GIOError.
+ - Remove leading IO_* prefix for the gio flags and register a quark
+ for the domain.
+ - Use GSlice in the glib module and bump required version to 2.14.
+
+2.15.1 15-jul-2008
+ - Rename pygtk-codegen-2.0 to pygobject-codegen-2.0 to avoid
+ conflicting with PyGTK (Paul Pogonyshev)
+
+2.15.0 15-jul-2008
+ - Add GIO bindings (Johan, Mario Tagliaretti, Thomas Leonard)
+ - Move codegen from PyGTK (Johan, Paul Pogonyshev, #542821)
+ - Add more variables to the .pc files (Damien Carbery, Paul,
+ Dan Winship, #486876)
+ - Add pyg_option_group_new to the public API (Johan)
+ - Add g_get_application_anme and g_get_progname (Sebastian Rittau)
+ - Avoid making wakeups when using Python 2.6 (Johan, Gustavo,
+ Adam Olsen, Josselin Mouette, Philippe Normand, Guido Van Rossum)
+ - Only link against libffi when found (Ed Catmur, #496006)
+ - Improve gobject.property (Tomeu Vizoso, #523352)
+ - Improve enum comparision and warnings (Paul, Phil Dumont, #428732)
+ - Many gobject.Source improvements (Bryan Silverthorn)
+ - Apply some fixes to make pylint happier (Johan, Simon Schampijer,
+ #523821)
+ - Fix error message in pyg_io_add_watch (Juha Sahkangas)
+ - Improve h2def.py (Oliver Crete, Murray Cumming, Lauro Moura)
+
+2.14.0 16-sep-2007
+ - Fix a Python 2.6 deprecation warning (Johannes Hölzl, #342948)
+ - Wrap g_timeout_add_seconds, when compiling with glib 2.14 (Gustavo)
+ - Always fully initialize the PyGObject (Ed Catmur, #466082)
+ - Fix compilation in Solaris, again (#339924, Gustavo)
+ - Fix check for default value in boolean type (Marco Giusti, #470230)
+ - Fix new style properties with subclasses (Johan Dahlin, #470718)
+ - Docs generation fixes (John Finlay)
+
+2.13.2 07-jul-2007
+ - Fix build on opensolaris (Damien Carbery, #339924)
+ - Proxy GOption exceptions from Python to C (Johannes Hölzl, #342948)
+ - Support G_TYPE_VALUE boxed args/signals
+ (Ed Catmur, Carlos Martin, #351072)
+ - pyg_error_exception_check bug fix (Sebastian Granjoux, #449879)
+ - Toggle references bug fix (#447271, Gustavo Carneiro)
+ - use python-config to get python includes (#448173, Sebastien Bacher)
+ - Support GObject properties in new properties API (Gustavo)
+ - generate-constants fixes (Muntyan)
+ - Allow running autogen.sh from outside $srcdir (Muntyan)
+
+2.13.1 02-may-2007
+ - Generic CClosure marshaller using libffi (Johan, #353816)
+ - Uninstalled .pc file (Damien Carbery, #385129)
+ - Fix leak in GFlags handling (Daniel Berrange, #428726)
+ - Use dirname in autogen (Loïc Minier, #409234)
+ - Treat None in a GValueArray as pointer/NULL (Ed Catmur, #352209)
+ - Toggle reference bug fix in tp_setattro (Gustavo, #434659)
+ - Add a simplified helper for creating properties (Johan, Gustavo, #338089)
+ - Avoid throwing an exception in GValue converter (James Livingstone,
+ Ed Catmur, #374653)
+ - Build fix in .pc file (Luca Ferretti, #435132)
+
+2.13.0 23-april-2007
+ - Release the GIL in g_object_set_property (Edward Hervey, #395048)
+ - Break PyGObject<->GObject reference cycle (Gustavo Carneiro, #320428)
+ - use static inline functions for init_pygobject (Gustavo, #419379)
+ - Wrap g_set_application_name, g_set_prgname
+ (Havoc Pennington, #415853)
+ - New pyg_gerror_exception_check API (Gustavo, #425242)
+ - New API to get/set multiple properties
+ (Gian Mario Tagliaretti, #403212)
+ - Misc. bug fixes.
+
+2.12.3 18-november-2006
+ - distutils build fixes (Cedric)
+ - documentation updates (John)
+ - gobject.handler_block_by_func and friends now accept methods
+ (Johan, Dima, #375589)
+ - avoid truncating of gparamspec (Yevgen Muntyan, #353943)
+ - set __module__ on gobject derived types (Johan,
+ Osmo Salomaa, #376099)
+ - Ensure exceptions are raised on errors in gobject.OptionGroup
+ (Johan, Laszlo Pandy, #364576
+
+2.12.2 3-october-2006
+ - Make PyGObject 64-bit safe for Python 2.5 (Gustavo)
+ - All headers are now LGPL and not GPL (Johan)
+ - Remove a couple of GCC warnings (Gustavo)
+ - Revive distutils support (Cedric Gustin)
+ - Emission hook reference count bugfix (Gustavo)
+ - MSVC/ANSI C compilation fix (John Ehresman)
+ - Bump Ctrl-C timeout handler from 100ms to 1000 (Johan)
+
+2.12.1 4-september-2006
+ - Corrected version check (Sebastian Dröge, #354364)
+
+2.12.0 4-september-2006
+ - Install the html files even when using --disable-docs (#353159, Johan,
+ Matthias Clasen)
+
+2.11.4 27-august-2006
+ - Include pre-generated html docs in the tarball (Johan)
+ - Fix bug in do_set_property called from constructor (Gustavo, #353039)
+ - Fix type registration involving interfaces with signals and/or
+ properties (Gustavo)
+
+2.11.3 21-august-2006
+ - Documentation updates (John)
+ - Documentation build fixes (Johan, John, Gian Mario Tagliaretti)
+ - PyGObject can now be compiled using a C++ compiler (Murray Cumming)
+ - Type registration bug fix (Gustavo)
+
+2.11.2 8-august-2006
+ - Add fixxref.py from PyGTK (Johan)
+ - Fix parallel build (#350225, Ed Catmur)
+
+2.11.1 4-august-2006
+ - Add John Finlay's reference manual (Johan, John)
+ - Fix GOption mem leak (Gustavo)
+ - Infrastructure for lazy type registration (Johan)
+ - Enum/Flags fixes (Gustavo, John)
+ - Eliminate some GCC warnings (Johan)
+
+2.11.0 12-july-2006
+ - Add GOption support (#163645, Johannes Hölzl)
+ - GObject metaclass converted to Python code (Gustavo)
+ - Register GType constants from Python-land (Johan)
+ - Distutils updates (John Ehresman, Cedric Gustin)
+ - Add support for signal emission hooks (#154845, Johan)
+ - g_spawn_close_pid support (Gustavo)
+ - Add new APIs do add or disable log redirections (Muntyan, #323786)
+ - "sub-sub-type" bug fixed (Gustavo)
+ - Coverity report code fixes (Johan)
+ - Support retrieving signal and property info from interfaces (Finlay)
+ - Support parameters of type G_TYPE_GSTRING in signals (Gustavo)
+ - Wrap a few g_filename_* APIs (Gustavo)
+
+2.10.1 11-april-2006
+ - uint64 property bug fix (Andy Wingo)
+ - Hard code path to 2.0 (Gustavo)
+ - Allow only tuples and lists in strv to value (Gustavo)
+ - Include dsextras.py in the dist (Johan)
+
+2.10.0 13-march-2006
+ - enum/leak fix (Michael Smith)
+
+2.9.0 16-january-2006
+ - Signal accumulator support (Gustavo)
+ - GObject doc string generation improvements (Gustavo)
+ - Discover GInterfaces in runtime (Gustavo)
+ - Warn if return value in iowatch callback is not bool (Gustavo)
+ - Convert string arrays properly (Christopher Aillon)
+
+2.8.0 9-january-2006
+ - Initial release, split of from PyGTK.
+ - Updates for Python 2.5's richcompare (Manish Yosh)
+ - PyFlags bug fixes (Gustavo)
+ - Fix leak in pygobject_new_with_interfaces (Johan)
+ - Undeprecate gobject.type_register (Johan)
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..f029d09
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,25 @@
+Metadata-Version: 1.0
+Name: PyGObject
+Version: 2.21.3
+Summary: Python bindings for GObject
+Home-page: http://www.pygtk.org/
+Author: James Henstridge
+Author-email: james@daa.com.au
+Maintainer: Johan Dahlin
+Maintainer-email: johan@gnome.org
+License: GNU LGPL
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.21/pygobject-2.21.3.tar.gz
+Description: Python bindings for GLib, GObject and GIO
+Platform: POSIX, Windows
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Linux
+Classifier: Environment :: MacOS X
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Environment :: Unix
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
+Classifier: Operating System :: POSIX
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/PKG-INFO.in b/PKG-INFO.in
new file mode 100644
index 0000000..ac0e2e6
--- /dev/null
+++ b/PKG-INFO.in
@@ -0,0 +1,25 @@
+Metadata-Version: 1.0
+Name: PyGObject
+Version: @VERSION@
+Summary: Python bindings for GObject
+Home-page: http://www.pygtk.org/
+Author: James Henstridge
+Author-email: james@daa.com.au
+Maintainer: Johan Dahlin
+Maintainer-email: johan@gnome.org
+License: GNU LGPL
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/@PYGOBJECT_MAJOR_VERSION@.@PYGOBJECT_MINOR_VERSION@/pygobject-@VERSION@.tar.gz
+Description: Python bindings for GLib, GObject and GIO
+Platform: POSIX, Windows
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Linux
+Classifier: Environment :: MacOS X
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Environment :: Unix
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
+Classifier: Operating System :: POSIX
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/README b/README
new file mode 100644
index 0000000..c5a7089
--- /dev/null
+++ b/README
@@ -0,0 +1,101 @@
+PyGObject
+=====
+Original authors: James Henstridge <james@daa.com.au>
+ Johan Dahlin <johan@gnome.org>
+
+Current maintainers: Gustavo J A M Carneiro <gjc@gnome.org>
+ Paul Pogonyshev <pogonyshev@gmx.net>
+ Gian Mario Tagliaretti <gianmt@gnome.org>
+ Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+
+This archive contains bindings for the GLib, GObject and GIO,
+to be used in Python. It is a fairly complete set of bindings,
+it's already rather useful, and is usable to write moderately
+complex programs. (see the examples directory for some examples
+of the simpler programs you could write).
+
+If you have any enhancements or bug reports, please file them in
+bugzilla at:
+ http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject
+
+If you have a patch, file the bug first and then use the "create new
+attachment" link on the bug's info page. My preferred format for
+patches is unified diff format (ie. diff -u). Please don't send me
+diffs which don't have any context, as these make it very difficult to
+see what the patch does.
+
+New Versions
+============
+
+New versions of this package can be found at:
+ http://ftp.gnome.org/pub/GNOME/sources/pygobject/
+
+
+Mailing list
+============
+
+pygobject share mailing list with pygtk. You can subscribe to it through
+the web interface:
+ http://www.daa.com.au/mailman/listinfo/pygtk
+
+
+Requirements
+============
+ * C compiler (GCC and MSVC supported)
+ * Python 2.3.5 or higher
+ * Glib 2.22.4 or higher
+ * GIO 2.22.4 or higher
+ * GIO-unix 2.22.4 or higher
+ * libffi (optional)
+
+Copyright Information
+=====================
+
+This software is covered by the GNU Lesser General Public Licence
+(version 2.1, or if you choose, a later version). Basically just don't
+say you wrote bits you didn't.
+
+Compilation
+===========
+
+PyGObject uses the standard autotools for the build infrastructure. To
+build, it should be as simple as running:
+
+ $ ./configure --prefix=<prefix where python is installed>
+ $ make
+ $ make install
+
+If your Python interpreter isn't in the path, or is not called
+"python", you can set the PYTHON environment variable to the full path
+of the interpreter:
+
+ $ PYTHON=/prefix/bin/python
+ $ export PYTHON
+
+If configure can't find GTK+, you may need to set the PKG_CONFIG_PATH
+environment variable to help it find the libraries.
+
+The "make install" target will generate normal and optimised bytecode
+for all the .py files.
+
+Note. If you're installing to another prefix than the one where python
+is installed you'll need to set the PYTHONPATH variable to the
+$prefix/lib/pythonX.Y/site-packages directory created by
+the PyGObject installation.
+
+Tests
+=====
+
+After having compiled and installed pygobject, you may want to test them.
+There are a number of example programs available in the examples/
+subdirectory.
+
+
+Getting Help
+============
+
+If you have questions about programming with PyGObject, you might want to
+send a message to the mailing list (information on subscribing is
+above). Alternatively, your question may be answered in the PyGTK FAQ:
+
+ http://www.async.com.br/faq/pygtk/?req=index
diff --git a/README.win32 b/README.win32
new file mode 100644
index 0000000..548a3c8
--- /dev/null
+++ b/README.win32
@@ -0,0 +1,24 @@
+Windows Setuptools Build Instructions
+======================================
+
+ 1. Install gtk+ bundle from gtk.org (to C:\GTK for example)
+ 2. Install Python2.6
+ 3. Install MinGW and MSYS
+ 4. Add C:\GTK\bin to path (from windows)
+ 5. Add the following to your msys environment variables
+ (open and append to C:\msys\1.0\etc\profile) or set for the session
+
+ $ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/c/GTK/lib/pkgconfig:/c/Python26/Lib/pkgconfig
+ $ export PATH=$PATH:/c/Python26:/c/Python26/bin
+
+ 6. In msys shell, build with
+
+ $ python setup.py build --compiler=mingw32 --enable-threading \
+ --yes-i-know-its-not-supported bdist_wininst
+
+Tested with
+ * gtk+-bundle_2.20.0-20100406_win32.zip
+ * MinGW-5.16.exe
+ * MSYS-1.0.11.exe
+ * python-2.6.5.exe
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..784a482
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1596 @@
+# 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.63],,
+[m4_warning([this file was generated for autoconf 2.63.
+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"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# 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) 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 -*-
+#
+# 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])dnl
+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.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$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
+ _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
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[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
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[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/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Configure paths for GLIB
+# Owen Taylor 1997-2001
+
+dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
+dnl gthread, or gio is specified in MODULES, pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GLIB_2_0],
+[dnl
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
+ , enable_glibtest=yes)
+
+ pkg_config_args=glib-2.0
+ for module in . $4
+ do
+ case "$module" in
+ gmodule)
+ pkg_config_args="$pkg_config_args gmodule-2.0"
+ ;;
+ gmodule-no-export)
+ pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
+ ;;
+ gobject)
+ pkg_config_args="$pkg_config_args gobject-2.0"
+ ;;
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.0"
+ ;;
+ gio*)
+ pkg_config_args="$pkg_config_args $module-2.0"
+ ;;
+ esac
+ done
+
+ PKG_PROG_PKG_CONFIG([0.16])
+
+ no_glib=""
+
+ if test "x$PKG_CONFIG" = x ; then
+ no_glib=yes
+ PKG_CONFIG=no
+ fi
+
+ min_glib_version=ifelse([$1], ,2.0.0,$1)
+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+ enable_glibtest=no
+ fi
+
+ if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+ :
+ else
+ no_glib=yes
+ fi
+ fi
+
+ if test x"$no_glib" = x ; then
+ GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+ GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+ GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+ glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_glibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+ rm -f conf.glibtest
+ AC_TRY_RUN([
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ fclose (fopen ("conf.glibtest", "w"));
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_glib_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_glib_version");
+ exit(1);
+ }
+
+ if ((glib_major_version != $glib_config_major_version) ||
+ (glib_minor_version != $glib_config_minor_version) ||
+ (glib_micro_version != $glib_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
+ (glib_micro_version != GLIB_MICRO_VERSION))
+ {
+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ }
+ else
+ {
+ if ((glib_major_version > major) ||
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_glib" = x ; then
+ AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+ else
+ if test -f conf.glibtest ; then
+ :
+ else
+ echo "*** Could not run GLIB test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
+ AC_TRY_LINK([
+#include <glib.h>
+#include <stdio.h>
+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GLIB_CFLAGS=""
+ GLIB_LIBS=""
+ GLIB_GENMARSHAL=""
+ GOBJECT_QUERY=""
+ GLIB_MKENUMS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+ AC_SUBST(GLIB_GENMARSHAL)
+ AC_SUBST(GOBJECT_QUERY)
+ AC_SUBST(GLIB_MKENUMS)
+ rm -f conf.glibtest
+])
+
+m4_include([m4/as-ac-expand.m4])
+m4_include([m4/jhflags.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/python.m4])
diff --git a/codegen/Makefile.am b/codegen/Makefile.am
new file mode 100644
index 0000000..cdb1e99
--- /dev/null
+++ b/codegen/Makefile.am
@@ -0,0 +1,31 @@
+PLATFORM_VERSION = 2.0
+
+bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
+
+codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
+
+codegen_SCRIPTS = \
+ code-coverage.py \
+ codegen.py \
+ createdefs.py \
+ defsconvert.py \
+ defsgen.py \
+ docextract_to_xml.py \
+ docgen.py \
+ h2def.py \
+ mergedefs.py \
+ missingdefs.py \
+ mkskel.py \
+ scanvirtuals.py \
+ scmexpr.py
+
+codegen_PYTHON = \
+ __init__.py \
+ argtypes.py \
+ definitions.py \
+ defsparser.py \
+ docextract.py \
+ override.py \
+ reversewrapper.py
+
+EXTRA_DIST = $(codegen_SCRIPTS) README.defs pygobject-codegen-$(PLATFORM_VERSION).in
diff --git a/codegen/Makefile.in b/codegen/Makefile.in
new file mode 100644
index 0000000..c9193fc
--- /dev/null
+++ b/codegen/Makefile.in
@@ -0,0 +1,555 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = codegen
+DIST_COMMON = $(codegen_PYTHON) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/pygobject-codegen-2.0.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = pygobject-codegen-2.0
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" \
+ "$(DESTDIR)$(codegendir)"
+SCRIPTS = $(bin_SCRIPTS) $(codegen_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+py_compile = $(top_srcdir)/py-compile
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+PLATFORM_VERSION = 2.0
+bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
+codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
+codegen_SCRIPTS = \
+ code-coverage.py \
+ codegen.py \
+ createdefs.py \
+ defsconvert.py \
+ defsgen.py \
+ docextract_to_xml.py \
+ docgen.py \
+ h2def.py \
+ mergedefs.py \
+ missingdefs.py \
+ mkskel.py \
+ scanvirtuals.py \
+ scmexpr.py
+
+codegen_PYTHON = \
+ __init__.py \
+ argtypes.py \
+ definitions.py \
+ defsparser.py \
+ docextract.py \
+ override.py \
+ reversewrapper.py
+
+EXTRA_DIST = $(codegen_SCRIPTS) README.defs pygobject-codegen-$(PLATFORM_VERSION).in
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(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) --gnu codegen/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu codegen/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+pygobject-codegen-2.0: $(top_builddir)/config.status $(srcdir)/pygobject-codegen-2.0.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-codegenSCRIPTS: $(codegen_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)"
+ @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(codegendir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(codegendir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-codegenSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(codegendir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-codegenPYTHON: $(codegen_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)"
+ @list='$(codegen_PYTHON)'; dlist=; list2=; test -n "$(codegendir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(codegendir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(codegendir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(codegendir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(codegendir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-codegenPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(codegen_PYTHON)'; test -n "$(codegendir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(codegendir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(codegendir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(codegendir)" && rm -f $$fileso
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" "$(DESTDIR)$(codegendir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-codegenPYTHON install-codegenSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-codegenPYTHON \
+ uninstall-codegenSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-codegenPYTHON \
+ install-codegenSCRIPTS install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-codegenPYTHON uninstall-codegenSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/codegen/README.defs b/codegen/README.defs
new file mode 100644
index 0000000..5f7957e
--- /dev/null
+++ b/codegen/README.defs
@@ -0,0 +1,351 @@
+ ChangeLog for this draft:
+ - caller-owns-return attribute on functions/methods
+ - include gtk-type-id in the type alias system
+ - c-name for types converted to in-c-name out-c-name inout-c-name
+ - merge unref-func and destroy-func for boxed types into release-func
+
+ - split structs out of boxed types
+ - c-declaration field
+ - special "native" type alias; bail and use C declaration when
+ necessary
+ - defined objects and boxeds automatically create a module
+ - make constructors functions and not methods, in appropriate
+ object/boxed module
+
+ Draft =========================
+
+ The overall syntax is:
+
+ (type-of-thing-being-defined name-used-to-refer-to-this-thing
+ (attribute-name attribute-value-depending-on-the-attribute)
+ (attribute-name attribute-value-depending-on-the-attribute)
+ (attribute-name attribute-value-depending-on-the-attribute))
+
+ Some definitions can have a c-declaration field that gives the C code
+ we parsed to arrive at the definition. The c-declaration is a quoted
+ string because it can contain parentheses and such.
+
+ Defined types and their attributes:
+
+ ===
+ (module module-name
+ (submodule-of module-name)) ;; submodule is optional
+
+ Ex: (module Gtk)
+ Ex: (module Rgb
+ (submodule-of Gdk))
+
+ modules are later referred to with a list of module names, like
+ (Gdk Rgb) or (Gtk)
+
+ Object and boxed type definitions automatically create a submodule.
+ For example, GtkCList creates the module (module CList (submodule-of
+ (Gtk))) which is referred to as module (Gtk CList).
+
+ ===
+
+ (type
+ (alias some-unique-identifier)
+ (in-module module-name) ;; optional, gchar* is not in a module
+ (gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
+ ;; in the type system
+ (in-c-name name-of-symbol-in-C)
+ (out-c-name name-of-symbol-in-C)
+ (inout-c-name name-of-symbol-in-C))
+
+ Ex: (type
+ (alias string)
+ (gtk-type-id GTK_TYPE_STRING)
+ (in-c-name const-gchar*)
+ (out-c-name gchar**) ;; actually I'm not sure how strings work
+ out/inout
+ (inout-c-name gchar*))
+
+ ;; This one would be implied by the (object) def for GtkWidget I
+ ;; think - (type) is only required for types that are not implied
+ ;; by other definitions, such as int/boolean/etc.
+
+ (type
+ (alias GtkWidget)
+ (in-module (Gtk))
+ (gtk-type-id GTK_TYPE_WIDGET)
+ (in-c-name GtkWidget*)
+ (inout-c-name GtkWidget*)
+ (out-c-name GtkWidget**))
+
+ "Type" bindings are automatically assumed for objects, boxed types,
+ etc. as defined below.
+
+ The alias field is used to refer to the type later on.
+
+ If the C type has spaces they are converted to hyphens after
+ compressing all syntactically significant whitespace to a single
+ space:
+ (type
+ (alias const-gchar*
+ (c-name const-gchar*)))
+
+ So hyphens have to go back to spaces for binding generators that
+ output C code.
+
+ Whenever a type alias can be used, it is also possible to use the
+ keyword "native", which implies that the type in question is too
+ C-specific to represent. Then a c-declaration will typically be
+ available for use.
+
+ C types containing [] or () are function pointers or arrays. For
+ arrays that don't specify a size, we just treat them as pointers. For
+ function pointers, we need special (type) syntax/attributes of some
+ kind, but since there basically aren't any of these right now in the
+ libs we care about we can just ignore them. For arrays that specify a
+ size ditto, you would handle them by adding an (array-size) attribute
+ or something or using the "native" keyword and skipping the (type)
+ stuff.
+
+ ===
+ (object object-name
+ (in-module module-name-list)
+ (parent object-name optional-module-name-if-different)
+ (abstract boolean-is-abstract-class) ;; omit for default of #f
+ (c-name name-of-the-object-in-C)
+ (field (type-and-name type-alias-of-struct-field
+ name-of-struct-field)
+ (access read-or-write-or-readwrite)))
+
+
+ Ex: (object Widget
+ (in-module (Gtk))
+ (parent Object) ;; could say (parent Object (Gtk))
+ (abstract #t)
+ (c-name GtkWidget)
+ (field (type-and-name GdkWindow* window) (access read)))
+
+ An "object" declaration automatically implies the type definition:
+
+ (type
+ (alias concat-module-elements-and-object-name)
+ (in-c-name pointer-to-c-name)
+ (out-c-name pointer-to-pointer-to-c-name)
+ (inout-c-name pointer-to-c-name))
+
+ Ex:
+ (type (alias GtkWidget)
+ (in-c-name GtkWidget*)
+ (out-c-name GtkWidget**)
+ (inout-c-name GtkWidget*))
+
+ It also implies a module that is the name broken into parts:
+ (module CTree
+ (submodule-of Gtk))
+
+ ===
+
+ (function function-name
+ (in-module module-name-list) ;; "static methods" go in their
+ ;; object's module
+ (is-constructor-of object-type-alias) ;; optional, marks a
+ constructor
+ (c-name function-name)
+ (return-type return-value-type) ;; defaults to void
+ (caller-owns-return boolean-value) ;; defaults to #f
+ (parameter in-or-out-or-inout
+ (type-and-name parameter-type-alias parameter-name)
+ (c-declaration "c-type-and-name")) ;; c-declaration only
+ required
+ ;; if the type alias is
+ "native"
+ (varargs #t) ;; has varargs at the end
+ )
+
+ Ex:
+ (function init
+ (in-module (Gdk Rgb)
+ (c-name gdk_rgb_init)))
+
+ Ex:
+ (function new
+ (in-module (Gdk Rgb Cmap))
+ (is-constructor-of GdkRgbCmap)
+ (c-name gdk_rgb_cmap_new)
+ (return-type GdkRgbCmap)
+ (caller-owns-return #t) ;; perhaps this could be implied by
+ is-constructor-of
+ (parameter in (type-and-name array-of-guint32 colors))
+ (parameter in (type-and-name gint n_colors)))
+
+ Ex:
+ (function config_set_set_handler
+ (in-module (Gnome))
+ (c-name gnome_config_set_set_handler)
+ (parameter in (type-and-name native func)
+ (c-declaration "void (*func)(void*)"))
+ (parameter in (type-and-name gpointer data)))
+
+ ===
+ (method method-name
+ (of-object object-name module-name)
+ ;; retval/arg attributes as for (function), but with first parameter
+
+ ;; omitted for non-constructors
+ )
+
+ Ex:
+ (method set_text
+ (of-object Label (Gtk))
+ (parameter (type-and-name const-gchar* str)))
+
+ ===
+ (object-argument arg-name
+ (of-object object-we-are-an-argument-of optional-objects-module)
+ (type argument-type) ;; not sure what to put for type
+ ;; flags all default to #f
+ (readable bool-value)
+ (writeable bool-value)
+ (run-action bool-value)
+ (construct-only bool-value))
+
+ Ex:
+ (object-argument label
+ (of-object Label (Gtk))
+ (type gchar*) ;; ????
+ (readable #t)
+ (writeable #t))
+
+ ===
+ (signal signal-name
+ (of-object object-we-are-a-signal-of optional-objects-module)
+ ;; return value and parameters as for a function, omitting the
+ object
+ ;; and user data parameters
+
+ ;; what other properties matter for a signal?
+ )
+
+ Ex:
+ (signal select_row
+ (of-object CList (Gtk))
+ ;; return type defaults to void
+ (parameter in (type-and-name gint row))
+ (parameter in (type-and-name gint column))
+ (parameter in (type-and-name GdkEvent* event)))
+
+ ===
+ (enum enum-name
+ (in-module modname)
+ (c-name name-in-c)
+ (value (name value-name-noprefixes-hyphen-lowercase) (c-name
+ value-c-name)))
+
+ Ex:
+
+ (enum DirectionType
+ (in-module Gtk)
+ (c-name GtkDirectionType)
+ (value (name tab-forward) (c-name GTK_DIR_TAB_FORWARD))
+ (value (name tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
+ (value (name up) (c-name GTK_DIR_UP))
+ (value (name down) (c-name GTK_DIR_DOWN))
+ (value (name left) (c-name GTK_DIR_LEFT))
+ (value (name right) (c-name GTK_DIR_RIGHT)))
+
+ (enum Pos
+ (in-module (Gtk CTree))
+ (c-name GtkCTreePos)
+ (value (name before) (c-name GTK_CTREE_POS_BEFORE))
+ (value (name as-child) (c-name GTK_CTREE_POS_AS_CHILD))
+ (value (name after) (c-name GTK_CTREE_POS_AFTER)))
+
+ ===
+ (flags) is just like enum, but some bindings may wrap enums and flags
+ differently.
+
+ ===
+
+ (boxed boxed-name
+ (in-module modname)
+ (c-name c-name)
+ (ref-func func-to-increase-refcount)
+ (copy-func func-to-copy)
+ (release-func func-to-destroy-or-decrement-refcount)
+ (field (type-and-name type-alias-of-struct-field
+ name-of-struct-field) (access access-rule)))
+
+ It is never OK to use memcpy() to copy a boxed type, or use
+ malloc()/free() to alloc/free one.
+
+ Ex:
+
+ (boxed Pixmap
+ (in-module (Gdk))
+ (c-name GdkPixmap)
+ (ref-func pixmap_ref)
+ (unref-func pixmap_unref))
+
+ An "object" declaration automatically implies the type definition:
+
+ (type
+ (alias concat-module-elements-and-boxed-name)
+ (in-c-name pointer-to-c-name)
+ (out-c-name pointer-to-pointer-to-c-name)
+ (inout-c-name pointer-to-c-name))
+
+ Ex:
+ (type (alias GdkPixmap)
+ (in-c-name GdkPixmap*)
+ (out-c-name GdkPixmap**)
+ (inout-c-name GdkPixmap*))
+
+ ===
+
+ (struct struct-name
+ (in-module modname)
+ (c-name c-name)
+ (field (type-and-name type-alias-of-struct-field
+ name-of-struct-field) (access access-rule)))
+
+ Ex:
+ (struct Rectangle
+ (in-module (Gdk))
+ (c-name GdkRectangle)
+ (field (type-and-name gint16 x) (access readwrite))
+ (field (type-and-name gint16 y) (access readwrite))
+ (field (type-and-name guint16 width) (access readwrite))
+ (field (type-and-name guint16 height) (access readwrite)))
+
+ Implies GdkRectangle type alias:
+
+ (type (alias GdkRectangle)
+ (in-c-name GdkRectangle*)
+ (out-c-name GdkRectangle*) ;; note - not the same as boxed
+ types
+ (inout-c-name GdkRectangle*))
+
+ ===
+
+ (user-function name
+ (in-module module)
+ (c-name c-typedef-name)
+ ;; return-type and parameters as for (function)
+ )
+
+ Ex:
+
+ (user-function PrintFunc
+ (in-module (Gtk))
+ (parameter in (type-and-name gpointer func_data))
+ (parameter in (type-and-name gchar* str)))
+
+ ===
+
+ (typedef new-name
+ (in-module module)
+ (c-name c-full-name)
+ (orig-type alias-of-orig-type))
+
+ Ex:
+
+ (typedef Type
+ (in-module (Gtk))
+ (c-name GtkType)
+ (orig-type guint))
+
diff --git a/codegen/__init__.py b/codegen/__init__.py
new file mode 100644
index 0000000..86188f9
--- /dev/null
+++ b/codegen/__init__.py
@@ -0,0 +1,16 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+__all__ = [
+ 'argtypes',
+ 'codegen',
+ 'definitions',
+ 'defsparser',
+ 'docextract',
+ 'docgen',
+ 'h2def',
+ 'defsgen'
+ 'mergedefs',
+ 'mkskel',
+ 'override',
+ 'scmexpr'
+]
diff --git a/codegen/argtypes.py b/codegen/argtypes.py
new file mode 100644
index 0000000..b35f6ef
--- /dev/null
+++ b/codegen/argtypes.py
@@ -0,0 +1,1043 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import string
+import keyword
+import struct
+
+py_ssize_t_clean = False
+
+class ArgTypeError(Exception):
+ pass
+
+class ArgTypeNotFoundError(ArgTypeError):
+ pass
+
+class ArgTypeConfigurationError(ArgTypeError):
+ pass
+
+
+class VarList:
+ """Nicely format a C variable list"""
+ def __init__(self):
+ self.vars = {}
+ def add(self, ctype, name):
+ if self.vars.has_key(ctype):
+ self.vars[ctype] = self.vars[ctype] + (name,)
+ else:
+ self.vars[ctype] = (name,)
+ def __str__(self):
+ ret = []
+ for type in self.vars.keys():
+ ret.append(' ')
+ ret.append(type)
+ ret.append(' ')
+ ret.append(string.join(self.vars[type], ', '))
+ ret.append(';\n')
+ if ret:
+ ret.append('\n')
+ return string.join(ret, '')
+ return ''
+
+class WrapperInfo:
+ """A class that holds information about variable defs, code
+ snippets, etcd for use in writing out the function/method
+ wrapper."""
+ def __init__(self):
+ self.varlist = VarList()
+ self.parsestr = ''
+ self.parselist = ['', 'kwlist']
+ self.codebefore = []
+ self.codeafter = []
+ self.arglist = []
+ self.kwlist = []
+ def get_parselist(self):
+ return string.join(self.parselist, ', ')
+ def get_codebefore(self):
+ return string.join(self.codebefore, '')
+ def get_codeafter(self):
+ return string.join(self.codeafter, '')
+ def get_arglist(self):
+ return string.join(self.arglist, ', ')
+ def get_varlist(self):
+ return str(self.varlist)
+ def get_kwlist(self):
+ ret = ' static char *kwlist[] = { %s };\n' % \
+ string.join(self.kwlist + [ 'NULL' ], ', ')
+ if not self.get_varlist():
+ ret = ret + '\n'
+ return ret
+
+ def add_parselist(self, codes, parseargs, keywords):
+ self.parsestr = self.parsestr + codes
+ for arg in parseargs:
+ self.parselist.append(arg)
+ for kw in keywords:
+ if keyword.iskeyword(kw):
+ kw = kw + '_'
+ self.kwlist.append('"%s"' % kw)
+
+class ArgType:
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ """Add code to the WrapperInfo instance to handle
+ parameter."""
+ raise RuntimeError, "write_param not implemented for %s" % \
+ self.__class__.__name__
+ def write_return(self, ptype, ownsreturn, info):
+ """Adds a variable named ret of the return type to
+ info.varlist, and add any required code to info.codeafter to
+ convert the return value to a python object."""
+ raise RuntimeError, "write_return not implemented for %s" % \
+ self.__class__.__name__
+
+class NoneArg(ArgType):
+ def write_return(self, ptype, ownsreturn, info):
+ info.codeafter.append(' Py_INCREF(Py_None);\n' +
+ ' return Py_None;')
+
+class StringArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt != None:
+ if pdflt != 'NULL': pdflt = '"' + pdflt + '"'
+ info.varlist.add('char', '*' + pname + ' = ' + pdflt)
+ else:
+ info.varlist.add('char', '*' + pname)
+ info.arglist.append(pname)
+ if pnull:
+ info.add_parselist('z', ['&' + pname], [pname])
+ else:
+ info.add_parselist('s', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ if ownsreturn:
+ # have to free result ...
+ info.varlist.add('gchar', '*ret')
+ info.codeafter.append(' if (ret) {\n' +
+ ' PyObject *py_ret = PyString_FromString(ret);\n' +
+ ' g_free(ret);\n' +
+ ' return py_ret;\n' +
+ ' }\n' +
+ ' Py_INCREF(Py_None);\n' +
+ ' return Py_None;')
+ else:
+ info.varlist.add('const gchar', '*ret')
+ info.codeafter.append(' if (ret)\n' +
+ ' return PyString_FromString(ret);\n'+
+ ' Py_INCREF(Py_None);\n' +
+ ' return Py_None;')
+
+class UCharArg(ArgType):
+ # allows strings with embedded NULLs.
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('guchar', '*' + pname + ' = "' + pdflt + '"')
+ else:
+ info.varlist.add('guchar', '*' + pname)
+ if py_ssize_t_clean:
+ info.varlist.add('Py_ssize_t', pname + '_len')
+ else:
+ info.varlist.add('int', pname + '_len')
+ info.arglist.append(pname)
+ if pnull:
+ info.add_parselist('z#', ['&' + pname, '&' + pname + '_len'],
+ [pname])
+ else:
+ info.add_parselist('s#', ['&' + pname, '&' + pname + '_len'],
+ [pname])
+
+class CharArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('char', pname + " = '" + pdflt + "'")
+ else:
+ info.varlist.add('char', pname)
+ info.arglist.append(pname)
+ info.add_parselist('c', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('gchar', 'ret')
+ info.codeafter.append(' return PyString_FromStringAndSize(&ret, 1);')
+class GUniCharArg(ArgType):
+ ret_tmpl = ('#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2\n'
+ ' if (ret > 0xffff) {\n'
+ ' PyErr_SetString(PyExc_RuntimeError, "returned character can not be represented in 16-bit unicode");\n'
+ ' return NULL;\n'
+ ' }\n'
+ '#endif\n'
+ ' py_ret = (Py_UNICODE)ret;\n'
+ ' return PyUnicode_FromUnicode(&py_ret, 1);\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('gunichar', pname + " = '" + pdflt + "'")
+ else:
+ info.varlist.add('gunichar', pname)
+ info.arglist.append(pname)
+ info.add_parselist('O&', ['pyg_pyobj_to_unichar_conv', '&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('gunichar', 'ret')
+ info.varlist.add('Py_UNICODE', 'py_ret')
+ info.codeafter.append(self.ret_tmpl)
+
+
+class IntArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('int', pname + ' = ' + pdflt)
+ else:
+ info.varlist.add('int', pname)
+ info.arglist.append(pname)
+ info.add_parselist('i', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('int', 'ret')
+ info.codeafter.append(' return PyInt_FromLong(ret);')
+
+class UIntArg(ArgType):
+ dflt = (' if (py_%(name)s) {\n'
+ ' if (PyLong_Check(py_%(name)s))\n'
+ ' %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n'
+ ' else if (PyInt_Check(py_%(name)s))\n'
+ ' %(name)s = PyInt_AsLong(py_%(name)s);\n'
+ ' else\n'
+ ' PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n'
+ ' if (PyErr_Occurred())\n'
+ ' return NULL;\n'
+ ' }\n')
+ before = (' if (PyLong_Check(py_%(name)s))\n'
+ ' %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n'
+ ' else if (PyInt_Check(py_%(name)s))\n'
+ ' %(name)s = PyInt_AsLong(py_%(name)s);\n'
+ ' else\n'
+ ' PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n'
+ ' if (PyErr_Occurred())\n'
+ ' return NULL;\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if not pdflt:
+ pdflt = '0';
+
+ info.varlist.add(ptype, pname + ' = ' + pdflt)
+ info.codebefore.append(self.dflt % {'name':pname})
+ info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add(ptype, 'ret')
+ info.codeafter.append(' return PyLong_FromUnsignedLong(ret);')
+
+class SizeArg(ArgType):
+
+ if struct.calcsize('P') <= struct.calcsize('l'):
+ llp64 = True
+ else:
+ llp64 = False
+
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add(ptype, pname + ' = ' + pdflt)
+ else:
+ info.varlist.add(ptype, pname)
+ info.arglist.append(pname)
+ if self.llp64:
+ info.add_parselist('k', ['&' + pname], [pname])
+ else:
+ info.add_parselist('K', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add(ptype, 'ret')
+ if self.llp64:
+ info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);\n')
+ else:
+ info.codeafter.append(' return PyLong_FromUnsignedLong(ret);\n')
+
+class SSizeArg(ArgType):
+
+ if struct.calcsize('P') <= struct.calcsize('l'):
+ llp64 = True
+ else:
+ llp64 = False
+
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add(ptype, pname + ' = ' + pdflt)
+ else:
+ info.varlist.add(ptype, pname)
+ info.arglist.append(pname)
+ if self.llp64:
+ info.add_parselist('l', ['&' + pname], [pname])
+ else:
+ info.add_parselist('L', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add(ptype, 'ret')
+ if self.llp64:
+ info.codeafter.append(' return PyLong_FromLongLong(ret);\n')
+ else:
+ info.codeafter.append(' return PyLong_FromLong(ret);\n')
+
+class LongArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add(ptype, pname + ' = ' + pdflt)
+ else:
+ info.varlist.add(ptype, pname)
+ info.arglist.append(pname)
+ info.add_parselist('l', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add(ptype, 'ret')
+ info.codeafter.append(' return PyInt_FromLong(ret);\n')
+
+class BoolArg(IntArg):
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('int', 'ret')
+ info.codeafter.append(' return PyBool_FromLong(ret);\n')
+
+class TimeTArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('time_t', pname + ' = ' + pdflt)
+ else:
+ info.varlist.add('time_t', pname)
+ info.arglist.append(pname)
+ info.add_parselist('i', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('time_t', 'ret')
+ info.codeafter.append(' return PyInt_FromLong(ret);')
+
+class ULongArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('unsigned long', pname + ' = ' + pdflt)
+ else:
+ info.varlist.add('unsigned long', pname)
+ info.arglist.append(pname)
+ info.add_parselist('k', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add(ptype, 'ret')
+ info.codeafter.append(' return PyLong_FromUnsignedLong(ret);\n')
+
+class UInt32Arg(ULongArg):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ ULongArg.write_param(self, ptype, pname, pdflt, pnull, info)
+ ## if sizeof(unsigned long) > sizeof(unsigned int), we need to
+ ## check the value is within guint32 range
+ if struct.calcsize('L') > struct.calcsize('I'):
+ info.codebefore.append((
+ ' if (%(pname)s > G_MAXUINT32) {\n'
+ ' PyErr_SetString(PyExc_ValueError,\n'
+ ' "Value out of range in conversion of"\n'
+ ' " %(pname)s parameter to unsigned 32 bit integer");\n'
+ ' return NULL;\n'
+ ' }\n') % vars())
+
+class Int64Arg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('gint64', pname + ' = ' + pdflt)
+ else:
+ info.varlist.add('gint64', pname)
+ info.arglist.append(pname)
+ info.add_parselist('L', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('gint64', 'ret')
+ info.codeafter.append(' return PyLong_FromLongLong(ret);')
+
+class UInt64Arg(ArgType):
+ dflt = ' if (py_%(name)s)\n' \
+ ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
+ before = ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('guint64', pname + ' = ' + pdflt)
+ info.codebefore.append(self.dflt % {'name':pname})
+ else:
+ info.varlist.add('guint64', pname)
+ info.codebefore.append(self.before % {'name':pname})
+ info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
+ info.arglist.append(pname)
+ info.add_parselist('O!', ['&PyLong_Type', '&py_' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('guint64', 'ret')
+ info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);')
+
+
+class DoubleArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('double', pname + ' = ' + pdflt)
+ else:
+ info.varlist.add('double', pname)
+ info.arglist.append(pname)
+ info.add_parselist('d', ['&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('double', 'ret')
+ info.codeafter.append(' return PyFloat_FromDouble(ret);')
+
+class FileArg(ArgType):
+ nulldflt = (' if (py_%(name)s == Py_None)\n'
+ ' %(name)s = NULL;\n'
+ ' else if (py_%(name)s && PyFile_Check(py_%(name)s)\n'
+ ' %s = PyFile_AsFile(py_%(name)s);\n'
+ ' else if (py_%(name)s) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n'
+ ' return NULL;\n'
+ ' }')
+ null = (' if (py_%(name)s && PyFile_Check(py_%(name)s)\n'
+ ' %(name)s = PyFile_AsFile(py_%(name)s);\n'
+ ' else if (py_%(name)s != Py_None) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n'
+ ' return NULL;\n'
+ ' }\n')
+ dflt = (' if (py_%(name)s)\n'
+ ' %(name)s = PyFile_AsFile(py_%(name)s);\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ if pdflt:
+ info.varlist.add('FILE', '*' + pname + ' = ' + pdflt)
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.nulldflt % {'name':pname})
+ else:
+ info.varlist.add('FILE', '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname)
+ info.codebefore.append(self.null & {'name':pname})
+ info.arglist.appned(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ else:
+ if pdflt:
+ info.varlist.add('FILE', '*' + pname + ' = ' + pdflt)
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.dflt % {'name':pname})
+ info.arglist.append(pname)
+ else:
+ info.varlist.add('PyObject', '*' + pname)
+ info.arglist.append('PyFile_AsFile(' + pname + ')')
+ info.add_parselist('O!', ['&PyFile_Type', '&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('FILE', '*ret')
+ info.codeafter.append(' if (ret)\n' +
+ ' return PyFile_FromFile(ret, "", "", fclose);\n' +
+ ' Py_INCREF(Py_None);\n' +
+ ' return Py_None;')
+
+class EnumArg(ArgType):
+ enum = (' if (pyg_enum_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n'
+ ' return NULL;\n')
+ def __init__(self, enumname, typecode):
+ self.enumname = enumname
+ self.typecode = typecode
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add(self.enumname, pname + ' = ' + pdflt)
+ else:
+ info.varlist.add(self.enumname, pname)
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.enum % { 'typecode': self.typecode,
+ 'name': pname})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname]);
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('gint', 'ret')
+ info.codeafter.append(' return pyg_enum_from_gtype(%s, ret);' % self.typecode)
+
+class FlagsArg(ArgType):
+ flag = (' if (%(default)spyg_flags_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n'
+ ' return NULL;\n')
+ def __init__(self, flagname, typecode):
+ self.flagname = flagname
+ self.typecode = typecode
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add(self.flagname, pname + ' = ' + pdflt)
+ default = "py_%s && " % (pname,)
+ else:
+ info.varlist.add(self.flagname, pname)
+ default = ""
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.flag % {'default':default,
+ 'typecode':self.typecode,
+ 'name':pname})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('guint', 'ret')
+ info.codeafter.append(' return pyg_flags_from_gtype(%s, ret);' % self.typecode)
+
+class ObjectArg(ArgType):
+ # should change these checks to more typesafe versions that check
+ # a little further down in the class heirachy.
+ nulldflt = (' if ((PyObject *)py_%(name)s == Py_None)\n'
+ ' %(name)s = NULL;\n'
+ ' else if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n'
+ ' %(name)s = %(cast)s(py_%(name)s->obj);\n'
+ ' else if (py_%(name)s) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
+ ' return NULL;\n'
+ ' }\n')
+ null = (' if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n'
+ ' %(name)s = %(cast)s(py_%(name)s->obj);\n'
+ ' else if ((PyObject *)py_%(name)s != Py_None) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
+ ' return NULL;\n'
+ ' }\n')
+ dflt = ' if (py_%(name)s)\n' \
+ ' %(name)s = %(cast)s(py_%(name)s->obj);\n'
+ def __init__(self, objname, parent, typecode):
+ self.objname = objname
+ self.cast = string.replace(typecode, '_TYPE_', '_', 1)
+ self.parent = parent
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ if pdflt:
+ info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt)
+ info.varlist.add('PyGObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.nulldflt % {'name':pname,
+ 'cast':self.cast,
+ 'type':self.objname})
+ else:
+ info.varlist.add(self.objname, '*' + pname + ' = NULL')
+ info.varlist.add('PyGObject', '*py_' + pname)
+ info.codebefore.append(self.null % {'name':pname,
+ 'cast':self.cast,
+ 'type':self.objname})
+ if ptype.endswith('*'):
+ typename = ptype[:-1]
+ try:
+ const, typename = typename.split('const-')
+ except ValueError:
+ const = ''
+ if typename != ptype:
+ info.arglist.append('(%s *) %s' % (ptype[:-1], pname))
+ else:
+ info.arglist.append(pname)
+
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ else:
+ if pdflt:
+ info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt)
+ info.varlist.add('PyGObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.dflt % {'name':pname,
+ 'cast':self.cast})
+ info.arglist.append(pname)
+ info.add_parselist('O!', ['&Py%s_Type' % self.objname,
+ '&py_' + pname], [pname])
+ else:
+ info.varlist.add('PyGObject', '*' + pname)
+ info.arglist.append('%s(%s->obj)' % (self.cast, pname))
+ info.add_parselist('O!', ['&Py%s_Type' % self.objname,
+ '&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ if ptype.endswith('*'):
+ typename = ptype[:-1]
+ try:
+ const, typename = typename.split('const-')
+ except ValueError:
+ const = ''
+ info.varlist.add(typename, '*ret')
+ if ownsreturn:
+ info.varlist.add('PyObject', '*py_ret')
+ info.codeafter.append(' py_ret = pygobject_new((GObject *)ret);\n'
+ ' if (ret != NULL)\n'
+ ' g_object_unref(ret);\n'
+ ' return py_ret;')
+ else:
+ info.codeafter.append(' /* pygobject_new handles NULL checking */\n' +
+ ' return pygobject_new((GObject *)ret);')
+
+class BoxedArg(ArgType):
+ # haven't done support for default args. Is it needed?
+ check = (' if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n'
+ ' %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n'
+ ' else {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n'
+ ' return NULL;\n'
+ ' }\n')
+ null = (' if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n'
+ ' %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n'
+ ' else if (py_%(name)s != Py_None) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n'
+ ' return NULL;\n'
+ ' }\n')
+ def __init__(self, ptype, typecode):
+ self.typename = ptype
+ self.typecode = typecode
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ info.varlist.add(self.typename, '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+ info.codebefore.append(self.null % {'name': pname,
+ 'typename': self.typename,
+ 'typecode': self.typecode})
+ else:
+ info.varlist.add(self.typename, '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname)
+ info.codebefore.append(self.check % {'name': pname,
+ 'typename': self.typename,
+ 'typecode': self.typecode})
+ if ptype[-1] == '*':
+ typename = ptype[:-1]
+ if typename[:6] == 'const-': typename = typename[6:]
+ if typename != self.typename:
+ info.arglist.append('(%s *)%s' % (ptype[:-1], pname))
+ else:
+ info.arglist.append(pname)
+ else:
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ ret_tmpl = ' /* pyg_boxed_new handles NULL checking */\n' \
+ ' return pyg_boxed_new(%(typecode)s, %(ret)s, %(copy)s, TRUE);'
+ def write_return(self, ptype, ownsreturn, info):
+ if ptype[-1] == '*':
+ decl_type = self.typename
+ ret = 'ret'
+ if ptype[:6] == 'const-':
+ decl_type = 'const ' + self.typename
+ ret = '(%s*) ret' % (self.typename,)
+ info.varlist.add(decl_type, '*ret')
+ else:
+ info.varlist.add(self.typename, 'ret')
+ ret = '&ret'
+ ownsreturn = 0 # of course it can't own a ref to a local var ...
+ info.codeafter.append(self.ret_tmpl %
+ { 'typecode': self.typecode,
+ 'ret': ret,
+ 'copy': ownsreturn and 'FALSE' or 'TRUE'})
+
+class CustomBoxedArg(ArgType):
+ # haven't done support for default args. Is it needed?
+ null = (' if (%(check)s(py_%(name)s))\n'
+ ' %(name)s = %(get)s(py_%(name)s);\n'
+ ' else if (py_%(name)s != Py_None) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
+ ' return NULL;\n'
+ ' }\n')
+ def __init__(self, ptype, pytype, getter, new):
+ self.pytype = pytype
+ self.getter = getter
+ self.checker = 'Py' + ptype + '_Check'
+ self.new = new
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ info.varlist.add(ptype[:-1], '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+ info.codebefore.append(self.null % {'name': pname,
+ 'get': self.getter,
+ 'check': self.checker,
+ 'type': ptype[:-1]})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ else:
+ info.varlist.add('PyObject', '*' + pname)
+ info.arglist.append(self.getter + '(' + pname + ')')
+ info.add_parselist('O!', ['&' + self.pytype, '&' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add(ptype[:-1], '*ret')
+ info.codeafter.append(' if (ret)\n' +
+ ' return ' + self.new + '(ret);\n' +
+ ' Py_INCREF(Py_None);\n' +
+ ' return Py_None;')
+
+class PointerArg(ArgType):
+ # haven't done support for default args. Is it needed?
+ check = (' if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n'
+ ' %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n'
+ ' else {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n'
+ ' return NULL;\n'
+ ' }\n')
+ null = (' if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n'
+ ' %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n'
+ ' else if (py_%(name)s != Py_None) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n'
+ ' return NULL;\n'
+ ' }\n')
+ def __init__(self, ptype, typecode):
+ self.typename = ptype
+ self.typecode = typecode
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ info.varlist.add(self.typename, '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+ info.codebefore.append(self.null % {'name': pname,
+ 'typename': self.typename,
+ 'typecode': self.typecode})
+ else:
+ info.varlist.add(self.typename, '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname)
+ info.codebefore.append(self.check % {'name': pname,
+ 'typename': self.typename,
+ 'typecode': self.typecode})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ if ptype[-1] == '*':
+ info.varlist.add(self.typename, '*ret')
+ info.codeafter.append(' /* pyg_pointer_new handles NULL checking */\n' +
+ ' return pyg_pointer_new(' + self.typecode + ', ret);')
+ else:
+ info.varlist.add(self.typename, 'ret')
+ info.codeafter.append(' /* pyg_pointer_new handles NULL checking */\n' +
+ ' return pyg_pointer_new(' + self.typecode + ', &ret);')
+
+class AtomArg(IntArg):
+ dflt = ' if (py_%(name)s) {\n' \
+ ' %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n' \
+ ' if (PyErr_Occurred())\n' \
+ ' return NULL;\n' \
+ ' }\n'
+ atom = (' %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n'
+ ' if (PyErr_Occurred())\n'
+ ' return NULL;\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pdflt:
+ info.varlist.add('GdkAtom', pname + ' = ' + pdflt)
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.dflt % {'name': pname})
+ else:
+ info.varlist.add('GdkAtom', pname)
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.atom % {'name': pname})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('GdkAtom', 'ret')
+ info.varlist.add('PyObject *', 'py_ret')
+ info.varlist.add('gchar *', 'name')
+ info.codeafter.append(' name = gdk_atom_name(ret);\n'
+ ' py_ret = PyString_FromString(name);\n'
+ ' g_free(name);\n'
+ ' return py_ret;')
+
+class GTypeArg(ArgType):
+ gtype = (' if ((%(name)s = pyg_type_from_object(py_%(name)s)) == 0)\n'
+ ' return NULL;\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ info.varlist.add('GType', pname)
+ info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
+ info.codebefore.append(self.gtype % {'name': pname})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('GType', 'ret')
+ info.codeafter.append(' return pyg_type_wrapper_new(ret);')
+
+# simple GError handler.
+class GErrorArg(ArgType):
+ handleerror = (' if (pyg_error_check(&%(name)s))\n'
+ ' return NULL;\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ info.varlist.add('GError', '*' + pname + ' = NULL')
+ info.arglist.append('&' + pname)
+ info.codeafter.append(self.handleerror % { 'name': pname })
+
+class GtkTreePathArg(ArgType):
+ # haven't done support for default args. Is it needed?
+ normal = (' %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n'
+ ' if (!%(name)s) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n'
+ ' return NULL;\n'
+ ' }\n')
+ null = (' if (py_%(name)s != Py_None) {\n'
+ ' %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n'
+ ' if (!%(name)s) {\n'
+ ' PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n'
+ ' return NULL;\n'
+ ' }\n'
+ ' }\n')
+ freepath = (' if (%(name)s)\n'
+ ' gtk_tree_path_free(%(name)s);\n')
+ def __init__(self):
+ pass
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ info.varlist.add('GtkTreePath', '*' + pname + ' = NULL')
+ info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+ info.codebefore.append(self.null % {'name': pname})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ else:
+ info.varlist.add('GtkTreePath', '*' + pname)
+ info.varlist.add('PyObject', '*py_' + pname)
+ info.codebefore.append(self.normal % {'name': pname})
+ info.arglist.append(pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ info.codeafter.append(self.freepath % {'name': pname})
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('GtkTreePath', '*ret')
+ if ownsreturn:
+ info.codeafter.append(' if (ret) {\n'
+ ' PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n'
+ ' gtk_tree_path_free(ret);\n'
+ ' return py_ret;\n'
+ ' }\n'
+ ' Py_INCREF(Py_None);\n'
+ ' return Py_None;')
+ else:
+ info.codeafter.append(' if (ret) {\n'
+ ' PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n'
+ ' return py_ret;\n'
+ ' }\n'
+ ' Py_INCREF(Py_None);\n'
+ ' return Py_None;')
+
+class GdkRectanglePtrArg(ArgType):
+ normal = (' if (!pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s))\n'
+ ' return NULL;\n')
+ null = (' if (py_%(name)s == Py_None)\n'
+ ' %(name)s = NULL;\n'
+ ' else if (pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s_rect))\n'
+ ' %(name)s = &%(name)s_rect;\n'
+ ' else\n'
+ ' return NULL;\n')
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ if pnull:
+ info.varlist.add('GdkRectangle', pname + '_rect = { 0, 0, 0, 0 }')
+ info.varlist.add('GdkRectangle', '*' + pname)
+ info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ info.arglist.append(pname)
+ info.codebefore.append(self.null % {'name': pname})
+ else:
+ info.varlist.add('GdkRectangle', pname + ' = { 0, 0, 0, 0 }')
+ info.varlist.add('PyObject', '*py_' + pname)
+ info.add_parselist('O', ['&py_' + pname], [pname])
+ info.arglist.append('&' + pname)
+ info.codebefore.append(self.normal % {'name': pname})
+
+class GdkRectangleArg(ArgType):
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add('GdkRectangle', 'ret')
+ info.codeafter.append(' return pyg_boxed_new(GDK_TYPE_RECTANGLE, &ret, TRUE, TRUE);')
+
+class PyObjectArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ info.varlist.add('PyObject', '*' + pname)
+ info.add_parselist('O', ['&' + pname], [pname])
+ info.arglist.append(pname)
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add("PyObject", "*ret")
+ if ownsreturn:
+ info.codeafter.append(' if (ret) {\n'
+ ' return ret;\n'
+ ' }\n'
+ ' Py_INCREF(Py_None);\n'
+ ' return Py_None;')
+ else:
+ info.codeafter.append(' if (!ret) ret = Py_None;\n'
+ ' Py_INCREF(ret);\n'
+ ' return ret;')
+
+class CairoArg(ArgType):
+ def write_param(self, ptype, pname, pdflt, pnull, info):
+ info.varlist.add('PycairoContext', '*' + pname)
+ info.add_parselist('O!', ['&PycairoContext_Type', '&' + pname], [pname])
+ info.arglist.append('%s->ctx' % pname)
+ def write_return(self, ptype, ownsreturn, info):
+ info.varlist.add("cairo_t", "*ret")
+ if ownsreturn:
+ info.codeafter.append(' return PycairoContext_FromContext(ret, NULL, NULL);')
+ else:
+ info.codeafter.append(' cairo_reference(ret);\n'
+ ' return PycairoContext_FromContext(ret, NULL, NULL);')
+
+
+class ArgMatcher:
+ def __init__(self):
+ self.argtypes = {}
+ self.reverse_argtypes = {}
+ self.reverse_rettypes = {}
+
+ def register(self, ptype, handler, overwrite=False):
+ if not overwrite and ptype in self.argtypes:
+ return
+ self.argtypes[ptype] = handler
+ def register_reverse(self, ptype, handler):
+ self.reverse_argtypes[ptype] = handler
+ def register_reverse_ret(self, ptype, handler):
+ self.reverse_rettypes[ptype] = handler
+
+ def register_enum(self, ptype, typecode):
+ if typecode is None:
+ self.register(ptype, IntArg())
+ else:
+ self.register(ptype, EnumArg(ptype, typecode))
+ def register_flag(self, ptype, typecode):
+ if typecode is None:
+ self.register(ptype, IntArg())
+ else:
+ self.register(ptype, FlagsArg(ptype, typecode))
+ def register_object(self, ptype, parent, typecode):
+ oa = ObjectArg(ptype, parent, typecode)
+ self.register(ptype, oa) # in case I forget the * in the .defs
+ self.register(ptype+'*', oa)
+ self.register('const-'+ptype+'*', oa)
+ if ptype == 'GdkPixmap':
+ # hack to handle GdkBitmap synonym.
+ self.register('GdkBitmap', oa)
+ self.register('GdkBitmap*', oa)
+ def register_boxed(self, ptype, typecode):
+ if self.argtypes.has_key(ptype): return
+ arg = BoxedArg(ptype, typecode)
+ self.register(ptype, arg)
+ self.register(ptype+'*', arg)
+ self.register('const-'+ptype+'*', arg)
+ def register_custom_boxed(self, ptype, pytype, getter, new):
+ arg = CustomBoxedArg(ptype, pytype, getter, new)
+ self.register(ptype+'*', arg)
+ self.register('const-'+ptype+'*', arg)
+ def register_pointer(self, ptype, typecode):
+ arg = PointerArg(ptype, typecode)
+ self.register(ptype, arg)
+ self.register(ptype+'*', arg)
+ self.register('const-'+ptype+'*', arg)
+
+ def get(self, ptype):
+ try:
+ return self.argtypes[ptype]
+ except KeyError:
+ if ptype[:8] == 'GdkEvent' and ptype[-1] == '*':
+ return self.argtypes['GdkEvent*']
+ raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
+ def _get_reverse_common(self, ptype, registry):
+ props = dict(c_type=ptype)
+ try:
+ return registry[ptype], props
+ except KeyError:
+ try:
+ handler = self.argtypes[ptype]
+ except KeyError:
+ if ptype.startswith('GdkEvent') and ptype.endswith('*'):
+ handler = self.argtypes['GdkEvent*']
+ else:
+ raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
+ if isinstance(handler, ObjectArg):
+ return registry['GObject*'], props
+ elif isinstance(handler, EnumArg):
+ props['typecode'] = handler.typecode
+ props['enumname'] = handler.enumname
+ return registry['GEnum'], props
+ elif isinstance(handler, FlagsArg):
+ props['typecode'] = handler.typecode
+ props['flagname'] = handler.flagname
+ return registry['GFlags'], props
+ elif isinstance(handler, BoxedArg):
+ props['typecode'] = handler.typecode
+ props['typename'] = handler.typename
+ return registry['GBoxed'], props
+ else:
+ raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
+
+ def get_reverse(self, ptype):
+ return self._get_reverse_common(ptype, self.reverse_argtypes)
+
+ def get_reverse_ret(self, ptype):
+ ret, props = self._get_reverse_common(ptype, self.reverse_rettypes)
+ if hasattr(ptype, 'optional') and ptype.optional:
+ if ret.supports_optional:
+ props['optional'] = True
+ else:
+ raise ArgTypeNotFoundError("Unsupported 'optional' for %s"
+ % (ptype,))
+ return ret, props
+
+ def object_is_a(self, otype, parent):
+ if otype == None: return 0
+ if otype == parent: return 1
+ if not self.argtypes.has_key(otype): return 0
+ return self.object_is_a(self.get(otype).parent, parent)
+
+matcher = ArgMatcher()
+
+arg = NoneArg()
+matcher.register(None, arg)
+matcher.register('none', arg)
+
+arg = StringArg()
+matcher.register('char*', arg)
+matcher.register('gchar*', arg)
+matcher.register('const-char*', arg)
+matcher.register('char-const*', arg)
+matcher.register('const-gchar*', arg)
+matcher.register('gchar-const*', arg)
+matcher.register('string', arg)
+matcher.register('static_string', arg)
+
+arg = UCharArg()
+matcher.register('unsigned-char*', arg)
+matcher.register('const-guchar*', arg)
+matcher.register('const-guint8*', arg)
+matcher.register('guchar*', arg)
+
+arg = CharArg()
+matcher.register('char', arg)
+matcher.register('gchar', arg)
+matcher.register('guchar', arg)
+
+arg = GUniCharArg()
+matcher.register('gunichar', arg)
+
+arg = IntArg()
+matcher.register('int', arg)
+matcher.register('gint', arg)
+matcher.register('short', arg)
+matcher.register('gshort', arg)
+matcher.register('gushort', arg)
+matcher.register('gsize', SizeArg())
+matcher.register('gssize', SSizeArg())
+matcher.register('guint8', arg)
+matcher.register('gint8', arg)
+matcher.register('guint16', arg)
+matcher.register('gint16', arg)
+matcher.register('gint32', arg)
+matcher.register('GTime', arg)
+matcher.register('GSeekType', arg) # Hack, but we have no python wrapper
+
+arg = LongArg()
+matcher.register('long', arg)
+matcher.register('glong', arg)
+
+arg = UIntArg()
+matcher.register('guint', arg)
+
+arg = BoolArg()
+matcher.register('gboolean', arg)
+
+arg = TimeTArg()
+matcher.register('time_t', arg)
+
+matcher.register('guint32', UInt32Arg())
+
+arg = ULongArg()
+matcher.register('gulong', arg)
+
+arg = Int64Arg()
+matcher.register('gint64', arg)
+matcher.register('long-long', arg)
+matcher.register('goffset', arg)
+
+arg = UInt64Arg()
+matcher.register('guint64', arg)
+matcher.register('unsigned-long-long', arg)
+
+arg = DoubleArg()
+matcher.register('double', arg)
+matcher.register('gdouble', arg)
+matcher.register('float', arg)
+matcher.register('gfloat', arg)
+
+arg = FileArg()
+matcher.register('FILE*', arg)
+
+# enums, flags, objects
+
+matcher.register('GdkAtom', AtomArg())
+
+matcher.register('GType', GTypeArg())
+matcher.register('GtkType', GTypeArg())
+
+matcher.register('GError**', GErrorArg())
+matcher.register('GtkTreePath*', GtkTreePathArg())
+matcher.register('GdkRectangle*', GdkRectanglePtrArg())
+matcher.register('GtkAllocation*', GdkRectanglePtrArg())
+matcher.register('GdkRectangle', GdkRectangleArg())
+matcher.register('PyObject*', PyObjectArg())
+
+matcher.register('GdkNativeWindow', ULongArg())
+
+matcher.register_object('GObject', None, 'G_TYPE_OBJECT')
+
+del arg
+
+matcher.register('cairo_t*', CairoArg())
+matcher.register_boxed("GClosure", "G_TYPE_CLOSURE")
diff --git a/codegen/code-coverage.py b/codegen/code-coverage.py
new file mode 100755
index 0000000..1dc54c3
--- /dev/null
+++ b/codegen/code-coverage.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+
+from __future__ import generators
+import sys, os
+
+def read_symbols(file, type=None, dynamic=0):
+ if dynamic:
+ cmd = 'nm -D %s' % file
+ else:
+ cmd = 'nm %s' % file
+ for line in os.popen(cmd, 'r'):
+ if line[0] != ' ': # has an address as first bit of line
+ while line[0] != ' ':
+ line = line[1:]
+ while line[0] == ' ':
+ line = line[1:]
+ # we should be up to "type symbolname" now
+ sym_type = line[0]
+ symbol = line[1:].strip()
+
+ if not type or type == sym_type:
+ yield symbol
+
+def main():
+ if len(sys.argv) != 3:
+ sys.stderr.write('usage: coverage-check library.so wrapper.so\n')
+ sys.exit(1)
+ library = sys.argv[1]
+ wrapper = sys.argv[2]
+
+ # first create a dict with all referenced symbols in the wrapper
+ # should really be a set, but a dict will do ...
+ wrapper_symbols = {}
+ for symbol in read_symbols(wrapper, type='U', dynamic=1):
+ wrapper_symbols[symbol] = 1
+
+ # now go through the library looking for matches on the defined symbols:
+ for symbol in read_symbols(library, type='T', dynamic=1):
+ if symbol[0] == '_': continue
+ if symbol not in wrapper_symbols:
+ print symbol
+
+if __name__ == '__main__':
+ main()
diff --git a/codegen/codegen.py b/codegen/codegen.py
new file mode 100755
index 0000000..008f01c
--- /dev/null
+++ b/codegen/codegen.py
@@ -0,0 +1,1722 @@
+#! /usr/bin/env python
+
+import getopt
+import keyword
+import os
+import string
+import sys
+
+import argtypes
+import definitions
+import defsparser
+import override
+import reversewrapper
+import warnings
+
+class Coverage(object):
+ def __init__(self, name):
+ self.name = name
+ self.wrapped = 0
+ self.not_wrapped = 0
+
+ def declare_wrapped(self):
+ self.wrapped += 1
+
+ def declare_not_wrapped(self):
+ self.not_wrapped += 1
+
+ def printstats(self):
+ total = self.wrapped + self.not_wrapped
+ fd = sys.stderr
+ if total:
+ fd.write("***INFO*** The coverage of %s is %.2f%% (%i/%i)\n" %
+ (self.name,
+ float(self.wrapped*100)/total,
+ self.wrapped,
+ total))
+ else:
+ fd.write("***INFO*** There are no declared %s.\n" % self.name)
+
+functions_coverage = Coverage("global functions")
+methods_coverage = Coverage("methods")
+vproxies_coverage = Coverage("virtual proxies")
+vaccessors_coverage = Coverage("virtual accessors")
+iproxies_coverage = Coverage("interface proxies")
+
+def exc_info():
+ warnings.warn("deprecated", DeprecationWarning, stacklevel=2)
+ #traceback.print_exc()
+ etype, value, tb = sys.exc_info()
+ ret = ""
+ try:
+ sval = str(value)
+ if etype == argtypes.ArgTypeError:
+ ret = "No ArgType for %s" % (sval,)
+ else:
+ ret = sval
+ finally:
+ del etype, value, tb
+ return ret
+
+def fixname(name):
+ if keyword.iskeyword(name):
+ return name + '_'
+ return name
+
+class FileOutput:
+ '''Simple wrapper for file object, that makes writing #line
+ statements easier.''' # "
+ def __init__(self, fp, filename=None):
+ self.fp = fp
+ self.lineno = 1
+ if filename:
+ self.filename = filename
+ else:
+ self.filename = self.fp.name
+ # handle writing to the file, and keep track of the line number ...
+ def write(self, str):
+ self.fp.write(str)
+ self.lineno = self.lineno + string.count(str, '\n')
+ def writelines(self, sequence):
+ for line in sequence:
+ self.write(line)
+ def close(self):
+ self.fp.close()
+ def flush(self):
+ self.fp.flush()
+
+ def setline(self, linenum, filename):
+ '''writes out a #line statement, for use by the C
+ preprocessor.''' # "
+ self.write('#line %d "%s"\n' % (linenum, filename))
+ def resetline(self):
+ '''resets line numbering to the original file'''
+ self.setline(self.lineno + 1, self.filename)
+
+class Wrapper:
+ type_tmpl = (
+ 'PyTypeObject G_GNUC_INTERNAL Py%(typename)s_Type = {\n'
+ ' PyObject_HEAD_INIT(NULL)\n'
+ ' 0, /* ob_size */\n'
+ ' "%(classname)s", /* tp_name */\n'
+ ' sizeof(%(tp_basicsize)s), /* tp_basicsize */\n'
+ ' 0, /* tp_itemsize */\n'
+ ' /* methods */\n'
+ ' (destructor)%(tp_dealloc)s, /* tp_dealloc */\n'
+ ' (printfunc)0, /* tp_print */\n'
+ ' (getattrfunc)%(tp_getattr)s, /* tp_getattr */\n'
+ ' (setattrfunc)%(tp_setattr)s, /* tp_setattr */\n'
+ ' (cmpfunc)%(tp_compare)s, /* tp_compare */\n'
+ ' (reprfunc)%(tp_repr)s, /* tp_repr */\n'
+ ' (PyNumberMethods*)%(tp_as_number)s, /* tp_as_number */\n'
+ ' (PySequenceMethods*)%(tp_as_sequence)s, /* tp_as_sequence */\n'
+ ' (PyMappingMethods*)%(tp_as_mapping)s, /* tp_as_mapping */\n'
+ ' (hashfunc)%(tp_hash)s, /* tp_hash */\n'
+ ' (ternaryfunc)%(tp_call)s, /* tp_call */\n'
+ ' (reprfunc)%(tp_str)s, /* tp_str */\n'
+ ' (getattrofunc)%(tp_getattro)s, /* tp_getattro */\n'
+ ' (setattrofunc)%(tp_setattro)s, /* tp_setattro */\n'
+ ' (PyBufferProcs*)%(tp_as_buffer)s, /* tp_as_buffer */\n'
+ ' %(tp_flags)s, /* tp_flags */\n'
+ ' %(tp_doc)s, /* Documentation string */\n'
+ ' (traverseproc)%(tp_traverse)s, /* tp_traverse */\n'
+ ' (inquiry)%(tp_clear)s, /* tp_clear */\n'
+ ' (richcmpfunc)%(tp_richcompare)s, /* tp_richcompare */\n'
+ ' %(tp_weaklistoffset)s, /* tp_weaklistoffset */\n'
+ ' (getiterfunc)%(tp_iter)s, /* tp_iter */\n'
+ ' (iternextfunc)%(tp_iternext)s, /* tp_iternext */\n'
+ ' (struct PyMethodDef*)%(tp_methods)s, /* tp_methods */\n'
+ ' (struct PyMemberDef*)0, /* tp_members */\n'
+ ' (struct PyGetSetDef*)%(tp_getset)s, /* tp_getset */\n'
+ ' NULL, /* tp_base */\n'
+ ' NULL, /* tp_dict */\n'
+ ' (descrgetfunc)%(tp_descr_get)s, /* tp_descr_get */\n'
+ ' (descrsetfunc)%(tp_descr_set)s, /* tp_descr_set */\n'
+ ' %(tp_dictoffset)s, /* tp_dictoffset */\n'
+ ' (initproc)%(tp_init)s, /* tp_init */\n'
+ ' (allocfunc)%(tp_alloc)s, /* tp_alloc */\n'
+ ' (newfunc)%(tp_new)s, /* tp_new */\n'
+ ' (freefunc)%(tp_free)s, /* tp_free */\n'
+ ' (inquiry)%(tp_is_gc)s /* tp_is_gc */\n'
+ '};\n\n'
+ )
+
+ slots_list = [
+ 'tp_getattr', 'tp_setattr', 'tp_getattro', 'tp_setattro',
+ 'tp_compare', 'tp_repr',
+ 'tp_as_number', 'tp_as_sequence', 'tp_as_mapping', 'tp_hash',
+ 'tp_call', 'tp_str', 'tp_as_buffer', 'tp_richcompare', 'tp_iter',
+ 'tp_iternext', 'tp_descr_get', 'tp_descr_set', 'tp_init',
+ 'tp_alloc', 'tp_new', 'tp_free', 'tp_is_gc',
+ 'tp_traverse', 'tp_clear', 'tp_dealloc', 'tp_flags', 'tp_doc'
+ ]
+
+ getter_tmpl = (
+ 'static PyObject *\n'
+ '%(funcname)s(PyObject *self, void *closure)\n'
+ '{\n'
+ '%(varlist)s'
+ ' ret = %(field)s;\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+
+ parse_tmpl = (
+ ' if (!PyArg_ParseTupleAndKeywords(args, kwargs,'
+ '"%(typecodes)s:%(name)s"%(parselist)s))\n'
+ ' return %(errorreturn)s;\n'
+ )
+
+ deprecated_tmpl = (
+ ' if (PyErr_Warn(PyExc_DeprecationWarning, '
+ '"%(deprecationmsg)s") < 0)\n'
+ ' return %(errorreturn)s;\n'
+ )
+
+ methdef_tmpl = (
+ ' { "%(name)s", (PyCFunction)%(cname)s, %(flags)s,\n'
+ ' %(docstring)s },\n'
+ )
+
+ noconstructor = (
+ 'static int\n'
+ 'pygobject_no_constructor(PyObject *self, PyObject *args, '
+ 'PyObject *kwargs)\n'
+ '{\n'
+ ' gchar buf[512];\n'
+ '\n'
+ ' g_snprintf(buf, sizeof(buf), "%s is an abstract widget", '
+ 'self->ob_type->tp_name);\n'
+ ' PyErr_SetString(PyExc_NotImplementedError, buf);\n'
+ ' return -1;\n'
+ '}\n\n'
+ )
+
+ function_tmpl = (
+ 'static PyObject *\n'
+ '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' %(begin_allow_threads)s\n'
+ ' %(setreturn)s%(cname)s(%(arglist)s);\n'
+ ' %(end_allow_threads)s\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+
+ virtual_accessor_tmpl = (
+ 'static PyObject *\n'
+ '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n'
+ '{\n'
+ ' gpointer klass;\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' klass = g_type_class_ref(pyg_type_from_object(cls));\n'
+ ' if (%(class_cast_macro)s(klass)->%(virtual)s)\n'
+ ' %(setreturn)s%(class_cast_macro)s(klass)->'
+ '%(virtual)s(%(arglist)s);\n'
+ ' else {\n'
+ ' PyErr_SetString(PyExc_NotImplementedError, '
+ '"virtual method %(name)s not implemented");\n'
+ ' g_type_class_unref(klass);\n'
+ ' return NULL;\n'
+ ' }\n'
+ ' g_type_class_unref(klass);\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+
+ # template for method calls
+ constructor_tmpl = None
+ method_tmpl = None
+
+ def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)):
+ self.parser = parser
+ self.objinfo = objinfo
+ self.overrides = overrides
+ self.fp = fp
+
+ def get_lower_name(self):
+ return string.lower(string.replace(self.objinfo.typecode,
+ '_TYPE_', '_', 1))
+
+ def get_field_accessor(self, fieldname):
+ raise NotImplementedError
+
+ def get_initial_class_substdict(self): return {}
+
+ def get_initial_constructor_substdict(self, constructor):
+ return { 'name': '%s.__init__' % self.objinfo.py_name,
+ 'errorreturn': '-1' }
+
+ def get_initial_method_substdict(self, method):
+ substdict = { 'name': '%s.%s' % (self.objinfo.py_name, method.name) }
+ if method.unblock_threads:
+ substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
+ substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
+ else:
+ substdict['begin_allow_threads'] = ''
+ substdict['end_allow_threads'] = ''
+ return substdict
+
+ def write_class(self):
+ if self.overrides.is_type_ignored(self.objinfo.c_name):
+ return
+ self.fp.write('\n/* ----------- %s ----------- */\n\n' %
+ self.objinfo.c_name)
+ substdict = self.get_initial_class_substdict()
+ if not substdict.has_key('tp_flags'):
+ substdict['tp_flags'] = 'Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE'
+ substdict['typename'] = self.objinfo.c_name
+ if self.overrides.modulename:
+ substdict['classname'] = '%s.%s' % (self.overrides.modulename,
+ self.objinfo.name)
+ else:
+ substdict['classname'] = self.objinfo.name
+ substdict['tp_doc'] = self.objinfo.docstring
+
+ # Maybe this could be done in a nicer way, but I'll leave it as it is
+ # for now: -- Johan
+ if not self.overrides.slot_is_overriden('%s.tp_init' %
+ self.objinfo.c_name):
+ substdict['tp_init'] = self.write_constructor()
+ substdict['tp_methods'] = self.write_methods()
+ substdict['tp_getset'] = self.write_getsets()
+
+ # handle slots ...
+ for slot in self.slots_list:
+
+ slotname = '%s.%s' % (self.objinfo.c_name, slot)
+ slotfunc = '_wrap_%s_%s' % (self.get_lower_name(), slot)
+ if slot[:6] == 'tp_as_':
+ slotfunc = '&' + slotfunc
+ if self.overrides.slot_is_overriden(slotname):
+ data = self.overrides.slot_override(slotname)
+ self.write_function(slotname, data)
+ substdict[slot] = slotfunc
+ else:
+ if not substdict.has_key(slot):
+ substdict[slot] = '0'
+
+ self.fp.write(self.type_tmpl % substdict)
+
+ self.write_virtuals()
+
+ def write_function_wrapper(self, function_obj, template,
+ handle_return=0, is_method=0, kwargs_needed=0,
+ substdict=None):
+ '''This function is the guts of all functions that generate
+ wrappers for functions, methods and constructors.'''
+ if not substdict: substdict = {}
+
+ info = argtypes.WrapperInfo()
+
+ substdict.setdefault('errorreturn', 'NULL')
+
+ # for methods, we want the leading comma
+ if is_method:
+ info.arglist.append('')
+
+ if function_obj.varargs:
+ raise argtypes.ArgTypeNotFoundError("varargs functions not supported")
+
+ for param in function_obj.params:
+ if param.pdflt != None and '|' not in info.parsestr:
+ info.add_parselist('|', [], [])
+ handler = argtypes.matcher.get(param.ptype)
+ handler.write_param(param.ptype, param.pname, param.pdflt,
+ param.pnull, info)
+
+ substdict['setreturn'] = ''
+ if handle_return:
+ if function_obj.ret not in ('none', None):
+ substdict['setreturn'] = 'ret = '
+ handler = argtypes.matcher.get(function_obj.ret)
+ handler.write_return(function_obj.ret,
+ function_obj.caller_owns_return, info)
+
+ if function_obj.deprecated != None:
+ deprecated = self.deprecated_tmpl % {
+ 'deprecationmsg': function_obj.deprecated,
+ 'errorreturn': substdict['errorreturn'] }
+ else:
+ deprecated = ''
+
+ # if name isn't set, set it to function_obj.name
+ substdict.setdefault('name', function_obj.name)
+
+ if function_obj.unblock_threads:
+ substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
+ substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
+ else:
+ substdict['begin_allow_threads'] = ''
+ substdict['end_allow_threads'] = ''
+
+ if self.objinfo:
+ substdict['typename'] = self.objinfo.c_name
+ substdict.setdefault('cname', function_obj.c_name)
+ substdict['varlist'] = info.get_varlist()
+ substdict['typecodes'] = info.parsestr
+ substdict['parselist'] = info.get_parselist()
+ substdict['arglist'] = info.get_arglist()
+ substdict['codebefore'] = deprecated + (
+ string.replace(info.get_codebefore(),
+ 'return NULL', 'return ' + substdict['errorreturn'])
+ )
+ substdict['codeafter'] = (
+ string.replace(info.get_codeafter(),
+ 'return NULL',
+ 'return ' + substdict['errorreturn']))
+
+ if info.parsestr or kwargs_needed:
+ substdict['parseargs'] = self.parse_tmpl % substdict
+ substdict['extraparams'] = ', PyObject *args, PyObject *kwargs'
+ flags = 'METH_VARARGS|METH_KEYWORDS'
+
+ # prepend the keyword list to the variable list
+ substdict['varlist'] = info.get_kwlist() + substdict['varlist']
+ else:
+ substdict['parseargs'] = ''
+ substdict['extraparams'] = ''
+ flags = 'METH_NOARGS'
+
+ return template % substdict, flags
+
+ def write_constructor(self):
+ initfunc = '0'
+ constructor = self.parser.find_constructor(self.objinfo,self.overrides)
+ if not constructor:
+ return self.write_default_constructor()
+
+ funcname = constructor.c_name
+ try:
+ if self.overrides.is_overriden(funcname):
+ data = self.overrides.override(funcname)
+ self.write_function(funcname, data)
+ self.objinfo.has_new_constructor_api = (
+ self.objinfo.typecode in
+ self.overrides.newstyle_constructors)
+ else:
+ # ok, a hack to determine if we should use
+ # new-style constructores :P
+ property_based = getattr(self,
+ 'write_property_based_constructor',
+ None)
+ if property_based:
+ if (len(constructor.params) == 0 or
+ isinstance(constructor.params[0],
+ definitions.Property)):
+ # write_property_based_constructor is only
+ # implemented in GObjectWrapper
+ return self.write_property_based_constructor(
+ constructor)
+ else:
+ sys.stderr.write(
+ "Warning: generating old-style constructor for:" +
+ constructor.c_name + '\n')
+
+ # write constructor from template ...
+ code = self.write_function_wrapper(constructor,
+ self.constructor_tmpl,
+ handle_return=0, is_method=0, kwargs_needed=1,
+ substdict=self.get_initial_constructor_substdict(
+ constructor))[0]
+ self.fp.write(code)
+ initfunc = '_wrap_' + funcname
+ except argtypes.ArgTypeError, ex:
+ sys.stderr.write('Could not write constructor for %s: %s\n'
+ % (self.objinfo.c_name, str(ex)))
+
+ initfunc = self.write_noconstructor()
+ return initfunc
+
+ def write_noconstructor(self):
+ # this is a hack ...
+ if not hasattr(self.overrides, 'no_constructor_written'):
+ self.fp.write(self.noconstructor)
+ self.overrides.no_constructor_written = 1
+ initfunc = 'pygobject_no_constructor'
+ return initfunc
+
+ def write_default_constructor(self):
+ return self.write_noconstructor()
+
+ def get_methflags(self, funcname):
+ if self.overrides.wants_kwargs(funcname):
+ flags = 'METH_VARARGS|METH_KEYWORDS'
+ elif self.overrides.wants_noargs(funcname):
+ flags = 'METH_NOARGS'
+ elif self.overrides.wants_onearg(funcname):
+ flags = 'METH_O'
+ else:
+ flags = 'METH_VARARGS'
+ if self.overrides.is_staticmethod(funcname):
+ flags += '|METH_STATIC'
+ elif self.overrides.is_classmethod(funcname):
+ flags += '|METH_CLASS'
+ return flags
+
+ def write_function(self, funcname, data):
+ lineno, filename = self.overrides.getstartline(funcname)
+ self.fp.setline(lineno, filename)
+ self.fp.write(data)
+ self.fp.resetline()
+ self.fp.write('\n\n')
+
+ def _get_class_virtual_substdict(self, meth, cname, parent):
+ substdict = self.get_initial_method_substdict(meth)
+ substdict['virtual'] = meth.name
+ substdict['cname'] = cname
+ substdict['class_cast_macro'] = parent.typecode.replace(
+ '_TYPE_', '_', 1) + "_CLASS"
+ substdict['typecode'] = self.objinfo.typecode
+ substdict['cast'] = string.replace(parent.typecode, '_TYPE_', '_', 1)
+ return substdict
+
+ def write_methods(self):
+ methods = []
+ klass = self.objinfo.c_name
+ # First, get methods from the defs files
+ for meth in self.parser.find_methods(self.objinfo):
+ method_name = meth.c_name
+ if self.overrides.is_ignored(method_name):
+ continue
+ try:
+ if self.overrides.is_overriden(method_name):
+ if not self.overrides.is_already_included(method_name):
+ data = self.overrides.override(method_name)
+ self.write_function(method_name, data)
+
+ methflags = self.get_methflags(method_name)
+ else:
+ # write constructor from template ...
+ code, methflags = self.write_function_wrapper(meth,
+ self.method_tmpl, handle_return=1, is_method=1,
+ substdict=self.get_initial_method_substdict(meth))
+ self.fp.write(code)
+ methods.append(self.methdef_tmpl %
+ { 'name': fixname(meth.name),
+ 'cname': '_wrap_' + method_name,
+ 'flags': methflags,
+ 'docstring': meth.docstring })
+ methods_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ methods_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write method %s.%s: %s\n'
+ % (klass, meth.name, str(ex)))
+
+ # Now try to see if there are any defined in the override
+ for method_name in self.overrides.get_defines_for(klass):
+ c_name = override.class2cname(klass, method_name)
+ if self.overrides.is_already_included(method_name):
+ continue
+
+ try:
+ data = self.overrides.define(klass, method_name)
+ self.write_function(method_name, data)
+ methflags = self.get_methflags(method_name)
+
+ methods.append(self.methdef_tmpl %
+ { 'name': method_name,
+ 'cname': '_wrap_' + c_name,
+ 'flags': methflags,
+ 'docstring': 'NULL' })
+ methods_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ methods_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write method %s.%s: %s\n'
+ % (klass, method_name, str(ex)))
+
+ # Add GObject virtual method accessors, for chaining to parent
+ # virtuals from subclasses
+ methods += self.write_virtual_accessors()
+
+ if methods:
+ methoddefs = '_Py%s_methods' % self.objinfo.c_name
+ # write the PyMethodDef structure
+ methods.append(' { NULL, NULL, 0, NULL }\n')
+ self.fp.write('static const PyMethodDef %s[] = {\n' % methoddefs)
+ self.fp.write(string.join(methods, ''))
+ self.fp.write('};\n\n')
+ else:
+ methoddefs = 'NULL'
+ return methoddefs
+
+ def write_virtual_accessors(self):
+ klass = self.objinfo.c_name
+ methods = []
+ for meth in self.parser.find_virtuals(self.objinfo):
+ method_name = self.objinfo.c_name + "__do_" + meth.name
+ if self.overrides.is_ignored(method_name):
+ continue
+ try:
+ if self.overrides.is_overriden(method_name):
+ if not self.overrides.is_already_included(method_name):
+ data = self.overrides.override(method_name)
+ self.write_function(method_name, data)
+ methflags = self.get_methflags(method_name)
+ else:
+ # temporarily add a 'self' parameter as first argument
+ meth.params.insert(0, definitions.Parameter(
+ ptype=(self.objinfo.c_name + '*'),
+ pname='self', pdflt=None, pnull=None))
+ try:
+ # write method from template ...
+ code, methflags = self.write_function_wrapper(
+ meth, self.virtual_accessor_tmpl,
+ handle_return=True, is_method=False,
+ substdict=self._get_class_virtual_substdict(
+ meth, method_name, self.objinfo))
+ self.fp.write(code)
+ finally:
+ del meth.params[0]
+ methods.append(self.methdef_tmpl %
+ { 'name': "do_" + fixname(meth.name),
+ 'cname': '_wrap_' + method_name,
+ 'flags': methflags + '|METH_CLASS',
+ 'docstring': 'NULL'})
+ vaccessors_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ vaccessors_coverage.declare_not_wrapped()
+ sys.stderr.write(
+ 'Could not write virtual accessor method %s.%s: %s\n'
+ % (klass, meth.name, str(ex)))
+ return methods
+
+ def write_virtuals(self):
+ '''
+ Write _wrap_FooBar__proxy_do_zbr() reverse wrapers for
+ GObject virtuals
+ '''
+ klass = self.objinfo.c_name
+ virtuals = []
+ for meth in self.parser.find_virtuals(self.objinfo):
+ method_name = self.objinfo.c_name + "__proxy_do_" + meth.name
+ if self.overrides.is_ignored(method_name):
+ continue
+ try:
+ if self.overrides.is_overriden(method_name):
+ if not self.overrides.is_already_included(method_name):
+ data = self.overrides.override(method_name)
+ self.write_function(method_name, data)
+ else:
+ # write virtual proxy ...
+ ret, props = argtypes.matcher.get_reverse_ret(meth.ret)
+ wrapper = reversewrapper.ReverseWrapper(
+ '_wrap_' + method_name, is_static=True)
+ wrapper.set_return_type(ret(wrapper, **props))
+ wrapper.add_parameter(reversewrapper.PyGObjectMethodParam(
+ wrapper, "self", method_name="do_" + meth.name,
+ c_type=(klass + ' *')))
+ for param in meth.params:
+ handler, props = argtypes.matcher.get_reverse(
+ param.ptype)
+ props["direction"] = param.pdir
+ props["nullok"] = param.pnull
+ wrapper.add_parameter(handler(wrapper,
+ param.pname, **props))
+ buf = reversewrapper.MemoryCodeSink()
+ wrapper.generate(buf)
+ self.fp.write(buf.flush())
+ virtuals.append((fixname(meth.name), '_wrap_' + method_name))
+ vproxies_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ vproxies_coverage.declare_not_wrapped()
+ virtuals.append((fixname(meth.name), None))
+ sys.stderr.write('Could not write virtual proxy %s.%s: %s\n'
+ % (klass, meth.name, str(ex)))
+ if virtuals:
+ # Write a 'pygtk class init' function for this object,
+ # except when the object type is explicitly ignored (like
+ # GtkPlug and GtkSocket on win32).
+ if self.overrides.is_ignored(self.objinfo.typecode):
+ return
+ class_cast_macro = self.objinfo.typecode.replace(
+ '_TYPE_', '_', 1) + "_CLASS"
+ cast_macro = self.objinfo.typecode.replace('_TYPE_', '_', 1)
+ funcname = "__%s_class_init" % klass
+ self.objinfo.class_init_func = funcname
+ have_implemented_virtuals = not not [True
+ for name, cname in virtuals
+ if cname is not None]
+ self.fp.write(
+ ('\nstatic int\n'
+ '%(funcname)s(gpointer gclass, PyTypeObject *pyclass)\n'
+ '{\n') % vars())
+
+ if have_implemented_virtuals:
+ self.fp.write(' PyObject *o;\n')
+ self.fp.write(
+ ' %(klass)sClass *klass = '
+ '%(class_cast_macro)s(gclass);\n'
+ ' PyObject *gsignals = '
+ 'PyDict_GetItemString(pyclass->tp_dict, "__gsignals__");\n'
+ % vars())
+
+ for name, cname in virtuals:
+ do_name = 'do_' + name
+ if cname is None:
+ self.fp.write('\n /* overriding %(do_name)s '
+ 'is currently not supported */\n' % vars())
+ else:
+ self.fp.write('''
+ o = PyObject_GetAttrString((PyObject *) pyclass, "%(do_name)s");
+ if (o == NULL)
+ PyErr_Clear();
+ else {
+ if (!PyObject_TypeCheck(o, &PyCFunction_Type)
+ && !(gsignals && PyDict_GetItemString(gsignals, "%(name)s")))
+ klass->%(name)s = %(cname)s;
+ Py_DECREF(o);
+ }
+''' % vars())
+ self.fp.write(' return 0;\n}\n')
+
+ def write_getsets(self):
+ lower_name = self.get_lower_name()
+ getsets_name = lower_name + '_getsets'
+ getterprefix = '_wrap_' + lower_name + '__get_'
+ setterprefix = '_wrap_' + lower_name + '__set_'
+
+ # no overrides for the whole function. If no fields,
+ # don't write a func
+ if not self.objinfo.fields:
+ return '0'
+ getsets = []
+ for ftype, cfname in self.objinfo.fields:
+ fname = cfname.replace('.', '_')
+ gettername = '0'
+ settername = '0'
+ attrname = self.objinfo.c_name + '.' + fname
+ if self.overrides.attr_is_overriden(attrname):
+ code = self.overrides.attr_override(attrname)
+ self.write_function(attrname, code)
+ if string.find(code, getterprefix + fname) >= 0:
+ gettername = getterprefix + fname
+ if string.find(code, setterprefix + fname) >= 0:
+ settername = setterprefix + fname
+ if gettername == '0':
+ try:
+ funcname = getterprefix + fname
+ info = argtypes.WrapperInfo()
+ handler = argtypes.matcher.get(ftype)
+ # for attributes, we don't own the "return value"
+ handler.write_return(ftype, 0, info)
+ self.fp.write(self.getter_tmpl %
+ { 'funcname': funcname,
+ 'varlist': info.varlist,
+ 'field': self.get_field_accessor(cfname),
+ 'codeafter': info.get_codeafter() })
+ gettername = funcname
+ except argtypes.ArgTypeError, ex:
+ sys.stderr.write(
+ "Could not write getter for %s.%s: %s\n"
+ % (self.objinfo.c_name, fname, str(ex)))
+ if gettername != '0' or settername != '0':
+ getsets.append(' { "%s", (getter)%s, (setter)%s },\n' %
+ (fixname(fname), gettername, settername))
+
+ if not getsets:
+ return '0'
+ self.fp.write('static const PyGetSetDef %s[] = {\n' % getsets_name)
+ for getset in getsets:
+ self.fp.write(getset)
+ self.fp.write(' { NULL, (getter)0, (setter)0 },\n')
+ self.fp.write('};\n\n')
+
+ return getsets_name
+
+ def _write_get_symbol_names(self, writer, functions):
+ self.fp.write("""static PyObject *
+_wrap__get_symbol_names(PyObject *self)
+{
+ PyObject *pylist = PyList_New(0);
+
+""")
+ for obj, bases in writer.get_classes():
+ self.fp.write(' PyList_Append(pylist, '
+ 'PyString_FromString("%s"));\n' % (obj.name))
+
+ for name, cname, flags, docstring in functions:
+ self.fp.write(' PyList_Append(pylist, '
+ 'PyString_FromString("%s"));\n' % (name))
+
+ for enum in writer.get_enums():
+ self.fp.write(' PyList_Append(pylist, '
+ 'PyString_FromString("%s"));\n' % (enum.name))
+ for nick, value in enum.values:
+ name = value[len(self.overrides.modulename)+1:]
+ self.fp.write(' PyList_Append(pylist, '
+ 'PyString_FromString("%s"));\n' % (name))
+
+ self.fp.write(" return pylist;\n}\n\n");
+
+ def _write_get_symbol(self, writer, functions):
+ self.fp.write("""static PyObject *
+_wrap__get_symbol(PyObject *self, PyObject *args)
+{
+ PyObject *d;
+ char *name;
+ static PyObject *modulename = NULL;
+ static PyObject *module = NULL;
+ static char *strip_prefix = "%s";
+
+ if (!PyArg_ParseTuple(args, "Os", &d, &name))
+ return NULL;
+
+ if (!modulename)
+ modulename = PyString_FromString("%s");
+
+ if (!module)
+ module = PyDict_GetItemString(d, "__module__");
+
+""" % (self.overrides.modulename.upper() + '_',
+ self.overrides.modulename))
+
+ first = True
+ # Classes / GObjects
+ for obj, bases in writer.get_classes():
+ if first:
+ self.fp.write(' if (!strcmp(name, "%s")) {\n' % obj.name)
+ first = False
+ else:
+ self.fp.write(' } else if (!strcmp(name, "%s")) {\n' % obj.name)
+ self.fp.write(
+ ' return (PyObject*)pygobject_lookup_class(%s);\n' %
+ obj.typecode)
+ self.fp.write(' }\n')
+
+ # Functions
+ for name, cname, flags, docstring in functions:
+ self.fp.write(' else if (!strcmp(name, "%s")) {\n' % name)
+ self.fp.write(' static PyMethodDef ml = { '
+ '"%s", (PyCFunction)%s, %s, "%s"};\n' % (
+ name, cname, flags, docstring))
+ self.fp.write(' return PyCFunction_NewEx(&ml, NULL, modulename);\n')
+ self.fp.write(' }\n')
+
+ # Enums
+ def write_enum(enum, returnobj=False):
+ if returnobj:
+ ret = 'return '
+ else:
+ ret = ''
+ if enum.deftype == 'enum':
+ self.fp.write(
+ ' %spyg_enum_add(module, "%s", strip_prefix, %s);\n'
+ % (ret, enum.name, enum.typecode))
+ else:
+ self.fp.write(
+ ' %spyg_flags_add(module, "%s", strip_prefix, %s);\n'
+ % (ret, enum.name, enum.typecode))
+
+ strip_len = len(self.overrides.modulename)+1 # GTK_
+ for enum in writer.get_enums():
+ # XXX: Implement without typecodes
+ self.fp.write(' else if (!strcmp(name, "%s")) {\n' % enum.name)
+ write_enum(enum, returnobj=True)
+ self.fp.write(' }\n')
+
+ for nick, value in enum.values:
+ value = value[strip_len:]
+ self.fp.write(' else if (!strcmp(name, "%s")) {\n' % value)
+ write_enum(enum)
+ self.fp.write(' return PyObject_GetAttrString(module, "%s");\n' %
+ value)
+ self.fp.write(' }\n')
+
+ self.fp.write(' return Py_None;\n}\n\n');
+
+ def _write_function_bodies(self):
+ functions = []
+ # First, get methods from the defs files
+ for func in self.parser.find_functions():
+ funcname = func.c_name
+ if self.overrides.is_ignored(funcname):
+ continue
+ try:
+ if self.overrides.is_overriden(funcname):
+ data = self.overrides.override(funcname)
+ self.write_function(funcname, data)
+
+ methflags = self.get_methflags(funcname)
+ else:
+ # write constructor from template ...
+ code, methflags = self.write_function_wrapper(func,
+ self.function_tmpl, handle_return=1, is_method=0)
+ self.fp.write(code)
+ functions.append((func.name, '_wrap_' + funcname,
+ methflags, func.docstring))
+ functions_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ functions_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write function %s: %s\n'
+ % (func.name, str(ex)))
+
+ # Now try to see if there are any defined in the override
+ for funcname in self.overrides.get_functions():
+ try:
+ data = self.overrides.function(funcname)
+ self.write_function(funcname, data)
+ methflags = self.get_methflags(funcname)
+ functions.append((funcname, '_wrap_' + funcname,
+ methflags, 'NULL'))
+ functions_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ functions_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write function %s: %s\n'
+ % (funcname, str(ex)))
+ return functions
+
+ def write_functions(self, writer, prefix):
+ self.fp.write('\n/* ----------- functions ----------- */\n\n')
+ functions = []
+ func_infos = self._write_function_bodies()
+
+ # If we have a dynamic namespace, write symbol and attribute getter
+ if self.overrides.dynamicnamespace:
+ self._write_get_symbol_names(writer, func_infos)
+ self._write_get_symbol(writer, func_infos)
+ for obj, bases in writer.get_classes():
+ self.fp.write("""static PyTypeObject *
+%s_register_type(const gchar *name, PyObject *unused)
+{
+ PyObject *m = PyImport_ImportModule("gtk");
+ PyObject *d = PyModule_GetDict(m);
+""" % obj.c_name)
+ writer.write_class(obj, bases, indent=1)
+ self.fp.write(
+ ' return (%s)PyDict_GetItemString(d, "%s");\n' % (
+ 'PyTypeObject*', obj.name))
+ self.fp.write("}\n")
+
+ functions.append(' { "_get_symbol_names", '
+ '(PyCFunction)_wrap__get_symbol_names, '
+ 'METH_NOARGS, NULL },\n')
+ functions.append(' { "_get_symbol", '
+ '(PyCFunction)_wrap__get_symbol, '
+ 'METH_VARARGS, NULL },\n')
+ else:
+ for name, cname, flags, docstring in func_infos:
+ functions.append(self.methdef_tmpl % dict(name=name,
+ cname=cname,
+ flags=flags,
+ docstring=docstring))
+
+ # write the PyMethodDef structure
+ functions.append(' { NULL, NULL, 0, NULL }\n')
+
+ self.fp.write('const PyMethodDef ' + prefix + '_functions[] = {\n')
+ self.fp.write(string.join(functions, ''))
+ self.fp.write('};\n\n')
+
+class GObjectWrapper(Wrapper):
+ constructor_tmpl = (
+ 'static int\n'
+ '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' self->obj = (GObject *)%(cname)s(%(arglist)s);\n'
+ '%(codeafter)s\n'
+ ' if (!self->obj) {\n'
+ ' PyErr_SetString(PyExc_RuntimeError, '
+ '"could not create %(typename)s object");\n'
+ ' return -1;\n'
+ ' }\n'
+ '%(aftercreate)s'
+ ' pygobject_register_wrapper((PyObject *)self);\n'
+ ' return 0;\n'
+ '}\n\n'
+ )
+
+ method_tmpl = (
+ 'static PyObject *\n'
+ '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' %(begin_allow_threads)s\n'
+ ' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n'
+ ' %(end_allow_threads)s\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+ def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)):
+ Wrapper.__init__(self, parser, objinfo, overrides, fp)
+ if self.objinfo:
+ self.castmacro = string.replace(self.objinfo.typecode,
+ '_TYPE_', '_', 1)
+
+ def get_initial_class_substdict(self):
+ return { 'tp_basicsize' : 'PyGObject',
+ 'tp_weaklistoffset' : 'offsetof(PyGObject, weakreflist)',
+ 'tp_dictoffset' : 'offsetof(PyGObject, inst_dict)' }
+
+ def get_field_accessor(self, fieldname):
+ castmacro = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1)
+ return '%s(pygobject_get(self))->%s' % (castmacro, fieldname)
+
+ def get_initial_constructor_substdict(self, constructor):
+ substdict = Wrapper.get_initial_constructor_substdict(self,
+ constructor)
+ if not constructor.caller_owns_return:
+ substdict['aftercreate'] = " g_object_ref(self->obj);\n"
+ else:
+ substdict['aftercreate'] = ''
+ return substdict
+
+ def get_initial_method_substdict(self, method):
+ substdict = Wrapper.get_initial_method_substdict(self, method)
+ substdict['cast'] = string.replace(self.objinfo.typecode,
+ '_TYPE_', '_', 1)
+ return substdict
+
+ def write_default_constructor(self):
+ try:
+ parent = self.parser.find_object(self.objinfo.parent)
+ except ValueError:
+ parent = None
+ if parent is not None:
+ ## just like the constructor is inheritted, we should
+ # inherit the new API compatibility flag
+ self.objinfo.has_new_constructor_api = (
+ parent.has_new_constructor_api)
+ elif self.objinfo.parent == 'GObject':
+ self.objinfo.has_new_constructor_api = True
+ return '0'
+
+ def write_property_based_constructor(self, constructor):
+ self.objinfo.has_new_constructor_api = True
+ out = self.fp
+ print >> out, "static int"
+ print >> out, '_wrap_%s(PyGObject *self, PyObject *args,' \
+ ' PyObject *kwargs)\n{' % constructor.c_name
+ if constructor.params:
+ s = " GType obj_type = pyg_type_from_object((PyObject *) self);"
+ print >> out, s
+
+ def py_str_list_to_c(arg):
+ if arg:
+ return "{" + ", ".join(
+ map(lambda s: '"' + s + '"', arg)) + ", NULL }"
+ else:
+ return "{ NULL }"
+
+ classname = '%s.%s' % (self.overrides.modulename,
+ self.objinfo.name)
+
+ if constructor.params:
+ mandatory_arguments = [param for param in constructor.params
+ if not param.optional]
+ optional_arguments = [param for param in constructor.params
+ if param.optional]
+ arg_names = py_str_list_to_c(
+ [param.argname
+ for param in mandatory_arguments + optional_arguments])
+
+ prop_names = py_str_list_to_c(
+ [param.pname
+ for param in mandatory_arguments + optional_arguments])
+
+ print >> out, " GParameter params[%i];" % \
+ len(constructor.params)
+ print >> out, " PyObject *parsed_args[%i] = {NULL, };" % \
+ len(constructor.params)
+ print >> out, " char *arg_names[] = %s;" % arg_names
+ print >> out, " char *prop_names[] = %s;" % prop_names
+ print >> out, " guint nparams, i;"
+ print >> out
+ if constructor.deprecated is not None:
+ out.write(
+ ' if (PyErr_Warn(PyExc_DeprecationWarning, '
+ '"%s") < 0)\n' %
+ constructor.deprecated)
+ print >> out, ' return -1;'
+ print >> out
+ out.write(" if (!PyArg_ParseTupleAndKeywords(args, kwargs, ")
+ template = '"'
+ if mandatory_arguments:
+ template += "O"*len(mandatory_arguments)
+ if optional_arguments:
+ template += "|" + "O"*len(optional_arguments)
+ template += ':%s.__init__"' % classname
+ print >> out, template, ", arg_names",
+ for i in range(len(constructor.params)):
+ print >> out, ", &parsed_args[%i]" % i,
+
+ out.write(
+ "))\n"
+ " return -1;\n"
+ "\n"
+ " memset(params, 0, sizeof(GParameter)*%i);\n"
+ " if (!pyg_parse_constructor_args(obj_type, arg_names,\n"
+ " prop_names, params, \n"
+ " &nparams, parsed_args))\n"
+ " return -1;\n"
+ " pygobject_constructv(self, nparams, params);\n"
+ " for (i = 0; i < nparams; ++i)\n"
+ " g_value_unset(&params[i].value);\n"
+ % len(constructor.params))
+ else:
+ out.write(
+ " static char* kwlist[] = { NULL };\n"
+ "\n")
+
+ if constructor.deprecated is not None:
+ out.write(
+ ' if (PyErr_Warn(PyExc_DeprecationWarning, "%s") < 0)\n'
+ ' return -1;\n'
+ '\n' % constructor.deprecated)
+
+ out.write(
+ ' if (!PyArg_ParseTupleAndKeywords(args, kwargs,\n'
+ ' ":%s.__init__",\n'
+ ' kwlist))\n'
+ ' return -1;\n'
+ '\n'
+ ' pygobject_constructv(self, 0, NULL);\n' % classname)
+ out.write(
+ ' if (!self->obj) {\n'
+ ' PyErr_SetString(\n'
+ ' PyExc_RuntimeError, \n'
+ ' "could not create %s object");\n'
+ ' return -1;\n'
+ ' }\n' % classname)
+
+ if not constructor.caller_owns_return:
+ print >> out, " g_object_ref(self->obj);\n"
+
+ out.write(
+ ' return 0;\n'
+ '}\n\n')
+
+ return "_wrap_%s" % constructor.c_name
+
+
+class GInterfaceWrapper(GObjectWrapper):
+ virtual_accessor_tmpl = (
+ 'static PyObject *\n'
+ '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n'
+ '{\n'
+ ' %(vtable)s *iface;\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' iface = g_type_interface_peek('
+ 'g_type_class_peek(pyg_type_from_object(cls)), %(typecode)s);\n'
+ ' if (iface->%(virtual)s)\n'
+ ' %(setreturn)siface->%(virtual)s(%(arglist)s);\n'
+ ' else {\n'
+ ' PyErr_SetString(PyExc_NotImplementedError, '
+ '"interface method %(name)s not implemented");\n'
+ ' return NULL;\n'
+ ' }\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+
+ def get_initial_class_substdict(self):
+ return { 'tp_basicsize' : 'PyObject',
+ 'tp_weaklistoffset' : '0',
+ 'tp_dictoffset' : '0'}
+
+ def write_constructor(self):
+ # interfaces have no constructors ...
+ return '0'
+ def write_getsets(self):
+ # interfaces have no fields ...
+ return '0'
+
+ def _get_class_virtual_substdict(self, meth, cname, parent):
+ substdict = self.get_initial_method_substdict(meth)
+ substdict['virtual'] = meth.name
+ substdict['cname'] = cname
+ substdict['typecode'] = self.objinfo.typecode
+ substdict['vtable'] = self.objinfo.vtable
+ return substdict
+
+ def write_virtuals(self):
+ ## Now write reverse method wrappers, which let python code
+ ## implement interface methods.
+ # First, get methods from the defs files
+ klass = self.objinfo.c_name
+ proxies = []
+ for meth in self.parser.find_virtuals(self.objinfo):
+ method_name = self.objinfo.c_name + "__proxy_do_" + meth.name
+ if self.overrides.is_ignored(method_name):
+ continue
+ try:
+ if self.overrides.is_overriden(method_name):
+ if not self.overrides.is_already_included(method_name):
+ data = self.overrides.override(method_name)
+ self.write_function(method_name, data)
+ else:
+ # write proxy ...
+ ret, props = argtypes.matcher.get_reverse_ret(meth.ret)
+ wrapper = reversewrapper.ReverseWrapper(
+ '_wrap_' + method_name, is_static=True)
+ wrapper.set_return_type(ret(wrapper, **props))
+ wrapper.add_parameter(reversewrapper.PyGObjectMethodParam(
+ wrapper, "self", method_name="do_" + meth.name,
+ c_type=(klass + ' *')))
+ for param in meth.params:
+ handler, props = argtypes.matcher.get_reverse(
+ param.ptype)
+ props["direction"] = param.pdir
+ props["nullok"] = param.pnull
+ wrapper.add_parameter(
+ handler(wrapper, param.pname, **props))
+ buf = reversewrapper.MemoryCodeSink()
+ wrapper.generate(buf)
+ self.fp.write(buf.flush())
+ proxies.append((fixname(meth.name), '_wrap_' + method_name))
+ iproxies_coverage.declare_wrapped()
+ except argtypes.ArgTypeError, ex:
+ iproxies_coverage.declare_not_wrapped()
+ proxies.append((fixname(meth.name), None))
+ sys.stderr.write('Could not write interface proxy %s.%s: %s\n'
+ % (klass, meth.name, str(ex)))
+
+ if not proxies or not [cname for name, cname in proxies if cname]:
+ return
+
+ ## Write an interface init function for this object
+ funcname = "__%s__interface_init" % klass
+ vtable = self.objinfo.vtable
+ self.fp.write(
+ '\nstatic void\n'
+ '%(funcname)s(%(vtable)s *iface, PyTypeObject *pytype)\n'
+ '{\n'
+ ' %(vtable)s *parent_iface = '
+ 'g_type_interface_peek_parent(iface);\n'
+ ' PyObject *py_method;\n'
+ '\n'
+ % vars())
+
+ for name, cname in proxies:
+ do_name = 'do_' + name
+ if cname is None:
+ continue
+
+ self.fp.write((
+ ' py_method = pytype? PyObject_GetAttrString('
+ '(PyObject *) pytype, "%(do_name)s") : NULL;\n'
+ ' if (py_method && !PyObject_TypeCheck(py_method, '
+ '&PyCFunction_Type)) {\n'
+ ' iface->%(name)s = %(cname)s;\n'
+ ' } else {\n'
+ ' PyErr_Clear();\n'
+ ' if (parent_iface) {\n'
+ ' iface->%(name)s = parent_iface->%(name)s;\n'
+ ' }\n'
+ ' Py_XDECREF(py_method);\n'
+ ' }\n'
+ ) % vars())
+ self.fp.write('}\n\n')
+ interface_info = "__%s__iinfo" % klass
+ self.fp.write('''
+static const GInterfaceInfo %s = {
+ (GInterfaceInitFunc) %s,
+ NULL,
+ NULL
+};
+''' % (interface_info, funcname))
+ self.objinfo.interface_info = interface_info
+
+class GBoxedWrapper(Wrapper):
+ constructor_tmpl = (
+ 'static int\n'
+ '_wrap_%(cname)s(PyGBoxed *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' self->gtype = %(typecode)s;\n'
+ ' self->free_on_dealloc = FALSE;\n'
+ ' self->boxed = %(cname)s(%(arglist)s);\n'
+ '%(codeafter)s\n'
+ ' if (!self->boxed) {\n'
+ ' PyErr_SetString(PyExc_RuntimeError, '
+ '"could not create %(typename)s object");\n'
+ ' return -1;\n'
+ ' }\n'
+ ' self->free_on_dealloc = TRUE;\n'
+ ' return 0;\n'
+ '}\n\n'
+ )
+
+ method_tmpl = (
+ 'static PyObject *\n'
+ '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' %(begin_allow_threads)s\n'
+ ' %(setreturn)s%(cname)s(pyg_boxed_get(self, '
+ '%(typename)s)%(arglist)s);\n'
+ ' %(end_allow_threads)s\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+
+ def get_initial_class_substdict(self):
+ return { 'tp_basicsize' : 'PyGBoxed',
+ 'tp_weaklistoffset' : '0',
+ 'tp_dictoffset' : '0' }
+
+ def get_field_accessor(self, fieldname):
+ return 'pyg_boxed_get(self, %s)->%s' % (self.objinfo.c_name, fieldname)
+
+ def get_initial_constructor_substdict(self, constructor):
+ substdict = Wrapper.get_initial_constructor_substdict(
+ self, constructor)
+ substdict['typecode'] = self.objinfo.typecode
+ return substdict
+
+class GPointerWrapper(GBoxedWrapper):
+ constructor_tmpl = (
+ 'static int\n'
+ '_wrap_%(cname)s(PyGPointer *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' self->gtype = %(typecode)s;\n'
+ ' self->pointer = %(cname)s(%(arglist)s);\n'
+ '%(codeafter)s\n'
+ ' if (!self->pointer) {\n'
+ ' PyErr_SetString(PyExc_RuntimeError, '
+ '"could not create %(typename)s object");\n'
+ ' return -1;\n'
+ ' }\n'
+ ' return 0;\n'
+ '}\n\n'
+ )
+
+ method_tmpl = (
+ 'static PyObject *\n'
+ '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
+ '{\n'
+ '%(varlist)s'
+ '%(parseargs)s'
+ '%(codebefore)s'
+ ' %(setreturn)s%(cname)s(pyg_pointer_get(self, '
+ '%(typename)s)%(arglist)s);\n'
+ '%(codeafter)s\n'
+ '}\n\n'
+ )
+
+ def get_initial_class_substdict(self):
+ return { 'tp_basicsize' : 'PyGPointer',
+ 'tp_weaklistoffset' : '0',
+ 'tp_dictoffset' : '0' }
+
+ def get_field_accessor(self, fieldname):
+ return 'pyg_pointer_get(self, %s)->%s' % (self.objinfo.c_name,
+ fieldname)
+
+ def get_initial_constructor_substdict(self, constructor):
+ substdict = Wrapper.get_initial_constructor_substdict(
+ self, constructor)
+ substdict['typecode'] = self.objinfo.typecode
+ return substdict
+
+class SourceWriter:
+ def __init__(self, parser, overrides, prefix, fp=FileOutput(sys.stdout)):
+ self.parser = parser
+ self.overrides = overrides
+ self.prefix = prefix
+ self.fp = fp
+
+ def write(self, py_ssize_t_clean=False):
+ argtypes.py_ssize_t_clean = py_ssize_t_clean
+
+ self.write_headers(py_ssize_t_clean)
+ self.write_imports()
+ self.write_type_declarations()
+ self.write_body()
+ self.write_classes()
+
+ wrapper = Wrapper(self.parser, None, self.overrides, self.fp)
+ wrapper.write_functions(self, self.prefix)
+
+ if not self.overrides.dynamicnamespace:
+ self.write_enums()
+ self.write_extension_init()
+ self.write_registers()
+
+ argtypes.py_ssize_t_clean = False
+
+ def write_headers(self, py_ssize_t_clean):
+ self.fp.write('/* -- THIS FILE IS GENERATED - DO NOT EDIT */')
+ self.fp.write('/* -*- Mode: C; c-basic-offset: 4 -*- */\n\n')
+ if py_ssize_t_clean:
+ self.fp.write('#define PY_SSIZE_T_CLEAN\n')
+ self.fp.write('#include <Python.h>\n\n\n')
+ if py_ssize_t_clean:
+ self.fp.write('''
+
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+typedef intargfunc ssizeargfunc;
+typedef intobjargproc ssizeobjargproc;
+#endif
+
+''')
+ self.fp.write(self.overrides.get_headers())
+ self.fp.resetline()
+ self.fp.write('\n\n')
+
+ def write_imports(self):
+ self.fp.write('/* ---------- types from other modules ---------- */\n')
+ for module, pyname, cname, importing_for in self.overrides.get_imports():
+ if importing_for is None or is_registered_object(importing_for):
+ self.fp.write('static PyTypeObject *_%s;\n' % cname)
+ self.fp.write('#define %s (*_%s)\n' % (cname, cname))
+ self.fp.write('\n\n')
+
+ def write_type_declarations(self):
+ #todo use 'static' if used only in one file
+ self.fp.write('/* ---------- forward type declarations ---------- */\n')
+ for obj in self.parser.boxes:
+ if not self.overrides.is_type_ignored(obj.c_name):
+ self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n')
+ for obj in self.parser.objects:
+ if not self.overrides.is_type_ignored(obj.c_name):
+ self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n')
+ for interface in self.parser.interfaces:
+ if not self.overrides.is_type_ignored(interface.c_name):
+ self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + interface.c_name + '_Type;\n')
+ self.fp.write('\n')
+
+ def write_body(self):
+ self.fp.write(self.overrides.get_body())
+ self.fp.resetline()
+ self.fp.write('\n\n')
+
+ def _sort_parent_children(self, objects):
+ objects = list(objects)
+ modified = True
+ while modified:
+ modified = False
+ parent_index = None
+ child_index = None
+ for i, obj in enumerate(objects):
+ if obj.parent == 'GObject':
+ continue
+ if obj.parent not in [info.c_name for info in objects[:i]]:
+ for j, info in enumerate(objects[i+1:]):
+ if info.c_name == obj.parent:
+ parent_index = i + 1 + j
+ child_index = i
+ break
+ else:
+ continue
+ break
+ if child_index is not None and parent_index is not None:
+ if child_index != parent_index:
+ objects.insert(child_index, objects.pop(parent_index))
+ modified = True
+ return objects
+
+ def write_classes(self):
+ ## Sort the objects, so that we generate code for the parent types
+ ## before their children.
+ objects = self._sort_parent_children(self.parser.objects)
+
+ for klass, items in ((GBoxedWrapper, self.parser.boxes),
+ (GPointerWrapper, self.parser.pointers),
+ (GObjectWrapper, objects),
+ (GInterfaceWrapper, self.parser.interfaces)):
+ for item in items:
+ instance = klass(self.parser, item, self.overrides, self.fp)
+ instance.write_class()
+ self.fp.write('\n')
+
+ def get_enums(self):
+ enums = []
+ for enum in self.parser.enums:
+ if self.overrides.is_type_ignored(enum.c_name):
+ continue
+ enums.append(enum)
+ return enums
+
+ def write_enums(self):
+ if not self.parser.enums:
+ return
+
+ self.fp.write('\n/* ----------- enums and flags ----------- */\n\n')
+ self.fp.write(
+ 'void\n' + self.prefix +
+ '_add_constants(PyObject *module, const gchar *strip_prefix)\n{\n')
+
+ self.fp.write(
+ '#ifdef VERSION\n'
+ ' PyModule_AddStringConstant(module, "__version__", VERSION);\n'
+ '#endif\n')
+
+ for enum in self.get_enums():
+ if enum.typecode is None:
+ for nick, value in enum.values:
+ self.fp.write(
+ ' PyModule_AddIntConstant(module, '
+ '(char *) pyg_constant_strip_prefix("%s", strip_prefix), %s);\n'
+ % (value, value))
+ else:
+ if enum.deftype == 'enum':
+ self.fp.write(' pyg_enum_add(module, "%s", strip_prefix, %s);\n'
+ % (enum.name, enum.typecode))
+ else:
+ self.fp.write(' pyg_flags_add(module, "%s", strip_prefix, %s);\n'
+ % (enum.name, enum.typecode))
+
+ self.fp.write('\n')
+ self.fp.write(' if (PyErr_Occurred())\n')
+ self.fp.write(' PyErr_Print();\n')
+ self.fp.write('}\n\n')
+
+ def write_object_imports(self, retval=''):
+ imports = self.overrides.get_imports()[:]
+ if not imports:
+ return
+
+ bymod = {}
+ for module, pyname, cname, importing_for in imports:
+ if importing_for is None or is_registered_object(importing_for):
+ bymod.setdefault(module, []).append((pyname, cname))
+ self.fp.write(' PyObject *module;\n\n')
+ for module in bymod:
+ self.fp.write(
+ ' if ((module = PyImport_ImportModule("%s")) != NULL) {\n'
+ % module)
+ #self.fp.write(
+ # ' PyObject *moddict = PyModule_GetDict(module);\n\n')
+ for pyname, cname in bymod[module]:
+ #self.fp.write(
+ # ' _%s = (PyTypeObject *)PyDict_GetItemString('
+ # 'moddict, "%s");\n' % (cname, pyname))
+ self.fp.write(
+ ' _%s = (PyTypeObject *)PyObject_GetAttrString('
+ 'module, "%s");\n' % (cname, pyname))
+ self.fp.write(' if (_%s == NULL) {\n' % cname)
+ self.fp.write(' PyErr_SetString(PyExc_ImportError,\n')
+ self.fp.write(' "cannot import name %s from %s");\n'
+ % (pyname, module))
+ self.fp.write(' return %s;\n' % retval)
+ self.fp.write(' }\n')
+ self.fp.write(' } else {\n')
+ self.fp.write(' PyErr_SetString(PyExc_ImportError,\n')
+ self.fp.write(' "could not import %s");\n' % module)
+ self.fp.write(' return %s;\n' % retval)
+ self.fp.write(' }\n')
+ self.fp.write('\n')
+
+ def write_extension_init(self):
+ self.fp.write('/* initialise stuff extension classes */\n')
+ self.fp.write('void\n' + self.prefix + '_register_classes(PyObject *d)\n{\n')
+ self.write_object_imports()
+ self.fp.write(self.overrides.get_init() + '\n')
+ self.fp.resetline()
+
+ def get_classes(self):
+ objects = self.parser.objects[:]
+ pos = 0
+ while pos < len(objects):
+ parent = objects[pos].parent
+ for i in range(pos+1, len(objects)):
+ if objects[i].c_name == parent:
+ objects.insert(i+1, objects[pos])
+ del objects[pos]
+ break
+ else:
+ pos = pos + 1
+
+ retval = []
+ for obj in objects:
+ if self.overrides.is_type_ignored(obj.c_name):
+ continue
+ bases = []
+ if obj.parent != None:
+ bases.append(obj.parent)
+ bases = bases + obj.implements
+ retval.append((obj, bases))
+
+ return retval
+
+ def write_registers(self):
+ for boxed in self.parser.boxes:
+ if not self.overrides.is_type_ignored(boxed.c_name):
+ self.fp.write(' pyg_register_boxed(d, "' + boxed.name +
+ '", ' + boxed.typecode +
+ ', &Py' + boxed.c_name +
+ '_Type);\n')
+ for pointer in self.parser.pointers:
+ if not self.overrides.is_type_ignored(pointer.c_name):
+ self.fp.write(' pyg_register_pointer(d, "' + pointer.name +
+ '", ' + pointer.typecode +
+ ', &Py' + pointer.c_name + '_Type);\n')
+ for interface in self.parser.interfaces:
+ if not self.overrides.is_type_ignored(interface.c_name):
+ self.fp.write(' pyg_register_interface(d, "'
+ + interface.name + '", '+ interface.typecode
+ + ', &Py' + interface.c_name + '_Type);\n')
+ if interface.interface_info is not None:
+ self.fp.write(' pyg_register_interface_info(%s, &%s);\n' %
+ (interface.typecode, interface.interface_info))
+
+ if not self.overrides.dynamicnamespace:
+ for obj, bases in self.get_classes():
+ self.write_class(obj, bases)
+ else:
+ for obj, bases in self.get_classes():
+ self.fp.write(
+ ' pyg_type_register_custom_callback("%s", '
+ '(PyGTypeRegistrationFunction)%s_register_type, d);\n' %
+ (obj.c_name, obj.c_name))
+
+ self.fp.write('}\n')
+
+ def _can_direct_ref(self, base):
+ if not self.overrides.dynamicnamespace:
+ return True
+ if base == 'GObject':
+ return True
+ obj = get_object_by_name(base)
+ if obj.module.lower() != self.overrides.modulename:
+ return True
+ return False
+
+ def write_class(self, obj, bases, indent=1):
+ indent_str = ' ' * (indent * 4)
+ if bases:
+ bases_str = 'Py_BuildValue("(%s)"' % (len(bases) * 'O')
+
+ for base in bases:
+ if self._can_direct_ref(base):
+ bases_str += ', &Py%s_Type' % base
+ else:
+ baseobj = get_object_by_name(base)
+ bases_str += ', PyObject_GetAttrString(m, "%s")' % baseobj.name
+ bases_str += ')'
+ else:
+ bases_str = 'NULL'
+
+ self.fp.write(
+ '%(indent)spygobject_register_class(d, "%(c_name)s", %(typecode)s, &Py%(c_name)s_Type, %(bases)s);\n'
+ % dict(indent=indent_str, c_name=obj.c_name, typecode=obj.typecode, bases=bases_str))
+
+ if obj.has_new_constructor_api:
+ self.fp.write(
+ indent_str + 'pyg_set_object_has_new_constructor(%s);\n' %
+ obj.typecode)
+ else:
+ print >> sys.stderr, (
+ "Warning: Constructor for %s needs to be updated to new API\n"
+ " See http://live.gnome.org/PyGTK_2fWhatsNew28"
+ "#update-constructors") % obj.c_name
+
+ if obj.class_init_func is not None:
+ self.fp.write(
+ indent_str + 'pyg_register_class_init(%s, %s);\n' %
+ (obj.typecode, obj.class_init_func))
+
+_objects = {}
+
+def is_registered_object(c_name):
+ return c_name in _objects
+
+def get_object_by_name(c_name):
+ global _objects
+ return _objects[c_name]
+
+def register_types(parser):
+ global _objects
+ for boxed in parser.boxes:
+ argtypes.matcher.register_boxed(boxed.c_name, boxed.typecode)
+ _objects[boxed.c_name] = boxed
+ for pointer in parser.pointers:
+ argtypes.matcher.register_pointer(pointer.c_name, pointer.typecode)
+ for obj in parser.objects:
+ argtypes.matcher.register_object(obj.c_name, obj.parent, obj.typecode)
+ _objects[obj.c_name] = obj
+ for iface in parser.interfaces:
+ argtypes.matcher.register_object(iface.c_name, None, iface.typecode)
+ _objects[iface.c_name] = iface
+ for enum in parser.enums:
+ if enum.deftype == 'flags':
+ argtypes.matcher.register_flag(enum.c_name, enum.typecode)
+ else:
+ argtypes.matcher.register_enum(enum.c_name, enum.typecode)
+
+usage = 'usage: codegen.py [-o overridesfile] [-p prefix] defsfile'
+def main(argv):
+ o = override.Overrides()
+ prefix = 'pygtk'
+ outfilename = None
+ errorfilename = None
+ opts, args = getopt.getopt(argv[1:], "o:p:r:t:D:I:",
+ ["override=", "prefix=", "register=", "outfilename=",
+ "load-types=", "errorfilename=", "py_ssize_t-clean"])
+ defines = {} # -Dkey[=val] options
+ py_ssize_t_clean = False
+ for opt, arg in opts:
+ if opt in ('-o', '--override'):
+ o = override.Overrides(arg)
+ elif opt in ('-p', '--prefix'):
+ prefix = arg
+ elif opt in ('-r', '--register'):
+ # Warning: user has to make sure all -D options appear before -r
+ p = defsparser.DefsParser(arg, defines)
+ p.startParsing()
+ register_types(p)
+ del p
+ elif opt == '--outfilename':
+ outfilename = arg
+ elif opt == '--errorfilename':
+ errorfilename = arg
+ elif opt in ('-t', '--load-types'):
+ globals = {}
+ execfile(arg, globals)
+ elif opt == '-D':
+ nameval = arg.split('=')
+ try:
+ defines[nameval[0]] = nameval[1]
+ except IndexError:
+ defines[nameval[0]] = None
+ elif opt == '-I':
+ defsparser.include_path.insert(0, arg)
+ elif opt == '--py_ssize_t-clean':
+ py_ssize_t_clean = True
+ if len(args) < 1:
+ print >> sys.stderr, usage
+ return 1
+ if errorfilename:
+ sys.stderr = open(errorfilename, "w")
+ p = defsparser.DefsParser(args[0], defines)
+ if not outfilename:
+ outfilename = os.path.splitext(args[0])[0] + '.c'
+
+ p.startParsing()
+
+ register_types(p)
+ sw = SourceWriter(p, o, prefix, FileOutput(sys.stdout, outfilename))
+ sw.write(py_ssize_t_clean)
+
+ functions_coverage.printstats()
+ methods_coverage.printstats()
+ vproxies_coverage.printstats()
+ vaccessors_coverage.printstats()
+ iproxies_coverage.printstats()
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/codegen/createdefs.py b/codegen/createdefs.py
new file mode 100755
index 0000000..84d50b1
--- /dev/null
+++ b/codegen/createdefs.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+import sys
+
+def main(args):
+ output = args[1]
+ input = args[2:]
+ outfd = open(output, 'w')
+ outfd.write(';; -*- scheme -*-\n')
+ outfd.write(';; THIS FILE IS GENERATED - DO NOT EDIT\n')
+ for filename in input:
+ outfd.write('(include "%s")\n' % filename)
+ outfd.close()
+
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/codegen/definitions.py b/codegen/definitions.py
new file mode 100644
index 0000000..aca5adb
--- /dev/null
+++ b/codegen/definitions.py
@@ -0,0 +1,575 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import copy
+import sys
+
+def get_valid_scheme_definitions(defs):
+ return [x for x in defs if isinstance(x, tuple) and len(x) >= 2]
+
+def unescape(s):
+ s = s.replace('\r\n', '\\r\\n').replace('\t', '\\t')
+ return s.replace('\r', '\\r').replace('\n', '\\n')
+
+def make_docstring(lines):
+ return "(char *) " + '\n'.join(['"%s"' % unescape(s) for s in lines])
+
+# New Parameter class, wich emulates a tuple for compatibility reasons
+class Parameter(object):
+ def __init__(self, ptype, pname, pdflt, pnull, pdir=None):
+ self.ptype = ptype
+ self.pname = pname
+ self.pdflt = pdflt
+ self.pnull = pnull
+ self.pdir = pdir
+
+ def __len__(self): return 4
+ def __getitem__(self, i):
+ return (self.ptype, self.pname, self.pdflt, self.pnull)[i]
+
+ def merge(self, old):
+ if old.pdflt is not None:
+ self.pdflt = old.pdflt
+ if old.pnull is not None:
+ self.pnull = old.pnull
+
+# We currently subclass 'str' to make impact on the rest of codegen as
+# little as possible. Later we can subclass 'object' instead, but
+# then we must find and adapt all places which expect return types to
+# be strings.
+class ReturnType(str):
+ def __new__(cls, *args, **kwds):
+ return str.__new__(cls, *args[:1])
+ def __init__(self, type_name, optional=False):
+ str.__init__(self)
+ self.optional = optional
+
+# Parameter for property based constructors
+class Property(object):
+ def __init__(self, pname, optional, argname):
+ self.pname = pname
+ self.optional = optional
+ self.argname = argname
+
+ def __len__(self): return 4
+ def __getitem__(self, i):
+ return ('', self.pname, self.optional, self.argname)[i]
+
+ def merge(self, old):
+ if old.optional is not None:
+ self.optional = old.optional
+ if old.argname is not None:
+ self.argname = old.argname
+
+
+class Definition(object):
+ docstring = "NULL"
+
+ def py_name(self):
+ return '%s.%s' % (self.module, self.name)
+
+ py_name = property(py_name)
+
+ def __init__(self, *args):
+ """Create a new defs object of this type. The arguments are the
+ components of the definition"""
+ raise RuntimeError, "this is an abstract class"
+
+ def merge(self, old):
+ """Merge in customisations from older version of definition"""
+ raise RuntimeError, "this is an abstract class"
+
+ def write_defs(self, fp=sys.stdout):
+ """write out this definition in defs file format"""
+ raise RuntimeError, "this is an abstract class"
+
+ def guess_return_value_ownership(self):
+ "return 1 if caller owns return value"
+ if getattr(self, 'is_constructor_of', False):
+ self.caller_owns_return = True
+ elif self.ret in ('char*', 'gchar*', 'string'):
+ self.caller_owns_return = True
+ else:
+ self.caller_owns_return = False
+
+
+class ObjectDef(Definition):
+ def __init__(self, name, *args):
+ self.name = name
+ self.module = None
+ self.parent = None
+ self.c_name = None
+ self.typecode = None
+ self.fields = []
+ self.implements = []
+ self.class_init_func = None
+ self.has_new_constructor_api = False
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'in-module':
+ self.module = arg[1]
+ elif arg[0] == 'docstring':
+ self.docstring = make_docstring(arg[1:])
+ elif arg[0] == 'parent':
+ self.parent = arg[1]
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'fields':
+ for parg in arg[1:]:
+ self.fields.append((parg[0], parg[1]))
+ elif arg[0] == 'implements':
+ self.implements.append(arg[1])
+ def merge(self, old):
+ # currently the .h parser doesn't try to work out what fields of
+ # an object structure should be public, so we just copy the list
+ # from the old version ...
+ self.fields = old.fields
+ self.implements = old.implements
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-object ' + self.name + '\n')
+ if self.module:
+ fp.write(' (in-module "' + self.module + '")\n')
+ if self.parent != (None, None):
+ fp.write(' (parent "' + self.parent + '")\n')
+ for interface in self.implements:
+ fp.write(' (implements "' + interface + '")\n')
+ if self.c_name:
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ if self.typecode:
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ if self.fields:
+ fp.write(' (fields\n')
+ for (ftype, fname) in self.fields:
+ fp.write(' \'("' + ftype + '" "' + fname + '")\n')
+ fp.write(' )\n')
+ fp.write(')\n\n')
+
+class InterfaceDef(Definition):
+ def __init__(self, name, *args):
+ self.name = name
+ self.module = None
+ self.c_name = None
+ self.typecode = None
+ self.vtable = None
+ self.fields = []
+ self.interface_info = None
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'in-module':
+ self.module = arg[1]
+ elif arg[0] == 'docstring':
+ self.docstring = make_docstring(arg[1:])
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'vtable':
+ self.vtable = arg[1]
+ if self.vtable is None:
+ self.vtable = self.c_name + "Iface"
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-interface ' + self.name + '\n')
+ if self.module:
+ fp.write(' (in-module "' + self.module + '")\n')
+ if self.c_name:
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ if self.typecode:
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ fp.write(')\n\n')
+
+class EnumDef(Definition):
+ def __init__(self, name, *args):
+ self.deftype = 'enum'
+ self.name = name
+ self.in_module = None
+ self.c_name = None
+ self.typecode = None
+ self.values = []
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'in-module':
+ self.in_module = arg[1]
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'values':
+ for varg in arg[1:]:
+ self.values.append((varg[0], varg[1]))
+ def merge(self, old):
+ pass
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-' + self.deftype + ' ' + self.name + '\n')
+ if self.in_module:
+ fp.write(' (in-module "' + self.in_module + '")\n')
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ if self.values:
+ fp.write(' (values\n')
+ for name, val in self.values:
+ fp.write(' \'("' + name + '" "' + val + '")\n')
+ fp.write(' )\n')
+ fp.write(')\n\n')
+
+class FlagsDef(EnumDef):
+ def __init__(self, *args):
+ apply(EnumDef.__init__, (self,) + args)
+ self.deftype = 'flags'
+
+class BoxedDef(Definition):
+ def __init__(self, name, *args):
+ self.name = name
+ self.module = None
+ self.c_name = None
+ self.typecode = None
+ self.copy = None
+ self.release = None
+ self.fields = []
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'in-module':
+ self.module = arg[1]
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'copy-func':
+ self.copy = arg[1]
+ elif arg[0] == 'release-func':
+ self.release = arg[1]
+ elif arg[0] == 'fields':
+ for parg in arg[1:]:
+ self.fields.append((parg[0], parg[1]))
+ def merge(self, old):
+ # currently the .h parser doesn't try to work out what fields of
+ # an object structure should be public, so we just copy the list
+ # from the old version ...
+ self.fields = old.fields
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-boxed ' + self.name + '\n')
+ if self.module:
+ fp.write(' (in-module "' + self.module + '")\n')
+ if self.c_name:
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ if self.typecode:
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ if self.copy:
+ fp.write(' (copy-func "' + self.copy + '")\n')
+ if self.release:
+ fp.write(' (release-func "' + self.release + '")\n')
+ if self.fields:
+ fp.write(' (fields\n')
+ for (ftype, fname) in self.fields:
+ fp.write(' \'("' + ftype + '" "' + fname + '")\n')
+ fp.write(' )\n')
+ fp.write(')\n\n')
+
+class PointerDef(Definition):
+ def __init__(self, name, *args):
+ self.name = name
+ self.module = None
+ self.c_name = None
+ self.typecode = None
+ self.fields = []
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'in-module':
+ self.module = arg[1]
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'fields':
+ for parg in arg[1:]:
+ self.fields.append((parg[0], parg[1]))
+ def merge(self, old):
+ # currently the .h parser doesn't try to work out what fields of
+ # an object structure should be public, so we just copy the list
+ # from the old version ...
+ self.fields = old.fields
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-pointer ' + self.name + '\n')
+ if self.module:
+ fp.write(' (in-module "' + self.module + '")\n')
+ if self.c_name:
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ if self.typecode:
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ if self.fields:
+ fp.write(' (fields\n')
+ for (ftype, fname) in self.fields:
+ fp.write(' \'("' + ftype + '" "' + fname + '")\n')
+ fp.write(' )\n')
+ fp.write(')\n\n')
+
+class MethodDefBase(Definition):
+ def __init__(self, name, *args):
+ dump = 0
+ self.name = name
+ self.ret = None
+ self.caller_owns_return = None
+ self.unblock_threads = None
+ self.c_name = None
+ self.typecode = None
+ self.of_object = None
+ self.params = [] # of form (type, name, default, nullok)
+ self.varargs = 0
+ self.deprecated = None
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'of-object':
+ self.of_object = arg[1]
+ elif arg[0] == 'docstring':
+ self.docstring = make_docstring(arg[1:])
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'return-type':
+ type_name = arg[1]
+ optional = False
+ for prop in arg[2:]:
+ if prop[0] == 'optional':
+ optional = True
+ self.ret = ReturnType(type_name, optional)
+ elif arg[0] == 'caller-owns-return':
+ self.caller_owns_return = arg[1] in ('t', '#t')
+ elif arg[0] == 'unblock-threads':
+ self.unblock_threads = arg[1] in ('t', '#t')
+ elif arg[0] == 'parameters':
+ for parg in arg[1:]:
+ ptype = parg[0]
+ pname = parg[1]
+ pdflt = None
+ pnull = 0
+ pdir = None
+ for farg in parg[2:]:
+ assert isinstance(farg, tuple)
+ if farg[0] == 'default':
+ pdflt = farg[1]
+ elif farg[0] == 'null-ok':
+ pnull = 1
+ elif farg[0] == 'direction':
+ pdir = farg[1]
+ self.params.append(Parameter(ptype, pname, pdflt, pnull, pdir))
+ elif arg[0] == 'varargs':
+ self.varargs = arg[1] in ('t', '#t')
+ elif arg[0] == 'deprecated':
+ self.deprecated = arg[1]
+ else:
+ sys.stderr.write("Warning: %s argument unsupported.\n"
+ % (arg[0]))
+ dump = 1
+ if dump:
+ self.write_defs(sys.stderr)
+
+ if self.caller_owns_return is None and self.ret is not None:
+ self.guess_return_value_ownership()
+
+ def merge(self, old, parmerge):
+ self.caller_owns_return = old.caller_owns_return
+ self.varargs = old.varargs
+ # here we merge extra parameter flags accross to the new object.
+ if not parmerge:
+ self.params = copy.deepcopy(old.params)
+ return
+ for i in range(len(self.params)):
+ ptype, pname, pdflt, pnull = self.params[i]
+ for p2 in old.params:
+ if p2[1] == pname:
+ self.params[i] = (ptype, pname, p2[2], p2[3])
+ break
+ def _write_defs(self, fp=sys.stdout):
+ if self.of_object != (None, None):
+ fp.write(' (of-object "' + self.of_object + '")\n')
+ if self.c_name:
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ if self.typecode:
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ if self.caller_owns_return:
+ fp.write(' (caller-owns-return #t)\n')
+ if self.unblock_threads:
+ fp.write(' (unblock_threads #t)\n')
+ if self.ret:
+ fp.write(' (return-type "' + self.ret + '")\n')
+ if self.deprecated:
+ fp.write(' (deprecated "' + self.deprecated + '")\n')
+ if self.params:
+ fp.write(' (parameters\n')
+ for ptype, pname, pdflt, pnull in self.params:
+ fp.write(' \'("' + ptype + '" "' + pname +'"')
+ if pdflt: fp.write(' (default "' + pdflt + '")')
+ if pnull: fp.write(' (null-ok)')
+ fp.write(')\n')
+ fp.write(' )\n')
+ if self.varargs:
+ fp.write(' (varargs #t)\n')
+ fp.write(')\n\n')
+
+
+class MethodDef(MethodDefBase):
+ def __init__(self, name, *args):
+ MethodDefBase.__init__(self, name, *args)
+ for item in ('c_name', 'of_object'):
+ if self.__dict__[item] == None:
+ self.write_defs(sys.stderr)
+ raise RuntimeError, "definition missing required %s" % (item,)
+
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-method ' + self.name + '\n')
+ self._write_defs(fp)
+
+class VirtualDef(MethodDefBase):
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-virtual ' + self.name + '\n')
+ self._write_defs(fp)
+
+class FunctionDef(Definition):
+ def __init__(self, name, *args):
+ dump = 0
+ self.name = name
+ self.in_module = None
+ self.is_constructor_of = None
+ self.ret = None
+ self.caller_owns_return = None
+ self.unblock_threads = None
+ self.c_name = None
+ self.typecode = None
+ self.params = [] # of form (type, name, default, nullok)
+ self.varargs = 0
+ self.deprecated = None
+ for arg in get_valid_scheme_definitions(args):
+ if arg[0] == 'in-module':
+ self.in_module = arg[1]
+ elif arg[0] == 'docstring':
+ self.docstring = make_docstring(arg[1:])
+ elif arg[0] == 'is-constructor-of':
+ self.is_constructor_of = arg[1]
+ elif arg[0] == 'c-name':
+ self.c_name = arg[1]
+ elif arg[0] == 'gtype-id':
+ self.typecode = arg[1]
+ elif arg[0] == 'return-type':
+ self.ret = arg[1]
+ elif arg[0] == 'caller-owns-return':
+ self.caller_owns_return = arg[1] in ('t', '#t')
+ elif arg[0] == 'unblock-threads':
+ self.unblock_threads = arg[1] in ('t', '#t')
+ elif arg[0] == 'parameters':
+ for parg in arg[1:]:
+ ptype = parg[0]
+ pname = parg[1]
+ pdflt = None
+ pnull = 0
+ for farg in parg[2:]:
+ if farg[0] == 'default':
+ pdflt = farg[1]
+ elif farg[0] == 'null-ok':
+ pnull = 1
+ self.params.append(Parameter(ptype, pname, pdflt, pnull))
+ elif arg[0] == 'properties':
+ if self.is_constructor_of is None:
+ print >> sys.stderr, "Warning: (properties ...) "\
+ "is only valid for constructors"
+ for prop in arg[1:]:
+ pname = prop[0]
+ optional = False
+ argname = pname
+ for farg in prop[1:]:
+ if farg[0] == 'optional':
+ optional = True
+ elif farg[0] == 'argname':
+ argname = farg[1]
+ self.params.append(Property(pname, optional, argname))
+ elif arg[0] == 'varargs':
+ self.varargs = arg[1] in ('t', '#t')
+ elif arg[0] == 'deprecated':
+ self.deprecated = arg[1]
+ else:
+ sys.stderr.write("Warning: %s argument unsupported\n"
+ % (arg[0],))
+ dump = 1
+ if dump:
+ self.write_defs(sys.stderr)
+
+ if self.caller_owns_return is None and self.ret is not None:
+ self.guess_return_value_ownership()
+ for item in ('c_name',):
+ if self.__dict__[item] == None:
+ self.write_defs(sys.stderr)
+ raise RuntimeError, "definition missing required %s" % (item,)
+
+ _method_write_defs = MethodDef.__dict__['write_defs']
+
+ def merge(self, old, parmerge):
+ self.caller_owns_return = old.caller_owns_return
+ self.varargs = old.varargs
+ if not parmerge:
+ self.params = copy.deepcopy(old.params)
+ return
+ # here we merge extra parameter flags accross to the new object.
+ def merge_param(param):
+ for old_param in old.params:
+ if old_param.pname == param.pname:
+ if isinstance(old_param, Property):
+ # h2def never scans Property's, therefore if
+ # we have one it was manually written, so we
+ # keep it.
+ return copy.deepcopy(old_param)
+ else:
+ param.merge(old_param)
+ return param
+ raise RuntimeError, "could not find %s in old_parameters %r" % (
+ param.pname, [p.pname for p in old.params])
+ try:
+ self.params = map(merge_param, self.params)
+ except RuntimeError:
+ # parameter names changed and we can't find a match; it's
+ # safer to keep the old parameter list untouched.
+ self.params = copy.deepcopy(old.params)
+
+ if not self.is_constructor_of:
+ try:
+ self.is_constructor_of = old.is_constructor_of
+ except AttributeError:
+ pass
+ if isinstance(old, MethodDef):
+ self.name = old.name
+ # transmogrify from function into method ...
+ self.write_defs = self._method_write_defs
+ self.of_object = old.of_object
+ del self.params[0]
+ def write_defs(self, fp=sys.stdout):
+ fp.write('(define-function ' + self.name + '\n')
+ if self.in_module:
+ fp.write(' (in-module "' + self.in_module + '")\n')
+ if self.is_constructor_of:
+ fp.write(' (is-constructor-of "' + self.is_constructor_of +'")\n')
+ if self.c_name:
+ fp.write(' (c-name "' + self.c_name + '")\n')
+ if self.typecode:
+ fp.write(' (gtype-id "' + self.typecode + '")\n')
+ if self.caller_owns_return:
+ fp.write(' (caller-owns-return #t)\n')
+ if self.unblock_threads:
+ fp.write(' (unblock-threads #t)\n')
+ if self.ret:
+ fp.write(' (return-type "' + self.ret + '")\n')
+ if self.deprecated:
+ fp.write(' (deprecated "' + self.deprecated + '")\n')
+ if self.params:
+ if isinstance(self.params[0], Parameter):
+ fp.write(' (parameters\n')
+ for ptype, pname, pdflt, pnull in self.params:
+ fp.write(' \'("' + ptype + '" "' + pname +'"')
+ if pdflt: fp.write(' (default "' + pdflt + '")')
+ if pnull: fp.write(' (null-ok)')
+ fp.write(')\n')
+ fp.write(' )\n')
+ elif isinstance(self.params[0], Property):
+ fp.write(' (properties\n')
+ for prop in self.params:
+ fp.write(' \'("' + prop.pname +'"')
+ if prop.optional: fp.write(' (optional)')
+ fp.write(')\n')
+ fp.write(' )\n')
+ else:
+ assert False, "strange parameter list %r" % self.params[0]
+ if self.varargs:
+ fp.write(' (varargs #t)\n')
+
+ fp.write(')\n\n')
diff --git a/codegen/defsconvert.py b/codegen/defsconvert.py
new file mode 100755
index 0000000..c3c2324
--- /dev/null
+++ b/codegen/defsconvert.py
@@ -0,0 +1,132 @@
+#! /usr/bin/env python
+
+import sys
+import string, re
+
+# ------------------ Create typecodes from typenames ---------
+
+_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
+_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
+_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
+
+def to_upper_str(name):
+ """Converts a typename to the equivalent upercase and underscores
+ name. This is used to form the type conversion macros and enum/flag
+ name variables"""
+ name = _upperstr_pat1.sub(r'\1_\2', name)
+ name = _upperstr_pat2.sub(r'\1_\2', name)
+ name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
+ return string.upper(name)
+
+def typecode(typename):
+ """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
+ return string.replace(to_upper_str(typename), '_', '_TYPE_', 1)
+
+
+STATE_START = 0
+STATE_OBJECT = 1
+STATE_INTERFACE = 2
+STATE_BOXED = 3
+STATE_ENUM = 4
+STATE_FLAGS = 5
+STATE_METHOD = 6
+STATE_FUNCTION = 7
+
+def convert(infp=sys.stdin, outfp=sys.stdout):
+ state = STATE_START
+ seen_params = 0
+
+ line = infp.readline()
+ while line:
+ if line[:8] == '(object ':
+ state = STATE_OBJECT
+ seen_params = 0
+ outfp.write('(define-object ' + line[8:])
+ elif line[:11] == '(interface ':
+ state = STATE_INTERFACE
+ seen_params = 0
+ outfp.write('(define-interface ' + line[11:])
+ elif line[:7] == '(boxed ':
+ state = STATE_BOXED
+ seen_params = 0
+ outfp.write('(define-boxed ' + line[7:])
+ elif line[:6] == '(enum ':
+ state = STATE_ENUM
+ seen_params = 0
+ outfp.write('(define-enum ' + line[6:])
+ elif line[:7] == '(flags ':
+ state = STATE_FLAGS
+ seen_params = 0
+ outfp.write('(define-flags ' + line[7:])
+ elif line[:8] == '(method ':
+ state = STATE_METHOD
+ seen_params = 0
+ outfp.write('(define-method ' + line[8:])
+ elif line[:10] == '(function ':
+ state = STATE_FUNCTION
+ seen_params = 0
+ outfp.write('(define-function ' + line[10:])
+ elif line[:13] == ' (in-module ':
+ outfp.write(re.sub(r'^(\s+\(in-module\s+)(\w+)(.*)$',
+ r'\1"\2"\3', line))
+ elif line[:10] == ' (parent ':
+ outfp.write(re.sub(r'^(\s+\(parent\s+)(\w+)(\s+\((\w+)\))?(.*)$',
+ r'\1"\4\2"\5', line))
+ elif line[:14] == ' (implements ':
+ outfp.write(re.sub(r'^(\s+\(implements\s+)([^\s]+)(\s*\))$',
+ r'\1"\2"\3', line))
+ elif line[:13] == ' (of-object ':
+ outfp.write(re.sub(r'^(\s+\(of-object\s+)(\w+)(\s+\((\w+)\))?(.*)$',
+ r'\1"\4\2"\5', line))
+ elif line[:10] == ' (c-name ':
+ outfp.write(re.sub(r'^(\s+\(c-name\s+)([^\s]+)(\s*\))$',
+ r'\1"\2"\3', line))
+ if state in (STATE_OBJECT, STATE_INTERFACE, STATE_BOXED,
+ STATE_ENUM, STATE_FLAGS):
+ c_name = re.match(r'^\s+\(c-name\s+([^\s]+)\s*\)$',
+ line).group(1)
+ outfp.write(' (gtype-id "%s")\n' % typecode(c_name))
+ elif line[:15] == ' (return-type ':
+ outfp.write(re.sub(r'^(\s+\(return-type\s+)([^\s]+)(\s*\))$',
+ r'\1"\2"\3', line))
+ elif line[:13] == ' (copy-func ':
+ outfp.write(re.sub(r'^(\s+\(copy-func\s+)(\w+)(.*)$',
+ r'\1"\2"\3', line))
+ elif line[:16] == ' (release-func ':
+ outfp.write(re.sub(r'^(\s+\(release-func\s+)(\w+)(.*)$',
+ r'\1"\2"\3', line))
+ elif line[:9] == ' (field ':
+ if not seen_params:
+ outfp.write(' (fields\n')
+ seen_params = 1
+ outfp.write(re.sub(r'^\s+\(field\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)\s*\)$',
+ ' \'("\\1" "\\2")', line))
+ elif line[:9] == ' (value ':
+ if not seen_params:
+ outfp.write(' (values\n')
+ seen_params = 1
+ outfp.write(re.sub(r'^\s+\(value\s+\(name\s+([^\s]+)\)\s+\(c-name\s+([^\s]+)\s*\)\s*\)$',
+ ' \'("\\1" "\\2")', line))
+ elif line[:13] == ' (parameter ':
+ if not seen_params:
+ outfp.write(' (parameters\n')
+ seen_params = 1
+ outfp.write(re.sub(r'^\s+\(parameter\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)(\s*.*)\)$',
+ ' \'("\\1" "\\2"\\3)', line))
+ elif line[:11] == ' (varargs ':
+ if seen_params:
+ outfp.write(' )\n')
+ seen_params = 0
+ outfp.write(' (varargs #t)\n')
+ elif line[0] == ')':
+ if seen_params:
+ outfp.write(' )\n')
+ seen_params = 0
+ state = STATE_START
+ outfp.write(line)
+ else:
+ outfp.write(line)
+ line = infp.readline()
+
+if __name__ == '__main__':
+ convert()
diff --git a/codegen/defsgen.py b/codegen/defsgen.py
new file mode 100755
index 0000000..6c2e63d
--- /dev/null
+++ b/codegen/defsgen.py
@@ -0,0 +1,737 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+#
+# Copyright (C) 2006-2009 John Finlay.
+#
+# Scan the given public .h files of a GTK module (or module using
+# GTK object conventions) and generates a set of scheme defs.
+#
+# defsgen uses the ctypes module to extract information from the installed
+# module library (or libraries) to generate the object, interface, function,
+# method, virtual, enum and flags defs. defsgen uses the gobject library
+# g_type_* functions. defsgen will try to open the "libgobject-2.0.so" library
+# if one is not specified on the command line.
+#
+# Basically the operation of defsgen is:
+#
+# - open and initialize the gobject and module libraries
+# - read each .h file into a buffer which is scrubbed of extraneous data
+# - find all *_get_type() functions prototypes
+# - look in the module libraries for the get_type symbols
+# - if found run the get_type() function to retrieve the GType
+# - find the parent type name and save the object info
+# - find each function prototypes in the file and check if it has a symbol in
+# the module libraries - save the info if found
+# - extract the virtual prototypes from the Class or Iface structs and save
+# - write out the various defs.
+#
+# The command line options are:
+#
+# -l --modulelib Adds the given module library name to the list to be used
+# for finding symbols. Mor ethan one modulefile may be
+# specified. (required)
+# -L --libgobject Specifies the name of the gobject library (optional but
+# must be specified if "libgobject-2.0.so" is not availble)
+# -s --separate Create separate files for objects and function/method defs
+# using the given name as the base name (optional). If this
+# is not specified the combined object and function defs
+# will be output to sys.stdout.
+# -f --defsfile Extract defs from the given file to filter the output defs
+# that is don't output defs that are defined in the
+# defsfile. More than one deffile may be specified.
+# -D --defines Include portions of the defsfile defs that are conditional
+# on the given define, for example GDK_TARGET_X11. Only
+# useful with the --defsfile option
+# -m --modulename The prefix to be stripped from the front of function names
+# for the given module
+# -p --useprefix Use the modulename prefix as a hint to split names into
+# module and name for object and enum defs. Also used for
+# generating type codes.
+# --onlyenums Only produce defs for enums and flags
+# --onlyobjdefs Only produce defs for objects
+# --onlyvirtuals Only produce defs for virtuals
+# --genpropgetsets Experimental option to generate prop-getset annotations.
+# Not supported by codegen.py and friends.
+#
+# Examples:
+#
+# python defsgen.py -m pango -l libpango-1.0.so \
+# /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs
+#
+# - Outputs all defs for the pango module.using the library module
+# libpango-1.0.so.
+#
+# python defsgen.py -m gdk -DGDK_TARGET_X11 -l libgdk-x11-2.0.so \
+# -l libgdk_pixbuf-2.0.so -s /tmp/gdk-2.10 \
+# -f /usr/tmp/pygtk/gtk/gdk-base.defs \
+# /usr/local/include/gtk-2.0/gdk/*.h \
+# /usr/local/include/gtk-2.0/gdk-pixbuf/*.h
+#
+# - Outputs the gdk module defs that are not contained in the defs file
+# /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created:
+# /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs.
+#
+# Based on the original h2def.py program by
+# Toby D. Reeves <toby@max.rl.plh.af.mil> and
+# modified by James Henstridge <james@daa.com.au> to output stuff in
+# Havoc's new defs format. Info on this format can be seen at:
+# http://www.gnome.org/mailing-lists/archives/gtk-devel-list/2000-January/0085.shtml
+# Updated to be PEP-8 compatible and refactored to use OOP
+# Extensively modified by John Finlay to use ctypes module to extract GType
+# info from the given library and to create virtual defines.
+#
+
+import getopt
+import os
+import re, string
+import sys
+import ctypes
+import defsparser
+
+#------------------ utility defs -----------------
+
+_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
+_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
+_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
+
+def to_upper_str(name):
+ """Converts a typename to the equivalent uppercase and underscores
+ name. This is used to form the type conversion macros and enum/flag
+ name variables"""
+ name = _upperstr_pat1.sub(r'\1_\2', name)
+ name = _upperstr_pat2.sub(r'\1_\2', name)
+ name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
+ return name.upper()
+
+def typecode(typename, prefix, use_prefix):
+ """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
+ tcode = to_upper_str(typename)
+ if (use_prefix and prefix and tcode.lower() != prefix
+ and tcode.lower().startswith(prefix)):
+ l = len(prefix)
+ tcode = tcode[:l] + '_TYPE' + tcode[l:]
+ else:
+ tcode = tcode.replace('_', '_TYPE_', 1)
+ return tcode
+
+_class_iface_pat = re.compile(r'\w+(Class|Iface)')
+
+def class_iface_sub(mobj):
+ '''Returns matched string if it matches a Class or Iface struct
+ otherwise returns the empty string'''
+ if not _class_iface_pat.match(mobj.group(1)):
+ return ''
+ return mobj.group(0)
+
+clean_patterns = [
+ # strip comments
+ (re.compile(r'/\*.*?\*/', re.DOTALL), ''),
+ # compact continued lines
+ (re.compile(r"\\\n", re.MULTILINE), ''),
+ # remove preprocess directives
+ (re.compile(r"""^[#].*?$""", re.MULTILINE), ''),
+ # strip DECLS macros and Windows DLL API macros
+ (re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS|G_END_DECLS|[A-Z]+_API """,
+ re.MULTILINE), ''),
+ # remove extern "C"
+ (re.compile(r'^\s*(extern)\s+"C"\s+{', re.MULTILINE), ''),
+ # remove singleline typedefs of stucts
+ (re.compile(r'^typedef\s+struct\s*[^{;\n]*;\s*$', re.MULTILINE), ''),
+ # remove all struct definitons but those for object classes and interfaces
+ (re.compile(r'^struct\s+(\w+)\s+{[^}]+}\s*;\s*$', re.MULTILINE),
+ class_iface_sub),
+ # compress multiple whitespace
+ (re.compile(r'\s+', re.MULTILINE), ' '),
+ # clean up line ends
+ (re.compile(r';\s*', re.MULTILINE), '\n'),
+ (re.compile(r'^\s*', re.MULTILINE), ''),
+ # associate *, &, and [] with type instead of variable
+ (re.compile(r' \s* ([*|&]+) \s* ([(\w]+)', re.VERBOSE), r'\1 \2'),
+ (re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE), r'[] \1'),
+ # make return types that are const work.
+ (re.compile(r'\s*\*\s*G_CONST_RETURN\s*\*\s*'), '** '),
+ (re.compile(r'G_CONST_RETURN |const '), 'const-'),
+ # remove typedefs of callback types
+ (re.compile(r'^typedef\s+\w+\s*\*?\s*\(\s*\*\s*\w+\)\s*\([^(]*\)\n',
+ re.MULTILINE), ''),
+ #strip GSEAL macros from the middle of function declarations:
+ (re.compile(r"""GSEAL""", re.VERBOSE), '')
+ ]
+
+def clean_buffer(buf):
+ """Cleans out extraneous data leaving function prototypes, Class and Iface
+ structs."""
+ for pat, subst in clean_patterns:
+ buf = pat.sub(subst, buf)
+ return buf
+
+# ------------------ utility classes -------------------------
+
+class ObjDef(object):
+ def __init__(self, name, type_id, parent_name, parent_type, base_name):
+ self.name = name
+ self.type = type_id
+ self.parent_name = parent_name
+ self.parent_type = parent_type
+ self.base_name = base_name
+ self.props = []
+ return
+ def __cmp__(self, other):
+ try:
+ res = cmp(self.name, other.name)
+ except AttributeError:
+ res = cmp(id(self), id(other))
+ return res
+ def set_properties(self, gobj):
+ if self.base_name == 'GObject':
+ self.props = self._get_gobject_properties(gobj)
+ elif self.base_name == 'GInterface':
+ self.props = self._get_ginterface_properties(gobj)
+
+ def _get_gobject_properties(self, gobj):
+ klass = gobj.g_type_class_ref(self.type)
+ num = ctypes.c_uint()
+ plist = gobj.g_object_class_list_properties(klass, ctypes.byref(num))
+ props = [plist[i][0].name for i in range(num.value)
+ if self.name == gobj.g_type_name(plist[i][0].owner_type)]
+ return props
+ def _get_ginterface_properties(self, gobj):
+ iface = gobj.g_type_default_interface_ref(self.type)
+ num = ctypes.c_uint()
+ plist = gobj.g_object_interface_list_properties(iface,
+ ctypes.byref(num))
+ props = [plist[i][0].name for i in range(num.value)]
+ return props
+
+# ------------------ Find object definitions -----------------
+
+split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)')
+
+get_type_pat = re.compile(r'''^\s*(GType|GtkType)\s+
+([a-z]\w+_get_type)\s*(\(void\)|\(\)).*$''', re.VERBOSE | re.MULTILINE)
+
+defkeys = 'GBoxed GInterface GObject gpointer GEnum GFlags'
+
+def find_defs(buf, gobj, modlib, defs):
+ """Find possible gobject, gboxed, interface, gpointer, enum and flags
+ definitions in header files.and find parent type."""
+ # find all *_get_type() functions that may represent a GObject
+ for m in get_type_pat.findall(buf):
+ func_name = m[1]
+ for lib in modlib:
+ if hasattr(lib, func_name):
+ objtype = apply(getattr(lib, func_name))
+ obj_name = gobj.g_type_name(objtype)
+ parent = gobj.g_type_parent(objtype)
+ parent_name = gobj.g_type_name(parent)
+ base_name = gobj.g_type_name(gobj.g_type_fundamental(parent))
+ #if gobj.g_type_is_a(parent, gobj.GObject):
+ # base_name = 'GObject'
+ if base_name in defkeys:
+ obj = ObjDef(obj_name, objtype, parent_name, parent,
+ base_name)
+ obj.set_properties(gobj)
+ defs[obj.base_name].append(obj)
+ break
+ return
+
+# ------------------ Find function definitions -----------------
+
+arg_split_pat = re.compile("\s*,\s*")
+
+proto_pat=re.compile(r"""^
+\s*((?:-|\w|\&|\*)+) # return type
+\s+ # skip whitespace
+([a-z]\w+)\s*[(] # match the function name until the opening (
+\s*(.*?)\s*[)].* # group the function arguments
+$""", re.IGNORECASE|re.VERBOSE|re.MULTILINE)
+
+def find_func_defs(buf, modlib, deffile, defs, verbose):
+ '''Find function prototypes in buf that have symbols in modlib
+ and save in defs.'''
+ funcs = defs['funcs'][deffile] = []
+ for m in proto_pat.findall(buf):
+ ret, func, args = m
+ if not True in [hasattr(lib, func) for lib in modlib]:
+ if verbose:
+ sys.stderr.write('no symbol for function: ' + func
+ + ' from file' + deffile + '\n')
+ else:
+ args = arg_split_pat.split(args)
+ args = [a.replace(' ','-', a.count(' ')-1) for a in args]
+ funcs.append((func, ret, args))
+ return
+
+virtual_pat = re.compile(r'''^
+\s*((?:-|\w|\&|\*)+) # return type
+\s* # skip whitespace
+\(\s*\*\s* # opening (
+([a-z]\w+)\) # match the function name until the closing )
+\s*\(\s*([^)]*)\).* # group the function arguments
+$''', re.VERBOSE|re.MULTILINE)
+
+class_iface_struct_pat = re.compile(
+ r'^struct\s+_(\w+)(?:Class|Iface)\s+{([^}]+)}\s*$', re.MULTILINE)
+
+def find_virt_defs(buf, deffile, defs):
+ '''Find virtual function prototypes in buf and save in defs.'''
+ virts = defs['virts'][deffile] = []
+ # get the Class or Iface structs
+ for m in class_iface_struct_pat.findall(buf):
+ objname, virtuals = m
+ for v in virtual_pat.findall(virtuals):
+ ret, func, args = v
+ if 'reserved' in func or args == 'void':
+ continue
+ args = arg_split_pat.split(args)
+ args = [a.replace(' ','-', a.count(' ')-1) for a in args]
+ virts.append((func, ret, args, objname))
+ return
+
+enum_pat = re.compile(r'^\s*typedef enum\s+{\s*([^}]*)}\s*([^\s]*)$',
+ re.MULTILINE)
+values_splitter = re.compile(r'\s*,\s', re.MULTILINE)
+
+def find_enums(buf, defs):
+ for vals, name in enum_pat.findall(buf):
+ if name != 'GdkCursorType':
+ isflags = '<<' in vals
+ entries = [val.split()[0] for val in values_splitter.split(vals)
+ if val.strip()]
+ if entries:
+ defs['untypedenums'][name] = (isflags, entries)
+ return
+
+# ------------------ write definitions -----------------
+
+type_pat = re.compile(r'(?:const-)?([A-Za-z0-9]+)\*?\s+')
+pointer_pat = re.compile('(.*)\*$')
+func_new_pat = re.compile('(\w+)_new$')
+getset_pat = re.compile(r'^(?:get|set)_(.*)$')
+
+def split_prefix(cname, prefix, use_prefix):
+ # use the module prefix to split the cname
+ pre = prefix.replace('_', '')
+ if use_prefix and cname.lower().startswith(pre):
+ l = len(pre)
+ module = cname[:l]
+ name = cname[l:]
+ else:
+ m = split_prefix_pat.match(cname)
+ if m:
+ module = m.group(1)
+ name = m.group(2)
+ return module, name
+
+class DefsWriter:
+ def __init__(self, defs, fp=None, prefix=None, verbose=False,
+ defsfiles=None, defines={}, genpropgetsets=False,
+ useprefix=False):
+ self.defs = defs
+ self.use_prefix = useprefix
+ self.objnames = reduce(list.__add__,
+ [[o.name for o in defs[base]]
+ for base in defkeys.split()[:3]])
+ self.othernames = reduce(list.__add__,
+ [[o.name for o in defs[base]]
+ for base in defkeys.split()[3:]])
+ self.objifacedefs = dict(reduce(list.__add__,
+ [[(o.name, o) for o in defs[base]]
+ for base in defkeys.split()[1:3]]))
+ self.fp = (fp, sys.stdout)[not fp]
+ self.prefix = prefix
+ self.verbose = verbose
+ self.genpropgetsets = genpropgetsets
+ self._c_names={}
+ for defsfile in defsfiles:
+ filter = defsparser.DefsParser(defsfile, defines)
+ filter.startParsing()
+ self._c_names.update(filter.c_name)
+ for vdef in filter.virtuals:
+ self._c_names[vdef.of_object + '.' + vdef.name] = None
+ return
+
+ def write_func_defs(self, deffiles, onlyvirts=False):
+ filter = self._c_names
+ for deffile in deffiles:
+ self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile))
+ if not onlyvirts:
+ for func, ret, args in self.defs['funcs'][deffile]:
+ if not func in filter:
+ self._write_func(func, ret, args)
+ for virt, ret, args, objname in self.defs['virts'][deffile]:
+ if not objname + '.' + virt in filter:
+ self._write_virt(objname, virt, ret, args)
+ self.fp.write('\n')
+ return
+
+ def write_enum_defs(self, fp=None):
+ fp = (fp, self.fp)[not fp]
+ klassptrs = {'GEnum':ctypes.POINTER(EnumClass),
+ 'GFlags':ctypes.POINTER(FlagsClass)}
+ filter = self._c_names
+ objs = self.defs['GEnum'] + self.defs ['GFlags']
+ #objs.sort()
+ fp.write(';; Enumerations and Flags ...\n\n')
+ for obj in objs:
+ cname = name = obj.name
+ tcode = typecode(cname, self.prefix, self.use_prefix)
+ if cname in filter:
+ continue
+ if cname in self.defs['untypedenums']:
+ if tcode not in self.defs['typedefines']:
+ # no type define so skip and print as untyped enum
+ continue
+ self.defs['untypedenums'].pop(cname, None)
+ parent_name = obj.parent_name
+ klassptr = klassptrs[parent_name]
+ typename = parent_name.lower()[1:]
+ module = None
+ module, name = split_prefix(cname, self.prefix, self.use_prefix)
+ fp.write('(define-' + typename + ' ' + name + '\n')
+ if module:
+ fp.write(' (in-module "' + module + '")\n')
+ fp.write(' (c-name "' + cname + '")\n')
+ fp.write(' (gtype-id "' + tcode + '")\n')
+ fp.write(' (values\n')
+ classref = self.gobj.g_type_class_ref(obj.type)
+ itemclass = ctypes.cast(classref, klassptr).contents
+ for i in range(itemclass.n_values):
+ val = itemclass.values[i]
+ fp.write(' \'("%s" "%s")\n' % (val.value_nick,
+ val.value_name))
+ fp.write(' )\n')
+ fp.write(')\n\n')
+ if self.defs['untypedenums']:
+ self.write_untyped_enum_defs(fp)
+ return
+
+ def write_untyped_enum_defs(self, fp):
+ fp.write(';; Untyped enumerations and flags ...\n\n')
+ filter = self._c_names
+ for cname, (isflags, entries) in self.defs['untypedenums'].items():
+ if filter and cname in filter: continue
+ module, name = split_prefix(cname, self.prefix, self.use_prefix)
+ if isflags:
+ fp.write('(define-flags ' + name + '\n')
+ else:
+ fp.write('(define-enum ' + name + '\n')
+ if module:
+ fp.write(' (in-module "' + module + '")\n')
+ fp.write(' (c-name "' + cname + '")\n')
+ preindex = entries[0].rfind('_')
+ for ent in entries[1:]:
+ while (preindex > 0
+ and ent[:preindex] != entries[0][:preindex]):
+ preindex = ent[:preindex].rfind('_')
+ fp.write(' (values\n')
+ for ent in entries:
+ fp.write(' \'("%s" "%s")\n' %
+ (ent[preindex+1:].lower().replace('_', '-'), ent))
+ fp.write(' )\n')
+ fp.write(')\n\n')
+
+
+ def _write_obj_helper(self, obj, fp):
+ base_name = obj.base_name.lower()[1:]
+ cmodule = None
+ cname = name = obj.name
+ type_id = obj.type
+ parent_name = obj.parent_name
+ cmodule, name = split_prefix(cname, self.prefix, self.use_prefix)
+ fp.write('(define-' + base_name + ' ' + name + '\n')
+ if cmodule:
+ fp.write(' (in-module "' + cmodule + '")\n')
+ if base_name == 'object':
+ fp.write(' (parent "' + parent_name + '")\n')
+ fp.write(' (c-name "' + cname + '")\n')
+ fp.write(' (gtype-id "'
+ + typecode(cname, self.prefix, self.use_prefix) + '")\n')
+ n = ctypes.c_uint()
+ ifaces = self.gobj.g_type_interfaces(type_id, ctypes.byref(n))
+ for i in range(n.value):
+ iface_name = self.gobj.g_type_name(ifaces[i])
+ if iface_name in self.interfaces:
+ fp.write(' (implements "%s")\n' % iface_name)
+ if base_name == 'interface':
+ prereq = self.gobj.g_type_interface_prerequisites(type_id,
+ ctypes.byref(n))
+ for i in range(n.value):
+ fp.write(' (prerequisite "%s")\n'
+ % self.gobj.g_type_name(prereq[i]))
+ # should do something about accessible fields
+ fp.write(')\n\n')
+ return
+
+ def write_obj_defs(self, fp=None):
+ fp = (fp, self.fp)[not fp]
+ fp.write(';; -*- scheme -*-\n')
+ filter = self._c_names
+ for base in defkeys.split()[:4]:
+ base_name = base.lower()[1:]
+ fp.write('; %s definitions ...\n\n' % base_name)
+ for obj in self.defs[base]:
+ if not obj.name in filter:
+ self._write_obj_helper(obj, fp)
+ return
+
+ def _write_func(self, name, ret, args):
+ if len(args) >= 1:
+ # methods must have at least one argument
+ munged_name = name.replace('_', '')
+ m = type_pat.match(args[0])
+ if m:
+ obj = m.group(1)
+ if munged_name.startswith(obj.lower()):
+ if obj not in self.othernames:
+ self._write_method(obj, name, ret, args)
+ return
+ fname = name
+ if self.prefix:
+ fname = re.sub('^'+self.prefix+'_', '', fname)
+
+ # it is either a constructor or normal function
+ self.fp.write('(define-function ' + fname + '\n')
+ self.fp.write(' (c-name "' + name + '")\n')
+
+ # Asume that a constructor function name
+ # ends with '_new' and it returns an object pointer.
+ m = func_new_pat.match(name)
+ r = pointer_pat.match(ret)
+ if m and r:
+ cname = ''
+ # get the type name by using the _get_type function
+ func = m.group(1) + '_get_type'
+ lib = [l for l in self.modlib if hasattr(l, func)]
+ if lib:
+ cname = self.gobj.g_type_name(apply(getattr(lib[0], func)))
+ if cname and self.gobj.g_type_from_name(r.group(1)):
+ self.fp.write(' (is-constructor-of "' + cname + '")\n')
+ self._write_return(ret)
+ self._write_arguments(args)
+ return
+
+ def _write_method(self, obj, name, ret, args):
+ regex = ''.join([c+'_?' for c in obj.lower()])
+ mname, count = re.subn(regex, '', name, 1)
+ if not count and self.prefix:
+ mname = re.sub('^'+self.prefix+'_', '', mname)
+ self.fp.write('(define-method ' + mname + '\n')
+ self.fp.write(' (of-object "' + obj + '")\n')
+ self.fp.write(' (c-name "' + name + '")\n')
+ m = getset_pat.match(mname)
+ if self.genpropgetsets and m and len(args[1:]) <= 1:
+ prop = m.group(1)
+ if obj in self.objifacedefs:
+ oidef = self.objifacedefs[obj]
+ if prop.replace('_', '-') in oidef.props:
+ self.fp.write(' (prop-getset "' + prop + '")\n')
+ self._write_return(ret)
+ self._write_arguments(args[1:])
+ return
+
+ def _write_virt(self, obj, name, ret, args):
+ self.fp.write('(define-virtual ' + name + '\n')
+ self.fp.write(' (of-object "' + obj + '")\n')
+ self._write_return(ret)
+ self._write_arguments(args[1:])
+ return
+
+ def _write_return(self, ret):
+ if ret == 'void':
+ ret = 'none'
+ self.fp.write(' (return-type "' + ret + '")\n')
+ return
+
+ def _write_arguments(self, args):
+ if args and not 'void' in args:
+ varargs = ''
+ self.fp.write(' (parameters\n')
+ for arg in args:
+ if arg == '...':
+ varargs = ' (varargs #t)\n'
+ else:
+ tupleArg = tuple(arg.split())
+ if len(tupleArg) == 2:
+ self.fp.write(' \'("%s" "%s")\n' % tupleArg)
+ self.fp.write(' )\n' + varargs)
+ self.fp.write(')\n\n')
+
+# ---------- ctypes support classes for gobject library functions ----------
+
+GType = ctypes.c_uint
+
+class GTypeClass(ctypes.Structure):
+ _fields_ = [('g_type', GType)]
+
+class GTypeInstance(ctypes.Structure):
+ _fields_ = [('g_class', ctypes.POINTER(GTypeClass))]
+
+class EnumValue(ctypes.Structure):
+ _fields_ = [('value', ctypes.c_int),
+ ('value_name', ctypes.c_char_p),
+ ('value_nick', ctypes.c_char_p)]
+
+class FlagsValue(ctypes.Structure):
+ _fields_ = [('value', ctypes.c_uint),
+ ('value_name', ctypes.c_char_p),
+ ('value_nick', ctypes.c_char_p)]
+
+class EnumClass(ctypes.Structure):
+ _fields_ = [('g_type_class', GTypeClass),
+ ('minimum', ctypes.c_int),
+ ('maximum', ctypes.c_int),
+ ('n_values', ctypes.c_uint),
+ ('values', ctypes.POINTER(EnumValue))]
+
+class FlagsClass(ctypes.Structure):
+ _fields_ = [('g_type_class', GTypeClass),
+ ('mask', ctypes.c_uint),
+ ('n_values', ctypes.c_uint),
+ ('values', ctypes.POINTER(FlagsValue))]
+
+class GTypeInterface(ctypes.Structure):
+ _fields_ = [('g_type', GType),
+ ('g_instance_type', GType)]
+
+class GParamSpec(ctypes.Structure):
+ _fields_ = [('g_type_instance', GTypeInstance),
+ ('name', ctypes.c_char_p),
+ ('flags', ctypes.c_uint),
+ ('value_type', GType),
+ ('owner_type', GType)]
+
+# ------------------ Main function -----------------
+
+def main(args):
+ verbose = False
+ all = True
+ onlyenums = False
+ onlyobjdefs = False
+ onlyvirtuals = False
+ separate = False
+ modulename = None
+ defsfiles = []
+ libgobject = None
+ modulelibs = []
+ defines = {}
+ genpropgetsets = False
+ use_prefix = False
+ opts, args = getopt.getopt(args[1:], 'vs:m:f:D:L:l:p',
+ ['onlyenums', 'onlyobjdefs', 'onlyvirtuals',
+ 'modulename=', 'separate=',
+ 'defsfile=', 'defines=', 'genpropgetsets',
+ 'libgobject-', 'modulelib=', 'useprefix'])
+ for o, v in opts:
+ if o == '-v':
+ verbose = True
+ if o == '--onlyenums':
+ onlyenums = True
+ all = False
+ if o == '--onlyvirtuals':
+ onlyvirtuals = True
+ all = False
+ if o == '--onlyobjdefs':
+ onlyobjdefs = True
+ all = False
+ if o in ('-p', '--useprefix'):
+ use_prefix = True
+ if o == '--genpropgetsets':
+ genpropgetsets = True
+ if o in ('-s', '--separate'):
+ separate = v
+ if o in ('-m', '--modulename'):
+ modulename = v
+ if o in ('-L', '--libgobject'):
+ libgobject = v
+ if o in ('-l', '--modulelib'):
+ modulelibs.append(v)
+ if o in ('-f', '--defsfile'):
+ defsfiles.append(v)
+ if o in ('-D', '--defines'):
+ nameval = v.split('=')
+ try:
+ defines[nameval[0]] = nameval[1]
+ except IndexError:
+ defines[nameval[0]] = None
+
+ if not args[0:1]:
+ print 'Must specify at least one input file name'
+ return -1
+ if not modulelibs:
+ print 'Must specify one or more modulelib names'
+ return -1
+
+ # load the gobject and module libraries and init the gtype system
+ if not libgobject:
+ if verbose:
+ sys.stderr.write('Using "libgobject-2.0.so" as the libobject' \
+ 'library name by default\n')
+ gobj = ctypes.cdll.LoadLibrary('libgobject-2.0.so')
+ else:
+ gobj = ctypes.cdll.LoadLibrary(libgobject)
+
+ modlib = [ctypes.cdll.LoadLibrary(lib) for lib in modulelibs]
+
+ gobj.g_type_init()
+ gobj.g_type_name.restype = ctypes.c_char_p
+ gobj.g_type_from_name.argtypes = [ctypes.c_char_p]
+ gobj.g_type_interfaces.restype = ctypes.POINTER(ctypes.c_int)
+ gobj.g_type_interface_prerequisites.restype = ctypes.POINTER(ctypes.c_int)
+ gobj.g_object_class_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec))
+ gobj.g_object_interface_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec))
+ gobj.GObject = gobj.g_type_from_name('GObject')
+ gobj.g_object_new(gobj.GObject, None)
+
+ defs = {}
+ for key in defkeys.split():
+ defs[key] = []
+ defs['funcs'] = {}
+ defs['virts'] = {}
+ defs['untypedenums'] = {}
+ defs['typedefines'] = []
+
+ # read in all the object and function definitions
+ args.sort()
+ type_define_pat = re.compile(
+ r'^#define\s+([A-Z]\S+_TYPE_\S+)\s+.*[a-z]\w+_get_type.*$',
+ re.MULTILINE)
+ for filename in args:
+ buf = open(filename).read()
+ defs['typedefines'] += type_define_pat.findall(buf)
+ buf = clean_buffer(buf)
+ find_enums(buf, defs)
+ find_defs(buf, gobj, modlib, defs)
+ find_func_defs(buf, modlib, filename, defs, verbose)
+ find_virt_defs(buf, filename, defs)
+
+ for key in defkeys.split():
+ defs[key].sort()
+
+ methods = types = None
+ if separate:
+ methods = file(separate + '.defs', 'w')
+ types = file(separate + '-types.defs', 'w')
+
+ dw = DefsWriter(defs, methods, prefix=modulename, verbose=verbose,
+ defsfiles=defsfiles, defines=defines,
+ genpropgetsets=genpropgetsets, useprefix=use_prefix)
+ dw.interfaces = [i.name for i in defs['GInterface']]
+ dw.gobj = gobj
+ dw.modlib = modlib
+
+ if onlyobjdefs or all:
+ dw.write_obj_defs(types)
+ if separate:
+ print "Wrote object defs to %s-types.defs" % separate
+ if onlyenums or all:
+ dw.write_enum_defs(types)
+ if separate:
+ print "Wrote enum and flags defs to %s-types.defs" % separate
+ if onlyvirtuals or all:
+ dw.write_func_defs(args, onlyvirtuals)
+ if separate:
+ print "Wrote function and virtual defs to %s.defs" % separate
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/codegen/defsparser.py b/codegen/defsparser.py
new file mode 100644
index 0000000..37ba0a2
--- /dev/null
+++ b/codegen/defsparser.py
@@ -0,0 +1,153 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+import os, sys
+import scmexpr
+from definitions import BoxedDef, EnumDef, FlagsDef, FunctionDef, \
+ InterfaceDef, MethodDef, ObjectDef, PointerDef, VirtualDef
+
+include_path = ['.']
+
+class IncludeParser(scmexpr.Parser):
+ """A simple parser that follows include statements automatically"""
+ def include(self, input_filename):
+ global include_path
+ if os.path.isabs(input_filename):
+ filename = input_filename
+ # set self.filename to the include name, to handle recursive includes
+ oldfile = self.filename
+ self.filename = filename
+ self.startParsing()
+ self.filename = oldfile
+ else:
+ inc_path = [os.path.dirname(self.filename)] + include_path
+ for filename in [os.path.join(path_entry, input_filename)
+ for path_entry in inc_path]:
+ if not os.path.exists(filename):
+ continue
+ # set self.filename to the include name, to handle recursive includes
+ oldfile = self.filename
+ self.filename = filename
+ self.startParsing()
+ self.filename = oldfile
+ break
+ else:
+ raise IOError("%s not found in include path %s" % (input_filename, inc_path))
+
+class DefsParser(IncludeParser):
+ def __init__(self, arg, defines={}):
+ IncludeParser.__init__(self, arg)
+ self.objects = []
+ self.interfaces = []
+ self.enums = [] # enums and flags
+ self.boxes = [] # boxed types
+ self.pointers = [] # pointer types
+ self.functions = [] # functions and methods
+ self.virtuals = [] # virtual methods
+ self.c_name = {} # hash of c names of functions
+ self.methods = {} # hash of methods of particular objects
+ self.defines = defines # -Dfoo=bar options, as dictionary
+
+ def define_object(self, *args):
+ odef = apply(ObjectDef, args)
+ self.objects.append(odef)
+ self.c_name[odef.c_name] = odef
+ def define_interface(self, *args):
+ idef = apply(InterfaceDef, args)
+ self.interfaces.append(idef)
+ self.c_name[idef.c_name] = idef
+ def define_enum(self, *args):
+ edef = apply(EnumDef, args)
+ self.enums.append(edef)
+ self.c_name[edef.c_name] = edef
+ def define_flags(self, *args):
+ fdef = apply(FlagsDef, args)
+ self.enums.append(fdef)
+ self.c_name[fdef.c_name] = fdef
+ def define_boxed(self, *args):
+ bdef = apply(BoxedDef, args)
+ self.boxes.append(bdef)
+ self.c_name[bdef.c_name] = bdef
+ def define_pointer(self, *args):
+ pdef = apply(PointerDef, args)
+ self.pointers.append(pdef)
+ self.c_name[pdef.c_name] = pdef
+ def define_function(self, *args):
+ fdef = apply(FunctionDef, args)
+ self.functions.append(fdef)
+ self.c_name[fdef.c_name] = fdef
+ def define_method(self, *args):
+ mdef = apply(MethodDef, args)
+ self.functions.append(mdef)
+ self.c_name[mdef.c_name] = mdef
+ def define_virtual(self, *args):
+ vdef = apply(VirtualDef, args)
+ self.virtuals.append(vdef)
+ def merge(self, old, parmerge):
+ for obj in self.objects:
+ if old.c_name.has_key(obj.c_name):
+ obj.merge(old.c_name[obj.c_name])
+ for f in self.functions:
+ if old.c_name.has_key(f.c_name):
+ f.merge(old.c_name[f.c_name], parmerge)
+
+ def printMissing(self, old):
+ for obj in self.objects:
+ if not old.c_name.has_key(obj.c_name):
+ obj.write_defs()
+ for f in self.functions:
+ if not old.c_name.has_key(f.c_name):
+ f.write_defs()
+
+ def write_defs(self, fp=sys.stdout):
+ for obj in self.objects:
+ obj.write_defs(fp)
+ for enum in self.enums:
+ enum.write_defs(fp)
+ for boxed in self.boxes:
+ boxed.write_defs(fp)
+ for pointer in self.pointers:
+ pointer.write_defs(fp)
+ for func in self.functions:
+ func.write_defs(fp)
+
+ def find_object(self, c_name):
+ for obj in self.objects:
+ if obj.c_name == c_name:
+ return obj
+ else:
+ raise ValueError('object %r not found' % c_name)
+
+ def find_constructor(self, obj, overrides):
+ for func in self.functions:
+ if isinstance(func, FunctionDef) and \
+ func.is_constructor_of == obj.c_name and \
+ not overrides.is_ignored(func.c_name):
+ return func
+
+ def find_methods(self, obj):
+ objname = obj.c_name
+ return filter(lambda func, on=objname: isinstance(func, MethodDef) and
+ func.of_object == on, self.functions)
+
+ def find_virtuals(self, obj):
+ objname = obj.c_name
+ retval = filter(lambda func, on=objname: isinstance(func, VirtualDef) and
+ func.of_object == on, self.virtuals)
+ return retval
+
+ def find_functions(self):
+ return filter(lambda func: isinstance(func, FunctionDef) and
+ not func.is_constructor_of, self.functions)
+
+ def ifdef(self, *args):
+ if args[0] in self.defines:
+ for arg in args[1:]:
+ #print >> sys.stderr, "-----> Handling conditional definition (%s): %s" % (args[0], arg)
+ self.handle(arg)
+ else:
+ pass
+ #print >> sys.stderr, "-----> Conditional %s is not true" % (args[0],)
+
+ def ifndef(self, *args):
+ if args[0] not in self.defines:
+ for arg in args[1:]:
+ self.handle(arg)
diff --git a/codegen/docextract.py b/codegen/docextract.py
new file mode 100644
index 0000000..eff8c5e
--- /dev/null
+++ b/codegen/docextract.py
@@ -0,0 +1,448 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+'''Simple module for extracting GNOME style doc comments from C
+sources, so I can use them for other purposes.'''
+
+import sys, os, string, re
+
+__all__ = ['extract']
+
+class GtkDoc:
+ def __init__(self):
+ self.name = None
+ self.block_type = '' # The block type ('function', 'signal', 'property')
+ self.params = []
+ self.annotations = []
+ self.description = ''
+ self.ret = ('', []) # (return, annotations)
+ def set_name(self, name):
+ self.name = name
+ def set_type(self, block_type):
+ self.block_type = block_type
+ def get_type(self):
+ return self.block_type
+ def add_param(self, name, description, annotations=[]):
+ if name == '...':
+ name = 'Varargs'
+ self.params.append((name, description, annotations))
+ def append_to_last_param(self, extra):
+ self.params[-1] = (self.params[-1][0], self.params[-1][1] + extra,
+ self.params[-1][2])
+ def append_to_named_param(self, name, extra):
+ for i in range(len(self.params)):
+ if self.params[i][0] == name:
+ self.params[i] = (name, self.params[i][1] + extra,
+ self.params[i][2])
+ return
+ # fall through to adding extra parameter ...
+ self.add_param(name, extra)
+ def add_annotation(self, annotation):
+ self.annotations.append(annotation)
+ def get_annotations(self):
+ return self.annotations
+ def append_to_description(self, extra):
+ self.description = self.description + extra
+ def get_description(self):
+ return self.description
+ def add_return(self, first_line, annotations=[]):
+ self.ret = (first_line, annotations)
+ def append_to_return(self, extra):
+ self.ret = (self.ret[0] + extra, self.ret[1])
+
+comment_start_pattern = re.compile(r'^\s*/\*\*\s')
+comment_end_pattern = re.compile(r'^\s*\*+/')
+comment_line_lead_pattern = re.compile(r'^\s*\*\s*')
+comment_empty_line_pattern = re.compile(r'^\s*\**\s*$')
+function_name_pattern = re.compile(r'^([a-z]\w*)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
+signal_name_pattern = re.compile(r'^([A-Z]\w+::[a-z0-9-]+)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
+property_name_pattern = re.compile(r'^([A-Z]\w+:[a-z0-9-]+)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
+return_pattern = re.compile(r'^@?(returns:|return\s+value:)(.*\n?)$', re.IGNORECASE)
+deprecated_pattern = re.compile(r'^(deprecated\s*:\s*.*\n?)$', re.IGNORECASE)
+rename_to_pattern = re.compile(r'^(rename\s+to)\s*:\s*(.*\n?)$', re.IGNORECASE)
+param_pattern = re.compile(r'^@(\S+)\s*:(.*\n?)$')
+# Used to extract the annotations in the parameter and return descriptions
+# extracted using above [param|return]_pattern patterns.
+annotations_pattern = re.compile(r'^(?:(\s*\(.*\)\s*)*:)')
+# Used to construct the annotation lists.
+annotation_lead_pattern = re.compile(r'^\s*\(\s*(.*?)\s*\)\s*')
+
+# These patterns determine the identifier of the current comment block. They
+# are grouped in a list for easy determination of block identifiers (in
+# skip_to_identifier). The function_name_pattern should be tested for last
+# because it always matches signal and property identifiers.
+identifier_patterns = [ signal_name_pattern, property_name_pattern, function_name_pattern ]
+
+# This pattern is to match return sections that forget to have a colon (':')
+# after the initial 'Return' phrase. It is not included by default in the list
+# of final sections below because a lot of function descriptions begin with
+# 'Returns ...' and the process_description() function would stop right at that
+# first line, thinking it is a return section.
+no_colon_return_pattern = re.compile(r'^@?(returns|return\s+value)\s*(.*\n?)$', re.IGNORECASE)
+since_pattern = re.compile(r'^(since\s*:\s*.*\n?)$', re.IGNORECASE)
+
+# These patterns normally will be encountered after the description. Knowing
+# the order of their appearance is difficult so this list is used to test when
+# one begins and the other ends when processing the rest of the sections after
+# the description.
+final_section_patterns = [ return_pattern, since_pattern, deprecated_pattern, rename_to_pattern ]
+
+def parse_file(fp, doc_dict):
+ line = fp.readline()
+ while line:
+ cur_doc = GtkDoc()
+ line = skip_to_comment_block(fp, line)
+ line = skip_to_identifier(fp, line, cur_doc)
+ # See if the identifier is found (stored in the current GtkDoc by
+ # skip_to_identifier). If so, continue reading the rest of the comment
+ # block.
+ if cur_doc.name:
+ line = process_params(fp, line, cur_doc)
+ line = process_description(fp, line, cur_doc)
+ line = process_final_sections(fp, line, cur_doc)
+ # Add the current doc block to the dictionary of doc blocks.
+ doc_dict[cur_doc.name] = cur_doc
+
+# Given a list of annotations as string of the form
+# '(annotation1) (annotation2) ...' return a list of annotations of the form
+# [ (name1, value1), (name2, value2) ... ]. Not all annotations have values so
+# the values in the list of tuples could be empty ('').
+def get_annotation_list(annotations):
+ annotation_list = []
+ while annotations:
+ match = annotation_lead_pattern.match(annotations)
+ if match:
+ annotation_contents = match.group(1)
+ name, split, value = annotation_contents.strip().partition(' ')
+ annotation_list.append((name, value))
+ # Remove first occurrence to continue processing.
+ annotations = annotation_lead_pattern.sub('', annotations)
+ else:
+ break
+ return annotation_list
+
+# Given a currently read line, test that line and continue reading until the
+# beginning of a comment block is found or eof is reached. Return the last
+# read line.
+def skip_to_comment_block(fp, line):
+ while line:
+ if comment_start_pattern.match(line):
+ break
+ line = fp.readline()
+ return line
+
+# Given the current line in a comment block, continue skipping lines until a
+# non-blank line in the comment block is found or until the end of the block
+# (or eof) is reached. Returns the line where reading stopped.
+def skip_to_nonblank(fp, line):
+ while line:
+ if not comment_empty_line_pattern.match(line):
+ break
+ line = fp.readline()
+ # Stop processing if eof or end of comment block is reached.
+ if not line or comment_end_pattern.match(line):
+ break
+ return line
+
+# Given the first line of a comment block (the '/**'), see if the next
+# non-blank line is the identifier of the comment block. Stop processing if
+# the end of the block or eof is reached. Store the identifier (if there is
+# one) and its type ('function', 'signal' or 'property') in the given GtkDoc.
+# Return the line where the identifier is found or the line that stops the
+# processing (if eof or the end of the comment block is found first).
+def skip_to_identifier(fp, line, cur_doc):
+ # Skip the initial comment block line ('/**') if not eof.
+ if line: line = fp.readline()
+
+ # Now skip empty lines.
+ line = skip_to_nonblank(fp, line)
+
+ # See if the first non-blank line is the identifier.
+ if line and not comment_end_pattern.match(line):
+ # Remove the initial ' * ' in comment block line and see if there is an
+ # identifier.
+ line = comment_line_lead_pattern.sub('', line)
+ for pattern in identifier_patterns:
+ match = pattern.match(line)
+ if match:
+ # Set the GtkDoc name.
+ cur_doc.set_name(match.group(1))
+ # Get annotations and add them to the GtkDoc.
+ annotations = get_annotation_list(match.group(2))
+ for annotation in annotations:
+ cur_doc.add_annotation(annotation)
+ # Set the GtkDoc type.
+ if pattern == signal_name_pattern:
+ cur_doc.set_type('signal')
+ elif pattern == property_name_pattern:
+ cur_doc.set_type('property')
+ elif pattern == function_name_pattern:
+ cur_doc.set_type('function')
+ return line
+ return line
+
+# Given a currently read line (presumably the identifier line), read the next
+# lines, testing to see if the lines are part of parameter descriptions. If
+# so, store the parameter descriptions in the given doc block. Stop on eof and
+# return the last line that stops the processing.
+def process_params(fp, line, cur_doc):
+ # Skip the identifier line if not eof. Also skip any blank lines in the
+ # comment block. Return if eof or the end of the comment block are
+ # encountered.
+ if line: line = fp.readline()
+ line = skip_to_nonblank(fp, line)
+ if not line or comment_end_pattern.match(line):
+ return line
+
+ # Remove initial ' * ' in first non-empty comment block line.
+ line = comment_line_lead_pattern.sub('', line)
+
+ # Now process possible parameters as long as no eof or the end of the
+ # param section is not reached (which could be triggered by anything that
+ # doesn't match a '@param:..." line, even the end of the comment block).
+ match = param_pattern.match(line)
+ while line and match:
+ description = match.group(2)
+
+ # First extract the annotations from the description and save them.
+ annotations = []
+ annotation_match = annotations_pattern.match(description)
+ if annotation_match:
+ annotations = get_annotation_list(annotation_match.group(1))
+ # Remove the annotations from the description
+ description = annotations_pattern.sub('', description)
+
+ # Default to appending lines to current parameter.
+ append_func = cur_doc.append_to_last_param
+
+ # See if the return has been included as part of the parameter
+ # section and make sure that lines are added to the GtkDoc return if
+ # so.
+ if match.group(1).lower() == "returns":
+ cur_doc.add_return(description, annotations)
+ append_func = cur_doc.append_to_return
+ # If not, just add it as a regular parameter.
+ else:
+ cur_doc.add_param(match.group(1), description, annotations)
+
+ # Now read lines and append them until next parameter, beginning of
+ # description (an empty line), the end of the comment block or eof.
+ line = fp.readline()
+ while line:
+ # Stop processing if end of comment block or a blank comment line
+ # is encountered.
+ if comment_empty_line_pattern.match(line) or \
+ comment_end_pattern.match(line):
+ break
+
+ # Remove initial ' * ' in comment block line.
+ line = comment_line_lead_pattern.sub('', line)
+
+ # Break from current param processing if a new one is
+ # encountered.
+ if param_pattern.match(line): break;
+
+ # Otherwise, just append the current line and get the next line.
+ append_func(line)
+ line = fp.readline()
+
+ # Re-evaluate match for while condition
+ match = param_pattern.match(line)
+
+ # End by returning the current line.
+ return line
+
+# Having processed parameters, read the following lines into the description of
+# the current doc block until the end of the comment block, the end of file or
+# a return section is encountered.
+def process_description(fp, line, cur_doc):
+ # First skip empty lines returning on eof or end of comment block.
+ line = skip_to_nonblank(fp, line)
+ if not line or comment_end_pattern.match(line):
+ return line
+
+ # Remove initial ' * ' in non-empty comment block line.
+ line = comment_line_lead_pattern.sub('', line)
+
+ # Also remove possible 'Description:' prefix.
+ if line[:12] == 'Description:': line = line[12:]
+
+ # Used to tell if the previous line was blank and a return section
+ # uncommonly marked with 'Returns ...' instead of 'Returns: ...' has
+ # started (assume it is non-empty to begin with).
+ prev_line = 'non-empty'
+
+ # Now read lines until a new section (like a return or a since section) is
+ # encountered.
+ while line:
+ # See if the description section has ended (if the line begins with
+ # 'Returns ...' and the previous line was empty -- this loop replaces
+ # empty lines with a newline).
+ if no_colon_return_pattern.match(line) and prev_line == '\n':
+ return line
+ # Or if one of the patterns of the final sections match
+ for pattern in final_section_patterns:
+ if pattern.match(line):
+ return line
+
+ # If not, append lines to description in the doc comment block.
+ cur_doc.append_to_description(line)
+
+ prev_line = line
+ line = fp.readline()
+
+ # Stop processing on eof or at the end of comment block.
+ if not line or comment_end_pattern.match(line):
+ return line
+
+ # Remove initial ' * ' in line so that the text can be appended to the
+ # description of the comment block and make sure that if the line is
+ # empty it be interpreted as a newline.
+ line = comment_line_lead_pattern.sub('', line)
+ if not line: line = '\n'
+
+# Given the line that ended the description (the first line of one of the final
+# sections) process the final sections ('Returns:', 'Since:', etc.) until the
+# end of the comment block or eof. Return the line that ends the processing.
+def process_final_sections(fp, line, cur_doc):
+ while line and not comment_end_pattern.match(line):
+ # Remove leading ' * ' from current non-empty comment line.
+ line = comment_line_lead_pattern.sub('', line)
+ # Temporarily append the no colon return pattern to the final section
+ # patterns now that the description has been processed. It will be
+ # removed after the for loop below executes so that future descriptions
+ # that begin with 'Returns ...' are not interpreted as a return
+ # section.
+ final_section_patterns.append(no_colon_return_pattern)
+ for pattern in final_section_patterns:
+ match = pattern.match(line)
+ if match:
+ if pattern == return_pattern or \
+ pattern == no_colon_return_pattern:
+ # Dealing with a 'Returns:' so first extract the
+ # annotations from the description and save them.
+ description = match.group(2)
+ annotations = []
+ annotation_match = \
+ annotations_pattern.match(description)
+ if annotation_match:
+ annotations = \
+ get_annotation_list(annotation_match.group(1))
+ # Remove the annotations from the description
+ description = annotations_pattern.sub('', description)
+
+ # Now add the return.
+ cur_doc.add_return(description, annotations)
+ # In case more lines need to be appended.
+ append_func = cur_doc.append_to_return
+ elif pattern == rename_to_pattern:
+ # Dealing with a 'Rename to:' section (GObjectIntrospection
+ # annotation) so no further lines will be appended but this
+ # single one (and only to the annotations).
+ append_func = None
+ cur_doc.add_annotation((match.group(1),
+ match.group(2)))
+ else:
+ # For all others ('Since:' and 'Deprecated:') just append
+ # the line to the description for now.
+ cur_doc.append_to_description(line)
+ # In case more lines need to be appended.
+ append_func = cur_doc.append_to_description
+
+ # Stop final section pattern matching for loop since a match
+ # has already been found.
+ break
+
+ # Remove the no colon return pattern (which was temporarily added in
+ # the just executed loop) from the list of final section patterns.
+ final_section_patterns.pop()
+
+ line = fp.readline()
+
+ # Now continue appending lines to current section until a new one is
+ # found or an eof or the end of the comment block is encountered.
+ finished = False
+ while not finished and line and \
+ not comment_end_pattern.match(line):
+ # Remove leading ' * ' from line and make sure that if it is empty,
+ # it be interpreted as a newline.
+ line = comment_line_lead_pattern.sub('', line)
+ if not line: line = '\n'
+
+ for pattern in final_section_patterns:
+ if pattern.match(line):
+ finished = True
+ break
+
+ # Break out of loop if a new section is found (determined in above
+ # inner loop).
+ if finished: break
+
+ # Now it's safe to append line.
+ if append_func: append_func(line)
+
+ # Get the next line to continue processing.
+ line = fp.readline()
+
+ return line
+
+def parse_dir(dir, doc_dict):
+ for file in os.listdir(dir):
+ if file in ('.', '..'): continue
+ path = os.path.join(dir, file)
+ if os.path.isdir(path):
+ parse_dir(path, doc_dict)
+ if len(file) > 2 and file[-2:] == '.c':
+ sys.stderr.write("Processing " + path + '\n')
+ parse_file(open(path, 'r'), doc_dict)
+
+def extract(dirs, doc_dict=None):
+ if not doc_dict: doc_dict = {}
+ for dir in dirs:
+ parse_dir(dir, doc_dict)
+ return doc_dict
+
+tmpl_section_pattern = re.compile(r'^<!-- ##### (\w+) (\w+) ##### -->$')
+def parse_tmpl(fp, doc_dict):
+ cur_doc = None
+
+ line = fp.readline()
+ while line:
+ match = tmpl_section_pattern.match(line)
+ if match:
+ cur_doc = None # new input shouldn't affect the old doc dict
+ sect_type = match.group(1)
+ sect_name = match.group(2)
+
+ if sect_type == 'FUNCTION':
+ cur_doc = doc_dict.get(sect_name)
+ if not cur_doc:
+ cur_doc = GtkDoc()
+ cur_doc.set_name(sect_name)
+ doc_dict[sect_name] = cur_doc
+ elif line == '<!-- # Unused Parameters # -->\n':
+ cur_doc = None # don't worry about unused params.
+ elif cur_doc:
+ if line[:10] == '@Returns: ':
+ if string.strip(line[10:]):
+ cur_doc.append_to_return(line[10:])
+ elif line[0] == '@':
+ pos = string.find(line, ':')
+ if pos >= 0:
+ cur_doc.append_to_named_param(line[1:pos], line[pos+1:])
+ else:
+ cur_doc.append_to_description(line)
+ else:
+ cur_doc.append_to_description(line)
+
+ line = fp.readline()
+
+def extract_tmpl(dirs, doc_dict=None):
+ if not doc_dict: doc_dict = {}
+ for dir in dirs:
+ for file in os.listdir(dir):
+ if file in ('.', '..'): continue
+ path = os.path.join(dir, file)
+ if os.path.isdir(path):
+ continue
+ if len(file) > 2 and file[-2:] == '.sgml':
+ parse_tmpl(open(path, 'r'), doc_dict)
+ return doc_dict
diff --git a/codegen/docextract_to_xml.py b/codegen/docextract_to_xml.py
new file mode 100755
index 0000000..7ac1053
--- /dev/null
+++ b/codegen/docextract_to_xml.py
@@ -0,0 +1,139 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+#
+# This litte script outputs the C doc comments to an XML format.
+# So far it's only used by gtkmm (The C++ bindings). Murray Cumming.
+# Usage example:
+# # ./docextract_to_xml.py -s /gnome/head/cvs/gtk+/gtk/ -s /gnome/head/cvs/gtk+/docs/reference/gtk/tmpl/ > gtk_docs.xml
+
+import getopt
+import re
+import string
+import sys
+
+import docextract
+
+def usage():
+ sys.stderr.write('usage: docextract_to_xml.py ' +
+ '[-s /src/dir | --source-dir=/src/dir] ' +
+ '[-a | --with-annotations] [-p | --with-properties] ' +
+ '[-i | --with-signals ]\n')
+ sys.exit(1)
+
+# Translates special texts to &... HTML acceptable format. Also replace
+# occurrences of '/*' and '*/' with '/ *' and '* /' respectively to avoid
+# comment errors (note the spaces). Some function descriptions include C++
+# multi-line comments which cause errors when the description is included in a
+# C++ Doxygen comment block.
+def escape_text(unescaped_text):
+ # Escape every "&" not part of an entity reference
+ escaped_text = re.sub(r'&(?![A-Za-z]+;)', '&amp;', unescaped_text)
+
+ # These weird entities turn up in the output...
+ escaped_text = string.replace(escaped_text, '&mdash;', '&#8212;')
+ escaped_text = string.replace(escaped_text, '&ast;', '*')
+ escaped_text = string.replace(escaped_text, '&percnt;', '%')
+ escaped_text = string.replace(escaped_text, '&commat;', '@')
+ escaped_text = string.replace(escaped_text, '&num;', '&#35;')
+ escaped_text = string.replace(escaped_text, '&nbsp;', '&#160;')
+ # This represents a '/' before or after an '*' so replace with slash but
+ # with spaces.
+ escaped_text = string.replace(escaped_text, '&sol;', ' / ')
+
+ # Escape for both tag contents and attribute values
+ escaped_text = string.replace(escaped_text, '<', '&lt;')
+ escaped_text = string.replace(escaped_text, '>', '&gt;')
+ escaped_text = string.replace(escaped_text, '"', '&quot;')
+
+ # Replace C++ comment begin and ends to ones that don't affect Doxygen.
+ escaped_text = string.replace(escaped_text, '/*', '/ *')
+ escaped_text = string.replace(escaped_text, '*/', '* /')
+
+ return escaped_text
+
+def print_annotations(annotations):
+ for annotation in annotations:
+ print "<annotation name=" + annotation[0] + ">" + \
+ escape_text(annotation[1]) + "</annotation>"
+
+if __name__ == '__main__':
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "d:s:o:api",
+ ["source-dir=", "with-annotations",
+ "with-properties", "with-signals"])
+ except getopt.error, e:
+ sys.stderr.write('docextract_to_xml.py: %s\n' % e)
+ usage()
+ source_dirs = []
+ with_annotations = False
+ with_signals = False
+ with_properties = False
+ for opt, arg in opts:
+ if opt in ('-s', '--source-dir'):
+ source_dirs.append(arg)
+ if opt in ('-a', '--with-annotations'):
+ with_annotations = True
+ if opt in ('-p', '--with-properties'):
+ with_properties = True
+ if opt in ('-i', '--with-signals'):
+ with_signals = True
+ if len(args) != 0:
+ usage()
+
+ docs = docextract.extract(source_dirs);
+ docextract.extract_tmpl(source_dirs, docs); #Try the tmpl sgml files too.
+
+ # print d.docs
+
+ if docs:
+
+ print "<root>"
+
+ for name, value in docs.items():
+ # Get the type of comment block ('function', 'signal' or
+ # 'property') (the value is a GtkDoc).
+ block_type = value.get_type()
+
+ # Skip signals if the option was not specified.
+ if block_type == 'signal' and not with_signals:
+ continue
+ # Likewise for properties.
+ elif block_type == 'property' and not with_properties:
+ continue
+
+ print "<" + block_type + " name=\"" + escape_text(name) + "\">"
+
+ print "<description>"
+ print escape_text(value.get_description())
+ print "</description>"
+
+ # Loop through the parameters if not dealing with a property:
+ if block_type != 'property':
+ print "<parameters>"
+ for name, description, annotations in value.params:
+ print "<parameter name=\"" + escape_text(name) + "\">"
+ print "<parameter_description>" + escape_text(description) + "</parameter_description>"
+
+ if with_annotations:
+ print_annotations(annotations)
+
+ print "</parameter>"
+
+ print "</parameters>"
+
+ # Show the return-type (also if not dealing with a property):
+ if with_annotations:
+ print "<return>"
+ print "<return_description>" + escape_text(value.ret[0]) + \
+ "</return_description>"
+ print_annotations(value.ret[1])
+ print "</return>"
+ else:
+ print "<return>" + escape_text(value.ret[0]) + "</return>"
+
+ if with_annotations:
+ print_annotations(value.get_annotations())
+
+ print "</" + block_type + ">\n"
+
+ print "</root>"
diff --git a/codegen/docgen.py b/codegen/docgen.py
new file mode 100755
index 0000000..b9e2f67
--- /dev/null
+++ b/codegen/docgen.py
@@ -0,0 +1,766 @@
+#!/usr/bin/env python
+import getopt
+import os
+import re
+import sys
+
+import definitions
+import defsparser
+import docextract
+import override
+
+
+class Node:
+
+ def __init__(self, name, interfaces=[]):
+ self.name = name
+ self.interfaces = interfaces
+ self.subclasses = []
+
+ def add_child(self, node):
+ self.subclasses.append(node)
+
+
+def build_object_tree(parser):
+ # reorder objects so that parent classes come first ...
+ objects = parser.objects[:]
+ pos = 0
+ while pos < len(objects):
+ parent = objects[pos].parent
+ for i in range(pos+1, len(objects)):
+ if objects[i].c_name == parent:
+ objects.insert(i+1, objects[pos])
+ del objects[pos]
+ break
+ else:
+ pos = pos + 1
+
+ root = Node(None)
+ nodes = {None: root}
+ for obj_def in objects:
+ parent_name = obj_def.parent
+ if parent_name == 'GObject':
+ parent_name = None
+ parent_node = nodes[parent_name]
+ node = Node(obj_def.c_name, obj_def.implements)
+ parent_node.add_child(node)
+ nodes[node.name] = node
+
+ if parser.interfaces:
+ interfaces = Node('gobject.GInterface')
+ root.add_child(interfaces)
+ nodes[interfaces.name] = interfaces
+ for obj_def in parser.interfaces:
+ node = Node(obj_def.c_name)
+ interfaces.add_child(node)
+ nodes[node.name] = node
+
+ if parser.boxes:
+ boxed = Node('gobject.GBoxed')
+ root.add_child(boxed)
+ nodes[boxed.name] = boxed
+ for obj_def in parser.boxes:
+ node = Node(obj_def.c_name)
+ boxed.add_child(node)
+ nodes[node.name] = node
+
+ if parser.pointers:
+ pointers = Node('gobject.GPointer')
+ root.add_child(pointers)
+ nodes[pointers.name] = pointers
+ for obj_def in parser.pointers:
+ node = Node(obj_def.c_name)
+ pointers.add_child(node)
+ nodes[node.name] = node
+
+ return root
+
+
+class DocWriter:
+
+ def __init__(self):
+ self._fp = None
+ # parse the defs file
+ self.parser = defsparser.DefsParser(())
+ self.overrides = override.Overrides()
+ self.classmap = {}
+ self.docs = {}
+
+ def add_sourcedirs(self, source_dirs):
+ self.docs = docextract.extract(source_dirs, self.docs)
+
+ def add_tmpldirs(self, tmpl_dirs):
+ self.docs = docextract.extract_tmpl(tmpl_dirs, self.docs)
+
+ def add_docs(self, defs_file, overrides_file, module_name):
+ '''parse information about a given defs file'''
+ self.parser.filename = defs_file
+ self.parser.startParsing(defs_file)
+ if overrides_file:
+ self.overrides.handle_file(overrides_file)
+
+ for obj in (self.parser.objects + self.parser.interfaces +
+ self.parser.boxes + self.parser.pointers):
+ if not obj.c_name in self.classmap:
+ self.classmap[obj.c_name] = '%s.%s' % (
+ module_name, obj.name)
+
+ def pyname(self, name):
+ return self.classmap.get(name, name)
+
+ def _compare(self, obja, objb):
+ return cmp(self.pyname(obja.c_name), self.pyname(objb.c_name))
+
+ def output_docs(self, output_prefix):
+ files = {}
+
+ # class hierarchy
+ hierarchy = build_object_tree(self.parser)
+ filename = self.create_filename('hierarchy', output_prefix)
+ self._fp = open(filename, 'w')
+ self.write_full_hierarchy(hierarchy)
+ self._fp.close()
+
+ obj_defs = (self.parser.objects + self.parser.interfaces +
+ self.parser.boxes + self.parser.pointers)
+ obj_defs.sort(self._compare)
+
+ for obj_def in obj_defs:
+ filename = self.create_filename(obj_def.c_name, output_prefix)
+ self._fp = open(filename, 'w')
+ if isinstance(obj_def, definitions.ObjectDef):
+ self.output_object_docs(obj_def)
+ elif isinstance(obj_def, definitions.InterfaceDef):
+ self.output_interface_docs(obj_def)
+ elif isinstance(obj_def, definitions.BoxedDef):
+ self.output_boxed_docs(obj_def)
+ elif isinstance(obj_def, definitions.PointerDef):
+ self.output_boxed_docs(obj_def)
+ self._fp.close()
+ files[os.path.basename(filename)] = obj_def
+
+ if not files:
+ return
+
+ output_filename = self.create_toc_filename(output_prefix)
+ self._fp = open(output_filename, 'w')
+ self.output_toc(files)
+ self._fp.close()
+
+ def output_object_docs(self, obj_def):
+ self.write_class_header(obj_def.c_name)
+
+ self.write_heading('Synopsis')
+ self.write_synopsis(obj_def)
+ self.close_section()
+
+ # construct the inheritence hierarchy ...
+ ancestry = [(obj_def.c_name, obj_def.implements)]
+ try:
+ parent = obj_def.parent
+ while parent != None:
+ if parent == 'GObject':
+ ancestry.append(('GObject', []))
+ parent = None
+ else:
+ parent_def = self.parser.find_object(parent)
+ ancestry.append((parent_def.c_name, parent_def.implements))
+ parent = parent_def.parent
+ except ValueError:
+ pass
+ ancestry.reverse()
+ self.write_heading('Ancestry')
+ self.write_hierarchy(obj_def.c_name, ancestry)
+ self.close_section()
+
+ constructor = self.parser.find_constructor(obj_def, self.overrides)
+ if constructor:
+ self.write_heading('Constructor')
+ self.write_constructor(constructor,
+ self.docs.get(constructor.c_name, None))
+ self.close_section()
+
+ methods = self.parser.find_methods(obj_def)
+ methods = filter(lambda meth, self=self:
+ not self.overrides.is_ignored(meth.c_name), methods)
+ if methods:
+ self.write_heading('Methods')
+ for method in methods:
+ self.write_method(method, self.docs.get(method.c_name, None))
+ self.close_section()
+
+ self.write_class_footer(obj_def.c_name)
+
+ def get_methods_for_object(self, obj_def):
+ methods = []
+ for method in self.parser.find_methods(obj_def):
+ if not self.overrides.is_ignored(method.c_name):
+ methods.append(method)
+ return methods
+
+ def output_interface_docs(self, int_def):
+ self.write_class_header(int_def.c_name)
+
+ self.write_heading('Synopsis')
+ self.write_synopsis(int_def)
+ self.close_section()
+
+ methods = self.get_methods_for_object(int_def)
+ if methods:
+ self.write_heading('Methods')
+ for method in methods:
+ self.write_method(method, self.docs.get(method.c_name, None))
+ self.close_section()
+ self.write_class_footer(int_def.c_name)
+
+ def output_boxed_docs(self, box_def):
+ self.write_class_header(box_def.c_name)
+
+ self.write_heading('Synopsis')
+ self.write_synopsis(box_def)
+ self.close_section()
+
+ constructor = self.parser.find_constructor(box_def, self.overrides)
+ if constructor:
+ self.write_heading('Constructor')
+ self.write_constructor(constructor,
+ self.docs.get(constructor.c_name, None))
+ self.close_section()
+
+ methods = self.get_methods_for_object(box_def)
+ if methods:
+ self.write_heading('Methods')
+ for method in methods:
+ self.write_method(method, self.docs.get(method.c_name, None))
+ self.close_section()
+
+ self.write_class_footer(box_def.c_name)
+
+ def output_toc(self, files):
+ self._fp.write('TOC\n\n')
+ for filename in sorted(files):
+ obj_def = files[filename]
+ self._fp.write(obj_def.c_name + ' - ' + filename + '\n')
+
+ # override the following to create a more complex output format
+
+ def create_filename(self, obj_name, output_prefix):
+ '''Create output filename for this particular object'''
+ return output_prefix + '-' + obj_name.lower() + '.txt'
+
+ def create_toc_filename(self, output_prefix):
+ return self.create_filename(self, 'docs', output_prefix)
+
+ def write_full_hierarchy(self, hierarchy):
+
+ def handle_node(node, indent=''):
+ for child in node.subclasses:
+ self._fp.write(indent + node.name)
+ if node.interfaces:
+ self._fp.write(' (implements ')
+ self._fp.write(', '.join(node.interfaces))
+ self._fp.write(')\n')
+ else:
+ self._fp.write('\n')
+ handle_node(child, indent + ' ')
+ handle_node(hierarchy)
+
+ def serialize_params(self, func_def):
+ params = []
+ for param in func_def.params:
+ params.append(param[1])
+ return ', '.join(params)
+
+ # these need to handle default args ...
+
+ def create_constructor_prototype(self, func_def):
+ return '%s(%s)' % (func_def.is_constructor_of,
+ self.serialize_params(func_def))
+
+ def create_function_prototype(self, func_def):
+ return '%s(%s)' % (func_def.name,
+ self.serialize_params(func_def))
+
+ def create_method_prototype(self, meth_def):
+ return '%s.%s(%s)' % (meth_def.of_object,
+ meth_def.name,
+ self.serialize_params(meth_def))
+
+ def write_class_header(self, obj_name):
+ self._fp.write('Class %s\n' % obj_name)
+ self._fp.write('======%s\n\n' % ('=' * len(obj_name)))
+
+ def write_class_footer(self, obj_name):
+ pass
+
+ def write_heading(self, text):
+ self._fp.write('\n' + text + '\n' + ('-' * len(text)) + '\n')
+
+ def close_section(self):
+ pass
+
+ def write_synopsis(self, obj_def):
+ self._fp.write('class %s' % obj_def.c_name)
+ if isinstance(obj_def, definitions.ObjectDef):
+ bases = []
+ if obj_def.parent:
+ bases.append(obj_def.parent)
+ bases = bases = obj_def.implements
+ if bases:
+ self._fp.write('(%s)' % ', '.join(bases, ))
+ self._fp.write(':\n')
+
+ constructor = self.parser.find_constructor(obj_def, self.overrides)
+ if constructor:
+ prototype = self.create_constructor_prototype(constructor)
+ self._fp.write(' def %s\n' % prototype)
+
+ for method in self.get_methods_for_object(obj_def):
+ prototype = self.create_method_prototype(method)
+ self._fp.write(' def %s\n' % prototype)
+
+ def write_hierarchy(self, obj_name, ancestry):
+ indent = ''
+ for name, interfaces in ancestry:
+ self._fp.write(indent + '+-- ' + name)
+ if interfaces:
+ self._fp.write(' (implements ')
+ self._fp.write(', '.join(interfaces))
+ self._fp.write(')\n')
+ else:
+ self._fp.write('\n')
+ indent = indent + ' '
+ self._fp.write('\n')
+
+ def write_constructor(self, func_def, func_doc):
+ prototype = self.create_constructor_prototype(func_def)
+ self._fp.write(prototype + '\n\n')
+ for type, name, dflt, null in func_def.params:
+ self.write_parameter(name, func_doc)
+ self.write_return_value(func_def, func_doc)
+ if func_doc and func_doc.description:
+ self._fp.write(func_doc.description)
+ self._fp.write('\n\n\n')
+
+ def write_method(self, meth_def, func_doc):
+ prototype = self.create_method_prototype(meth_def)
+ self._fp.write(prototype + '\n\n')
+ for type, name, dflt, null in meth_def.params:
+ self.write_parameter(name, func_doc)
+ self.write_return_value(meth_def, func_doc)
+ if func_doc and func_doc.description:
+ self._fp.write('\n')
+ self._fp.write(func_doc.description)
+ self._fp.write('\n\n')
+
+ def write_parameter(self, param_name, func_doc):
+ if func_doc:
+ descr = func_doc.get_param_description(param_name)
+ else:
+ descr = 'a ' + type
+ self._fp.write(' ' + param_name + ': ' + descr + '\n')
+
+ def write_return_value(self, meth_def, func_doc):
+ if meth_def.ret and meth_def.ret != 'none':
+ if func_doc and func_doc.ret:
+ descr = func_doc.ret
+ else:
+ descr = 'a ' + meth_def.ret
+ self._fp.write(' Returns: ' + descr + '\n')
+
+CLASS_HEADER_TEMPLATE = """<refentry id="%(entryid)s">
+ <refmeta>
+ <refentrytitle>%(name)s</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo>%(miscinfo)s</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>%(name)s</refname><refpurpose></refpurpose>
+ </refnamediv>
+
+"""
+VARIABLE_TEMPLATE = """<varlistentry>
+ <term><parameter>%(parameter)s</parameter>&nbsp;:</term>
+ <listitem><simpara>%(description)s</simpara></listitem>
+ </varlistentry>
+"""
+
+DOCBOOK_HEADER = """<?xml version="1.0" standalone="no"?>
+<!DOCTYPE synopsis PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+"""
+
+
+class DocbookDocWriter(DocWriter):
+
+ def __init__(self):
+ DocWriter.__init__(self)
+
+ self._function_pat = re.compile(r'(\w+)\s*\(\)')
+ self._parameter_pat = re.compile(r'\@(\w+)')
+ self._constant_pat = re.compile(r'\%(-?\w+)')
+ self._symbol_pat = re.compile(r'#([\w-]+)')
+
+ self._transtable = ['-'] * 256
+ # make string -> reference translation func
+ for digit in '0123456789':
+ self._transtable[ord(digit)] = digit
+
+ for letter in 'abcdefghijklmnopqrstuvwxyz':
+ self._transtable[ord(letter)] = letter
+ self._transtable[ord(letter.upper())] = letter
+ self._transtable = ''.join(self._transtable)
+
+ def create_filename(self, obj_name, output_prefix):
+ '''Create output filename for this particular object'''
+ stem = output_prefix + '-' + obj_name.lower()
+ return stem + '.xml'
+
+ def create_toc_filename(self, output_prefix):
+ return self.create_filename('classes', output_prefix)
+
+ def make_class_ref(self, obj_name):
+ return 'class-' + obj_name.translate(self._transtable)
+
+ def make_method_ref(self, meth_def):
+ return 'method-%s--%s' % (
+ meth_def.of_object.translate(self._transtable),
+ meth_def.name.translate(self._transtable))
+
+ def _format_function(self, match):
+ info = self.parser.c_name.get(match.group(1), None)
+ if info:
+ if isinstance(info, defsparser.FunctionDef):
+ return self._format_funcdef(info)
+ if isinstance(info, defsparser.MethodDef):
+ return self._format_method(info)
+
+ # fall through through
+ return '<function>%s()</function>' % (match.group(1), )
+
+ def _format_funcdef(self, info):
+ if info.is_constructor_of is not None:
+ # should have a link here
+ return '<methodname>%s()</methodname>' % (
+ self.pyname(info.is_constructor_of), )
+ else:
+ return '<function>%s()</function>' % (info.name, )
+
+ def _format_param(self, match):
+ return '<parameter>%s</parameterdliteral>' % (match.group(1), )
+
+ def _format_const(self, match):
+ return '<literal>%s</literal>' % (match.group(1), )
+
+ def _format_method(self, info):
+ return ('<link linkend="%s">'
+ '<methodname>%s.%s</methodname>'
+ '</link>') % (self.make_method_ref(info),
+ self.pyname(info.of_object),
+ info.name)
+
+ def _format_object(self, info):
+ return ('<link linkend="%s">'
+ '<classname>%s</classname>'
+ '</link>') % (self.make_class_ref(info.c_name),
+ self.pyname(info.c_name))
+
+ def _format_symbol(self, match):
+ info = self.parser.c_name.get(match.group(1), None)
+ if info:
+ if isinstance(info, defsparser.FunctionDef):
+ return self._format_funcdef(info)
+ elif isinstance(info, defsparser.MethodDef):
+ return self._format_method(info)
+ elif isinstance(info, (defsparser.ObjectDef,
+ defsparser.InterfaceDef,
+ defsparser.BoxedDef,
+ defsparser.PointerDef)):
+ return self._format_object(info)
+
+ # fall through through
+ return '<literal>%s</literal>' % (match.group(1), )
+
+ def reformat_text(self, text, singleline=0):
+ # replace special strings ...
+ text = self._function_pat.sub(self._format_function, text)
+ text = self._parameter_pat.sub(self._format_param, text)
+ text = self._constant_pat.sub(self._format_const, text)
+ text = self._symbol_pat.sub(self._format_symbol, text)
+
+ # don't bother with <para> expansion for single line text.
+ if singleline:
+ return text
+
+ lines = text.strip().split('\n')
+ for index in range(len(lines)):
+ if lines[index].strip() == '':
+ lines[index] = '</para>\n<para>'
+ continue
+ return '<para>%s</para>' % ('\n'.join(lines), )
+
+ # write out hierarchy
+
+ def write_full_hierarchy(self, hierarchy):
+
+ def handle_node(node, indent=''):
+ if node.name:
+ self._fp.write('%s<link linkend="%s">%s</link>' %
+ (indent, self.make_class_ref(node.name),
+ self.pyname(node.name)))
+ if node.interfaces:
+ self._fp.write(' (implements ')
+ for i in range(len(node.interfaces)):
+ self._fp.write('<link linkend="%s">%s</link>' %
+ (self.make_class_ref(node.interfaces[i]),
+ self.pyname(node.interfaces[i])))
+ if i != len(node.interfaces) - 1:
+ self._fp.write(', ')
+ self._fp.write(')\n')
+ else:
+ self._fp.write('\n')
+
+ indent = indent + ' '
+ node.subclasses.sort(lambda a, b:
+ cmp(self.pyname(a.name), self.pyname(b.name)))
+ for child in node.subclasses:
+ handle_node(child, indent)
+
+ self._fp.write(DOCBOOK_HEADER)
+ self._fp.write('<synopsis>')
+ handle_node(hierarchy)
+ self._fp.write('</synopsis>\n')
+
+ # these need to handle default args ...
+
+ def create_constructor_prototype(self, func_def):
+ xml = ['<constructorsynopsis language="python">\n']
+ xml.append(' <methodname>__init__</methodname>\n')
+ for type, name, dflt, null in func_def.params:
+ xml.append(' <methodparam><parameter>')
+ xml.append(name)
+ xml.append('</parameter>')
+ if dflt:
+ xml.append('<initializer>')
+ xml.append(dflt)
+ xml.append('</initializer>')
+ xml.append('</methodparam>\n')
+ if not func_def.params:
+ xml.append(' <methodparam></methodparam>')
+ xml.append(' </constructorsynopsis>')
+ return ''.join(xml)
+
+ def create_function_prototype(self, func_def):
+ xml = ['<funcsynopsis language="python">\n <funcprototype>\n']
+ xml.append(' <funcdef><function>')
+ xml.append(func_def.name)
+ xml.append('</function></funcdef>\n')
+ for type, name, dflt, null in func_def.params:
+ xml.append(' <paramdef><parameter>')
+ xml.append(name)
+ xml.append('</parameter>')
+ if dflt:
+ xml.append('<initializer>')
+ xml.append(dflt)
+ xml.append('</initializer>')
+ xml.append('</paramdef>\n')
+ if not func_def.params:
+ xml.append(' <paramdef></paramdef')
+ xml.append(' </funcprototype>\n </funcsynopsis>')
+ return ''.join(xml)
+
+ def create_method_prototype(self, meth_def, addlink=0):
+ xml = ['<methodsynopsis language="python">\n']
+ xml.append(' <methodname>')
+ if addlink:
+ xml.append('<link linkend="%s">' % self.make_method_ref(meth_def))
+ xml.append(self.pyname(meth_def.name))
+ if addlink:
+ xml.append('</link>')
+ xml.append('</methodname>\n')
+ for type, name, dflt, null in meth_def.params:
+ xml.append(' <methodparam><parameter>')
+ xml.append(name)
+ xml.append('</parameter>')
+ if dflt:
+ xml.append('<initializer>')
+ xml.append(dflt)
+ xml.append('</initializer>')
+ xml.append('</methodparam>\n')
+ if not meth_def.params:
+ xml.append(' <methodparam></methodparam>')
+ xml.append(' </methodsynopsis>')
+ return ''.join(xml)
+
+ def write_class_header(self, obj_name):
+ self._fp.write(DOCBOOK_HEADER)
+ self._fp.write(CLASS_HEADER_TEMPLATE % dict(
+ entryid=self.make_class_ref(obj_name),
+ name=self.pyname(obj_name),
+ miscinfo="PyGTK Docs"))
+
+ def write_class_footer(self, obj_name):
+ self._fp.write('</refentry>\n')
+
+ def write_heading(self, text):
+ self._fp.write(' <refsect1>\n')
+ self._fp.write(' <title>' + text + '</title>\n\n')
+
+ def close_section(self):
+ self._fp.write(' </refsect1>\n')
+
+ def write_synopsis(self, obj_def):
+ self._fp.write('<classsynopsis language="python">\n')
+ self._fp.write(' <ooclass><classname>%s</classname></ooclass>\n'
+ % self.pyname(obj_def.c_name))
+ if isinstance(obj_def, definitions.ObjectDef):
+ if obj_def.parent:
+ self._fp.write(' <ooclass><classname><link linkend="%s">%s'
+ '</link></classname></ooclass>\n'
+ % (self.make_class_ref(obj_def.parent),
+ self.pyname(obj_def.parent)))
+ for base in obj_def.implements:
+ self._fp.write(' <ooclass><classname><link linkend="%s">%s'
+ '</link></classname></ooclass>\n'
+ % (self.make_class_ref(base), self.pyname(base)))
+ elif isinstance(obj_def, definitions.InterfaceDef):
+ self._fp.write(' <ooclass><classname>gobject.GInterface'
+ '</classname></ooclass>\n')
+ elif isinstance(obj_def, definitions.BoxedDef):
+ self._fp.write(' <ooclass><classname>gobject.GBoxed'
+ '</classname></ooclass>\n')
+ elif isinstance(obj_def, definitions.PointerDef):
+ self._fp.write(' <ooclass><classname>gobject.GPointer'
+ '</classname></ooclass>\n')
+
+ constructor = self.parser.find_constructor(obj_def, self.overrides)
+ if constructor:
+ self._fp.write(
+ '%s\n' % self.create_constructor_prototype(constructor))
+ for method in self.get_methods_for_object(obj_def):
+ self._fp.write(
+ '%s\n' % self.create_method_prototype(method, addlink=1))
+ self._fp.write('</classsynopsis>\n\n')
+
+ def write_hierarchy(self, obj_name, ancestry):
+ self._fp.write('<synopsis>')
+ indent = ''
+ for name, interfaces in ancestry:
+ self._fp.write(
+ '%s+-- <link linkend="%s">%s</link>' %
+ (indent, self.make_class_ref(name), self.pyname(name)))
+ if interfaces:
+ self._fp.write(' (implements ')
+ for i in range(len(interfaces)):
+ self._fp.write('<link linkend="%s">%s</link>' %
+ (self.make_class_ref(interfaces[i]),
+ self.pyname(interfaces[i])))
+ if i != len(interfaces) - 1:
+ self._fp.write(', ')
+ self._fp.write(')\n')
+ else:
+ self._fp.write('\n')
+ indent = indent + ' '
+ self._fp.write('</synopsis>\n\n')
+
+ def write_params(self, params, ret, func_doc):
+ if not params and (not ret or ret == 'none'):
+ return
+ self._fp.write(' <variablelist>\n')
+ for type, name, dflt, null in params:
+ if func_doc:
+ descr = func_doc.get_param_description(name).strip()
+ else:
+ descr = 'a ' + type
+ self._fp.write(VARIABLE_TEMPLATE % dict(
+ parameter=name,
+ description=self.reformat_text(descr, singleline=1)))
+ if ret and ret != 'none':
+ if func_doc and func_doc.ret:
+ descr = func_doc.ret.strip()
+ else:
+ descr = 'a ' + ret
+ self._fp.write(VARIABLE_TEMPLATE % dict(
+ parameter='Returns',
+ description=self.reformat_text(descr, singleline=1)))
+ self._fp.write(' </variablelist>\n')
+
+ def write_constructor(self, func_def, func_doc):
+ prototype = self.create_constructor_prototype(func_def)
+ self._fp.write('<programlisting>%s</programlisting>\n' % prototype)
+ self.write_params(func_def.params, func_def.ret, func_doc)
+
+ if func_doc and func_doc.description:
+ self._fp.write(self.reformat_text(func_doc.description))
+ self._fp.write('\n\n\n')
+
+ def write_method(self, meth_def, func_doc):
+ self._fp.write(' <refsect2 id="%s">\n' % (
+ self.make_method_ref(meth_def), ))
+ self._fp.write(' <title>%s.%s</title>\n\n' % (
+ self.pyname(meth_def.of_object),
+ meth_def.name))
+ prototype = self.create_method_prototype(meth_def)
+ self._fp.write('<programlisting>%s</programlisting>\n' % prototype)
+ self.write_params(meth_def.params, meth_def.ret, func_doc)
+ if func_doc and func_doc.description:
+ self._fp.write(self.reformat_text(func_doc.description))
+ self._fp.write(' </refsect2>\n\n\n')
+
+ def output_toc(self, files, fp=sys.stdout):
+ self._fp.write(DOCBOOK_HEADER)
+
+ #self._fp.write('<reference id="class-reference">\n')
+ #self._fp.write(' <title>Class Documentation</title>\n')
+ #for filename, obj_def in files:
+ # self._fp.write('&' +
+ # obj_def.c_name.translate(self._transtable) + ';\n')
+ #self._fp.write('</reference>\n')
+
+ self._fp.write('<reference id="class-reference" '
+ 'xmlns:xi="http://www.w3.org/2001/XInclude">\n')
+ self._fp.write(' <title>Class Reference</title>\n')
+ for filename in sorted(files):
+ self._fp.write(' <xi:include href="%s"/>\n' % filename)
+ self._fp.write('</reference>\n')
+
+
+def main(args):
+ try:
+ opts, args = getopt.getopt(args[1:], "d:s:o:",
+ ["defs-file=", "override=", "source-dir=",
+ "output-prefix="])
+ except getopt.error, e:
+ sys.stderr.write('docgen.py: %s\n' % e)
+ sys.stderr.write(
+ 'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n')
+ return 1
+
+ defs_file = None
+ overrides_file = None
+ source_dirs = []
+ output_prefix = 'docs'
+ for opt, arg in opts:
+ if opt in ('-d', '--defs-file'):
+ defs_file = arg
+ if opt in ('--override', ):
+ overrides_file = arg
+ elif opt in ('-s', '--source-dir'):
+ source_dirs.append(arg)
+ elif opt in ('-o', '--output-prefix'):
+ output_prefix = arg
+ if len(args) != 0 or not defs_file:
+ sys.stderr.write(
+ 'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n')
+ return 1
+
+ d = DocbookDocWriter()
+ d.add_sourcedirs(source_dirs)
+ d.add_docs(defs_file, overrides_file, 'gio')
+ d.output_docs(output_prefix)
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/codegen/h2def.py b/codegen/h2def.py
new file mode 100755
index 0000000..17617fa
--- /dev/null
+++ b/codegen/h2def.py
@@ -0,0 +1,631 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# GPL'ed
+# Toby D. Reeves <toby@max.rl.plh.af.mil>
+#
+# Modified by James Henstridge <james@daa.com.au> to output stuff in
+# Havoc's new defs format. Info on this format can be seen at:
+# http://mail.gnome.org/archives/gtk-devel-list/2000-January/msg00070.html
+# Updated to be PEP-8 compatible and refactored to use OOP
+#
+# Scan the given public .h files of a GTK module (or module using
+# GTK object conventions) and generates a set of scheme defs.
+#
+# h2def searches through a header file looking for function prototypes and
+# generates a scheme style defenition for each prototype.
+# Basically the operation of h2def is:
+#
+# - read each .h file into a buffer which is scrubbed of extraneous data
+# - find all object defenitions:
+# - find all structures that may represent a GtkObject
+# - find all structures that might represent a class
+# - find all structures that may represent a GtkObject subclass
+# - find all structures that might represent a class/Iface inherited from
+# GTypeInterface
+# - find all enum defenitions
+# - write out the defs
+#
+# The command line options are:
+#
+# -s --separate Create separate files for objects and function/method defs
+# using the given name as the base name (optional). If this
+# is not specified the combined object and function defs
+# will be output to sys.stdout.
+# -f --defsfilter Extract defs from the given file to filter the output defs
+# that is don't output defs that are defined in the
+# defsfile. More than one deffile may be specified.
+# -m --modulename The prefix to be stripped from the front of function names
+# for the given module
+# -n --namespace The module or namespace name to be used, for example
+# WebKit where h2def is unable to detect the module name
+# automatically. it also sets the gtype-id prefix.
+# --onlyenums Only produce defs for enums and flags
+# --onlyobjdefs Only produce defs for objects
+# -v Verbose output
+#
+# Examples:
+#
+# python h2def.py /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs
+#
+# - Outputs all defs for the pango module.
+#
+# python h2def.py -m gdk -s /tmp/gdk-2.10 \
+# -f /usr/tmp/pygtk/gtk/gdk-base.defs \
+# /usr/local/include/gtk-2.0/gdk/*.h \
+# /usr/local/include/gtk-2.0/gdk-pixbuf/*.h
+#
+# - Outputs the gdk module defs that are not contained in the defs file
+# /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created:
+# /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs.
+#
+# python h2def.py -n WebKit /usr/incude/webkit-1.0/webkit/*.h \
+# >/tmp/webkit.defs
+#
+# - Outputs all the defs for webkit module, setting the module name to WebKit
+# and the gtype-id prefix to WEBKIT_ which can't be detected automatically.
+#
+
+import getopt
+import os
+import re
+import string
+import sys
+
+import defsparser
+
+# ------------------ Create typecodes from typenames ---------
+
+_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
+_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
+_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
+
+def to_upper_str(name):
+ """Converts a typename to the equivalent upercase and underscores
+ name. This is used to form the type conversion macros and enum/flag
+ name variables"""
+ name = _upperstr_pat1.sub(r'\1_\2', name)
+ name = _upperstr_pat2.sub(r'\1_\2', name)
+ name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
+ return string.upper(name)
+
+def typecode(typename, namespace=None):
+ """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
+ if namespace:
+ return string.replace(string.upper(namespace) + "_" + to_upper_str(typename[len(namespace):]), '_', '_TYPE_', 1)
+
+ return string.replace(to_upper_str(typename), '_', '_TYPE_', 1)
+
+
+# ------------------ Find object definitions -----------------
+# Strips the comments from buffer
+def strip_comments(buf):
+ parts = []
+ lastpos = 0
+ while 1:
+ pos = string.find(buf, '/*', lastpos)
+ if pos >= 0:
+ parts.append(buf[lastpos:pos])
+ pos = string.find(buf, '*/', pos)
+ if pos >= 0:
+ lastpos = pos + 2
+ else:
+ break
+ else:
+ parts.append(buf[lastpos:])
+ break
+ return string.join(parts, '')
+
+# Strips the dll API from buffer, for example WEBKIT_API
+def strip_dll_api(buf):
+ pat = re.compile("[A-Z]*_API ")
+ buf = pat.sub("", buf)
+ return buf
+
+obj_name_pat = "[A-Z][a-z]*[A-Z][A-Za-z0-9]*"
+
+split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)')
+
+def find_obj_defs(buf, objdefs=[]):
+ """
+ Try to find object definitions in header files.
+ """
+
+ # filter out comments from buffer.
+ buf = strip_comments(buf)
+
+ # filter out dll api
+ buf = strip_dll_api(buf)
+
+ maybeobjdefs = [] # contains all possible objects from file
+
+ # first find all structures that look like they may represent a GtkObject
+ pat = re.compile("struct\s+_(" + obj_name_pat + ")\s*{\s*" +
+ "(" + obj_name_pat + ")\s+", re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = pat.search(buf, pos)
+ if not m: break
+ maybeobjdefs.append((m.group(1), m.group(2)))
+ pos = m.end()
+
+ # handle typedef struct { ... } style struct defs.
+ pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" +
+ "(" + obj_name_pat + ")\s+[^}]*}\s*" +
+ "(" + obj_name_pat + ")\s*;", re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = pat.search(buf, pos)
+ if not m: break
+ maybeobjdefs.append((m.group(2), m.group(1)))
+ pos = m.end()
+
+ # now find all structures that look like they might represent a class:
+ pat = re.compile("struct\s+_(" + obj_name_pat + ")Class\s*{\s*" +
+ "(" + obj_name_pat + ")Class\s+", re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = pat.search(buf, pos)
+ if not m: break
+ t = (m.group(1), m.group(2))
+ # if we find an object structure together with a corresponding
+ # class structure, then we have probably found a GtkObject subclass.
+ if t in maybeobjdefs:
+ objdefs.append(t)
+ pos = m.end()
+
+ pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" +
+ "(" + obj_name_pat + ")Class\s+[^}]*}\s*" +
+ "(" + obj_name_pat + ")Class\s*;", re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = pat.search(buf, pos)
+ if not m: break
+ t = (m.group(2), m.group(1))
+ # if we find an object structure together with a corresponding
+ # class structure, then we have probably found a GtkObject subclass.
+ if t in maybeobjdefs:
+ objdefs.append(t)
+ pos = m.end()
+
+ # now find all structures that look like they might represent
+ # a class inherited from GTypeInterface:
+ pat = re.compile("struct\s+_(" + obj_name_pat + ")Class\s*{\s*" +
+ "GTypeInterface\s+", re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = pat.search(buf, pos)
+ if not m: break
+ t = (m.group(1), '')
+ t2 = (m.group(1)+'Class', 'GTypeInterface')
+ # if we find an object structure together with a corresponding
+ # class structure, then we have probably found a GtkObject subclass.
+ if t2 in maybeobjdefs:
+ objdefs.append(t)
+ pos = m.end()
+
+ # now find all structures that look like they might represent
+ # an Iface inherited from GTypeInterface:
+ pat = re.compile("struct\s+_(" + obj_name_pat + ")Iface\s*{\s*" +
+ "GTypeInterface\s+", re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = pat.search(buf, pos)
+ if not m: break
+ t = (m.group(1), '')
+ t2 = (m.group(1)+'Iface', 'GTypeInterface')
+ # if we find an object structure together with a corresponding
+ # class structure, then we have probably found a GtkObject subclass.
+ if t2 in maybeobjdefs:
+ objdefs.append(t)
+ pos = m.end()
+
+def sort_obj_defs(objdefs):
+ objdefs.sort() # not strictly needed, but looks nice
+ pos = 0
+ while pos < len(objdefs):
+ klass,parent = objdefs[pos]
+ for i in range(pos+1, len(objdefs)):
+ # parent below subclass ... reorder
+ if objdefs[i][0] == parent:
+ objdefs.insert(i+1, objdefs[pos])
+ del objdefs[pos]
+ break
+ else:
+ pos = pos + 1
+ return objdefs
+
+# ------------------ Find enum definitions -----------------
+
+def find_enum_defs(buf, enums=[]):
+ # strip comments
+ # bulk comments
+ buf = strip_comments(buf)
+
+ # strip dll api macros
+ buf = strip_dll_api(buf)
+
+ # strip # directives
+ pat = re.compile(r"""^[#].*?$""", re.MULTILINE)
+ buf = pat.sub('', buf)
+
+ buf = re.sub('\n', ' ', buf)
+
+ enum_pat = re.compile(r'enum\s*{([^}]*)}\s*([A-Z][A-Za-z]*)(\s|;)')
+ splitter = re.compile(r'\s*,\s', re.MULTILINE)
+ pos = 0
+ while pos < len(buf):
+ m = enum_pat.search(buf, pos)
+ if not m: break
+
+ name = m.group(2)
+ vals = m.group(1)
+ isflags = string.find(vals, '<<') >= 0
+ entries = []
+ for val in splitter.split(vals):
+ if not string.strip(val): continue
+ entries.append(string.split(val)[0])
+ if name != 'GdkCursorType':
+ enums.append((name, isflags, entries))
+
+ pos = m.end()
+
+# ------------------ Find function definitions -----------------
+
+def clean_func(buf):
+ """
+ Ideally would make buf have a single prototype on each line.
+ Actually just cuts out a good deal of junk, but leaves lines
+ where a regex can figure prototypes out.
+ """
+ # bulk comments
+ buf = strip_comments(buf)
+
+ # dll api
+ buf = strip_dll_api(buf)
+
+ # compact continued lines
+ pat = re.compile(r"""\\\n""", re.MULTILINE)
+ buf = pat.sub('', buf)
+
+ # Preprocess directives
+ pat = re.compile(r"""^[#].*?$""", re.MULTILINE)
+ buf = pat.sub('', buf)
+
+ #typedefs, stucts, and enums
+ pat = re.compile(r"""^(typedef|struct|enum)(\s|.|\n)*?;\s*""",
+ re.MULTILINE)
+ buf = pat.sub('', buf)
+
+ #strip DECLS macros
+ pat = re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS""", re.MULTILINE)
+ buf = pat.sub('', buf)
+
+ #extern "C"
+ pat = re.compile(r"""^\s*(extern)\s+\"C\"\s+{""", re.MULTILINE)
+ buf = pat.sub('', buf)
+
+ #multiple whitespace
+ pat = re.compile(r"""\s+""", re.MULTILINE)
+ buf = pat.sub(' ', buf)
+
+ #clean up line ends
+ pat = re.compile(r""";\s*""", re.MULTILINE)
+ buf = pat.sub('\n', buf)
+ buf = buf.lstrip()
+
+ #associate *, &, and [] with type instead of variable
+ #pat = re.compile(r'\s+([*|&]+)\s*(\w+)')
+ pat = re.compile(r' \s* ([*|&]+) \s* (\w+)', re.VERBOSE)
+ buf = pat.sub(r'\1 \2', buf)
+ pat = re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE)
+ buf = pat.sub(r'[] \1', buf)
+
+ # make return types that are const work.
+ buf = re.sub(r'\s*\*\s*G_CONST_RETURN\s*\*\s*', '** ', buf)
+ buf = string.replace(buf, 'G_CONST_RETURN ', 'const-')
+ buf = string.replace(buf, 'const ', 'const-')
+
+ #strip GSEAL macros from the middle of function declarations:
+ pat = re.compile(r"""GSEAL""", re.VERBOSE)
+ buf = pat.sub('', buf)
+
+ return buf
+
+proto_pat=re.compile(r"""
+(?P<ret>(-|\w|\&|\*)+\s*) # return type
+\s+ # skip whitespace
+(?P<func>\w+)\s*[(] # match the function name until the opening (
+\s*(?P<args>.*?)\s*[)] # group the function arguments
+""", re.IGNORECASE|re.VERBOSE)
+#"""
+arg_split_pat = re.compile("\s*,\s*")
+
+get_type_pat = re.compile(r'(const-)?([A-Za-z0-9]+)\*?\s+')
+pointer_pat = re.compile('.*\*$')
+func_new_pat = re.compile('(\w+)_new$')
+
+class DefsWriter:
+ def __init__(self, fp=None, prefix=None, ns=None, verbose=False,
+ defsfilter=None):
+ if not fp:
+ fp = sys.stdout
+
+ self.fp = fp
+ self.prefix = prefix
+ self.namespace = ns
+ self.verbose = verbose
+
+ self._enums = {}
+ self._objects = {}
+ self._functions = {}
+ if defsfilter:
+ filter = defsparser.DefsParser(defsfilter)
+ filter.startParsing()
+ for func in filter.functions + filter.methods.values():
+ self._functions[func.c_name] = func
+ for obj in filter.objects + filter.boxes + filter.interfaces:
+ self._objects[obj.c_name] = obj
+ for obj in filter.enums:
+ self._enums[obj.c_name] = obj
+
+ def write_def(self, deffile):
+ buf = open(deffile).read()
+
+ self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile))
+ self._define_func(buf)
+ self.fp.write('\n')
+
+ def write_enum_defs(self, enums, fp=None):
+ if not fp:
+ fp = self.fp
+
+ fp.write(';; Enumerations and flags ...\n\n')
+ trans = string.maketrans(string.uppercase + '_',
+ string.lowercase + '-')
+ filter = self._enums
+ for cname, isflags, entries in enums:
+ if filter:
+ if cname in filter:
+ continue
+ name = cname
+ module = None
+ if self.namespace:
+ module = self.namespace
+ name = cname[len(self.namespace):]
+ else:
+ m = split_prefix_pat.match(cname)
+ if m:
+ module = m.group(1)
+ name = m.group(2)
+ if isflags:
+ fp.write('(define-flags ' + name + '\n')
+ else:
+ fp.write('(define-enum ' + name + '\n')
+ if module:
+ fp.write(' (in-module "' + module + '")\n')
+ fp.write(' (c-name "' + cname + '")\n')
+ fp.write(' (gtype-id "' + typecode(cname, self.namespace) + '")\n')
+ prefix = entries[0]
+ for ent in entries:
+ # shorten prefix til we get a match ...
+ # and handle GDK_FONT_FONT, GDK_FONT_FONTSET case
+ while ((len(prefix) and prefix[-1] != '_') or ent[:len(prefix)] != prefix
+ or len(prefix) >= len(ent)):
+ prefix = prefix[:-1]
+ prefix_len = len(prefix)
+ fp.write(' (values\n')
+ for ent in entries:
+ fp.write(' \'("%s" "%s")\n' %
+ (string.translate(ent[prefix_len:], trans), ent))
+ fp.write(' )\n')
+ fp.write(')\n\n')
+
+ def write_obj_defs(self, objdefs, fp=None):
+ if not fp:
+ fp = self.fp
+
+ fp.write(';; -*- scheme -*-\n')
+ fp.write('; object definitions ...\n')
+
+ filter = self._objects
+ for klass, parent in objdefs:
+ if filter:
+ if klass in filter:
+ continue
+ if self.namespace:
+ cname = klass[len(self.namespace):]
+ cmodule = self.namespace
+ else:
+ m = split_prefix_pat.match(klass)
+ cname = klass
+ cmodule = None
+ if m:
+ cmodule = m.group(1)
+ cname = m.group(2)
+ fp.write('(define-object ' + cname + '\n')
+ if cmodule:
+ fp.write(' (in-module "' + cmodule + '")\n')
+ if parent:
+ fp.write(' (parent "' + parent + '")\n')
+ fp.write(' (c-name "' + klass + '")\n')
+ fp.write(' (gtype-id "' + typecode(klass, self.namespace) + '")\n')
+ # should do something about accessible fields
+ fp.write(')\n\n')
+
+ def _define_func(self, buf):
+ buf = clean_func(buf)
+ buf = string.split(buf,'\n')
+ filter = self._functions
+ for p in buf:
+ if not p:
+ continue
+ m = proto_pat.match(p)
+ if m == None:
+ if self.verbose:
+ sys.stderr.write('No match:|%s|\n' % p)
+ continue
+ func = m.group('func')
+ if func[0] == '_':
+ continue
+ if filter:
+ if func in filter:
+ continue
+ ret = m.group('ret')
+ args = m.group('args')
+ args = arg_split_pat.split(args)
+ for i in range(len(args)):
+ spaces = string.count(args[i], ' ')
+ if spaces > 1:
+ args[i] = string.replace(args[i], ' ', '-', spaces - 1)
+
+ self._write_func(func, ret, args)
+
+ def _write_func(self, name, ret, args):
+ if len(args) >= 1:
+ # methods must have at least one argument
+ munged_name = name.replace('_', '')
+ m = get_type_pat.match(args[0])
+ if m:
+ obj = m.group(2)
+ if munged_name[:len(obj)] == obj.lower():
+ self._write_method(obj, name, ret, args)
+ return
+
+ if self.prefix:
+ l = len(self.prefix)
+ if name[:l] == self.prefix and name[l] == '_':
+ fname = name[l+1:]
+ else:
+ fname = name
+ else:
+ fname = name
+
+ # it is either a constructor or normal function
+ self.fp.write('(define-function ' + fname + '\n')
+ self.fp.write(' (c-name "' + name + '")\n')
+
+ # Hmmm... Let's asume that a constructor function name
+ # ends with '_new' and it returns a pointer.
+ m = func_new_pat.match(name)
+ if pointer_pat.match(ret) and m:
+ cname = ''
+ for s in m.group(1).split ('_'):
+ cname += s.title()
+ if cname != '':
+ self.fp.write(' (is-constructor-of "' + cname + '")\n')
+
+ self._write_return(ret)
+ self._write_arguments(args)
+
+ def _write_method(self, obj, name, ret, args):
+ regex = string.join(map(lambda x: x+'_?', string.lower(obj)),'')
+ mname = re.sub(regex, '', name, 1)
+ if self.prefix:
+ l = len(self.prefix) + 1
+ if mname[:l] == self.prefix and mname[l+1] == '_':
+ mname = mname[l+1:]
+ self.fp.write('(define-method ' + mname + '\n')
+ self.fp.write(' (of-object "' + obj + '")\n')
+ self.fp.write(' (c-name "' + name + '")\n')
+ self._write_return(ret)
+ self._write_arguments(args[1:])
+
+ def _write_return(self, ret):
+ if ret != 'void':
+ self.fp.write(' (return-type "' + ret + '")\n')
+ else:
+ self.fp.write(' (return-type "none")\n')
+
+ def _write_arguments(self, args):
+ is_varargs = 0
+ has_args = len(args) > 0
+ for arg in args:
+ if arg == '...':
+ is_varargs = 1
+ elif arg in ('void', 'void '):
+ has_args = 0
+ if has_args:
+ self.fp.write(' (parameters\n')
+ for arg in args:
+ if arg != '...':
+ tupleArg = tuple(string.split(arg))
+ if len(tupleArg) == 2:
+ self.fp.write(' \'("%s" "%s")\n' % tupleArg)
+ self.fp.write(' )\n')
+ if is_varargs:
+ self.fp.write(' (varargs #t)\n')
+ self.fp.write(')\n\n')
+
+# ------------------ Main function -----------------
+
+def main(args):
+ verbose = False
+ onlyenums = False
+ onlyobjdefs = False
+ separate = False
+ modulename = None
+ namespace = None
+ defsfilter = None
+ opts, args = getopt.getopt(args[1:], 'vs:m:n:f:',
+ ['onlyenums', 'onlyobjdefs',
+ 'modulename=', 'namespace=',
+ 'separate=', 'defsfilter='])
+ for o, v in opts:
+ if o == '-v':
+ verbose = True
+ if o == '--onlyenums':
+ onlyenums = True
+ if o == '--onlyobjdefs':
+ onlyobjdefs = True
+ if o in ('-s', '--separate'):
+ separate = v
+ if o in ('-m', '--modulename'):
+ modulename = v
+ if o in ('-n', '--namespace'):
+ namespace = v
+ if o in ('-f', '--defsfilter'):
+ defsfilter = v
+
+ if not args[0:1]:
+ print 'Must specify at least one input file name'
+ return -1
+
+ # read all the object definitions in
+ objdefs = []
+ enums = []
+ for filename in args:
+ buf = open(filename).read()
+ find_obj_defs(buf, objdefs)
+ find_enum_defs(buf, enums)
+ objdefs = sort_obj_defs(objdefs)
+
+ if separate:
+ methods = file(separate + '.defs', 'w')
+ types = file(separate + '-types.defs', 'w')
+
+ dw = DefsWriter(methods, prefix=modulename, ns=namespace,
+ verbose=verbose, defsfilter=defsfilter)
+ dw.write_obj_defs(objdefs, types)
+ dw.write_enum_defs(enums, types)
+ print "Wrote %s-types.defs" % separate
+
+ for filename in args:
+ dw.write_def(filename)
+ print "Wrote %s.defs" % separate
+ else:
+ dw = DefsWriter(prefix=modulename, ns=namespace,
+ verbose=verbose, defsfilter=defsfilter)
+
+ if onlyenums:
+ dw.write_enum_defs(enums)
+ elif onlyobjdefs:
+ dw.write_obj_defs(objdefs)
+ else:
+ dw.write_obj_defs(objdefs)
+ dw.write_enum_defs(enums)
+
+ for filename in args:
+ dw.write_def(filename)
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/codegen/mergedefs.py b/codegen/mergedefs.py
new file mode 100755
index 0000000..773e499
--- /dev/null
+++ b/codegen/mergedefs.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import optparse
+
+import defsparser
+
+parser = optparse.OptionParser(
+ usage="usage: %prog [options] generated-defs old-defs")
+parser.add_option("-p", "--merge-parameters",
+ help="Merge changes in function/methods parameter lists",
+ action="store_true", dest="parmerge", default=False)
+(options, args) = parser.parse_args()
+
+if len(args) != 2:
+ parser.error("wrong number of arguments")
+
+newp = defsparser.DefsParser(args[0])
+oldp = defsparser.DefsParser(args[1])
+
+newp.startParsing()
+oldp.startParsing()
+
+newp.merge(oldp, options.parmerge)
+
+newp.write_defs()
diff --git a/codegen/missingdefs.py b/codegen/missingdefs.py
new file mode 100755
index 0000000..f0017e7
--- /dev/null
+++ b/codegen/missingdefs.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import sys
+import defsparser
+
+if len(sys.argv) < 3:
+ sys.stderr.write("Usage: missingdefs.py generated-defs old-defs\n")
+ sys.exit(1)
+
+newp = defsparser.DefsParser(sys.argv[1])
+oldp = defsparser.DefsParser(sys.argv[2])
+
+newp.startParsing()
+oldp.startParsing()
+
+newp.printMissing(oldp)
diff --git a/codegen/mkskel.py b/codegen/mkskel.py
new file mode 100755
index 0000000..61f520b
--- /dev/null
+++ b/codegen/mkskel.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import sys, os, getopt
+
+module_init_template = \
+'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \
+'#ifdef HAVE_CONFIG_H\n' + \
+'# include "config.h"\n' + \
+'#endif\n' + \
+'#include <Python.h>\n' + \
+'#include <pygtk.h>\n' + \
+'\n' + \
+'/* include any extra headers needed here */\n' + \
+'\n' + \
+'void %(prefix)s_register_classes(PyObject *d);\n' + \
+'extern PyMethodDef %(prefix)s_functions[];\n' + \
+'\n' + \
+'DL_EXPORT(void)\n' + \
+'init%(module)s(void)\n' + \
+'{\n' + \
+' PyObject *m, *d;\n' + \
+'\n' + \
+' /* perform any initialisation required by the library here */\n' + \
+'\n' + \
+' m = Py_InitModule("%(module)s", %(prefix)s_functions);\n' + \
+' d = PyModule_GetDict(m);\n' + \
+'\n' + \
+' init_pygtk();\n' + \
+'\n' + \
+' %(prefix)s_register_classes(d);\n' + \
+'\n' + \
+' /* add anything else to the module dictionary (such as constants) */\n' +\
+'\n' + \
+' if (PyErr_Occurred())\n' + \
+' Py_FatalError("could not initialise module %(module)s");\n' + \
+'}\n'
+
+override_template = \
+'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \
+'%%%%\n' + \
+'headers\n' + \
+'/* include any required headers here */\n' + \
+'%%%%\n' + \
+'init\n' + \
+' /* include any code here that needs to be executed before the\n' + \
+' * extension classes get initialised */\n' + \
+'%%%%\n' + \
+'\n' + \
+'/* you should add appropriate ignore, ignore-glob and\n' + \
+' * override sections here */\n'
+
+def open_with_backup(file):
+ if os.path.exists(file):
+ try:
+ os.rename(file, file+'~')
+ except OSError:
+ # fail silently if we can't make a backup
+ pass
+ return open(file, 'w')
+
+def write_skels(fileprefix, prefix, module):
+ fp = open_with_backup(fileprefix+'module.c')
+ fp.write(module_init_template % { 'prefix': prefix, 'module': module })
+ fp.close()
+ fp = open_with_backup(fileprefix+'.override')
+ fp.write(override_template % { 'prefix': prefix, 'module': module })
+ fp.close()
+
+if __name__ == '__main__':
+ opts, args = getopt.getopt(sys.argv[1:], 'f:p:m:h',
+ ['file-prefix=', 'prefix=', 'module=', 'help'])
+ fileprefix = None
+ prefix = None
+ module = None
+ for opt, arg in opts:
+ if opt in ('-f', '--file-prefix'):
+ fileprefix = arg
+ elif opt in ('-p', '--prefix'):
+ prefix = arg
+ elif opt in ('-m', '--module'):
+ module = arg
+ elif opt in ('-h', '--help'):
+ print 'usage: mkskel.py -f fileprefix -p prefix -m module'
+ sys.exit(0)
+ if not fileprefix or not prefix or not module:
+ print 'usage: mkskel.py -f fileprefix -p prefix -m module'
+ sys.exit(1)
+ write_skels(fileprefix, prefix, module)
diff --git a/codegen/override.py b/codegen/override.py
new file mode 100644
index 0000000..bba5e42
--- /dev/null
+++ b/codegen/override.py
@@ -0,0 +1,285 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+# this file contains code for loading up an override file. The override file
+# provides implementations of functions where the code generator could not
+# do its job correctly.
+
+import fnmatch
+import os
+import re
+import string
+import sys
+
+def class2cname(klass, method):
+ c_name = ''
+ for c in klass:
+ if c.isupper():
+ c_name += '_' + c.lower()
+ else:
+ c_name += c
+ return c_name[1:] + '_' + method
+
+# import python_type as c_name [for arg_type]
+# Last ('for') clause is optional. If present, the type will be
+# imported only if given 'arg_type' is registered.
+import_pat = re.compile(r'\s*import\s+(\S+)\.([^\s.]+)\s+as\s+(\S+)(\s+for\s+(\S+))?')
+
+class Overrides:
+ def __init__(self, filename=None):
+ self.modulename = None
+ self.ignores = {}
+ self.glob_ignores = []
+ self.type_ignores = {}
+ self.overrides = {}
+ self.overridden = {}
+ self.kwargs = {}
+ self.noargs = {}
+ self.onearg = {}
+ self.staticmethod = {}
+ self.classmethod = {}
+ self.startlines = {}
+ self.override_attrs = {}
+ self.override_slots = {}
+ self.headers = ''
+ self.body = ''
+ self.init = ''
+ self.imports = []
+ self.defines = {}
+ self.functions = {}
+ self.newstyle_constructors = {}
+ self.dynamicnamespace = False
+ if filename:
+ self.handle_file(filename)
+
+ def handle_file(self, filename):
+ oldpath = os.getcwd()
+
+ fp = open(filename, 'r')
+ dirname = os.path.dirname(os.path.abspath(filename))
+
+ if dirname != oldpath:
+ os.chdir(dirname)
+
+ # read all the components of the file ...
+ bufs = []
+ startline = 1
+ lines = []
+ line = fp.readline()
+ linenum = 1
+ while line:
+ if line == '%%\n' or line == '%%':
+ if lines:
+ bufs.append((string.join(lines, ''), startline))
+ startline = linenum + 1
+ lines = []
+ else:
+ lines.append(line)
+ line = fp.readline()
+ linenum = linenum + 1
+ if lines:
+ bufs.append((string.join(lines, ''), startline))
+ if not bufs: return
+
+ for buf, startline in bufs:
+ self.__parse_override(buf, startline, filename)
+
+ os.chdir(oldpath)
+
+ def __parse_override(self, buffer, startline, filename):
+ pos = string.find(buffer, '\n')
+ if pos >= 0:
+ line = buffer[:pos]
+ rest = buffer[pos+1:]
+ else:
+ line = buffer ; rest = ''
+ words = string.split(line)
+ command = words[0]
+ if (command == 'ignore' or
+ command == 'ignore-' + sys.platform):
+ "ignore/ignore-platform [functions..]"
+ for func in words[1:]:
+ self.ignores[func] = 1
+ for func in string.split(rest):
+ self.ignores[func] = 1
+ elif (command == 'ignore-glob' or
+ command == 'ignore-glob-' + sys.platform):
+ "ignore-glob/ignore-glob-platform [globs..]"
+ for func in words[1:]:
+ self.glob_ignores.append(func)
+ for func in string.split(rest):
+ self.glob_ignores.append(func)
+ elif (command == 'ignore-type' or
+ command == 'ignore-type-' + sys.platform):
+ "ignore-type/ignore-type-platform [typenames..]"
+ for typename in words[1:]:
+ self.type_ignores[typename] = 1
+ for typename in string.split(rest):
+ self.type_ignores[typename] = 1
+ elif command == 'override':
+ "override function/method [kwargs|noargs|onearg] [staticmethod|classmethod]"
+ func = words[1]
+ if 'kwargs' in words[1:]:
+ self.kwargs[func] = 1
+ elif 'noargs' in words[1:]:
+ self.noargs[func] = 1
+ elif 'onearg' in words[1:]:
+ self.onearg[func] = True
+
+ if 'staticmethod' in words[1:]:
+ self.staticmethod[func] = True
+ elif 'classmethod' in words[1:]:
+ self.classmethod[func] = True
+ if func in self.overrides:
+ raise RuntimeError("Function %s is being overridden more than once" % (func,))
+ self.overrides[func] = rest
+ self.startlines[func] = (startline + 1, filename)
+ elif command == 'override-attr':
+ "override-slot Class.attr"
+ attr = words[1]
+ self.override_attrs[attr] = rest
+ self.startlines[attr] = (startline + 1, filename)
+ elif command == 'override-slot':
+ "override-slot Class.slot"
+ slot = words[1]
+ self.override_slots[slot] = rest
+ self.startlines[slot] = (startline + 1, filename)
+ elif command == 'headers':
+ "headers"
+ self.headers = '%s\n#line %d "%s"\n%s' % \
+ (self.headers, startline + 1, filename, rest)
+ elif command == 'body':
+ "body"
+ self.body = '%s\n#line %d "%s"\n%s' % \
+ (self.body, startline + 1, filename, rest)
+ elif command == 'init':
+ "init"
+ self.init = '%s\n#line %d "%s"\n%s' % \
+ (self.init, startline + 1, filename, rest)
+ elif command == 'modulename':
+ "modulename name"
+ self.modulename = words[1]
+ elif command == 'include':
+ "include filename"
+ for filename in words[1:]:
+ self.handle_file(filename)
+ for filename in string.split(rest):
+ self.handle_file(filename)
+ elif command == 'import':
+ "import module1 [\n module2, \n module3 ...]"
+ for line in string.split(buffer, '\n'):
+ match = import_pat.match(line)
+ if match:
+ module, pyname, cname, conditional, importing_for = match.groups()
+ self.imports.append((module, pyname, cname, importing_for or None))
+ elif command == 'define':
+ "define funcname [kwargs|noargs|onearg] [classmethod|staticmethod]"
+ "define Class.method [kwargs|noargs|onearg] [classmethod|staticmethod]"
+ func = words[1]
+ klass = None
+ if func.find('.') != -1:
+ klass, func = func.split('.', 1)
+
+ if not self.defines.has_key(klass):
+ self.defines[klass] = {}
+ self.defines[klass][func] = rest
+ else:
+ self.functions[func] = rest
+
+ if 'kwargs' in words[1:]:
+ self.kwargs[func] = 1
+ elif 'noargs' in words[1:]:
+ self.noargs[func] = 1
+ elif 'onearg' in words[1:]:
+ self.onearg[func] = 1
+
+ if 'staticmethod' in words[1:]:
+ self.staticmethod[func] = True
+ elif 'classmethod' in words[1:]:
+ self.classmethod[func] = True
+
+ self.startlines[func] = (startline + 1, filename)
+
+ elif command == 'new-constructor':
+ "new-constructor GType"
+ gtype, = words[1:]
+ self.newstyle_constructors[gtype] = True
+ elif command == 'options':
+ for option in words[1:]:
+ if option == 'dynamicnamespace':
+ self.dynamicnamespace = True
+
+ def is_ignored(self, name):
+ if self.ignores.has_key(name):
+ return 1
+ for glob in self.glob_ignores:
+ if fnmatch.fnmatchcase(name, glob):
+ return 1
+ return 0
+
+ def is_type_ignored(self, name):
+ return name in self.type_ignores
+
+ def is_overriden(self, name):
+ return self.overrides.has_key(name)
+
+ def is_already_included(self, name):
+ return self.overridden.has_key(name)
+
+ def override(self, name):
+ self.overridden[name] = 1
+ return self.overrides[name]
+
+ def define(self, klass, name):
+ self.overridden[class2cname(klass, name)] = 1
+ return self.defines[klass][name]
+
+ def function(self, name):
+ return self.functions[name]
+
+ def getstartline(self, name):
+ return self.startlines[name]
+
+ def wants_kwargs(self, name):
+ return self.kwargs.has_key(name)
+
+ def wants_noargs(self, name):
+ return self.noargs.has_key(name)
+
+ def wants_onearg(self, name):
+ return self.onearg.has_key(name)
+
+ def is_staticmethod(self, name):
+ return self.staticmethod.has_key(name)
+
+ def is_classmethod(self, name):
+ return self.classmethod.has_key(name)
+
+ def attr_is_overriden(self, attr):
+ return self.override_attrs.has_key(attr)
+
+ def attr_override(self, attr):
+ return self.override_attrs[attr]
+
+ def slot_is_overriden(self, slot):
+ return self.override_slots.has_key(slot)
+
+ def slot_override(self, slot):
+ return self.override_slots[slot]
+
+ def get_headers(self):
+ return self.headers
+
+ def get_body(self):
+ return self.body
+
+ def get_init(self):
+ return self.init
+
+ def get_imports(self):
+ return self.imports
+
+ def get_defines_for(self, klass):
+ return self.defines.get(klass, {})
+
+ def get_functions(self):
+ return self.functions
diff --git a/codegen/pygobject-codegen-2.0.in b/codegen/pygobject-codegen-2.0.in
new file mode 100644
index 0000000..c5c912e
--- /dev/null
+++ b/codegen/pygobject-codegen-2.0.in
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+prefix=@prefix@
+datarootdir=@datarootdir@
+datadir=@datadir@
+codegendir=${datadir}/pygobject/2.0/codegen
+
+PYTHONPATH=$codegendir
+export PYTHONPATH
+
+exec @PYTHON@ $codegendir/codegen.py "$@"
diff --git a/codegen/reversewrapper.py b/codegen/reversewrapper.py
new file mode 100644
index 0000000..b96e12e
--- /dev/null
+++ b/codegen/reversewrapper.py
@@ -0,0 +1,912 @@
+### -*- python -*-
+### Code to generate "Reverse Wrappers", i.e. C->Python wrappers
+### (C) 2004 Gustavo Carneiro <gjc@gnome.org>
+import argtypes
+import os
+
+DEBUG_MODE = ('PYGTK_CODEGEN_DEBUG' in os.environ)
+
+def join_ctype_name(ctype, name):
+ '''Joins a C type and a variable name into a single string'''
+ if ctype[-1] != '*':
+ return " ".join((ctype, name))
+ else:
+ return "".join((ctype, name))
+
+
+class CodeSink(object):
+ def __init__(self):
+ self.indent_level = 0 # current indent level
+ self.indent_stack = [] # previous indent levels
+
+ def _format_code(self, code):
+ assert isinstance(code, str)
+ l = []
+ for line in code.split('\n'):
+ l.append(' '*self.indent_level + line)
+ if l[-1]:
+ l.append('')
+ return '\n'.join(l)
+
+ def writeln(self, line=''):
+ raise NotImplementedError
+
+ def indent(self, level=4):
+ '''Add a certain ammount of indentation to all lines written
+ from now on and until unindent() is called'''
+ self.indent_stack.append(self.indent_level)
+ self.indent_level += level
+
+ def unindent(self):
+ '''Revert indentation level to the value before last indent() call'''
+ self.indent_level = self.indent_stack.pop()
+
+
+class FileCodeSink(CodeSink):
+ def __init__(self, fp):
+ CodeSink.__init__(self)
+ assert isinstance(fp, file)
+ self.fp = fp
+
+ def writeln(self, line=''):
+ self.fp.write(self._format_code(line))
+
+class MemoryCodeSink(CodeSink):
+ def __init__(self):
+ CodeSink.__init__(self)
+ self.lines = []
+
+ def writeln(self, line=''):
+ self.lines.append(self._format_code(line))
+
+ def flush_to(self, sink):
+ assert isinstance(sink, CodeSink)
+ for line in self.lines:
+ sink.writeln(line.rstrip())
+ self.lines = []
+
+ def flush(self):
+ l = []
+ for line in self.lines:
+ l.append(self._format_code(line))
+ self.lines = []
+ return "".join(l)
+
+class ReverseWrapper(object):
+ '''Object that generates a C->Python wrapper'''
+ def __init__(self, cname, is_static=True):
+ assert isinstance(cname, str)
+
+ self.cname = cname
+ ## function object we will call, or object whose method we will call
+ self.called_pyobj = None
+ ## name of method of self.called_pyobj we will call
+ self.method_name = None
+ self.is_static = is_static
+
+ self.parameters = []
+ self.declarations = MemoryCodeSink()
+ self.post_return_code = MemoryCodeSink()
+ self.body = MemoryCodeSink()
+ self.check_exception_code = MemoryCodeSink()
+ self.cleanup_actions = []
+ self.pyargv_items = []
+ self.pyargv_optional_items = []
+ self.pyret_parse_items = [] # list of (format_spec, parameter)
+ self.code_sinks_stack = [self.body]
+
+ def set_call_target(self, called_pyobj, method_name=None):
+ assert called_pyobj is not None
+ assert self.called_pyobj is None
+ self.called_pyobj = called_pyobj
+ self.method_name = method_name
+
+ def set_return_type(self, return_type):
+ assert isinstance(return_type, ReturnType)
+ self.return_type = return_type
+
+ def add_parameter(self, param):
+ assert isinstance(param, Parameter)
+ self.parameters.append(param)
+
+ def add_declaration(self, decl_code):
+ self.declarations.writeln(decl_code)
+
+ def add_pyargv_item(self, variable, optional=False):
+ if optional:
+ self.pyargv_optional_items.append(variable)
+ else:
+ self.pyargv_items.append(variable)
+
+ def add_pyret_parse_item(self, format_specifier, parameter, prepend=False):
+ if prepend:
+ self.pyret_parse_items.insert(0, (format_specifier, parameter))
+ else:
+ self.pyret_parse_items.append((format_specifier, parameter))
+
+
+ def push_code_sink(self, code_sink):
+ self.code_sinks_stack.insert(0, code_sink)
+
+ def pop_code_sink(self):
+ return self.code_sinks_stack.pop(0)
+
+
+ def write_code(self, code,
+ cleanup=None,
+ failure_expression=None,
+ failure_cleanup=None,
+ failure_exception=None,
+ code_sink=None):
+ '''Add a chunk of code with cleanup and error handling
+
+ This method is to be used by TypeHandlers when generating code
+
+ Keywork arguments:
+ code -- code to add
+ cleanup -- code to cleanup any dynamic resources created by @code
+ (except in case of failure) (default None)
+ failure_expression -- C boolean expression to indicate
+ if anything failed (default None)
+ failure_cleanup -- code to cleanup any dynamic resources
+ created by @code in case of failure (default None)
+ failure_exception -- code to raise an exception in case of
+ failure (which will be immediately
+ printed and cleared), (default None)
+ code_sink -- "code sink" to use; by default,
+ ReverseWrapper.body is used, which writes the
+ main body of the wrapper, before calling the
+ python method. Alternatively,
+ ReverseWrapper.after_pyret_parse can be used, to
+ write code after the PyArg_ParseTuple that
+ parses the python method return value.
+ '''
+ if code_sink is None:
+ code_sink = self.code_sinks_stack[0]
+ if code is not None:
+ code_sink.writeln(code)
+ if failure_expression is not None:
+ code_sink.writeln("if (%s) {" % (failure_expression,))
+ code_sink.indent()
+ if failure_exception is None:
+ code_sink.writeln("if (PyErr_Occurred())")
+ code_sink.indent()
+ code_sink.writeln("PyErr_Print();")
+ code_sink.unindent()
+ else:
+ code_sink.writeln(failure_exception)
+ code_sink.writeln("PyErr_Print();")
+ if failure_cleanup is not None:
+ code_sink.writeln(failure_cleanup)
+ for cleanup_action in self.cleanup_actions:
+ code_sink.writeln(cleanup_action)
+
+ self.push_code_sink(code_sink)
+ try:
+ self.return_type.write_error_return()
+ finally:
+ self.pop_code_sink()
+
+ code_sink.unindent()
+ code_sink.writeln("}")
+ if cleanup is not None:
+ self.cleanup_actions.insert(0, cleanup)
+
+ def generate(self, sink):
+ '''Generate the code into a CodeSink object'''
+ assert isinstance(sink, CodeSink)
+
+ if DEBUG_MODE:
+ self.declarations.writeln("/* begin declarations */")
+ self.body.writeln("/* begin main body */")
+ self.post_return_code.writeln("/* begin post-return code */")
+
+ self.add_declaration("PyGILState_STATE __py_state;")
+ self.write_code(code="__py_state = pyg_gil_state_ensure();",
+ cleanup="pyg_gil_state_release(__py_state);")
+
+ for param in self.parameters:
+ param.convert_c2py()
+
+ assert self.called_pyobj is not None,\
+ "Parameters failed to provide a target function or method."
+
+ if self.is_static:
+ sink.writeln('static %s' % self.return_type.get_c_type())
+ else:
+ sink.writeln(self.return_type.get_c_type())
+ c_proto_params = map(Parameter.format_for_c_proto, self.parameters)
+ sink.writeln("%s(%s)\n{" % (self.cname, ", ".join(c_proto_params)))
+
+ self.return_type.write_decl()
+ self.add_declaration("PyObject *py_retval;")
+
+ ## Handle number of arguments
+ if self.pyargv_items:
+ self.add_declaration("PyObject *py_args;")
+ py_args = "py_args"
+ if self.pyargv_optional_items:
+ self.add_declaration("int argc = %i;" % len(self.pyargv_items))
+ argc = "argc"
+ for arg in self.pyargv_optional_items:
+ self.body.writeln("if (%s)" % arg)
+ self.body.indent()
+ self.body.writeln("++argc;")
+ self.body.unindent()
+ else:
+ argc = str(len(self.pyargv_items))
+ else:
+ if self.pyargv_optional_items:
+ self.add_declaration("PyObject *py_args;")
+ py_args = "py_args"
+ self.add_declaration("int argc = 0;")
+ argc = "argc"
+ for arg in self.pyargv_optional_items:
+ self.body.writeln("if (%s)" % arg)
+ self.body.indent()
+ self.body.writeln("++argc;")
+ self.body.unindent()
+ else:
+ py_args = "NULL"
+ argc = None
+
+ self.body.writeln()
+
+ if py_args != "NULL":
+ self.write_code("py_args = PyTuple_New(%s);" % argc,
+ cleanup="Py_DECREF(py_args);")
+ pos = 0
+ for arg in self.pyargv_items:
+ try: # try to remove the Py_DECREF cleanup action, if we can
+ self.cleanup_actions.remove("Py_DECREF(%s);" % arg)
+ except ValueError: # otherwise we have to Py_INCREF..
+ self.body.writeln("Py_INCREF(%s);" % arg)
+ self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg))
+ pos += 1
+ for arg in self.pyargv_optional_items:
+ self.body.writeln("if (%s) {" % arg)
+ self.body.indent()
+ try: # try to remove the Py_DECREF cleanup action, if we can
+ self.cleanup_actions.remove("Py_XDECREF(%s);" % arg)
+ except ValueError: # otherwise we have to Py_INCREF..
+ self.body.writeln("Py_INCREF(%s);" % arg)
+ self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg))
+ self.body.unindent()
+ self.body.writeln("}")
+ pos += 1
+
+ self.body.writeln()
+
+ ## Call the python method
+ if self.method_name is None:
+ self.write_code("py_retval = PyObject_Call(%s, %s);"
+ % (self.called_pyobj, py_args),
+ cleanup="Py_XDECREF(py_retval);")
+ self.check_exception_code.flush_to(self.body)
+ self.write_code(None, failure_expression="!py_retval")
+
+ else:
+ self.add_declaration("PyObject *py_method;")
+ self.write_code("py_method = PyObject_GetAttrString(%s, \"%s\");"
+ % (self.called_pyobj, self.method_name),
+ cleanup="Py_DECREF(py_method);",
+ failure_expression="!py_method")
+ self.write_code("py_retval = PyObject_CallObject(py_method, %s);"
+ % (py_args,),
+ cleanup="Py_XDECREF(py_retval);")
+ self.check_exception_code.flush_to(self.body)
+ self.write_code(None, failure_expression="!py_retval")
+
+ ## -- Handle the return value --
+
+ ## we need to check if the return_type object is prepared to cooperate with multiple return values
+ len_before = len(self.pyret_parse_items)
+ self.return_type.write_conversion()
+ len_after = len(self.pyret_parse_items)
+ assert (self.return_type.get_c_type() == 'void'
+ or not (len_before == len_after and len_after > 0)),\
+ ("Bug in reverse wrappers: return type handler %s"
+ " is not prepared to cooperate multiple return values") % (type(self.return_type),)
+
+ sink.indent()
+
+ if self.pyret_parse_items == [("", "")]:
+ ## special case when there are no return parameters
+ self.write_code(
+ code=None,
+ failure_expression='py_retval != Py_None',
+ failure_exception=('PyErr_SetString(PyExc_TypeError, '
+ '"virtual method should return None");'))
+ else:
+ if len(self.pyret_parse_items) == 1:
+ ## if retval is one item only, pack it in a tuple so we
+ ## can use PyArg_ParseTuple as usual..
+ self.write_code('py_retval = Py_BuildValue("(N)", py_retval);')
+ if len(self.pyret_parse_items) > 0:
+ ## Parse return values using PyArg_ParseTuple
+ params = ["py_retval",
+ '"%s"' % "".join([format for format, param in self.pyret_parse_items])]
+ params.extend([param for format, param in self.pyret_parse_items if param])
+ self.write_code(code=None, failure_expression=(
+ '!PyArg_ParseTuple(%s)' % (', '.join(params),)))
+
+ if DEBUG_MODE:
+ self.declarations.writeln("/* end declarations */")
+ self.declarations.flush_to(sink)
+ sink.writeln()
+ if DEBUG_MODE:
+ self.body.writeln("/* end main body */")
+ self.body.flush_to(sink)
+ sink.writeln()
+ if DEBUG_MODE:
+ self.post_return_code.writeln("/* end post-return code */")
+ self.post_return_code.flush_to(sink)
+ sink.writeln()
+
+ for cleanup_action in self.cleanup_actions:
+ sink.writeln(cleanup_action)
+ if self.return_type.get_c_type() != 'void':
+ sink.writeln()
+ sink.writeln("return retval;")
+ sink.unindent()
+ sink.writeln("}")
+
+class TypeHandler(object):
+ def __init__(self, wrapper, **props):
+ assert isinstance(wrapper, ReverseWrapper)
+ self.wrapper = wrapper
+ self.props = props
+
+class ReturnType(TypeHandler):
+
+ supports_optional = False
+
+ def get_c_type(self):
+ raise NotImplementedError
+
+ def write_decl(self):
+ raise NotImplementedError
+
+ def write_error_return(self):
+ '''Write "return <value>" code in case of error'''
+ raise NotImplementedError
+
+ def write_conversion(self):
+ '''Writes code to convert Python return value in 'py_retval'
+ into C 'retval'. Returns a string with C boolean expression
+ that determines if anything went wrong. '''
+ raise NotImplementedError
+
+class Parameter(TypeHandler):
+
+ def __init__(self, wrapper, name, **props):
+ TypeHandler.__init__(self, wrapper, **props)
+ self.name = name
+
+ def get_c_type(self):
+ raise NotImplementedError
+
+ def convert_c2py(self):
+ '''Write some code before calling the Python method.'''
+ pass
+
+ def format_for_c_proto(self):
+ return join_ctype_name(self.get_c_type(), self.name)
+
+
+###---
+class StringParam(Parameter):
+
+ def get_c_type(self):
+ return self.props.get('c_type', 'char *').replace('const-', 'const ')
+
+ def convert_c2py(self):
+ if self.props.get('optional', False):
+ self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
+ self.wrapper.write_code(code=("if (%s)\n"
+ " py_%s = PyString_FromString(%s);\n"
+ % (self.name, self.name, self.name)),
+ cleanup=("Py_XDECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name, optional=True)
+ elif self.props.get('nullok', False):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=("if (%s)\n"
+ " py_%s = PyString_FromString(%s);\n"
+ "else {\n"
+ " Py_INCREF(Py_None);\n"
+ " py_%s = Py_None;\n"
+ "}\n"
+ % (self.name, self.name, self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+ else:
+ self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
+ self.wrapper.write_code(code=("if (%s)\n"
+ " py_%s = PyString_FromString(%s);\n" %
+ (self.name, self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name),
+ failure_expression=("!py_%s" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+for ctype in ('char*', 'gchar*', 'const-char*', 'char-const*', 'const-gchar*',
+ 'gchar-const*', 'string', 'static_string'):
+ argtypes.matcher.register_reverse(ctype, StringParam)
+del ctype
+
+class StringReturn(ReturnType):
+
+ def get_c_type(self):
+ return self.props.get('c_type', 'char *').replace('const-', 'const ')
+ #return "char *"
+
+ def write_decl(self):
+ self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+ #self.wrapper.add_declaration("char *retval;")
+
+ def write_error_return(self):
+ self.wrapper.write_code("return NULL;")
+
+ def write_conversion(self):
+ self.wrapper.add_pyret_parse_item("s", "&retval", prepend=True)
+ self.wrapper.write_code("retval = g_strdup(retval);", code_sink=self.wrapper.post_return_code)
+
+for ctype in ('char*', 'gchar*', 'const-gchar*'):
+ argtypes.matcher.register_reverse_ret(ctype, StringReturn)
+del ctype
+
+
+class VoidReturn(ReturnType):
+
+ def get_c_type(self):
+ return "void"
+
+ def write_decl(self):
+ pass
+
+ def write_error_return(self):
+ self.wrapper.write_code("return;")
+
+ def write_conversion(self):
+ self.wrapper.add_pyret_parse_item("", "", prepend=True)
+
+argtypes.matcher.register_reverse_ret('void', VoidReturn)
+argtypes.matcher.register_reverse_ret('none', VoidReturn)
+
+class GObjectParam(Parameter):
+
+ def get_c_type(self):
+ return self.props.get('c_type', 'GObject *')
+
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
+ self.wrapper.write_code(code=("if (%s)\n"
+ " py_%s = pygobject_new((GObject *) %s);\n"
+ "else {\n"
+ " Py_INCREF(Py_None);\n"
+ " py_%s = Py_None;\n"
+ "}"
+ % (self.name, self.name, self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse('GObject*', GObjectParam)
+
+class GObjectReturn(ReturnType):
+
+ supports_optional = True
+
+ def get_c_type(self):
+ return self.props.get('c_type', 'GObject *')
+
+ def write_decl(self):
+ if not self.props.get('optional'):
+ self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+ else:
+ self.wrapper.add_declaration("%s retval = NULL;" % self.get_c_type())
+
+ def write_error_return(self):
+ self.wrapper.write_code("return NULL;")
+
+ def write_conversion(self):
+ if not self.props.get('optional'):
+ self.wrapper.write_code(
+ code=None,
+ failure_expression="!PyObject_TypeCheck(py_retval, &PyGObject_Type)",
+ failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be a GObject");')
+ self.wrapper.write_code("retval = (%s) pygobject_get(py_retval);"
+ % self.get_c_type())
+ self.wrapper.write_code("g_object_ref((GObject *) retval);")
+ else:
+ self.wrapper.write_code(
+ code=None,
+ failure_expression="py_retval != Py_None && !PyObject_TypeCheck(py_retval, &PyGObject_Type)",
+ failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be None or a GObject");')
+ self.wrapper.write_code("if (py_retval != Py_None) {\n"
+ " retval = (%s) pygobject_get(py_retval);\n"
+ " g_object_ref((GObject *) retval);\n"
+ "}\n"
+ % self.get_c_type())
+
+argtypes.matcher.register_reverse_ret('GObject*', GObjectReturn)
+
+
+
+class IntParam(Parameter):
+
+ def get_c_type(self):
+ return self.props.get('c_type', 'int')
+
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=("py_%s = PyInt_FromLong(%s);" %
+ (self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+class IntReturn(ReturnType):
+ def get_c_type(self):
+ return self.props.get('c_type', 'int')
+ def write_decl(self):
+ self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+ def write_error_return(self):
+ self.wrapper.write_code("return -G_MAXINT;")
+ def write_conversion(self):
+ self.wrapper.add_pyret_parse_item("i", "&retval", prepend=True)
+
+for argtype in ('int', 'gint', 'guint', 'short', 'gshort', 'gushort', 'long',
+ 'glong', 'gsize', 'gssize', 'guint8', 'gint8', 'guint16',
+ 'gint16', 'gint32', 'GTime'):
+ argtypes.matcher.register_reverse(argtype, IntParam)
+ argtypes.matcher.register_reverse_ret(argtype, IntReturn)
+del argtype
+
+class IntPtrParam(Parameter):
+ def __init__(self, wrapper, name, **props):
+ if "direction" not in props:
+ raise argtypes.ArgTypeConfigurationError(
+ "cannot use int* parameter without direction")
+ if props["direction"] not in ("out", "inout"):
+ raise argtypes.ArgTypeConfigurationError(
+ "cannot use int* parameter with direction '%s'"
+ % (props["direction"],))
+ Parameter.__init__(self, wrapper, name, **props)
+ def get_c_type(self):
+ return self.props.get('c_type', 'int*')
+ def convert_c2py(self):
+ if self.props["direction"] == "inout":
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=("py_%s = PyInt_FromLong(*%s);" %
+ (self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+ self.wrapper.add_pyret_parse_item("i", self.name)
+for argtype in ('int*', 'gint*'):
+ argtypes.matcher.register_reverse(argtype, IntPtrParam)
+del argtype
+
+
+class GEnumReturn(IntReturn):
+ def write_conversion(self):
+ self.wrapper.write_code(
+ code=None,
+ failure_expression=(
+ "pyg_enum_get_value(%s, py_retval, (gint *)&retval)"
+ % (self.props['typecode'],)))
+
+argtypes.matcher.register_reverse_ret("GEnum", GEnumReturn)
+
+class GEnumParam(IntParam):
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=("py_%s = pyg_enum_from_gtype(%s, %s);" %
+ (self.name, self.props['typecode'], self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name),
+ failure_expression=("!py_%s" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GEnum", GEnumParam)
+
+class GFlagsReturn(IntReturn):
+ def write_conversion(self):
+ self.wrapper.write_code(
+ code=None,
+ failure_expression=(
+ "pyg_flags_get_value(%s, py_retval, (gint *)&retval)" %
+ self.props['typecode']))
+
+argtypes.matcher.register_reverse_ret("GFlags", GFlagsReturn)
+
+class GFlagsParam(IntParam):
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=(
+ "py_%s = pyg_flags_from_gtype(%s, %s);" %
+ (self.name, self.props['typecode'], self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name),
+ failure_expression=("!py_%s" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GFlags", GFlagsParam)
+
+
+class GtkTreePathParam(IntParam):
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=(
+ "py_%s = pygtk_tree_path_to_pyobject(%s);" %
+ (self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name),
+ failure_expression=("!py_%s" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GtkTreePath*", GtkTreePathParam)
+
+
+class GtkTreePathReturn(ReturnType):
+ def get_c_type(self):
+ return self.props.get('c_type', 'GtkTreePath *')
+ def write_decl(self):
+ self.wrapper.add_declaration("GtkTreePath * retval;")
+ def write_error_return(self):
+ self.wrapper.write_code("return NULL;")
+ def write_conversion(self):
+ self.wrapper.write_code(
+ "retval = pygtk_tree_path_from_pyobject(py_retval);\n",
+ failure_expression=('!retval'),
+ failure_exception=(
+ 'PyErr_SetString(PyExc_TypeError, "retval should be a GtkTreePath");'))
+
+argtypes.matcher.register_reverse_ret("GtkTreePath*", GtkTreePathReturn)
+
+
+class BooleanReturn(ReturnType):
+ def get_c_type(self):
+ return "gboolean"
+ def write_decl(self):
+ self.wrapper.add_declaration("gboolean retval;")
+ self.wrapper.add_declaration("PyObject *py_main_retval;")
+ def write_error_return(self):
+ self.wrapper.write_code("return FALSE;")
+ def write_conversion(self):
+ self.wrapper.add_pyret_parse_item("O", "&py_main_retval", prepend=True)
+ self.wrapper.write_code(
+ "retval = PyObject_IsTrue(py_main_retval)? TRUE : FALSE;",
+ code_sink=self.wrapper.post_return_code)
+argtypes.matcher.register_reverse_ret("gboolean", BooleanReturn)
+
+class BooleanParam(Parameter):
+ def get_c_type(self):
+ return "gboolean"
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code("py_%s = %s? Py_True : Py_False;"
+ % (self.name, self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("gboolean", BooleanParam)
+
+
+class DoubleParam(Parameter):
+ def get_c_type(self):
+ return self.props.get('c_type', 'gdouble')
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=("py_%s = PyFloat_FromDouble(%s);" %
+ (self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+class DoublePtrParam(Parameter):
+ def __init__(self, wrapper, name, **props):
+ if "direction" not in props:
+ raise argtypes.ArgTypeConfigurationError(
+ "cannot use double* parameter without direction")
+ if props["direction"] not in ("out", ): # inout not yet implemented
+ raise argtypes.ArgTypeConfigurationError(
+ "cannot use double* parameter with direction '%s'"
+ % (props["direction"],))
+ Parameter.__init__(self, wrapper, name, **props)
+ def get_c_type(self):
+ return self.props.get('c_type', 'double*')
+ def convert_c2py(self):
+ self.wrapper.add_pyret_parse_item("d", self.name)
+for argtype in ('double*', 'gdouble*'):
+ argtypes.matcher.register_reverse(argtype, DoublePtrParam)
+del argtype
+
+class DoubleReturn(ReturnType):
+ def get_c_type(self):
+ return self.props.get('c_type', 'gdouble')
+ def write_decl(self):
+ self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+ def write_error_return(self):
+ self.wrapper.write_code("return -G_MAXFLOAT;")
+ def write_conversion(self):
+ self.wrapper.add_pyret_parse_item("d", "&retval", prepend=True)
+
+for argtype in ('float', 'double', 'gfloat', 'gdouble'):
+ argtypes.matcher.register_reverse(argtype, DoubleParam)
+ argtypes.matcher.register_reverse_ret(argtype, DoubleReturn)
+
+
+class GBoxedParam(Parameter):
+ def get_c_type(self):
+ return self.props.get('c_type').replace('const-', 'const ')
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ ctype = self.get_c_type()
+ if ctype.startswith('const '):
+ ctype_no_const = ctype[len('const '):]
+ self.wrapper.write_code(
+ code=('py_%s = pyg_boxed_new(%s, (%s) %s, TRUE, TRUE);' %
+ (self.name, self.props['typecode'],
+ ctype_no_const, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ else:
+ self.wrapper.write_code(
+ code=('py_%s = pyg_boxed_new(%s, %s, FALSE, FALSE);' %
+ (self.name, self.props['typecode'], self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GBoxed", GBoxedParam)
+
+
+class GBoxedReturn(ReturnType):
+ def get_c_type(self):
+ return self.props.get('c_type')
+ def write_decl(self):
+ self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+ def write_error_return(self):
+ self.wrapper.write_code("return retval;")
+ def write_conversion(self):
+ self.wrapper.write_code(code = None,
+ failure_expression=("!pyg_boxed_check(py_retval, %s)" %
+ (self.props['typecode'],)),
+ failure_exception=(
+ 'PyErr_SetString(PyExc_TypeError, "retval should be a %s");'
+ % (self.props['typename'],)))
+ self.wrapper.write_code('retval = pyg_boxed_get(py_retval, %s);' %
+ self.props['typename'])
+
+argtypes.matcher.register_reverse_ret("GBoxed", GBoxedReturn)
+
+
+class GdkRegionPtrReturn(GBoxedReturn):
+ def write_error_return(self):
+ self.wrapper.write_code("return gdk_region_new();")
+ def write_conversion(self):
+ self.props['typecode'] = 'PYGDK_TYPE_REGION'
+ self.props['typename'] = 'GdkRegion'
+ super(GdkRegionPtrReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("GdkRegion*", GdkRegionPtrReturn)
+
+
+class PangoFontDescriptionReturn(GBoxedReturn):
+ def write_error_return(self):
+ self.wrapper.write_code("return pango_font_description_new();")
+ def write_conversion(self):
+ self.props['typecode'] = 'PANGO_TYPE_FONT_DESCRIPTION'
+ self.props['typename'] = 'PangoFontDescription'
+ super(PangoFontDescriptionReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("PangoFontDescription*",
+ PangoFontDescriptionReturn)
+
+
+class PangoFontMetricsReturn(GBoxedReturn):
+ def write_error_return(self):
+ self.wrapper.write_code("return pango_font_metrics_new();")
+ def write_conversion(self):
+ self.props['typecode'] = 'PANGO_TYPE_FONT_METRICS'
+ self.props['typename'] = 'PangoFontMetrics'
+ super(PangoFontMetricsReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("PangoFontMetrics*",
+ PangoFontMetricsReturn)
+
+
+class PangoLanguageReturn(GBoxedReturn):
+ def write_error_return(self):
+ self.wrapper.write_code("return pango_language_from_string(\"\");")
+ def write_conversion(self):
+ self.props['typecode'] = 'PANGO_TYPE_LANGUAGE'
+ self.props['typename'] = 'PangoLanguage'
+ super(PangoLanguageReturn, self).write_conversion()
+
+argtypes.matcher.register_reverse_ret("PangoLanguage*", PangoLanguageReturn)
+
+
+class GdkRectanglePtrParam(Parameter):
+ def get_c_type(self):
+ return self.props.get('c_type').replace('const-', 'const ')
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(
+ code=('py_%s = pyg_boxed_new(GDK_TYPE_RECTANGLE, %s, TRUE, TRUE);' %
+ (self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name))
+ self.wrapper.add_pyargv_item("py_%s" % self.name)
+
+argtypes.matcher.register_reverse("GdkRectangle*", GdkRectanglePtrParam)
+argtypes.matcher.register_reverse('GtkAllocation*', GdkRectanglePtrParam)
+
+
+class GErrorParam(Parameter):
+ def get_c_type(self):
+ return self.props.get('c_type').replace('**', ' **')
+ def convert_c2py(self):
+ self.wrapper.write_code(code=None,
+ failure_expression=("pyg_gerror_exception_check(%s)" % self.name),
+ code_sink=self.wrapper.check_exception_code)
+
+argtypes.matcher.register_reverse('GError**', GErrorParam)
+
+
+class PyGObjectMethodParam(Parameter):
+ def __init__(self, wrapper, name, method_name, **props):
+ Parameter.__init__(self, wrapper, name, **props)
+ self.method_name = method_name
+
+ def get_c_type(self):
+ return self.props.get('c_type', 'GObject *')
+
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+ self.wrapper.write_code(code=("py_%s = pygobject_new((GObject *) %s);" %
+ (self.name, self.name)),
+ cleanup=("Py_DECREF(py_%s);" % self.name),
+ failure_expression=("!py_%s" % self.name))
+ self.wrapper.set_call_target("py_%s" % self.name, self.method_name)
+
+
+class CallbackInUserDataParam(Parameter):
+ def __init__(self, wrapper, name, free_it, **props):
+ Parameter.__init__(self, wrapper, name, **props)
+ self.free_it = free_it
+
+ def get_c_type(self):
+ return "gpointer"
+
+ def convert_c2py(self):
+ self.wrapper.add_declaration("PyObject **_user_data;")
+ cleanup = self.free_it and ("g_free(%s);" % self.name) or None
+ self.wrapper.write_code(code=("_real_user_data = (PyObject **) %s;"
+ % self.name),
+ cleanup=cleanup)
+
+ self.wrapper.add_declaration("PyObject *py_func;")
+ cleanup = self.free_it and "Py_DECREF(py_func);" or None
+ self.wrapper.write_code(code="py_func = _user_data[0];",
+ cleanup=cleanup)
+ self.wrapper.set_call_target("py_func")
+
+ self.wrapper.add_declaration("PyObject *py_user_data;")
+ cleanup = self.free_it and "Py_XDECREF(py_user_data);" or None
+ self.wrapper.write_code(code="py_user_data = _user_data[1];",
+ cleanup=cleanup)
+ self.wrapper.add_pyargv_item("py_user_data", optional=True)
+
+def _test():
+ import sys
+
+ if 1:
+ wrapper = ReverseWrapper("this_is_the_c_function_name", is_static=True)
+ wrapper.set_return_type(StringReturn(wrapper))
+ wrapper.add_parameter(PyGObjectMethodParam(wrapper, "self", method_name="do_xxx"))
+ wrapper.add_parameter(StringParam(wrapper, "param2", optional=True))
+ wrapper.add_parameter(GObjectParam(wrapper, "param3"))
+ #wrapper.add_parameter(InoutIntParam(wrapper, "param4"))
+ wrapper.generate(FileCodeSink(sys.stderr))
+
+ if 0:
+ wrapper = ReverseWrapper("this_a_callback_wrapper")
+ wrapper.set_return_type(VoidReturn(wrapper))
+ wrapper.add_parameter(StringParam(wrapper, "param1", optional=False))
+ wrapper.add_parameter(GObjectParam(wrapper, "param2"))
+ wrapper.add_parameter(CallbackInUserDataParam(wrapper, "data", free_it=True))
+ wrapper.generate(FileCodeSink(sys.stderr))
+
+if __name__ == '__main__':
+ _test()
diff --git a/codegen/scanvirtuals.py b/codegen/scanvirtuals.py
new file mode 100755
index 0000000..c108737
--- /dev/null
+++ b/codegen/scanvirtuals.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+import re
+import sys
+
+
+def main():
+ rx = re.compile(r'^\s*([\w\s\*]+)\(\s*\*\s*(\w+)\s*\)\s*\(([^()]*)\);',
+ re.DOTALL|re.MULTILINE)
+ for f in sys.argv[1:]:
+ #print ";; From", f
+ buf = file(f).read()
+ for m in rx.findall(buf):
+ return_type = m[0].strip()
+ if 'typedef' in return_type:
+ continue
+ if return_type == 'void':
+ return_type = 'none'
+ return_type = return_type.replace(' ', '')
+ virtual_name = m[1]
+ if 'reserved' in virtual_name:
+ continue
+ params = []
+ if not m[2]:
+ print >> sys.stderr, repr(m)
+ continue
+ for param in map(str.strip, m[2].split(',')):
+ if '*' in param:
+ tokens = param.split('*')
+ ptype = tokens[0].strip() + '*'*(len(tokens) - 1)
+ pname = tokens[-1].strip()
+ else:
+ if param == 'void':
+ continue
+ ptype, pname = map(str.strip, param.split())
+ ptype = ptype.replace('const ', 'const-')
+ while '[]' in pname:
+ pname = pname.replace('[]', '')
+ ptype += '[]'
+ params.append((ptype, pname))
+ if not params:
+ continue
+ objname = params[0][0].replace('*', '')
+ print '(define-virtual', virtual_name
+ print ' (of-object "%s")' % objname
+ print ' (return-type "%s")' % return_type
+ if len(params) > 1:
+ print ' (parameters'
+ for param in params[1:]:
+ print ' \'("%s" "%s")' % param
+ print ' )'
+ print ')'
+
+if __name__ == '__main__':
+ main()
diff --git a/codegen/scmexpr.py b/codegen/scmexpr.py
new file mode 100755
index 0000000..02f2e4b
--- /dev/null
+++ b/codegen/scmexpr.py
@@ -0,0 +1,143 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+from __future__ import generators
+
+import string
+from cStringIO import StringIO
+
+class error(Exception):
+ def __init__(self, filename, lineno, msg):
+ Exception.__init__(self, msg)
+ self.filename = filename
+ self.lineno = lineno
+ self.msg = msg
+ def __str__(self):
+ return '%s:%d: error: %s' % (self.filename, self.lineno, self.msg)
+
+trans = [' '] * 256
+for i in range(256):
+ if chr(i) in string.letters + string.digits + '_':
+ trans[i] = chr(i)
+ else:
+ trans[i] = '_'
+trans = string.join(trans, '')
+
+def parse(filename):
+ if isinstance(filename, str):
+ fp = open(filename, 'r')
+ else: # if not string, assume it is some kind of iterator
+ fp = filename
+ filename = getattr(fp, 'name', '<unknown>')
+ whitespace = ' \t\n\r\x0b\x0c'
+ nonsymbol = whitespace + '();\'"'
+ stack = []
+ openlines = []
+ lineno = 0
+ for line in fp:
+ pos = 0
+ lineno += 1
+ while pos < len(line):
+ if line[pos] in whitespace: # ignore whitespace
+ pass
+ elif line[pos] == ';': # comment
+ break
+ elif line[pos:pos+2] == "'(":
+ pass # the open parenthesis will be handled next iteration
+ elif line[pos] == '(':
+ stack.append(())
+ openlines.append(lineno)
+ elif line[pos] == ')':
+ if len(stack) == 0:
+ raise error(filename, lineno, 'close parenthesis found when none open')
+ closed = stack[-1]
+ del stack[-1]
+ del openlines[-1]
+ if stack:
+ stack[-1] += (closed,)
+ else:
+ yield closed
+ elif line[pos] == '"': # quoted string
+ if not stack:
+ raise error(filename, lineno,
+ 'string found outside of s-expression')
+ endpos = pos + 1
+ chars = []
+ while endpos < len(line):
+ if endpos+1 < len(line) and line[endpos] == '\\':
+ endpos += 1
+ if line[endpos] == 'n':
+ chars.append('\n')
+ elif line[endpos] == 'r':
+ chars.append('\r')
+ elif line[endpos] == 't':
+ chars.append('\t')
+ else:
+ chars.append('\\')
+ chars.append(line[endpos])
+ elif line[endpos] == '"':
+ break
+ else:
+ chars.append(line[endpos])
+ endpos += 1
+ if endpos >= len(line):
+ raise error(filename, lineno, "unclosed quoted string")
+ pos = endpos
+ stack[-1] += (''.join(chars),)
+ else: # symbol/number
+ if not stack:
+ raise error(filename, lineno,
+ 'identifier found outside of s-expression')
+ endpos = pos
+ while endpos < len(line) and line[endpos] not in nonsymbol:
+ endpos += 1
+ symbol = line[pos:endpos]
+ pos = max(pos, endpos-1)
+ try: symbol = int(symbol)
+ except ValueError:
+ try: symbol = float(symbol)
+ except ValueError: pass
+ stack[-1] += (symbol,)
+ pos += 1
+ if len(stack) != 0:
+ msg = '%d unclosed parentheses found at end of ' \
+ 'file (opened on line(s) %s)' % (len(stack),
+ ', '.join(map(str, openlines)))
+ raise error(filename, lineno, msg)
+
+class Parser:
+ def __init__(self, filename):
+ """Argument is either a string, a parse tree, or file object"""
+ self.filename = filename
+ def startParsing(self, filename=None):
+ statements = parse(filename or self.filename)
+ for statement in statements:
+ self.handle(statement)
+ def handle(self, tup):
+ cmd = string.translate(tup[0], trans)
+ if hasattr(self, cmd):
+ getattr(self, cmd)(*tup[1:])
+ else:
+ self.unknown(tup)
+ def unknown(self, tup):
+ pass
+
+_testString = """; a scheme file
+(define-func gdk_font_load ; a comment at end of line
+ GdkFont
+ ((string name)))
+
+(define-boxed GdkEvent
+ gdk_event_copy
+ gdk_event_free
+ "sizeof(GdkEvent)")
+"""
+
+if __name__ == '__main__':
+ import sys
+ if sys.argv[1:]:
+ fp = open(sys.argv[1])
+ else:
+ fp = StringIO(_testString)
+ statements = parse(fp)
+ for s in statements:
+ print `s`
diff --git a/compile b/compile
new file mode 100755
index 0000000..c0096a7
--- /dev/null
+++ b/compile
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-10-06.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..dc84c68
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1501 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..061e620
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,80 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Use PyGI to create wrappers for introspection-enabled types */
+#undef ENABLE_PYGI
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Have libffi include files */
+#undef HAVE_FFI_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if PySignal_SetWakeupFd is available */
+#undef HAVE_PYSIGNAL_SETWAKEUPFD
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* pygobject major version */
+#undef PYGOBJECT_MAJOR_VERSION
+
+/* pygobject micro version */
+#undef PYGOBJECT_MICRO_VERSION
+
+/* pygobject minor version */
+#undef PYGOBJECT_MINOR_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..2a55a50
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1705 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..b53dedf
--- /dev/null
+++ b/configure
@@ -0,0 +1,16893 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63 for pygobject 2.21.3.
+#
+# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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
+
+
+
+
+# PATH needs CR
+# 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_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
+if (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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+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.
+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); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+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
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+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_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. 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
+ { (exit 1); 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+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=:
+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'"
+
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, 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=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='pygobject'
+PACKAGE_TARNAME='pygobject'
+PACKAGE_VERSION='2.21.3'
+PACKAGE_STRING='pygobject 2.21.3'
+PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
+
+ac_unique_file="gobject/gobjectmodule.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+BUILD_GIOUNIX_FALSE
+BUILD_GIOUNIX_TRUE
+GIOUNIX_LIBS
+GIOUNIX_CFLAGS
+BUILD_GIO_FALSE
+BUILD_GIO_TRUE
+GIO_LIBS
+GIO_CFLAGS
+LIBFFI_PC
+HAVE_LIBFFI_FALSE
+HAVE_LIBFFI_TRUE
+FFI_LIBS
+FFI_CFLAGS
+DATADIR
+pygobject_CODEGEN_DEFINES
+PYTHON_BASENAME
+GLIB_MKENUMS
+GOBJECT_QUERY
+GLIB_GENMARSHAL
+GLIB_LIBS
+GLIB_CFLAGS
+PKG_CONFIG
+THREADING_CFLAGS
+ENABLE_DOCS_FALSE
+ENABLE_DOCS_TRUE
+XSLTPROC
+PLATFORM
+PYTHON_INCLUDES
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+OS_WIN32_FALSE
+OS_WIN32_TRUE
+PLATFORM_WIN32_FALSE
+PLATFORM_WIN32_TRUE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+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
+PYGOBJECT_MICRO_VERSION
+PYGOBJECT_MINOR_VERSION
+PYGOBJECT_MAJOR_VERSION
+ACLOCAL_AMFLAGS
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_static
+enable_shared
+with_pic
+enable_fast_install
+enable_dependency_tracking
+with_gnu_ld
+enable_libtool_lock
+enable_thread
+enable_docs
+enable_glibtest
+with_ffi
+enable_pygi
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+FFI_CFLAGS
+FFI_LIBS
+GIO_CFLAGS
+GIO_LIBS
+GIOUNIX_CFLAGS
+GIOUNIX_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=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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ 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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ 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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ 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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ 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_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ 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_echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $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_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+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_echo "$as_me: error: working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# 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_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures pygobject 2.21.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/pygobject]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of pygobject 2.21.3:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-static[=PKGS] build static libraries [default=no]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-thread Disable pygobject threading support
+ --enable-docs Enable documentation building
+ --disable-glibtest do not try to compile and run a test GLIB program
+ --enable-pygi Use PyGI to create wrappers for
+ introspection-enabled types
+
+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]
+ --without-ffi Disable libffi support
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective 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
+ FFI_CFLAGS C compiler flags for FFI, overriding pkg-config
+ FFI_LIBS linker flags for FFI, overriding pkg-config
+ GIO_CFLAGS C compiler flags for GIO, overriding pkg-config
+ GIO_LIBS linker flags for GIO, overriding pkg-config
+ GIOUNIX_CFLAGS
+ C compiler flags for GIOUNIX, overriding pkg-config
+ GIOUNIX_LIBS
+ linker flags for GIOUNIX, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+pygobject configure 2.21.3
+generated by GNU Autoconf 2.63
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 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
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by pygobject $as_me 2.21.3, which was
+generated by GNU Autoconf 2.63. 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) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$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
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ 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:$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= ;; #(
+ *) $as_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
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ 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
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ 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
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ 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'; { (exit 1); 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
+
+# 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
+
+
+# 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
+ ac_site_file1=$CONFIG_SITE
+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 -r "$ac_site_file"; then
+ { $as_echo "$as_me:$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"
+ 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.
+ if test -f "$cache_file"; then
+ { $as_echo "$as_me:$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:$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:$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:$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:$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:$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:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$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.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+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
+
+
+ACLOCAL_AMFLAGS="-I m4 -I ."
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define PYGOBJECT_MAJOR_VERSION 2
+_ACEOF
+
+PYGOBJECT_MAJOR_VERSION=2
+
+
+cat >>confdefs.h <<\_ACEOF
+#define PYGOBJECT_MINOR_VERSION 21
+_ACEOF
+
+PYGOBJECT_MINOR_VERSION=21
+
+
+cat >>confdefs.h <<\_ACEOF
+#define PYGOBJECT_MICRO_VERSION 3
+_ACEOF
+
+PYGOBJECT_MICRO_VERSION=3
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; 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:$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:$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_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
+ { (exit 1); exit 1; }; };;
+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_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+$as_echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+{ $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; 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:$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:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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:$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:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$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 test "${ac_cv_path_mkdir+set}" = set; 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
+
+ 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.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; 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:$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:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:$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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='pygobject'
+ VERSION='2.21.3'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; 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_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+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:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; 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_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking for some Win32 platform" >&5
+$as_echo_n "checking for some Win32 platform... " >&6; }
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ platform_win32=yes
+ ;;
+ *)
+ platform_win32=no
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $platform_win32" >&5
+$as_echo "$platform_win32" >&6; }
+ if test "$platform_win32" = "yes"; then
+ PLATFORM_WIN32_TRUE=
+ PLATFORM_WIN32_FALSE='#'
+else
+ PLATFORM_WIN32_TRUE='#'
+ PLATFORM_WIN32_FALSE=
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for native Win32" >&5
+$as_echo_n "checking for native Win32... " >&6; }
+case "$host" in
+ *-*-mingw*)
+ os_win32=yes
+ ;;
+ *)
+ os_win32=no
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $os_win32" >&5
+$as_echo "$os_win32" >&6; }
+ if test "$os_win32" = "yes"; then
+ OS_WIN32_TRUE=
+ OS_WIN32_FALSE='#'
+else
+ OS_WIN32_TRUE='#'
+ OS_WIN32_FALSE=
+fi
+
+
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=no
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:$LINENO: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; 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:$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:$LINENO: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; 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:$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:$LINENO: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; 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:$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:$LINENO: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; 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:$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:$LINENO: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:$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.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+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:$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:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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:$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:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; 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:$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:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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:$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:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$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 test "${ac_cv_c_compiler_gnu+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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:$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:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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:$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:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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"
+ 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+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
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:$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 test "${ac_cv_path_SED+set}" = set; 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
+ $as_unset ac_script || 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
+ ac_count=`expr $ac_count + 1`
+ 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_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:$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:$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 test "${ac_cv_path_GREP+set}" = set; 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
+ ac_count=`expr $ac_count + 1`
+ 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_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; 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
+ ac_count=`expr $ac_count + 1`
+ 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_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; 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
+ ac_count=`expr $ac_count + 1`
+ 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_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:$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:$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:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; 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:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; 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:$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:$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 test "${lt_cv_path_NM+set}" = set; 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:$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 "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ 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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; 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:$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:$LINENO: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:$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 -symbols" "link -dump -symbols"
+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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; 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:$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:$LINENO: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:$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:$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
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; 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:4851: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4854: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4857: 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:$LINENO: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:$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:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; 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;
+ ;;
+
+ 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$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:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:$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:$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"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:$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:$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:$LINENO: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:$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
+ 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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; 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:$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:$LINENO: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; 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:$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:$LINENO: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; 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.
+ if ( 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
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ 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
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+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)
+ 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:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+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}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; 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}ar"
+ $as_echo "$as_me:$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:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; 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="ar"
+ $as_echo "$as_me:$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:$LINENO: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; 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:$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:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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:$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:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; 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:$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:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; 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:$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:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$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:$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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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:$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 test "${lt_cv_sys_global_symbol_pipe+set}" = set; 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
+
+ # 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:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && 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
+#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. */
+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_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_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:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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 6060 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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:$LINENO: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ lt_cv_cc_needs_belf=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ lt_cv_cc_needs_belf=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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:$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:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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"
+
+
+ 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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; 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:$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:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; 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:$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:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; 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:$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:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; 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:$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:$LINENO: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; 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:$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:$LINENO: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; 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:$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:$LINENO: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; 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:$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:$LINENO: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; 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:$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:$LINENO: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; 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:$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:$LINENO: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; 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:$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:$LINENO: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:$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:$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:$LINENO: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; 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:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ lt_cv_ld_exported_symbols_list=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ lt_cv_ld_exported_symbols_list=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&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" != ":"; 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:$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 test "${ac_cv_prog_CPP+set}" = set; 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f 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:$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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+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:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+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
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+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`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = 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
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; 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:$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
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# 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'
+
+# 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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "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:$LINENO: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; 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:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; 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:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:$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
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; 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:7885: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:7889: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:$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=
+
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ 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'
+ ;;
+
+ 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
+ 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)
+ 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'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # 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*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # 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=''
+ ;;
+ 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*)
+ 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:$LINENO: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_pic_works+set}" = set; 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:8224: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8228: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:$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:$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 test "${lt_cv_prog_compiler_static_works+set}" = set; 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ 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:$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:$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 test "${lt_cv_prog_compiler_c_o+set}" = set; 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:8329: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8333: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_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:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:$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 test "${lt_cv_prog_compiler_c_o+set}" = set; 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:8384: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8388: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_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:$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:$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:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:$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:$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
+ if test "$with_gnu_ld" = 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
+ *\ [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.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_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'
+ 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/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ 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
+ ;;
+
+ 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)
+ 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=
+ 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$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]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ 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; $ECHO \"$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*)
+ # 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 $compiler_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 $compiler_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 $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'
+ 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 $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
+ ;;
+
+ 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 $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
+
+ 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
+ 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")) && (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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+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 "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+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 "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ 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.
+ 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 `$ECHO "X$deplibs" | $Xsed -e '\''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'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ 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=echo
+ 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 -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 -fPIC ${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 -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${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 -a "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${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'
+ ;;
+ *)
+ archive_cmds='$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
+ 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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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 ${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 ${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:$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:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 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:$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:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:$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
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # 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; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ 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,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+
+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'
+ ;;
+
+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)
+ 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
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+ shlibpath_overrides_runpath=yes
+fi
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # 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;/^$/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:$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:$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:$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:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_lib_dl_dlopen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; 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
+
+ ;;
+
+ *)
+ { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
+$as_echo_n "checking for shl_load... " >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load (); 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 shl_load
+
+/* 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 ();
+/* 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_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_func_shl_load=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_shl_load=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+$as_echo "$ac_cv_func_shl_load" >&6; }
+if test "x$ac_cv_func_shl_load" = x""yes; then
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_lib_dld_shl_load=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dld_shl_load=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$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" = x""yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
+$as_echo_n "checking for dlopen... " >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); 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 dlopen
+
+/* 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 ();
+/* 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_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_func_dlopen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+$as_echo "$ac_cv_func_dlopen" >&6; }
+if test "x$ac_cv_func_dlopen" = x""yes; then
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_lib_dl_dlopen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_lib_svld_dlopen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_svld_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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_cv_lib_dld_dld_link=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dld_dld_link=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$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" = x""yes; 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:$LINENO: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; 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 11187 "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
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && 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:$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:$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 test "${lt_cv_dlopen_self_static+set}" = set; 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 11283 "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
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && 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:$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:$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:$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:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:$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:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:$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:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+: ${CONFIG_LT=./config.lt}
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_LT" >&5
+$as_echo "$as_me: creating $CONFIG_LT" >&6;}
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+## --------------------- ##
+## 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
+
+
+
+
+# PATH needs CR
+# 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_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
+if (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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+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.
+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); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. 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:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+$as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+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=:
+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
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $0 [OPTIONS]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+pygobject config.lt 2.21.3
+configured by $0, generated by GNU Autoconf 2.63.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $# != 0
+do
+ case $1 in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) { { $as_echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+$as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: unrecognized argument: $1
+Try \`$0 --help' for more information." >&5
+$as_echo "$as_me: error: unrecognized argument: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec 6>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+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 \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+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 \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$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 \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+{ $as_echo "$as_me:$LINENO: creating $ofile" >&5
+$as_echo "$as_me: creating $ofile" >&6;}
+
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# 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
+
+# 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
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# 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
+
+# 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
+
+# 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
+
+# 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
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# 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
+
+# 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# 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 ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# 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 ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# 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_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}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# 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 ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -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 file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# 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 "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+{ (exit 0); 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.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec 5>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec 5>>config.log
+ $lt_cl_success || { (exit 1); exit 1; }
+fi
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:$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:$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 { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+ 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:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+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
+
+
+
+
+
+
+
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.3.5" >&5
+$as_echo_n "checking whether $PYTHON version >= 2.3.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.3.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:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { { $as_echo "$as_me:$LINENO: error: too old" >&5
+$as_echo "$as_me: error: too old" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ { $as_echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.3.5" >&5
+$as_echo_n "checking for a Python interpreter with version >= 2.3.5... " >&6; }
+if test "${am_cv_pathless_PYTHON+set}" = set; 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.3.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:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PYTHON+set}" = set; 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:$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:$LINENO: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+
+
+ if test "$PYTHON" = :; then
+ { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+$as_echo "$as_me: error: no suitable Python interpreter found" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+
+
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if test "${am_cv_python_version+set}" = set; 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:$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:$LINENO: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if test "${am_cv_python_platform+set}" = set; 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:$LINENO: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+ PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if test "${am_cv_python_pythondir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+fi
+{ $as_echo "$as_me:$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:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if test "${am_cv_python_pyexecdir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+ echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+ pyexecdir=$am_cv_python_pyexecdir
+
+
+
+ pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+ fi
+
+
+
+
+
+
+
+ # Find any Python interpreter.
+ if test -z "$PYTHON"; then
+ for ac_prog in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PYTHON+set}" = set; 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:$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:$LINENO: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PYTHON" && break
+done
+test -n "$PYTHON" || PYTHON=":"
+
+ fi
+ am_display_PYTHON=python
+
+
+ if test "$PYTHON" = :; then
+ { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+$as_echo "$as_me: error: no suitable Python interpreter found" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+
+
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if test "${am_cv_python_version+set}" = set; 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:$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:$LINENO: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if test "${am_cv_python_platform+set}" = set; 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:$LINENO: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+ PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if test "${am_cv_python_pythondir+set}" = set; 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:$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:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if test "${am_cv_python_pyexecdir+set}" = set; 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:$LINENO: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+ pyexecdir=$am_cv_python_pyexecdir
+
+
+
+ pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+ fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for headers required to compile python extensions" >&5
+$as_echo_n "checking for headers required to compile python extensions... " >&6; }
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
+if test -x "$PYTHON-config"; then
+PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <Python.h>
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ { $as_echo "$as_me:$LINENO: result: found" >&5
+$as_echo "found" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: not found" >&5
+$as_echo "not found" >&6; }
+{ { $as_echo "$as_me:$LINENO: error: could not find Python headers" >&5
+$as_echo "$as_me: error: could not find Python headers" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.err conftest.$ac_ext
+CPPFLAGS="$save_CPPFLAGS"
+
+
+{ $as_echo "$as_me:$LINENO: checking for PySignal_SetWakeupFd in Python.h" >&5
+$as_echo_n "checking for PySignal_SetWakeupFd in Python.h... " >&6; }
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+if test -x "$PYTHON-config"; then
+PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+fi
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <Python.h>
+int
+main ()
+{
+PySignal_SetWakeupFd(0);
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ setwakeupfd_ok=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ setwakeupfd_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $setwakeupfd_ok" >&5
+$as_echo "$setwakeupfd_ok" >&6; }
+if test "x$setwakeupfd_ok" != xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PYSIGNAL_SETWAKEUPFD 1
+_ACEOF
+
+fi
+CPPFLAGS=$old_CPPFLAGS
+
+PLATFORM=`$PYTHON -c "import sys; from distutils import util; sys.stdout.write(util.get_platform())"`
+
+
+# Check whether --enable-thread was given.
+if test "${enable_thread+set}" = set; then
+ enableval=$enable_thread;
+else
+ enable_thread=yes
+fi
+
+
+# Check whether --enable-docs was given.
+if test "${enable_docs+set}" = set; then
+ enableval=$enable_docs; enable_docs=$enableval
+else
+ enable_docs=no
+fi
+
+if test "${enable_docs}" != no; then
+ # Extract the first word of "xsltproc", so it can be a program name with args.
+set dummy xsltproc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XSLTPROC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $XSLTPROC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XSLTPROC=$ac_cv_path_XSLTPROC
+if test -n "$XSLTPROC"; then
+ { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test -z "$XSLTPROC"; then
+ enable_docs=no
+ fi
+
+ fi
+
+ if test x$enable_docs != xno; then
+ ENABLE_DOCS_TRUE=
+ ENABLE_DOCS_FALSE='#'
+else
+ ENABLE_DOCS_TRUE='#'
+ ENABLE_DOCS_FALSE=
+fi
+
+
+
+py_mod_var=`echo thread'_' | sed 'y%./+-%__p_%'`
+{ $as_echo "$as_me:$LINENO: checking for python module thread" >&5
+$as_echo_n "checking for python module thread... " >&6; }
+if { as_var=py_cv_mod_$py_mod_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+
+prog="
+import sys
+try:
+ import thread
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"
+if $PYTHON -c "$prog" 1>&5 2>&5
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+
+fi
+
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ enable_thread=no
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether to enable threading in pygobject" >&5
+$as_echo_n "checking whether to enable threading in pygobject... " >&6; }
+if test "x$enable_thread" != xno; then
+ extra_mods=gthread
+ THREADING_CFLAGS=
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ extra_mods=
+ THREADING_CFLAGS="-DDISABLE_THREADING"
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+CPPFLAGS="${CPPFLAGS} $THREADING_CFLAGS"
+
+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+
+# Check whether --enable-glibtest was given.
+if test "${enable_glibtest+set}" = set; then
+ enableval=$enable_glibtest;
+else
+ enable_glibtest=yes
+fi
+
+
+ pkg_config_args=glib-2.0
+ for module in . gobject $extra_mods
+ do
+ case "$module" in
+ gmodule)
+ pkg_config_args="$pkg_config_args gmodule-2.0"
+ ;;
+ gmodule-no-export)
+ pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
+ ;;
+ gobject)
+ pkg_config_args="$pkg_config_args gobject-2.0"
+ ;;
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.0"
+ ;;
+ gio*)
+ pkg_config_args="$pkg_config_args $module-2.0"
+ ;;
+ esac
+ done
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; 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:$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:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; 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:$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:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$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:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.16
+ { $as_echo "$as_me:$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:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+ no_glib=""
+
+ if test "x$PKG_CONFIG" = x ; then
+ no_glib=yes
+ PKG_CONFIG=no
+ fi
+
+ min_glib_version=2.22.4
+ { $as_echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5
+$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+ enable_glibtest=no
+ fi
+
+ if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+ :
+ else
+ no_glib=yes
+ fi
+ fi
+
+ if test x"$no_glib" = x ; then
+ GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+ GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+ GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+ glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+ if test "x$enable_glibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$GLIB_LIBS $LIBS"
+ rm -f conf.glibtest
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ fclose (fopen ("conf.glibtest", "w"));
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_glib_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_glib_version");
+ exit(1);
+ }
+
+ if ((glib_major_version != $glib_config_major_version) ||
+ (glib_minor_version != $glib_config_minor_version) ||
+ (glib_micro_version != $glib_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
+ (glib_micro_version != GLIB_MICRO_VERSION))
+ {
+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ }
+ else
+ {
+ if ((glib_major_version > major) ||
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+
+_ACEOF
+rm -f 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { 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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+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
+
+( exit $ac_status )
+no_glib=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_glib" = x ; then
+ { $as_echo "$as_me:$LINENO: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
+$as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; }
+ :
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+ else
+ if test -f conf.glibtest ; then
+ :
+ else
+ echo "*** Could not run GLIB test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <glib.h>
+#include <stdio.h>
+
+int
+main ()
+{
+ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ 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
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GLIB_CFLAGS=""
+ GLIB_LIBS=""
+ GLIB_GENMARSHAL=""
+ GOBJECT_QUERY=""
+ GLIB_MKENUMS=""
+ { { $as_echo "$as_me:$LINENO: error: maybe you want the pygobject-2-4 branch?" >&5
+$as_echo "$as_me: error: maybe you want the pygobject-2-4 branch?" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+
+
+
+
+ rm -f conf.glibtest
+
+if test -n "$export_dynamic"; then
+ GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"`
+fi
+PYTHON_BASENAME=`basename $PYTHON`
+
+
+pygobject_CODEGEN_DEFINES=""
+
+
+
+ EXP_VAR=DATADIR
+ FROM_VAR=$datadir
+
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ if test "x$prefix" = "xNONE"; then
+ prefix=$ac_default_prefix
+ fi
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var"="x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ full_var=$new_full_var
+ DATADIR="$full_var"
+
+
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+
+
+{ $as_echo "$as_me:$LINENO: checking for ffi" >&5
+$as_echo_n "checking for ffi... " >&6; }
+
+# Check whether --with-ffi was given.
+if test "${with_ffi+set}" = set; then
+ withval=$with_ffi; with_libffi=$withval
+else
+ with_libffi=auto
+fi
+
+if test x"$with_libffi" = xno ; then
+ have_libffi=false
+else
+
+pkg_failed=no
+{ $as_echo "$as_me:$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:$LINENO: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libffi >= 3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$FFI_LIBS"; then
+ pkg_cv_FFI_LIBS="$FFI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libffi >= 3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi >= 3.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi >= 3.0" 2>&1`
+ else
+ FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi >= 3.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FFI_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ have_libffi=no
+elif test $pkg_failed = untried; then
+ have_libffi=no
+else
+ FFI_CFLAGS=$pkg_cv_FFI_CFLAGS
+ FFI_LIBS=$pkg_cv_FFI_LIBS
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libffi=yes
+fi
+fi
+if test x"$with_libffi" = xyes && test x"$have_libffi" = xno ; then
+ { { $as_echo "$as_me:$LINENO: error: ffi requested, but not found" >&5
+$as_echo "$as_me: error: ffi requested, but not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test x"$have_libffi" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FFI_H 1
+_ACEOF
+
+ LIBFFI_PC=libffi
+fi
+{ $as_echo "$as_me:$LINENO: result: $have_libffi" >&5
+$as_echo "$have_libffi" >&6; }
+ if test "$have_libffi" = "yes"; then
+ HAVE_LIBFFI_TRUE=
+ HAVE_LIBFFI_FALSE='#'
+else
+ HAVE_LIBFFI_TRUE='#'
+ HAVE_LIBFFI_FALSE=
+fi
+
+
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:$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:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.22.4\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.22.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.22.4" 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:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.22.4\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.22.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.22.4" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+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.22.4" 2>&1`
+ else
+ GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0 >= 2.22.4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GIO_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ have_gio=false
+elif test $pkg_failed = untried; then
+ have_gio=false
+else
+ GIO_CFLAGS=$pkg_cv_GIO_CFLAGS
+ GIO_LIBS=$pkg_cv_GIO_LIBS
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_gio=true
+fi
+
+
+ if $have_gio; then
+ BUILD_GIO_TRUE=
+ BUILD_GIO_FALSE='#'
+else
+ BUILD_GIO_TRUE='#'
+ BUILD_GIO_FALSE=
+fi
+
+if test -n "$export_dynamic"; then
+ GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for GIOUNIX" >&5
+$as_echo_n "checking for GIOUNIX... " >&6; }
+
+if test -n "$GIOUNIX_CFLAGS"; then
+ pkg_cv_GIOUNIX_CFLAGS="$GIOUNIX_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_GIOUNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0 >= 2.22.4" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$GIOUNIX_LIBS"; then
+ pkg_cv_GIOUNIX_LIBS="$GIOUNIX_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_GIOUNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0 >= 2.22.4" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1`
+ else
+ GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GIOUNIX_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ have_giounix=false
+elif test $pkg_failed = untried; then
+ have_giounix=false
+else
+ GIOUNIX_CFLAGS=$pkg_cv_GIOUNIX_CFLAGS
+ GIOUNIX_LIBS=$pkg_cv_GIOUNIX_LIBS
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_giounix=true
+fi
+
+
+ if $have_giounix; then
+ BUILD_GIOUNIX_TRUE=
+ BUILD_GIOUNIX_FALSE='#'
+else
+ BUILD_GIOUNIX_TRUE='#'
+ BUILD_GIOUNIX_FALSE=
+fi
+
+if test -n "$export_dynamic"; then
+ GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+# Check whether --enable-pygi was given.
+if test "${enable_pygi+set}" = set; then
+ enableval=$enable_pygi; enable_pygi=$enableval
+else
+ enable_pygi=no
+fi
+
+if test "$enable_pygi" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_PYGI 1
+_ACEOF
+
+fi
+
+if test "x$GCC" = "xyes"; then
+
+case " $CFLAGS " in
+*[\ \ ]-Wall[\ \ ]*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wall"
+ { $as_echo "$as_me:$LINENO: checking whether $CC understands -Wall" >&5
+$as_echo_n "checking whether $CC understands -Wall... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ jh_has_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ jh_has_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:$LINENO: result: $jh_has_option" >&5
+$as_echo "$jh_has_option" >&6; }
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac
+
+case " $CFLAGS " in
+*[\ \ ]-fno-strict-aliasing[\ \ ]*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+ { $as_echo "$as_me:$LINENO: checking whether $CC understands -fno-strict-aliasing" >&5
+$as_echo_n "checking whether $CC understands -fno-strict-aliasing... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ jh_has_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ jh_has_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:$LINENO: result: $jh_has_option" >&5
+$as_echo "$jh_has_option" >&6; }
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac
+
+ case $host_os in
+ solaris*)
+ ;;
+ *)
+
+case " $CFLAGS " in
+*[\ \ ]-std=c9x[\ \ ]*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -std=c9x"
+ { $as_echo "$as_me:$LINENO: checking whether $CC understands -std=c9x" >&5
+$as_echo_n "checking whether $CC understands -std=c9x... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+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:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ jh_has_option=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ jh_has_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:$LINENO: result: $jh_has_option" >&5
+$as_echo "$jh_has_option" >&6; }
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac
+ ;;
+ esac
+
+fi
+
+ac_config_files="$ac_config_files Makefile pygobject-2.0.pc pygobject-2.0-uninstalled.pc codegen/Makefile codegen/pygobject-codegen-2.0 docs/Makefile docs/reference/entities.docbook docs/xsl/fixxref.py glib/Makefile gobject/Makefile gio/Makefile examples/Makefile tests/Makefile PKG-INFO"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$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= ;; #(
+ *) $as_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
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:$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=
+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.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$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 "${PLATFORM_WIN32_TRUE}" && test -z "${PLATFORM_WIN32_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"PLATFORM_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"PLATFORM_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"OS_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"OS_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_DOCS_TRUE}" && test -z "${ENABLE_DOCS_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"ENABLE_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_LIBFFI_TRUE}" && test -z "${HAVE_LIBFFI_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBFFI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_LIBFFI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${BUILD_GIO_TRUE}" && test -z "${BUILD_GIO_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_GIO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_GIO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${BUILD_GIOUNIX_TRUE}" && test -z "${BUILD_GIOUNIX_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_GIOUNIX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_GIOUNIX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+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:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_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}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_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
+
+
+
+
+# PATH needs CR
+# 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_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
+if (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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+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.
+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); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. 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
+ { (exit 1); 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+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=:
+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
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by pygobject $as_me 2.21.3, which was
+generated by GNU Autoconf 2.63. 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 from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, 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 <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+pygobject config.status 2.21.3
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 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=$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 ;;
+ --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"` ;;
+ esac
+ CONFIG_FILES="$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
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --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_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+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 \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+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 \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$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 \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+ac_aux_dir='$ac_aux_dir'
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "pygobject-2.0.pc") CONFIG_FILES="$CONFIG_FILES pygobject-2.0.pc" ;;
+ "pygobject-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pygobject-2.0-uninstalled.pc" ;;
+ "codegen/Makefile") CONFIG_FILES="$CONFIG_FILES codegen/Makefile" ;;
+ "codegen/pygobject-codegen-2.0") CONFIG_FILES="$CONFIG_FILES codegen/pygobject-codegen-2.0" ;;
+ "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+ "docs/reference/entities.docbook") CONFIG_FILES="$CONFIG_FILES docs/reference/entities.docbook" ;;
+ "docs/xsl/fixxref.py") CONFIG_FILES="$CONFIG_FILES docs/xsl/fixxref.py" ;;
+ "glib/Makefile") CONFIG_FILES="$CONFIG_FILES glib/Makefile" ;;
+ "gobject/Makefile") CONFIG_FILES="$CONFIG_FILES gobject/Makefile" ;;
+ "gio/Makefile") CONFIG_FILES="$CONFIG_FILES gio/Makefile" ;;
+ "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "PKG-INFO") CONFIG_FILES="$CONFIG_FILES PKG-INFO" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ 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=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+# 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=' '
+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 {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+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_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+ 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_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ 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 >>"\$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 >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ 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[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+ { (exit 1); exit 1; }; }
+ 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 = ""
+}
+/^[\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_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+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_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+ { (exit 1); exit 1; }; };;
+ :[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="$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_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$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:$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 >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ 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"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ 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:$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 "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$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 "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
+ 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:$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
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ 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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ # 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 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# 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
+
+# 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
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# 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
+
+# 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
+
+# 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
+
+# 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
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# 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
+
+# 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# 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 ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# 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 ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# 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_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}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# 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 ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -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 file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# 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 "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+
+# 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 || { (exit 1); exit 1; }
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo
+echo "libffi support: $have_libffi"
+echo
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..4146420
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,244 @@
+-*- mode: m4 -*-
+AC_PREREQ(2.52)
+
+dnl the pygobject version number
+m4_define(pygobject_major_version, 2)
+m4_define(pygobject_minor_version, 21)
+m4_define(pygobject_micro_version, 3)
+m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
+
+dnl versions of packages we require ...
+m4_define(glib_required_version, 2.22.4)
+m4_define(gio_required_version, 2.22.4)
+m4_define(giounix_required_version, 2.22.4)
+
+AC_INIT(pygobject, pygobject_version,
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject])
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .")
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_DEFINE(PYGOBJECT_MAJOR_VERSION, pygobject_major_version, [pygobject major version])
+AC_SUBST(PYGOBJECT_MAJOR_VERSION, pygobject_major_version)
+AC_DEFINE(PYGOBJECT_MINOR_VERSION, pygobject_minor_version, [pygobject minor version])
+AC_SUBST(PYGOBJECT_MINOR_VERSION, pygobject_minor_version)
+AC_DEFINE(PYGOBJECT_MICRO_VERSION, pygobject_micro_version, [pygobject micro version])
+AC_SUBST(PYGOBJECT_MICRO_VERSION, pygobject_micro_version)
+
+AC_CONFIG_SRCDIR([gobject/gobjectmodule.c])
+AM_CONFIG_HEADER(config.h)
+
+AM_INIT_AUTOMAKE
+
+dnl put the ACLOCAL flags in the makefile
+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_MSG_CHECKING([for some Win32 platform])
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ platform_win32=yes
+ ;;
+ *)
+ platform_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$platform_win32])
+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+ *-*-mingw*)
+ os_win32=yes
+ ;;
+ *)
+ os_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+
+AC_DISABLE_STATIC
+
+dnl XXXX hack to kill off all the libtool tags ...
+dnl it isn't like we are using C++ or Fortran.
+dnl (copied from libglade/configure.in)
+m4_define([_LT_AC_TAGCONFIG],[])
+
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+dnl when using libtool 2.x create libtool early, because it's used in configure
+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+AM_PROG_CC_C_O
+
+JD_PATH_PYTHON(2.3.5)
+
+JD_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+
+AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+if test -x "$PYTHON-config"; then
+PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+fi
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
+AC_TRY_COMPILE([#include <Python.h>],
+ [PySignal_SetWakeupFd(0);],
+ setwakeupfd_ok=yes,
+ setwakeupfd_ok=no)
+AC_MSG_RESULT($setwakeupfd_ok)
+if test "x$setwakeupfd_ok" != xno; then
+ AC_DEFINE(HAVE_PYSIGNAL_SETWAKEUPFD, 1,
+ [Define to 1 if PySignal_SetWakeupFd is available])
+fi
+CPPFLAGS=$old_CPPFLAGS
+
+PLATFORM=`$PYTHON -c "import sys; from distutils import util; sys.stdout.write(util.get_platform())"`
+AC_SUBST(PLATFORM)
+
+AC_ARG_ENABLE(thread,
+ AC_HELP_STRING([--disable-thread], [Disable pygobject threading support]),,
+ enable_thread=yes)
+
+dnl Building documentation
+AC_ARG_ENABLE(docs,
+ AC_HELP_STRING([--enable-docs], [Enable documentation building]),enable_docs=$enableval,
+ enable_docs=no)
+if test "${enable_docs}" != no; then
+ dnl
+ dnl Check for xsltproc
+ dnl
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test -z "$XSLTPROC"; then
+ enable_docs=no
+ fi
+
+ dnl check for DocBook DTD and stylesheets in the local catalog.
+ dnl JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
+ dnl [DocBook XML DTD V4.1.2],,enable_docs=no)
+ dnl JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
+ dnl [DocBook XSL Stylesheets],,enable_docs=no)
+fi
+
+AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno)
+
+AM_CHECK_PYMOD(thread,,,enable_thread=no)
+
+AC_MSG_CHECKING(whether to enable threading in pygobject)
+if test "x$enable_thread" != xno; then
+ extra_mods=gthread
+ THREADING_CFLAGS=
+ AC_MSG_RESULT(yes)
+else
+ extra_mods=
+ THREADING_CFLAGS="-DDISABLE_THREADING"
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST(THREADING_CFLAGS)
+CPPFLAGS="${CPPFLAGS} $THREADING_CFLAGS"
+
+dnl get rid of the -export-dynamic stuff from the configure flags ...
+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+
+dnl glib
+AM_PATH_GLIB_2_0(glib_required_version,,[AC_MSG_ERROR(maybe you want the pygobject-2-4 branch?)],gobject $extra_mods)
+if test -n "$export_dynamic"; then
+ GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"`
+fi
+PYTHON_BASENAME=`basename $PYTHON`
+AC_SUBST([PYTHON_BASENAME])
+
+pygobject_CODEGEN_DEFINES=""
+AC_SUBST([pygobject_CODEGEN_DEFINES])
+
+AS_AC_EXPAND(DATADIR, $datadir)
+
+dnl libffi
+AC_MSG_CHECKING(for ffi)
+AC_ARG_WITH(ffi,
+ AC_HELP_STRING([--without-ffi], [Disable libffi support]),
+ with_libffi=$withval,
+ with_libffi=auto)
+if test x"$with_libffi" = xno ; then
+ have_libffi=false
+else
+ PKG_CHECK_MODULES(FFI, libffi >= 3.0, have_libffi=yes, have_libffi=no)
+fi
+if test x"$with_libffi" = xyes && test x"$have_libffi" = xno ; then
+ AC_MSG_ERROR([ffi requested, but not found])
+fi
+if test x"$have_libffi" = xyes; then
+ AC_DEFINE(HAVE_FFI_H,1,[Have libffi include files])
+ LIBFFI_PC=libffi
+fi
+AC_MSG_RESULT([$have_libffi])
+AM_CONDITIONAL(HAVE_LIBFFI, test "$have_libffi" = "yes")
+AC_SUBST(FFI_CFLAGS)
+AC_SUBST(FFI_LIBS)
+AC_SUBST(LIBFFI_PC)
+
+dnl gio
+PKG_CHECK_MODULES(GIO, gio-2.0 >= gio_required_version,
+ have_gio=true, have_gio=false)
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+AM_CONDITIONAL(BUILD_GIO, $have_gio)
+if test -n "$export_dynamic"; then
+ GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+dnl giounix
+PKG_CHECK_MODULES(GIOUNIX, gio-unix-2.0 >= giounix_required_version,
+ have_giounix=true, have_giounix=false)
+AC_SUBST(GIOUNIX_CFLAGS)
+AC_SUBST(GIOUNIX_LIBS)
+AM_CONDITIONAL(BUILD_GIOUNIX, $have_giounix)
+if test -n "$export_dynamic"; then
+ GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+AC_ARG_ENABLE(pygi,
+ AC_HELP_STRING([--enable-pygi], [Use PyGI to create wrappers for introspection-enabled types]),
+ enable_pygi=$enableval,
+ enable_pygi=no)
+if test "$enable_pygi" != no; then
+ AC_DEFINE(ENABLE_PYGI,1,Use PyGI to create wrappers for introspection-enabled types)
+fi
+
+dnl add required cflags ...
+if test "x$GCC" = "xyes"; then
+ JH_ADD_CFLAG([-Wall])
+ JH_ADD_CFLAG([-fno-strict-aliasing])
+
+ case $host_os in
+ solaris*)
+ ;;
+ *)
+ JH_ADD_CFLAG([-std=c9x])
+ ;;
+ esac
+
+fi
+
+AC_CONFIG_FILES(
+ Makefile
+ pygobject-2.0.pc
+ pygobject-2.0-uninstalled.pc
+ codegen/Makefile
+ codegen/pygobject-codegen-2.0
+ docs/Makefile
+ docs/reference/entities.docbook
+ docs/xsl/fixxref.py
+ glib/Makefile
+ gobject/Makefile
+ gio/Makefile
+ examples/Makefile
+ tests/Makefile
+ PKG-INFO)
+AC_OUTPUT
+
+echo
+echo "libffi support: $have_libffi"
+echo
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..df8eea7
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..391eec8
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,195 @@
+REF_VERSION = $(PYGOBJECT_MAJOR_VERSION).$(PYGOBJECT_MINOR_VERSION)
+FULL_VERSION = $(REF_VERSION).$(PYGOBJECT_MICRO_VERSION)
+
+BUILDDIR = $(top_builddir)/docs
+
+CSS_FILES = style.css
+
+HTML_FILES = \
+ html/class-gobjectgboxed.html \
+ html/class-gobjectginterface.html \
+ html/class-gobjectgpointer.html \
+ html/class-gobject.html \
+ html/class-glibmaincontext.html \
+ html/class-glibmainloop.html \
+ html/glib-constants.html \
+ html/glib-functions.html \
+ html/gobject-class-reference.html \
+ html/glib-class-reference.html \
+ html/class-gioapplaunchcontext.html \
+ html/class-gioappinfo.html \
+ html/class-gioasyncresult.html \
+ html/class-giobufferedinputstream.html \
+ html/class-giobufferedoutputstream.html \
+ html/class-giocancellable.html \
+ html/class-giodatainputstream.html \
+ html/class-giodataoutputstream.html \
+ html/class-giodrive.html \
+ html/class-gioemblem.html \
+ html/class-gioemblemedicon.html \
+ html/class-giofile.html \
+ html/class-giofileattributeinfo.html \
+ html/class-giofileenumerator.html \
+ html/class-giofileicon.html \
+ html/class-giofileinfo.html \
+ html/class-giofileinputstream.html \
+ html/class-giofilemonitor.html \
+ html/class-giofileoutputstream.html \
+ html/class-giofilterinputstream.html \
+ html/class-giofilteroutputstream.html \
+ html/class-gioicon.html \
+ html/class-gioinputstream.html \
+ html/class-gioloadableicon.html \
+ html/class-giomemoryinputstream.html \
+ html/class-giomemoryoutputstream.html \
+ html/class-giomount.html \
+ html/class-giomountoperation.html \
+ html/class-giooutputstream.html \
+ html/class-gioseekable.html \
+ html/class-giosimpleasyncresult.html \
+ html/class-giothemedicon.html \
+ html/class-giounixinputstream.html \
+ html/class-giounixoutputstream.html \
+ html/class-giovolume.html \
+ html/class-giovolumemonitor.html \
+ html/gio-constants.html \
+ html/gio-functions.html \
+ html/gio-class-reference.html \
+ html/giounix-class-reference.html \
+ html/gobject-constants.html \
+ html/gobject-functions.html \
+ html/index.html \
+ html/index.sgml \
+ html/pygobject.devhelp \
+ html/pygobject-introduction.html
+
+
+XML_FILES = \
+ reference/pygobject.xml \
+ reference/pygobject-introduction.xml \
+ reference/pygobject-classes.xml \
+ reference/pygobject-constants.xml \
+ reference/pygobject-ref.xml \
+ reference/pygobject-functions.xml \
+ reference/pygobject-gboxed.xml \
+ reference/pygobject-ginterface.xml \
+ reference/pygobject-gpointer.xml \
+ reference/pyglib-classes.xml \
+ reference/pyglib-constants.xml \
+ reference/pyglib-functions.xml \
+ reference/pyglib-maincontext.xml \
+ reference/pyglib-mainloop.xml \
+ reference/pygio-classes.xml \
+ reference/pygiounix-classes.xml \
+ reference/pygio-constants.xml \
+ reference/pygio-functions.xml \
+ reference/pygio-applaunchcontext.xml \
+ reference/pygio-appinfo.xml \
+ reference/pygio-asyncresult.xml \
+ reference/pygio-bufferedinputstream.xml \
+ reference/pygio-bufferedoutputstream.xml \
+ reference/pygio-cancellable.xml \
+ reference/pygio-datainputstream.xml \
+ reference/pygio-dataoutputstream.xml \
+ reference/pygio-drive.xml \
+ reference/pygio-emblem.xml \
+ reference/pygio-emblemedicon.xml \
+ reference/pygio-file.xml \
+ reference/pygio-fileattributeinfo.xml \
+ reference/pygio-fileenumerator.xml \
+ reference/pygio-fileicon.xml \
+ reference/pygio-fileinfo.xml \
+ reference/pygio-fileinputstream.xml \
+ reference/pygio-filemonitor.xml \
+ reference/pygio-fileoutputstream.xml \
+ reference/pygio-filterinputstream.xml \
+ reference/pygio-filteroutputstream.xml \
+ reference/pygio-icon.xml \
+ reference/pygio-inputstream.xml \
+ reference/pygio-loadableicon.xml \
+ reference/pygio-memoryinputstream.xml \
+ reference/pygio-memoryoutputstream.xml \
+ reference/pygio-mount.xml \
+ reference/pygio-mountoperation.xml \
+ reference/pygio-outputstream.xml \
+ reference/pygio-seekable.xml \
+ reference/pygio-simpleasyncresult.xml \
+ reference/pygio-themedicon.xml \
+ reference/pygio-unixinputstream.xml \
+ reference/pygio-unixoutputstream.xml \
+ reference/pygio-volume.xml \
+ reference/pygio-volumemonitor.xml
+
+XSL_FILES = \
+ xsl/common.xsl \
+ xsl/devhelp.xsl \
+ xsl/html.xsl \
+ xsl/pdf-style.xsl \
+ xsl/pdf.xsl \
+ xsl/ref-html-style.xsl
+
+# fixxref cannot be included in XSL_FILES, because automake is touching it
+# so the date is newer then the files in HTML_FILES
+FIXXREF = xsl/fixxref.py
+
+TARGET_DIR = $(datadir)/gtk-doc/html/pygobject
+CSSdir = $(TARGET_DIR)
+CSS_DATA = $(CSS_FILES)
+
+
+install-data-local:
+ installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+ fi
+
+uninstall-local:
+ rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+
+XSLdir = $(datadir)/pygobject/xsl
+XSL_DATA = $(XSL_FILES) $(FIXXREF)
+
+EXTRA_DIST = \
+ $(HTML_FILES) \
+ $(XML_FILES) \
+ $(XSL_FILES) \
+ $(FIXXREF) \
+ $(CSS_FILES)
+
+reference/builddate.xml:
+ @$(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+
+
+if ENABLE_DOCS
+
+BUILT_SOURCES = reference/builddate.xml $(HTML_FILES)
+CLEANFILES = reference/builddate.xml $(HTML_FILES)
+
+
+# Do not add a builddate.xml dependency here, because the generated html
+# documentation will be included in the tarball so xsltproc is not needed to
+# install the documentation. Adding a builddate.xml dependency will force
+# the documentation to be rebuilt when it doesn't need to be.
+$(HTML_FILES): $(XML_FILES) $(XSL_FILES)
+ @xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
+ --path $(BUILDDIR)/reference:$(srcdir)/reference \
+ --stringparam gtkdoc.bookname "pygobject" \
+ --stringparam gtkdoc.version ${REF_VERSION} \
+ $(srcdir)/xsl/ref-html-style.xsl \
+ $(srcdir)/reference/pygobject-ref.xml
+
+# pdf: $(REFERENCE_DEPS) reference/builddate.xml
+# xsltproc --nonet --xinclude -o pygobject-ref.fo xsl/pdf-style.xsl \
+# reference/pygobject-ref.xml
+# pdfxmltex pygobject-ref.fo >output </dev/null
+
+endif
diff --git a/docs/Makefile.in b/docs/Makefile.in
new file mode 100644
index 0000000..3fcbd06
--- /dev/null
+++ b/docs/Makefile.in
@@ -0,0 +1,641 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = docs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(CSSdir)" "$(DESTDIR)$(XSLdir)"
+DATA = $(CSS_DATA) $(XSL_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+REF_VERSION = $(PYGOBJECT_MAJOR_VERSION).$(PYGOBJECT_MINOR_VERSION)
+FULL_VERSION = $(REF_VERSION).$(PYGOBJECT_MICRO_VERSION)
+BUILDDIR = $(top_builddir)/docs
+CSS_FILES = style.css
+HTML_FILES = \
+ html/class-gobjectgboxed.html \
+ html/class-gobjectginterface.html \
+ html/class-gobjectgpointer.html \
+ html/class-gobject.html \
+ html/class-glibmaincontext.html \
+ html/class-glibmainloop.html \
+ html/glib-constants.html \
+ html/glib-functions.html \
+ html/gobject-class-reference.html \
+ html/glib-class-reference.html \
+ html/class-gioapplaunchcontext.html \
+ html/class-gioappinfo.html \
+ html/class-gioasyncresult.html \
+ html/class-giobufferedinputstream.html \
+ html/class-giobufferedoutputstream.html \
+ html/class-giocancellable.html \
+ html/class-giodatainputstream.html \
+ html/class-giodataoutputstream.html \
+ html/class-giodrive.html \
+ html/class-gioemblem.html \
+ html/class-gioemblemedicon.html \
+ html/class-giofile.html \
+ html/class-giofileattributeinfo.html \
+ html/class-giofileenumerator.html \
+ html/class-giofileicon.html \
+ html/class-giofileinfo.html \
+ html/class-giofileinputstream.html \
+ html/class-giofilemonitor.html \
+ html/class-giofileoutputstream.html \
+ html/class-giofilterinputstream.html \
+ html/class-giofilteroutputstream.html \
+ html/class-gioicon.html \
+ html/class-gioinputstream.html \
+ html/class-gioloadableicon.html \
+ html/class-giomemoryinputstream.html \
+ html/class-giomemoryoutputstream.html \
+ html/class-giomount.html \
+ html/class-giomountoperation.html \
+ html/class-giooutputstream.html \
+ html/class-gioseekable.html \
+ html/class-giosimpleasyncresult.html \
+ html/class-giothemedicon.html \
+ html/class-giounixinputstream.html \
+ html/class-giounixoutputstream.html \
+ html/class-giovolume.html \
+ html/class-giovolumemonitor.html \
+ html/gio-constants.html \
+ html/gio-functions.html \
+ html/gio-class-reference.html \
+ html/giounix-class-reference.html \
+ html/gobject-constants.html \
+ html/gobject-functions.html \
+ html/index.html \
+ html/index.sgml \
+ html/pygobject.devhelp \
+ html/pygobject-introduction.html
+
+XML_FILES = \
+ reference/pygobject.xml \
+ reference/pygobject-introduction.xml \
+ reference/pygobject-classes.xml \
+ reference/pygobject-constants.xml \
+ reference/pygobject-ref.xml \
+ reference/pygobject-functions.xml \
+ reference/pygobject-gboxed.xml \
+ reference/pygobject-ginterface.xml \
+ reference/pygobject-gpointer.xml \
+ reference/pyglib-classes.xml \
+ reference/pyglib-constants.xml \
+ reference/pyglib-functions.xml \
+ reference/pyglib-maincontext.xml \
+ reference/pyglib-mainloop.xml \
+ reference/pygio-classes.xml \
+ reference/pygiounix-classes.xml \
+ reference/pygio-constants.xml \
+ reference/pygio-functions.xml \
+ reference/pygio-applaunchcontext.xml \
+ reference/pygio-appinfo.xml \
+ reference/pygio-asyncresult.xml \
+ reference/pygio-bufferedinputstream.xml \
+ reference/pygio-bufferedoutputstream.xml \
+ reference/pygio-cancellable.xml \
+ reference/pygio-datainputstream.xml \
+ reference/pygio-dataoutputstream.xml \
+ reference/pygio-drive.xml \
+ reference/pygio-emblem.xml \
+ reference/pygio-emblemedicon.xml \
+ reference/pygio-file.xml \
+ reference/pygio-fileattributeinfo.xml \
+ reference/pygio-fileenumerator.xml \
+ reference/pygio-fileicon.xml \
+ reference/pygio-fileinfo.xml \
+ reference/pygio-fileinputstream.xml \
+ reference/pygio-filemonitor.xml \
+ reference/pygio-fileoutputstream.xml \
+ reference/pygio-filterinputstream.xml \
+ reference/pygio-filteroutputstream.xml \
+ reference/pygio-icon.xml \
+ reference/pygio-inputstream.xml \
+ reference/pygio-loadableicon.xml \
+ reference/pygio-memoryinputstream.xml \
+ reference/pygio-memoryoutputstream.xml \
+ reference/pygio-mount.xml \
+ reference/pygio-mountoperation.xml \
+ reference/pygio-outputstream.xml \
+ reference/pygio-seekable.xml \
+ reference/pygio-simpleasyncresult.xml \
+ reference/pygio-themedicon.xml \
+ reference/pygio-unixinputstream.xml \
+ reference/pygio-unixoutputstream.xml \
+ reference/pygio-volume.xml \
+ reference/pygio-volumemonitor.xml
+
+XSL_FILES = \
+ xsl/common.xsl \
+ xsl/devhelp.xsl \
+ xsl/html.xsl \
+ xsl/pdf-style.xsl \
+ xsl/pdf.xsl \
+ xsl/ref-html-style.xsl
+
+
+# fixxref cannot be included in XSL_FILES, because automake is touching it
+# so the date is newer then the files in HTML_FILES
+FIXXREF = xsl/fixxref.py
+TARGET_DIR = $(datadir)/gtk-doc/html/pygobject
+CSSdir = $(TARGET_DIR)
+CSS_DATA = $(CSS_FILES)
+XSLdir = $(datadir)/pygobject/xsl
+XSL_DATA = $(XSL_FILES) $(FIXXREF)
+EXTRA_DIST = \
+ $(HTML_FILES) \
+ $(XML_FILES) \
+ $(XSL_FILES) \
+ $(FIXXREF) \
+ $(CSS_FILES)
+
+@ENABLE_DOCS_TRUE@BUILT_SOURCES = reference/builddate.xml $(HTML_FILES)
+@ENABLE_DOCS_TRUE@CLEANFILES = reference/builddate.xml $(HTML_FILES)
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(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) --gnu docs/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-CSSDATA: $(CSS_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(CSSdir)" || $(MKDIR_P) "$(DESTDIR)$(CSSdir)"
+ @list='$(CSS_DATA)'; test -n "$(CSSdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(CSSdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(CSSdir)" || exit $$?; \
+ done
+
+uninstall-CSSDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(CSS_DATA)'; test -n "$(CSSdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(CSSdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(CSSdir)" && rm -f $$files
+install-XSLDATA: $(XSL_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(XSLdir)" || $(MKDIR_P) "$(DESTDIR)$(XSLdir)"
+ @list='$(XSL_DATA)'; test -n "$(XSLdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(XSLdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(XSLdir)" || exit $$?; \
+ done
+
+uninstall-XSLDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(XSL_DATA)'; test -n "$(XSLdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(XSLdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(XSLdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(CSSdir)" "$(DESTDIR)$(XSLdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-CSSDATA install-XSLDATA install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-CSSDATA uninstall-XSLDATA uninstall-local
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-CSSDATA \
+ install-XSLDATA install-am install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall \
+ uninstall-CSSDATA uninstall-XSLDATA uninstall-am \
+ uninstall-local
+
+
+install-data-local:
+ installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+ fi
+
+uninstall-local:
+ rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+reference/builddate.xml:
+ @$(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+
+# Do not add a builddate.xml dependency here, because the generated html
+# documentation will be included in the tarball so xsltproc is not needed to
+# install the documentation. Adding a builddate.xml dependency will force
+# the documentation to be rebuilt when it doesn't need to be.
+@ENABLE_DOCS_TRUE@$(HTML_FILES): $(XML_FILES) $(XSL_FILES)
+@ENABLE_DOCS_TRUE@ @xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
+@ENABLE_DOCS_TRUE@ --path $(BUILDDIR)/reference:$(srcdir)/reference \
+@ENABLE_DOCS_TRUE@ --stringparam gtkdoc.bookname "pygobject" \
+@ENABLE_DOCS_TRUE@ --stringparam gtkdoc.version ${REF_VERSION} \
+@ENABLE_DOCS_TRUE@ $(srcdir)/xsl/ref-html-style.xsl \
+@ENABLE_DOCS_TRUE@ $(srcdir)/reference/pygobject-ref.xml
+
+# pdf: $(REFERENCE_DEPS) reference/builddate.xml
+# xsltproc --nonet --xinclude -o pygobject-ref.fo xsl/pdf-style.xsl \
+# reference/pygobject-ref.xml
+# pdfxmltex pygobject-ref.fo >output </dev/null
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/docs/html/class-gioappinfo.html b/docs/html/class-gioappinfo.html
new file mode 100644
index 0000000..7942ff9
--- /dev/null
+++ b/docs/html/class-gioappinfo.html
@@ -0,0 +1,210 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AppInfo</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="next" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AppInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioapplaunchcontext.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AppInfo"><a name="class-gioappinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AppInfo</h2><p>gio.AppInfo — Information about an installed application and methods to launch it (with file arguments).</p></div><div class="refsect1" title="Synopsis"><a name="id3056633"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AppInfo</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioappinfo.html#constructor-gioappinfo" title="Constructor">gio.AppInfo</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>application_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.APP_INFO_CREATE_NONE</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--add-supports-type" title="gio.AppInfo.add_supports_type">add_supports_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-delete" title="gio.AppInfo.can_delete">can_delete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-remove-supports-type" title="gio.AppInfo.can_remove_supports_type">can_remove_supports_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--delete" title="gio.AppInfo.delete">delete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--dup" title="gio.AppInfo.dup">dup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--equal" title="gio.AppInfo.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>appinfo2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-commandline" title="gio.AppInfo.get_commandline">get_commandline</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-description" title="gio.AppInfo.get_description">get_description</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-executable" title="gio.AppInfo.get_executable">get_executable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-icon" title="gio.AppInfo.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-id" title="gio.AppInfo.get_id">get_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-name" title="gio.AppInfo.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch" title="gio.AppInfo.launch">launch</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch-uris" title="gio.AppInfo.launch_uris">launch_uris</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--remove-supports-type" title="gio.AppInfo.remove_supports_type">remove_supports_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension" title="gio.AppInfo.set_as_default_for_extension">set_as_default_for_extension</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>extension</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type" title="gio.AppInfo.set_as_default_for_type">set_as_default_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--should-show" title="gio.AppInfo.should_show">should_show</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--supports-files" title="gio.AppInfo.supports_files">supports_files</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--supports-uris" title="gio.AppInfo.supports_uris">supports_uris</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-all" title="gio.app_info_get_all">gio.app_info_get_all</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-all-for-type" title="gio.app_info_get_all_for_type">gio.app_info_get_all_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-default-for-type" title="gio.app_info_get_default_for_type">gio.app_info_get_default_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>must_support_uris</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme" title="gio.app_info_get_default_for_uri_scheme">gio.app_info_get_default_for_uri_scheme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-reset-type-association" title="gio.app_info_reset_type_association">gio.app_info_reset_type_association</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3056059"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo">gio.AppInfo</a>
+</pre></div><div class="refsect1" title="Known Implementation"><a name="id3056035"></a><h2>Known Implementation</h2><p>
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a> is implemented by
+ <PYGTKDOCLINK HREF="class-giodesktopappinfo"><code class="classname">gio.DesktopAppInfo</code></PYGTKDOCLINK>
+ </p></div><div class="refsect1" title="Description"><a name="id3056004"></a><h2>Description</h2><p>
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ and <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+ are used for describing and launching applications installed on the system.
+ </p><p>
+ As of GLib 2.20, URIs will always be converted to POSIX paths (using
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">gio.File.get_path</a></code>()) when using
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch" title="gio.AppInfo.launch">gio.AppInfo.launch</a></code>()
+ even if the application requested an URI and not a POSIX path. For example for an desktop-file
+ based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
+ on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
+ compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
+ unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
+ (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application.
+ </p><p>
+ Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> constructors
+ (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
+ it needs to use
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>()
+ or similar on
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ In other words, an application cannot assume that the URI passed to e.g.
+ <code class="methodname"><a class="link" href="class-giofile.html#constructor-giofile" title="Constructor">gio.File</a></code>() constructor
+ is equal to the result of
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>().
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioappinfo"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.AppInfo</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>application_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.APP_INFO_CREATE_NONE</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td><td>the commandline to use
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>application_name</code></em> :</span></p></td><td>the application name, or <code class="literal">None</code> to use commandline.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>flags that can specify details of the created,
+ from <a class="xref" href="gio-constants.html#gio-app-info-constants" title="Gio AppInfo Create Flags Constants">Gio AppInfo Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ for given command.
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ from the given information.
+ </p></div><div class="refsect1" title="Methods"><a name="id2981938"></a><h2>Methods</h2><div class="refsect2" title="gio.AppInfo.add_supports_type"><a name="method-gioappinfo--add-supports-type"></a><h3>gio.AppInfo.add_supports_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_supports_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>A string.</td></tr></tbody></table><p>
+ The <code class="methodname">add_supports_type</code>() method adds a content type
+ to the application information to indicate the application is capable of
+ opening files with the given content type.
+ </p></div><div class="refsect2" title="gio.AppInfo.can_delete"><a name="method-gioappinfo--can-delete"></a><h3>gio.AppInfo.can_delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_delete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo can be deleted.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_delete</code>() method obtains the information
+ whether the <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ can be deleted. See
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--delete" title="gio.AppInfo.delete">gio.AppInfo.delete</a></code>().
+ </p></div><div class="refsect2" title="gio.AppInfo.can_remove_supports_type"><a name="method-gioappinfo--can-remove-supports-type"></a><h3>gio.AppInfo.can_remove_supports_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_remove_supports_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if it is possible to remove
+ supported content types from a given appinfo, <code class="literal">False</code>
+ if not. </td></tr></tbody></table><p>
+ The <code class="methodname">can_remove_supports_type</code>() method checks if a
+ supported content type can be removed from an application.
+ </p></div><div class="refsect2" title="gio.AppInfo.delete"><a name="method-gioappinfo--delete"></a><h3>gio.AppInfo.delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">delete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo has been deleted.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">delete</code>() method tries to delete an
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>.
+ </p><p>
+ On some platforms, there may be a difference between user-defined
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
+ which can be deleted, and system-wide ones which cannot. See
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-delete" title="gio.AppInfo.can_delete">gio.AppInfo.can_delete</a></code>().
+ </p></div><div class="refsect2" title="gio.AppInfo.dup"><a name="method-gioappinfo--dup"></a><h3>gio.AppInfo.dup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">dup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A duplicate of appinfo.</td></tr></tbody></table><p>
+ The <code class="methodname">dup</code>() method creates a duplicate of a
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>.
+ </p></div><div class="refsect2" title="gio.AppInfo.equal"><a name="method-gioappinfo--equal"></a><h3>gio.AppInfo.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>appinfo2</code></em> :</span></p></td><td>the second
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo1 is equal to appinfo2.
+ <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+ The <code class="methodname">equal</code>() method checks if two
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s are equal.
+ </p></div><div class="refsect2" title="gio.AppInfo.get_commandline"><a name="method-gioappinfo--get-commandline"></a><h3>gio.AppInfo.get_commandline</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_commandline</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the appinfo's commandline, or
+ <code class="literal">None</code> if this information is not available.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_commandline</code>() method gets the
+ commandline with which the application will be started.
+ </p></div><div class="refsect2" title="gio.AppInfo.get_description"><a name="method-gioappinfo--get-description"></a><h3>gio.AppInfo.get_description</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_description</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing a description of the application
+ appinfo, or <code class="literal">None</code> if none.</td></tr></tbody></table><p>
+ The <code class="methodname">get_description</code>() method gets a human-readable
+ description of an installed application.
+ </p></div><div class="refsect2" title="gio.AppInfo.get_executable"><a name="method-gioappinfo--get-executable"></a><h3>gio.AppInfo.get_executable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_executable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the appinfo's application
+ binary's name.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_description</code>() method gets the executable's
+ name for the installed application.
+ </p></div><div class="refsect2" title="gio.AppInfo.get_icon"><a name="method-gioappinfo--get-icon"></a><h3>gio.AppInfo.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> for appinfo.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_icon</code>() method gets the icon for the application.
+ </p></div><div class="refsect2" title="gio.AppInfo.get_id"><a name="method-gioappinfo--get-id"></a><h3>gio.AppInfo.get_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_id</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the application's ID.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_id</code>() method gets the ID of an application.
+ An id is a string that identifies the application. The exact format of the
+ id is platform dependent. For instance, on Unix this is the desktop file id
+ from the xdg menu specification.
+ </p><p>
+ Note that the returned ID may be <code class="literal">None</code>, depending on
+ how the appinfo has been constructed.
+ </p></div><div class="refsect2" title="gio.AppInfo.get_name"><a name="method-gioappinfo--get-name"></a><h3>gio.AppInfo.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the application for appinfo.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_name</code>() method gets the installed
+ name of the application.
+ </p></div><div class="refsect2" title="gio.AppInfo.launch"><a name="method-gioappinfo--launch"></a><h3>gio.AppInfo.launch</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">launch</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> objects.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td>a <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+ or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful launch,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">launch</code>() method launches the application.
+ Passes files to the launched application as arguments, using the optional
+ launch_context to get information about the details of the launcher
+ (like what screen it is on). On error, error will be set accordingly.
+ </p><p>
+ To lauch the application without arguments pass a <code class="literal">None</code> for files list.
+ </p><p>
+ Note that even if the launch is successful the application launched can fail
+ to start if it runs into problems during startup. There is no way to detect this.
+ </p><p>
+ Some URIs can be changed when passed through a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ (for instance unsupported uris with strange formats like mailto:), so
+ if you have a textual uri you want to pass in as argument, consider using
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch-uris" title="gio.AppInfo.launch_uris">gio.File.launch_uris</a></code>()
+ instead.
+ </p></div><div class="refsect2" title="gio.AppInfo.launch_uris"><a name="method-gioappinfo--launch-uris"></a><h3>gio.AppInfo.launch_uris</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">launch_uris</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>uris</code></em> :</span></p></td><td>a list containing URIs to launch.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td>a <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+ or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful launch,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">launch_uris</code>() method launches the application.
+ Passes uris to the launched application as arguments, using the optional
+ launch_context to get information about the details of the launcher
+ (like what screen it is on). On error, error will be set accordingly.
+ </p><p>
+ To lauch the application without arguments pass a <code class="literal">None</code> for files list.
+ </p><p>
+ Note that even if the launch is successful the application launched can fail
+ to start if it runs into problems during startup. There is no way to detect this.
+ </p></div><div class="refsect2" title="gio.AppInfo.remove_supports_type"><a name="method-gioappinfo--remove-supports-type"></a><h3>gio.AppInfo.remove_supports_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_supports_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>A string.</td></tr></tbody></table><p>
+ The <code class="methodname">remove_supports_type</code>() method removes a
+ supported type from an application, if possible.
+ </p></div><div class="refsect2" title="gio.AppInfo.set_as_default_for_extension"><a name="method-gioappinfo--set-as-default-for-extension"></a><h3>gio.AppInfo.set_as_default_for_extension</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_as_default_for_extension</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>extension</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td><td>A string containing the file extension (without the dot).
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_as_default_for_extension</code>() method sets the
+ application as the default handler for the given file extention.
+ </p></div><div class="refsect2" title="gio.AppInfo.set_as_default_for_type"><a name="method-gioappinfo--set-as-default-for-type"></a><h3>gio.AppInfo.set_as_default_for_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_as_default_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>The content type.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_as_default_for_type</code>() method sets the
+ application as the default handler for a given type.
+ </p></div><div class="refsect2" title="gio.AppInfo.should_show"><a name="method-gioappinfo--should-show"></a><h3>gio.AppInfo.should_show</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">should_show</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo should be shown,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">should_show</code>() method checks if the application
+ info should be shown in menus that list available applications.
+ </p></div><div class="refsect2" title="gio.AppInfo.supports_files"><a name="method-gioappinfo--supports-files"></a><h3>gio.AppInfo.supports_files</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">supports_files</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo supports files.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">supports_files</code>() method checks if the application
+ accepts files as arguments.
+ </p></div><div class="refsect2" title="gio.AppInfo.supports_uris"><a name="method-gioappinfo--supports-uris"></a><h3>gio.AppInfo.supports_uris</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">supports_uris</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo supports uris.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">supports_uris</code>() method checks if the application
+ accepts uris as arguments.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2934722"></a><h2>Functions</h2><div class="refsect2" title="gio.app_info_get_all"><a name="function-gio--app-info-get-all"></a><h3>gio.app_info_get_all</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_all</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">app_info_get_all</code>() function gets a list of all of
+ the applications currently registered on this system.
+ </p><p>
+ For desktop files, this includes applications that have NoDisplay=true set or are
+ excluded from display by means of OnlyShowIn or NotShowIn. See
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--should-show" title="gio.AppInfo.should_show">gio.AppInfo.should_show</a></code>().
+ The returned list does not include applications which have the Hidden key set.
+ </p></div><div class="refsect2" title="gio.app_info_get_all_for_type"><a name="function-gio--app-info-get-all-for-type"></a><h3>gio.app_info_get_all_for_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_all_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>the content type to find a
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ for.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
+ for a given content type or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">app_info_get_all_for_type</code>() function gets a list of all
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
+ for a given content type.
+ </p></div><div class="refsect2" title="gio.app_info_get_default_for_type"><a name="function-gio--app-info-get-default-for-type"></a><h3>gio.app_info_get_default_for_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_default_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>must_support_uris</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>the content type to find a
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ for.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>must_support_uris</code></em> :</span></p></td><td>if <code class="literal">True</code>, the
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ is expected to support URIs </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ for given content_type or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">app_info_get_default_for_type</code>() function gets the
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ that correspond to a given content type.
+ </p></div><div class="refsect2" title="gio.app_info_get_default_for_uri_scheme"><a name="function-gio--app-info-get-default-for-uri-scheme"></a><h3>gio.app_info_get_default_for_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_default_for_uri_scheme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>uri_scheme</code></em> :</span></p></td><td>a string containing a URI scheme.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ for given uri_scheme or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">app_info_get_default_for_uri_scheme</code>() function gets
+ the default application for launching applications using this URI scheme. A URI
+ scheme is the initial part of the URI, up to but not including the
+ ':', e.g. "http", "ftp" or "sip".
+ </p></div><div class="refsect2" title="gio.app_info_reset_type_association"><a name="function-gio--app-info-reset-type-association"></a><h3>gio.app_info_reset_type_association</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_reset_type_association</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>a content type</td></tr></tbody></table><p>
+ The <code class="methodname">app_info_reset_type_association</code>() function
+ removes all changes to the type associations done by
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type" title="gio.AppInfo.set_as_default_for_type">set_as_default_for_type</a></code>(),
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension" title="gio.AppInfo.set_as_default_for_extension">set_as_default_for_extension</a></code>(),
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--add-supports-type" title="gio.AppInfo.add_supports_type">add_supports_type</a></code>() or
+ <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--remove-supports-type" title="gio.AppInfo.remove_supports_type">remove_supports_type</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioapplaunchcontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGio Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AppLaunchContext</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioapplaunchcontext.html b/docs/html/class-gioapplaunchcontext.html
new file mode 100644
index 0000000..32c735f
--- /dev/null
+++ b/docs/html/class-gioapplaunchcontext.html
@@ -0,0 +1,44 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AppLaunchContext</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioappinfo.html" title="gio.AppInfo"><link rel="next" href="class-gioasyncresult.html" title="gio.AsyncResult"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AppLaunchContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioappinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioasyncresult.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AppLaunchContext"><a name="class-gioapplaunchcontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AppLaunchContext</h2><p>gio.AppLaunchContext — Application launch context.</p></div><div class="refsect1" title="Synopsis"><a name="id2982022"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AppLaunchContext</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#constructor-gioapplaunchcontext" title="Constructor">gio.AppLaunchContext</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display" title="gio.AppLaunchContext.get_display">get_display</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed" title="gio.AppLaunchContext.launch_failed">launch_failed</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_notify_id</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2895856"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext">gio.AppLaunchContext</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2917478"></a><h2>Description</h2><p>
+ The <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+ is used for integrating the launch with the launching application. This is used to handle for
+ instance startup notification and launching the new application on the same screen as the launching window.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioapplaunchcontext"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.AppLaunchContext</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new application launch context. This is not normally used, instead
+ you instantiate a subclass of this, such as
+ <PYGTKDOCLINK HREF="class-gdkapplaunchcontext"><code class="classname">gtk.gdk.AppLaunchContext</code></PYGTKDOCLINK>.
+ </p></div><div class="refsect1" title="Methods"><a name="id2958219"></a><h2>Methods</h2><div class="refsect2" title="gio.AppLaunchContext.get_display"><a name="method-gioapplaunchcontext--get-display"></a><h3>gio.AppLaunchContext.get_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a display string for the display.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_display</code>() method gets the display
+ string for the display. This is used to ensure new applications
+ are started on the same display as the launching application.
+ </p></div><div class="refsect2" title="gio.AppLaunchContext.get_startup_notify_id"><a name="method-gioapplaunchcontext--get-startup-notify-id"></a><h3>gio.AppLaunchContext.get_startup_notify_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_startup_notify_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a startup notification ID for the application,
+ or <code class="literal">None</code> if not supported.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_startup_notify_id</code>() method initiates
+ startup notification for the application and returns the DESKTOP_STARTUP_ID
+ for the launched operation, if supported.
+ </p><p>
+ Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
+ </p></div><div class="refsect2" title="gio.AppLaunchContext.launch_failed"><a name="method-gioapplaunchcontext--launch-failed"></a><h3>gio.AppLaunchContext.launch_failed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">launch_failed</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_notify_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>startup_notify_id</code></em> :</span></p></td><td>the startup notification id that was returned by
+ <code class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></code>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a startup notification ID for the application,
+ or <code class="literal">None</code> if not supported.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_startup_notify_id</code>() method is called
+ when an application has failed to launch, so that it can cancel the application
+ startup notification started in
+ <code class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></code>
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioappinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioasyncresult.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AppInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AsyncResult</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioasyncresult.html b/docs/html/class-gioasyncresult.html
new file mode 100644
index 0000000..39f491f
--- /dev/null
+++ b/docs/html/class-gioasyncresult.html
@@ -0,0 +1,44 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AsyncResult</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><link rel="next" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AsyncResult</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioapplaunchcontext.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giobufferedinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AsyncResult"><a name="class-gioasyncresult"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AsyncResult</h2><p>gio.AsyncResult — Asynchronous Function Results.</p></div><div class="refsect1" title="Synopsis"><a name="id2937155"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AsyncResult</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioasyncresult.html#method-gioasyncresult--get-source-object" title="gio.AsyncResult.get_source_object">get_source_object</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2946360"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult">gio.AsyncResult</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id2948332"></a><h2>Prerequisites</h2><p>
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a> is required by
+ <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>.
+ </p></div><div class="refsect1" title="Known Implementation"><a name="id2917316"></a><h2>Known Implementation</h2><p>
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a> is implemented by
+ <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>.
+ </p></div><div class="refsect1" title="Description"><a name="id2904498"></a><h2>Description</h2><p>
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ provides a base class for implementing asynchronous function results.
+ </p><p>
+ Asynchronous operations are broken up into two separate operations which are chained
+ together by a GAsyncReadyCallback. To begin an asynchronous operation, provide a
+ GAsyncReadyCallback to the asynchronous function. This callback will be triggered when
+ the operation has completed, and will be passed a GAsyncResult instance filled with the
+ details of the operation's success or failure, the object the asynchronous function was
+ started for and any error codes returned. The asynchronous callback function is then expected
+ to call the corresponding "_finish()" function with the object the function was called for,
+ and the <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ instance, and optionally, an error to grab any error conditions that may have occurred.
+ </p><p>
+ The purpose of the "_finish()" function is to take the generic result of type GAsyncResult and
+ return the specific result that the operation in question yields (e.g. a
+ <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ for a "enumerate children" operation). If the result or error status of the operation is not needed,
+ there is no need to call the "_finish()" function, GIO will take care of cleaning up the result and error
+ information after the GAsyncReadyCallback returns. It is also allowed to take a reference to the
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ and call "_finish()" later.
+ </p><p>
+ The callback for an asynchronous operation is called only once, and is always called, even
+ in the case of a cancelled operation. On cancellation the result is a gio.ERROR_CANCELLED error.
+ </p><p>
+ Some ascynchronous operations are implemented using synchronous calls. These are run in a
+ separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event
+ Loop and processed in an idle function. So, if you truly need asynchronous operations, make
+ sure to initialize GThread.
+ </p></div><div class="refsect1" title="Methods"><a name="id2946015"></a><h2>Methods</h2><div class="refsect2" title="gio.AsyncResult.get_source_object"><a name="method-gioasyncresult--get-source-object"></a><h3>gio.AsyncResult.get_source_object</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_source_object</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the source object for the res.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_source_object</code>() method gets the source object
+ from a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioapplaunchcontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giobufferedinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AppLaunchContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.BufferedInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giobufferedinputstream.html b/docs/html/class-giobufferedinputstream.html
new file mode 100644
index 0000000..2f2f5d6
--- /dev/null
+++ b/docs/html/class-giobufferedinputstream.html
@@ -0,0 +1,133 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.BufferedInputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioasyncresult.html" title="gio.AsyncResult"><link rel="next" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.BufferedInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioasyncresult.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giobufferedoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.BufferedInputStream"><a name="class-giobufferedinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.BufferedInputStream</h2><p>gio.BufferedInputStream — Buffered Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id2932400"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.BufferedInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#constructor-giobufferedinputstream" title="Constructor">gio.BufferedInputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill" title="gio.BufferedInputStream.fill">fill</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">fill_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish" title="gio.BufferedInputStream.fill_finish">fill_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-available" title="gio.BufferedInputStream.get_available">get_available</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size" title="gio.BufferedInputStream.get_buffer_size">get_buffer_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte" title="gio.BufferedInputStream.read_byte">read_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size" title="gio.BufferedInputStream.set_buffer_size">set_buffer_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized" title="gio.buffered_input_stream_new_sized">gio.buffered_input_stream_new_sized</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2982394"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+ +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
+ +-- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a>
+</pre></div><div class="refsect1" title="gio.BufferedInputStream Properties"><a name="properties-giobufferedinputstream"></a><h2>gio.BufferedInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"buffer-size"</td><td valign="top">Read - Write - Construct</td><td valign="top">The size of the backend buffer. Allowed values: &gt;= 1. Default value: 4096.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2910952"></a><h2>Description</h2><p>
+ <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>
+ implements <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream"><code class="classname">gio.FilterInputStream</code></a>
+ and provides for buffered reads.
+ </p><p>
+ By default,
+ <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>'s
+ buffer size is set at 4 kilobytes.
+ </p><p>
+ To create a buffered input stream, use
+ <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#constructor-giobufferedinputstream" title="Constructor">gio.BufferedInputStream</a></code>(),
+ or <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized" title="gio.buffered_input_stream_new_sized">gio.buffered_input_stream_new_sized</a></code>()
+ to specify the buffer's size at construction.
+ </p><p>
+ To get the size of a buffer within a buffered input stream, use
+ <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size" title="gio.BufferedInputStream.get_buffer_size">get_buffer_size</a></code>().
+ To change the size of a buffered input stream's buffer, use
+ <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size" title="gio.BufferedInputStream.set_buffer_size">set_buffer_size</a></code>().
+ Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giobufferedinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.BufferedInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ for the given base_stream.
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ from the given base_stream, with a buffer set to the default size (4 kilobytes).
+ </p></div><div class="refsect1" title="Methods"><a name="id2904456"></a><h2>Methods</h2><div class="refsect2" title="gio.BufferedInputStream.fill"><a name="method-giobufferedinputstream--fill"></a><h3>gio.BufferedInputStream.fill</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fill</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be read from the stream.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes read into stream's buffer,
+ up to count, or -1 on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">fill</code>() method tries to read count bytes
+ from the stream into the buffer. Will block during this read.
+ </p><p>
+ If count is zero, returns zero and does nothing. A value of count
+ larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </p><p>
+ On success, the number of bytes read into the buffer is returned. It
+ is not an error if this is not the same as the requested size, as it can
+ happen e.g. near the end of a file. Zero is returned on end of file
+ (or if count is zero), but never otherwise.
+ </p><p>
+ If count is -1 then the attempted read size is equal to the number
+ of bytes that are required to fill the buffer.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can
+ be cancelled by triggering the cancellable object from another thread.
+ If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+ returned. If an operation was partially finished when the operation was
+ cancelled the partial result will be returned, without an error.
+ </p><p>
+ On error -1 is returned and error is set accordingly.
+ </p><p>
+ For the asynchronous, non-blocking, version of this function, see
+ <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">gio.BufferedInputStream.fill_async</a></code>().
+ </p></div><div class="refsect2" title="gio.BufferedInputStream.fill_async"><a name="method-giobufferedinputstream--fill-async"></a><h3>gio.BufferedInputStream.fill_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fill_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be read from the stream.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">fill_async</code>() method reads data into stream's
+ buffer asynchronously, up to count size. io_priority can be used to
+ prioritize reads.
+ </p><p>
+ For the synchronous version of this function, see
+ <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill" title="gio.BufferedInputStream.fill">gio.BufferedInputStream.fill</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </p><p>
+ If count is -1 then the attempted read size is equal to the number of bytes
+ that are required to fill the buffer.
+ </p></div><div class="refsect2" title="gio.BufferedInputStream.fill_finish"><a name="method-giobufferedinputstream--fill-finish"></a><h3>gio.BufferedInputStream.fill_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fill_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the size of the read stream, or -1 on an error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">fill_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">gio.BufferedInputStream.fill_async</a></code>().
+ </p></div><div class="refsect2" title="gio.BufferedInputStream.get_available"><a name="method-giobufferedinputstream--get-available"></a><h3>gio.BufferedInputStream.get_available</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_available</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>size of the available stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_available</code>() method gets the size of
+ the available data within the stream.
+ </p></div><div class="refsect2" title="gio.BufferedInputStream.get_buffer_size"><a name="method-giobufferedinputstream--get-buffer-size"></a><h3>gio.BufferedInputStream.get_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_buffer_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current buffer size.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_buffer_size</code>() method gets the size
+ of the input buffer.
+ </p></div><div class="refsect2" title="gio.BufferedInputStream.read_byte"><a name="method-giobufferedinputstream--read-byte"></a><h3>gio.BufferedInputStream.read_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the byte read from the stream, or -1 on end of stream or error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_byte</code>() method tries to read a single
+ byte from the stream or the buffer. Will block during this read.
+ </p><p>
+ On success, the byte read from the stream is returned. On end of stream -1
+ is returned but it's not an exceptional error and error is not set.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can
+ be cancelled by triggering the cancellable object from another thread.
+ If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+ returned. If an operation was partially finished when the operation was
+ cancelled the partial result will be returned, without an error.
+ </p><p>
+ On error -1 is returned and error is set accordingly.
+ </p></div><div class="refsect2" title="gio.BufferedInputStream.set_buffer_size"><a name="method-giobufferedinputstream--set-buffer-size"></a><h3>gio.BufferedInputStream.set_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_buffer_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the new buffer size.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_buffer_size</code>() method sets the size
+ of the internal buffer of stream to size, or to the size of the contents
+ of the buffer. The buffer can never be resized smaller than its current contents.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2891445"></a><h2>Functions</h2><div class="refsect2" title="gio.buffered_input_stream_new_sized"><a name="function-gio--buffered-input-stream-new-sized"></a><h3>gio.buffered_input_stream_new_sized</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">buffered_input_stream_new_sized</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>the requested buffer size.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">buffered_input_stream_new_sized</code>() function creates
+ a new <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>
+ from the given base_stream, with a buffer set to size.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioasyncresult.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giobufferedoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AsyncResult </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.BufferedOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giobufferedoutputstream.html b/docs/html/class-giobufferedoutputstream.html
new file mode 100644
index 0000000..400e153
--- /dev/null
+++ b/docs/html/class-giobufferedoutputstream.html
@@ -0,0 +1,62 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.BufferedOutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><link rel="next" href="class-giocancellable.html" title="gio.Cancellable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.BufferedOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giobufferedinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giocancellable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.BufferedOutputStream"><a name="class-giobufferedoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.BufferedOutputStream</h2><p>gio.BufferedOutputStream — Buffered Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id2970103"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.BufferedOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream" title="Constructor">gio.BufferedOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow" title="gio.BufferedOutputStream.get_auto_grow">get_auto_grow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size" title="gio.BufferedOutputStream.get_buffer_size">get_buffer_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow" title="gio.BufferedOutputStream.set_auto_grow">set_auto_grow</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>auto_grow</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size" title="gio.BufferedOutputStream.set_buffer_size">set_buffer_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized" title="gio.buffered_output_stream_new_sized">gio.buffered_output_stream_new_sized</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2925621"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+ +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+ +-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
+</pre></div><div class="refsect1" title="gio.BufferedOutputStream Properties"><a name="properties-giobufferedoutputstream"></a><h2>gio.BufferedOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"auto-grow"</td><td valign="top">Read - Write</td><td valign="top">Whether the buffer should automatically grow. Default value: <code class="literal">False</code>.</td></tr><tr valign="top"><td valign="top">"buffer-size"</td><td valign="top">Read - Write - Construct</td><td valign="top">The size of the backend buffer. Allowed values: &gt;= 1. Default value: 4096.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2924805"></a><h2>Description</h2><p>
+ <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>
+ implements <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"><code class="classname">gio.FilterOutputStream</code></a>
+ and provides for buffered writes.
+ </p><p>
+ By default,
+ <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>'s
+ buffer size is set at 4 kilobytes.
+ </p><p>
+ To create a buffered output stream, use
+ <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream" title="Constructor">gio.BufferedOutputStream</a></code>(),
+ or <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized" title="gio.buffered_output_stream_new_sized">gio.buffered_output_stream_new_sized</a></code>()
+ to specify the buffer's size at construction.
+ </p><p>
+ To get the size of a buffer within a buffered output stream, use
+ <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size" title="gio.BufferedOutputStream.get_buffer_size">gio.BufferedOutputStream.get_buffer_size</a></code>().
+ To change the size of a buffered output stream's buffer, use
+ <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size" title="gio.BufferedOutputStream.set_buffer_size">gio.BufferedOutputStream.set_buffer_size</a></code>().
+ Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giobufferedoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.BufferedOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+ for the given base_stream.
+ </td></tr></tbody></table><p>
+ Creates a new buffered output stream for a base stream.
+ </p></div><div class="refsect1" title="Methods"><a name="id2973086"></a><h2>Methods</h2><div class="refsect2" title="gio.BufferedOutputStream.get_auto_grow"><a name="method-giobufferedoutputstream--get-auto-grow"></a><h3>gio.BufferedOutputStream.get_auto_grow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_auto_grow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream's
+ buffer automatically grows, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_auto_grow</code>() method checks if the
+ buffer automatically grows as data is added.
+ </p></div><div class="refsect2" title="gio.BufferedOutputStream.get_buffer_size"><a name="method-giobufferedoutputstream--get-buffer-size"></a><h3>gio.BufferedOutputStream.get_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_buffer_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current buffer size.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_buffer_size</code>() method gets the size
+ of the buffer in the stream.
+ </p></div><div class="refsect2" title="gio.BufferedOutputStream.set_auto_grow"><a name="method-giobufferedoutputstream--set-auto-grow"></a><h3>gio.BufferedOutputStream.set_auto_grow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_auto_grow</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>auto_grow</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>auto_grow</code></strong> :</span></p></td><td>a boolean.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_auto_grow</code>() method sets whether or not
+ the stream's buffer should automatically grow. If auto_grow is true,
+ then each write will just make the buffer larger, and you must manually
+ flush the buffer to actually write out the data to the underlying stream.
+ </p></div><div class="refsect2" title="gio.BufferedOutputStream.set_buffer_size"><a name="method-giobufferedoutputstream--set-buffer-size"></a><h3>gio.BufferedOutputStream.set_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_buffer_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the new buffer size.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_buffer_size</code>() method sets the size of
+ the internal buffer to size.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2930687"></a><h2>Functions</h2><div class="refsect2" title="gio.buffered_output_stream_new_sized"><a name="function-gio--buffered-output-stream-new-sized"></a><h3>gio.buffered_output_stream_new_sized</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">buffered_output_stream_new_sized</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>the requested buffer size.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+ with an internal buffer set to size..
+ </td></tr></tbody></table><p>
+ The <code class="methodname">buffered_output_stream_new_sized</code>() function creates
+ a new <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>
+ from the given base_stream, with a buffer set to size.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giobufferedinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giocancellable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.BufferedInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Cancellable</td></tr></table></div></body></html>
diff --git a/docs/html/class-giocancellable.html b/docs/html/class-giocancellable.html
new file mode 100644
index 0000000..67de087
--- /dev/null
+++ b/docs/html/class-giocancellable.html
@@ -0,0 +1,61 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Cancellable</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><link rel="next" href="class-giodatainputstream.html" title="gio.DataInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Cancellable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giobufferedoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodatainputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Cancellable"><a name="class-giocancellable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Cancellable</h2><p>gio.Cancellable — Thread-safe Operation Cancellation Stack.</p></div><div class="refsect1" title="Synopsis"><a name="id2918796"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Cancellable</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giocancellable.html#constructor-giocancellable" title="Constructor">gio.Cancellable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--cancel" title="gio.Cancellable.cancel">cancel</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--get-fd" title="gio.Cancellable.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--is-cancelled" title="gio.Cancellable.is_cancelled">is_cancelled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--pop-current" title="gio.Cancellable.pop_current">pop_current</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--push-current" title="gio.Cancellable.push_current">push_current</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--reset" title="gio.Cancellable.reset">reset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--set-error-if-cancelled" title="gio.Cancellable.set_error_if_cancelled">set_error_if_cancelled</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#function-gio--cancellable-get-current" title="gio.cancellable_get_current">gio.cancellable_get_current</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2945357"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giocancellable.html" title="gio.Cancellable">gio.Cancellable</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2897140"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ is a thread-safe operation cancellation stack used throughout GIO to allow for
+ cancellation of synchronous and asynchronous operations.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giocancellable"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.Cancellable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a> object.
+ </p><p>
+ Applications that want to start one or more operations that should be cancellable should create a
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ and pass it to the operations.
+ </p><p>
+ One <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ can be used in multiple consecutive operations, but not in multiple concurrent operations.
+ </p></div><div class="refsect1" title="Methods"><a name="id2894890"></a><h2>Methods</h2><div class="refsect2" title="gio.Cancellable.cancel"><a name="method-giocancellable--cancel"></a><h3>gio.Cancellable.cancel</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cancel</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">cancel</code>() method will set cancellable to cancelled,
+ and will emit the "cancelled" signal. (However, see the warning about race conditions
+ in the documentation for that signal if you are planning to connect to it.)
+ </p><p>
+ This function is thread-safe. In other words, you can safely call it from a thread
+ other than the one running the operation that was passed the cancellable.
+ </p><p>
+ The convention within gio is that cancelling an asynchronous operation causes it
+ to complete asynchronously. That is, if you cancel the operation from the same thread
+ in which it is running, then the operation's GAsyncReadyCallback will not be invoked
+ until the application returns to the main loop.
+ </p></div><div class="refsect2" title="gio.Cancellable.get_fd"><a name="method-giocancellable--get-fd"></a><h3>gio.Cancellable.get_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A valid file descriptor. -1 if the file descriptor
+ is not supported, or on errors.</td></tr></tbody></table><p>
+ The <code class="methodname">get_fd</code>() method gets the file descriptor
+ for a cancellable job. This can be used to implement cancellable operations
+ on Unix systems. The returned fd will turn readable when cancellable is cancelled.
+ </p></div><div class="refsect2" title="gio.Cancellable.is_cancelled"><a name="method-giocancellable--is-cancelled"></a><h3>gio.Cancellable.is_cancelled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_cancelled</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if cancellable is cancelled,
+ <code class="literal">False</code> if called with <code class="literal">None</code> or if
+ item is not cancelled. </td></tr></tbody></table><p>
+ The <code class="methodname">get_fd</code>() method gets the file descriptor
+ for a cancellable job. This can be used to implement cancellable operations
+ on Unix systems. The returned fd will turn readable when cancellable is cancelled.
+ </p></div><div class="refsect2" title="gio.Cancellable.pop_current"><a name="method-giocancellable--pop-current"></a><h3>gio.Cancellable.pop_current</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pop_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">pop_current</code>() method pops cancellable off
+ the cancellable stack (verifying that cancellable is on the top of the stack).
+ </p></div><div class="refsect2" title="gio.Cancellable.push_current"><a name="method-giocancellable--push-current"></a><h3>gio.Cancellable.push_current</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">push_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">push_current</code>() method pushes cancellable onto
+ the cancellable stack. The current cancllable can then be recieved using
+ <code class="methodname"><a class="link" href="class-giocancellable.html#function-gio--cancellable-get-current" title="gio.cancellable_get_current">gio.cancellable_get_current</a></code>().
+ </p></div><div class="refsect2" title="gio.Cancellable.reset"><a name="method-giocancellable--reset"></a><h3>gio.Cancellable.reset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reset</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">reset</code>() method resets cancellable to its uncancelled state.
+ </p></div><div class="refsect2" title="gio.Cancellable.set_error_if_cancelled"><a name="method-giocancellable--set-error-if-cancelled"></a><h3>gio.Cancellable.set_error_if_cancelled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_error_if_cancelled</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if cancellable was cancelled,
+ <code class="literal">False</code> if it was not.</td></tr></tbody></table><p>
+ The <code class="methodname">set_error_if_cancelled</code>() method, if the cancellable
+ is cancelled, sets the error to notify that the operation was cancelled.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2927444"></a><h2>Functions</h2><div class="refsect2" title="gio.cancellable_get_current"><a name="function-gio--cancellable-get-current"></a><h3>gio.cancellable_get_current</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cancellable_get_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ from the top of the stack, or <code class="literal">None</code> if the stack is empty.</td></tr></tbody></table><p>
+ The <code class="methodname">cancellable_get_current</code>() function gets the top cancellable from the stack.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giobufferedoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodatainputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.BufferedOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.DataInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodatainputstream.html b/docs/html/class-giodatainputstream.html
new file mode 100644
index 0000000..c88c2cb
--- /dev/null
+++ b/docs/html/class-giodatainputstream.html
@@ -0,0 +1,223 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataInputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giocancellable.html" title="gio.Cancellable"><link rel="next" href="class-giodataoutputstream.html" title="gio.DataOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giocancellable.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodataoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataInputStream"><a name="class-giodatainputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataInputStream</h2><p>gio.DataInputStream — Data Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id2931471"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giodatainputstream.html#constructor-giodatainputstream" title="Constructor">gio.DataInputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--get-byte-order" title="gio.DataInputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--get-newline-type" title="gio.DataInputStream.get_newline_type">get_newline_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-byte" title="gio.DataInputStream.read_byte">read_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int16" title="gio.DataInputStream.read_int16">read_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int32" title="gio.DataInputStream.read_int32">read_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int64" title="gio.DataInputStream.read_int64">read_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">read_line</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-async" title="gio.DataInputStream.read_line_async">read_line_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-finish" title="gio.DataInputStream.read_line_finish">read_line_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint16" title="gio.DataInputStream.read_uint16">read_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint32" title="gio.DataInputStream.read_uint32">read_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint64" title="gio.DataInputStream.read_uint64">read_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">read_until</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-async" title="gio.DataInputStream.read_until_async">read_until_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-finish" title="gio.DataInputStream.read_until_finish">read_until_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--set-byte-order" title="gio.DataInputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--set-newline-type" title="gio.DataInputStream.set_newline_type">set_newline_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2915369"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+ +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
+ +-- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a>
+ +-- <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream">gio.DataInputStream</a>
+</pre></div><div class="refsect1" title="gio.DataInputStream Properties"><a name="properties-giodatainputstream"></a><h2>gio.DataInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">The byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr><tr valign="top"><td valign="top">"newline-type"</td><td valign="top">Read - Write</td><td valign="top">The accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2897334"></a><h2>Description</h2><p>
+ <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
+ implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ and includes functions for reading structured data directly from a binary input stream.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giodatainputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.DataInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
+ from the given base_stream.
+ </p></div><div class="refsect1" title="Methods"><a name="id2925566"></a><h2>Methods</h2><div class="refsect2" title="gio.DataInputStream.get_byte_order"><a name="method-giodatainputstream--get-byte-order"></a><h3>gio.DataInputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
+ <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_byte_order</code>() method gets the byte
+ order for the data input stream.
+ </p></div><div class="refsect2" title="gio.DataInputStream.get_newline_type"><a name="method-giodatainputstream--get-newline-type"></a><h3>gio.DataInputStream.get_newline_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_newline_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a>
+ for the given stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_newline_type</code>() method gets the current
+ newline type for the stream.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_byte"><a name="method-giodatainputstream--read-byte"></a><h3>gio.DataInputStream.read_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an unsigned 8-bit/1-byte value read from the
+ stream or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_byte</code>() method reads an unsigned 8-bit/1-byte value from stream.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_int16"><a name="method-giodatainputstream--read-int16"></a><h3>gio.DataInputStream.read_int16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_int16</code>() method reads a 16-bit/2-byte value from stream.
+ </p><p>
+ In order to get the correct byte order for this read operation, see
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+ and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_int32"><a name="method-giodatainputstream--read-int32"></a><h3>gio.DataInputStream.read_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 32-bit/4-byte value read from the stream
+ or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_int32</code>() method reads a signed 32-bit/4-byte value from stream.
+ </p><p>
+ In order to get the correct byte order for this read operation, see
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+ and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_int64"><a name="method-giodatainputstream--read-int64"></a><h3>gio.DataInputStream.read_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 64-bit/8-byte value read from the stream
+ or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_int64</code>() method reads a signed 64-bit/8-byte value from stream.
+ </p><p>
+ In order to get the correct byte order for this read operation, see
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+ and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_line"><a name="method-giodatainputstream--read-line"></a><h3>gio.DataInputStream.read_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_line</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the line that was read in (without the newlines).
+ Set length to a gsize to get the length of the read line. On an error, it will return
+ <code class="literal">None</code> and error will be set. If there's no content to read, it
+ will still return <code class="literal">None</code>, but error won't be set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_line</code>() reads a line from the data input stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can
+ be cancelled by triggering the cancellable object from another thread.
+ If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+ returned. If an operation was partially finished when the operation was
+ cancelled the partial result will be returned, without an error.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_line_async"><a name="method-giodatainputstream--read-line-async"></a><h3>gio.DataInputStream.read_line_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_line_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_line_async</code>() method is the asynchronous version of
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">gio.DataInputStream.read_line</a></code>().
+ It is an error to have two outstanding calls to this function.
+ </p><p>
+ For the synchronous version of this function, see
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">gio.DataInputStream.read_line</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_line_finish"><a name="method-giodatainputstream--read-line-finish"></a><h3>gio.DataInputStream.read_line_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_line_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the line that was read in (without the newlines).
+ On an error, it will return <code class="literal">None</code> and error will be set.
+ If there's no content to read, it will still return <code class="literal">None</code>,
+ but error won't be set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_line_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-async" title="gio.DataInputStream.read_line_async">gio.DataInputStream.read_line_async</a></code>().
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_uint16"><a name="method-giodatainputstream--read-uint16"></a><h3>gio.DataInputStream.read_uint16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_uint16</code>() method reads a 16-bit/2-byte value from stream.
+ </p><p>
+ In order to get the correct byte order for this read operation, see
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+ and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_uint32"><a name="method-giodatainputstream--read-uint32"></a><h3>gio.DataInputStream.read_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 32-bit/4-byte value read from the stream
+ or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_uint32</code>() method reads a signed 32-bit/4-byte value from stream.
+ </p><p>
+ In order to get the correct byte order for this read operation, see
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+ and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_uint64"><a name="method-giodatainputstream--read-uint64"></a><h3>gio.DataInputStream.read_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 64-bit/8-byte value read from the stream
+ or 0 if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_uint64</code>() method reads a signed 64-bit/8-byte value from stream.
+ </p><p>
+ In order to get the correct byte order for this read operation, see
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+ and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_until"><a name="method-giodatainputstream--read-until"></a><h3>gio.DataInputStream.read_until</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_until</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stop_chars</code></strong> :</span></p></td><td>characters to terminate the read.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the data that was read before encountering
+ any of the stop characters. This function will return NULL on an error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_until</code>() reads a string from the data input
+ stream, up to the first occurrence of any of the stop characters.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_until_async"><a name="method-giodatainputstream--read-until-async"></a><h3>gio.DataInputStream.read_until_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_until_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stop_chars</code></strong> :</span></p></td><td>characters to terminate the read.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_until_async</code>() method it's the asynchronous version of
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">gio.DataInputStream.read_until</a></code>().
+ It is an error to have two outstanding calls to this function.
+ </p><p>
+ For the synchronous version of this function, see
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">gio.DataInputStream.read_until</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-finish" title="gio.DataInputStream.read_until_finish">gio.DataInputStream.read_until_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.DataInputStream.read_until_finish"><a name="method-giodatainputstream--read-until-finish"></a><h3>gio.DataInputStream.read_until_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_until_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the data that was read before encountering
+ any of the stop characters. This function will return <code class="literal">None</code> on an error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_until_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-async" title="gio.DataInputStream.read_until_async">gio.DataInputStream.read_until_async</a></code>().
+ </p></div><div class="refsect2" title="gio.DataInputStream.set_byte_order"><a name="method-giodatainputstream--set-byte-order"></a><h3>gio.DataInputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_byte_order</code>() method sets the byte order for
+ the given stream. All subsequent reads from the stream will be read in the given order.
+ </p></div><div class="refsect2" title="gio.DataInputStream.set_newline_type"><a name="method-giodatainputstream--set-newline-type"></a><h3>gio.DataInputStream.set_newline_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_newline_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a> to set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_newline_type</code>() method sets the newline type for the stream.
+ </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+ Note that using gio.DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a
+ read chunk ends in "CR" we must read an additional byte to know if this is
+ "CR" or "CR LF", and this might block if there is no more data availible.
+ </div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giocancellable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodataoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Cancellable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.DataOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodataoutputstream.html b/docs/html/class-giodataoutputstream.html
new file mode 100644
index 0000000..f6f9980
--- /dev/null
+++ b/docs/html/class-giodataoutputstream.html
@@ -0,0 +1,118 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataOutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodatainputstream.html" title="gio.DataInputStream"><link rel="next" href="class-giodrive.html" title="gio.Drive"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataOutputStream"><a name="class-giodataoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataOutputStream</h2><p>gio.DataOutputStream — Data Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id2901910"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giodataoutputstream.html#constructor-giodataoutputstream" title="Constructor">gio.DataOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order" title="gio.DataOutputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-byte" title="gio.DataOutputStream.put_byte">put_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int16" title="gio.DataOutputStream.put_int16">put_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int32" title="gio.DataOutputStream.put_int32">put_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int64" title="gio.DataOutputStream.put_int64">put_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-string" title="gio.DataOutputStream.put_string">put_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16" title="gio.DataOutputStream.put_uint16">put_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32" title="gio.DataOutputStream.put_uint32">put_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64" title="gio.DataOutputStream.put_uint64">put_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order" title="gio.DataOutputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2948765"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+ +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+ +-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
+ +-- <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream">gio.DataOutputStream</a>
+</pre></div><div class="refsect1" title="gio.DataOutputStream Properties"><a name="properties-giodataoutputstream"></a><h2>gio.DataOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">Determines the byte ordering that is used when writing
+ multi-byte entities (such as integers) to the stream.
+ Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2933011"></a><h2>Description</h2><p>
+ <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
+ implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ and includes functions for writing data directly to an output stream.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giodataoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.DataOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
+ from the given base_stream.
+ </p></div><div class="refsect1" title="Methods"><a name="id2907008"></a><h2>Methods</h2><div class="refsect2" title="gio.DataOutputStream.get_byte_order"><a name="method-giodataoutputstream--get-byte-order"></a><h3>gio.DataOutputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
+ <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_byte_order</code>() method gets the byte
+ order for the stream.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_byte"><a name="method-giodataoutputstream--put-byte"></a><h3>gio.DataOutputStream.put_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a char.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_byte</code>() method puts a byte into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_int16"><a name="method-giodataoutputstream--put-int16"></a><h3>gio.DataOutputStream.put_int16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint16.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_int16</code>() method puts a signed 16-bit integer into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_int32"><a name="method-giodataoutputstream--put-int32"></a><h3>gio.DataOutputStream.put_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint32.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_int32</code>() method puts a signed 32-bit integer into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_int64"><a name="method-giodataoutputstream--put-int64"></a><h3>gio.DataOutputStream.put_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint64.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_int64</code>() method puts a signed 64-bit integer into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_string"><a name="method-giodataoutputstream--put-string"></a><h3>gio.DataOutputStream.put_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a string.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if string was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_string</code>() method puts a string into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint16"><a name="method-giodataoutputstream--put-uint16"></a><h3>gio.DataOutputStream.put_uint16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint16.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_uint16</code>() method puts an unsigned 16-bit integer into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint32"><a name="method-giodataoutputstream--put-uint32"></a><h3>gio.DataOutputStream.put_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint32.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_uint32</code>() method puts an unsigned 32-bit integer into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint64"><a name="method-giodataoutputstream--put-uint64"></a><h3>gio.DataOutputStream.put_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint64.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">put_uint64</code>() method puts an unsigned 64-bit integer into the output stream.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.DataOutputStream.set_byte_order"><a name="method-giodataoutputstream--set-byte-order"></a><h3>gio.DataOutputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_byte_order</code>() method sets the byte order for
+ the given stream. All subsequent reads from the stream will be read in the given order.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Drive</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodrive.html b/docs/html/class-giodrive.html
new file mode 100644
index 0000000..dba9dcf
--- /dev/null
+++ b/docs/html/class-giodrive.html
@@ -0,0 +1,117 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Drive</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><link rel="next" href="class-gioemblem.html" title="gio.Emblem"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Drive</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodataoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblem.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Drive"><a name="class-giodrive"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Drive</h2><p>gio.Drive — Virtual File System drive management.</p></div><div class="refsect1" title="Synopsis"><a name="id2888061"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Drive</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--can-eject" title="gio.Drive.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--can-poll-for-media" title="gio.Drive.can_poll_for_media">can_poll_for_media</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject" title="gio.Drive.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject-finish" title="gio.Drive.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--enumerate-identifiers" title="gio.Drive.enumerate_identifiers">enumerate_identifiers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-icon" title="gio.Drive.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-identifier" title="gio.Drive.get_identifier">get_identifier</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-name" title="gio.Drive.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-volumes" title="gio.Drive.get_volumes">get_volumes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--has-media" title="gio.Drive.has_media">has_media</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--has-volumes" title="gio.Drive.has_volumes">has_volumes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-check-automatic" title="gio.Drive.is_media_check_automatic">is_media_check_automatic</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-removable" title="gio.Drive.is_media_removable">is_media_removable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media" title="gio.Drive.poll_for_media">poll_for_media</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media-finish" title="gio.Drive.poll_for_media_finish">poll_for_media_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2898897"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-giodrive.html" title="gio.Drive">gio.Drive</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id2920566"></a><h2>Prerequisites</h2><p>
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a> requires
+ <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id2900985"></a><h2>Description</h2><p>
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ - this represent a piece of hardware connected to the machine. Its generally
+ only created for removable hardware or hardware with removable media.
+ </p><p>
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ is a container class for GVolume objects that stem from the same piece of media.
+ As such, <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ abstracts a drive with (or without) removable media and provides operations for
+ querying whether media is available, determing whether media change is automatically
+ detected and ejecting the media.
+ </p><p>
+ If the <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ reports that media isn't automatically detected, one can poll for media; typically
+ one should not do this periodically as a poll for media operation is potententially
+ expensive and may spin up the drive creating noise.
+ </p><p>
+ For porting from GnomeVFS note that there is no equivalent of
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ in that API.
+ </p></div><div class="refsect1" title="Methods"><a name="id2895866"></a><h2>Methods</h2><div class="refsect2" title="gio.Drive.can_eject"><a name="method-giodrive--can-eject"></a><h3>gio.Drive.can_eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive can be ejected,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_eject</code>() method checks if a drive can be ejected.
+ </p></div><div class="refsect2" title="gio.Drive.can_poll_for_media"><a name="method-giodrive--can-poll-for-media"></a><h3>gio.Drive.can_poll_for_media</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_poll_for_media</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive can be polled
+ for media changes, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_poll_for_media</code>() method checks if a drive
+ can be polled for media changes.
+ </p></div><div class="refsect2" title="gio.Drive.eject"><a name="method-giodrive--eject"></a><h3>gio.Drive.eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject</code>() method asynchronously ejects a drive.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject-finish" title="gio.Drive.eject_finish">gio.Drive.eject_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Drive.eject_finish"><a name="method-giodrive--eject-finish"></a><h3>gio.Drive.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive has been ejected
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject_finish</code>() method finishes ejecting a drive.
+ </p></div><div class="refsect2" title="gio.Drive.enumerate_identifiers"><a name="method-giodrive--enumerate-identifiers"></a><h3>gio.Drive.enumerate_identifiers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_identifiers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of strings containing kinds of identifiers.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">enumerate_identifiers</code>() method gets the kinds
+ of identifiers that drive has. Use
+ <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-identifier" title="gio.Drive.get_identifier">gio.Drive.get_identifier</a></code>()
+ to obtain the identifiers themselves.
+ </p></div><div class="refsect2" title="gio.Drive.get_icon"><a name="method-giodrive--get-icon"></a><h3>gio.Drive.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ for the drive.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_icon</code>() method gets the icon for drive.
+ </p></div><div class="refsect2" title="gio.Drive.get_identifier"><a name="method-giodrive--get-identifier"></a><h3>gio.Drive.get_identifier</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_identifier</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing the requested identfier, or
+ <code class="literal">None</code> if the
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ doesn't have this kind of identifier.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_identifier</code>() method gets the identifier of
+ the given kind for drive.
+ </p></div><div class="refsect2" title="gio.Drive.get_name"><a name="method-giodrive--get-name"></a><h3>gio.Drive.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing drive's name.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_name</code>() method gets the name of drive.
+ </p></div><div class="refsect2" title="gio.Drive.get_volumes"><a name="method-giodrive--get-volumes"></a><h3>gio.Drive.get_volumes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list containing any
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ objects on the given drive.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_volumes</code>() method get a list of mountable
+ volumes for drive.
+ </p></div><div class="refsect2" title="gio.Drive.has_media"><a name="method-giodrive--has-media"></a><h3>gio.Drive.has_media</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_media</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive has media,
+ <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+ The <code class="methodname">has_media</code>() method checks if the drive
+ has media. Note that the OS may not be polling the drive for media changes; see
+ <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-check-automatic" title="gio.Drive.is_media_check_automatic">gio.Drive.is_media_check_automatic</a></code>()
+ for more details.
+ </p></div><div class="refsect2" title="gio.Drive.has_volumes"><a name="method-giodrive--has-volumes"></a><h3>gio.Drive.has_volumes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive contains volumes,
+ <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+ The <code class="methodname">has_volumes</code>() method check if drive has any mountable volumes.
+ </p></div><div class="refsect2" title="gio.Drive.is_media_check_automatic"><a name="method-giodrive--is-media-check-automatic"></a><h3>gio.Drive.is_media_check_automatic</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_media_check_automatic</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive is capabable
+ of automatically detecting media changes,
+ <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+ The <code class="methodname">is_media_check_automatic</code>() method checks if
+ drive is capabable of automatically detecting media changes.
+ </p></div><div class="refsect2" title="gio.Drive.is_media_removable"><a name="method-giodrive--is-media-removable"></a><h3>gio.Drive.is_media_removable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_media_removable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive supports removable media,
+ <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+ The <code class="methodname">is_media_removable</code>() method checks if the
+ drive supports removable media.
+ </p></div><div class="refsect2" title="gio.Drive.poll_for_media"><a name="method-giodrive--poll-for-media"></a><h3>gio.Drive.poll_for_media</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">poll_for_media</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">poll_for_media</code>() method asynchronously polls
+ drive to see if media has been inserted or removed.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media-finish" title="gio.Drive.poll_for_media_finish">gio.Drive.poll_for_media_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Drive.poll_for_media_finish"><a name="method-giodrive--poll-for-media-finish"></a><h3>gio.Drive.poll_for_media_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">poll_for_media_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive has been poll_for_mediaed
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">poll_for_media_finish</code>() method finishes
+ an operation started with
+ <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media" title="gio.Drive.poll_for_media">gio.Drive.poll_for_media</a></code>()
+ on a drive.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodataoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblem.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Emblem</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioemblem.html b/docs/html/class-gioemblem.html
new file mode 100644
index 0000000..0834b0f
--- /dev/null
+++ b/docs/html/class-gioemblem.html
@@ -0,0 +1,46 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Emblem</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodrive.html" title="gio.Drive"><link rel="next" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Emblem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Emblem"><a name="class-gioemblem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Emblem</h2><p>gio.Emblem — An object for emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id2917213"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Emblem</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioemblem.html#constructor-gioemblem" title="Constructor">gio.Emblem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-icon" title="gio.Emblem.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-origin" title="gio.Emblem.get_origin">get_origin</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblem.html#function-gio--emblem-new-with-origin" title="gio.emblem_new_with_origin">gio.emblem_new_with_origin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2837565"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioemblem.html" title="gio.Emblem">gio.Emblem</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3007999"></a><h2>Implemented Interfaces</h2><p>
+ <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+ implements
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ </p></div><div class="refsect1" title="gio.Emblem Properties"><a name="properties-gioemblem"></a><h2>gio.Emblem Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"icon"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">The actual icon of the emblem.</td></tr><tr valign="top"><td valign="top">"origin"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">Tells which origin the emblem is derived from.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2936036"></a><h2>Description</h2><p>
+ The <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+ class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
+ that supports having an emblem, which is an icon with additional properties.
+ It can then be added to a
+ <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
+ </p><p>
+ Currently, only metainformation about the emblem's origin is supported.
+ More may be added in the future.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.Emblem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> containing the icon.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>
+ <a class="link" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">origin</a> of the emblem.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
+ </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+ Parameter <em class="parameter"><code>origin</code></em> is available since PyGObject 2.20.
+ </div><p>
+ Creates a new <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a> for icon.
+ </p></div><div class="refsect1" title="Methods"><a name="id2888095"></a><h2>Methods</h2><div class="refsect2" title="gio.Emblem.get_icon"><a name="method-gioemblem--get-icon"></a><h3>gio.Emblem.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_icon</code>() method gives back the icon from emblem.
+ </p></div><div class="refsect2" title="gio.Emblem.get_origin"><a name="method-gioemblem--get-origin"></a><h3>gio.Emblem.get_origin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_origin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the origin of the emblem.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_origin</code>() method gets the origin of the emblem.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2949396"></a><h2>Functions</h2><div class="refsect2" title="gio.emblem_new_with_origin"><a name="function-gio--emblem-new-with-origin"></a><h3>gio.emblem_new_with_origin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">emblem_new_with_origin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>a <a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
+ defining the emblem's origin.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
+ </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+ While this method is not deprecated, with 2.20 and up it is recommended
+ to use the constructor instead.
+ </div><p>
+ The <code class="methodname">emblem_new_with_origin</code>() function creates
+ a new emblem for icon.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Drive </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.EmblemedIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioemblemedicon.html b/docs/html/class-gioemblemedicon.html
new file mode 100644
index 0000000..5c474f5
--- /dev/null
+++ b/docs/html/class-gioemblemedicon.html
@@ -0,0 +1,38 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.EmblemedIcon</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioemblem.html" title="gio.Emblem"><link rel="next" href="class-giofile.html" title="gio.File"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.EmblemedIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioemblem.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofile.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.EmblemedIcon"><a name="class-gioemblemedicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.EmblemedIcon</h2><p>gio.EmblemedIcon — Icon with emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id2966280"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.EmblemedIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioemblemedicon.html#constructor-gioemblemedicon" title="Constructor">gio.EmblemedIcon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem" title="gio.EmblemedIcon.add_emblem">add_emblem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--get-icon" title="gio.EmblemedIcon.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2926682"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon">gio.EmblemedIcon</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id2931890"></a><h2>Implemented Interfaces</h2><p>
+ <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
+ implements
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id2862087"></a><h2>Description</h2><p>
+ The <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
+ class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
+ that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via
+ <code class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem" title="gio.EmblemedIcon.add_emblem">gio.EmblemedIcon.add_emblem</a></code>().
+ </p><p>
+ Note that
+ <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
+ allows no control over the position of the emblems. See also
+ <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+ for more information.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblemedicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.EmblemedIcon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>emblem</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ for icon with the emblem emblem.
+ </p></div><div class="refsect1" title="Methods"><a name="id2918592"></a><h2>Methods</h2><div class="refsect2" title="gio.EmblemedIcon.add_emblem"><a name="method-gioemblemedicon--add-emblem"></a><h3>gio.EmblemedIcon.add_emblem</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_emblem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>emblem</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">add_emblem</code>() method adds emblem to the
+ list of <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>s.
+ </p></div><div class="refsect2" title="gio.EmblemedIcon.get_icon"><a name="method-gioemblemedicon--get-icon"></a><h3>gio.EmblemedIcon.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ that is owned by emblemed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_icon</code>() method gets the main icon for emblemed.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioemblem.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofile.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Emblem </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.File</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofile.html b/docs/html/class-giofile.html
new file mode 100644
index 0000000..f18df5e
--- /dev/null
+++ b/docs/html/class-giofile.html
@@ -0,0 +1,1436 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.File</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><link rel="next" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.File</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioemblemedicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileattributeinfo.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.File"><a name="class-giofile"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.File</h2><p>gio.File — File and Directory Handling.</p></div><div class="refsect1" title="Synopsis"><a name="id2891493"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.File</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giofile.html#constructor-giofile" title="Constructor">gio.File</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to" title="gio.File.append_to">append_to</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-async" title="gio.File.append_to_async">append_to_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-finish" title="gio.File.append_to_finish">append_to_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">copy</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-async" title="gio.File.copy_async">copy_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-attributes" title="gio.File.copy_attributes">copy_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-finish" title="gio.File.copy_finish">copy_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">create</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">create_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-finish" title="gio.File.create_finish">create_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--delete" title="gio.File.delete">delete</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--dup" title="gio.File.dup">dup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable" title="gio.File.eject_mountable">eject_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable-finish" title="gio.File.eject_mountable_finish">eject_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">enumerate_children</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-async" title="gio.File.enumerate_children_async">enumerate_children_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-finish" title="gio.File.eject_mountable_finish">enumerate_children_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--equal" title="gio.File.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount" title="gio.File.find_enclosing_mount">find_enclosing_mount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-async" title="gio.File.find_enclosing_mount_async">find_enclosing_mount_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-finish" title="gio.File.find_enclosing_mount_finish">find_enclosing_mount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-basename" title="gio.File.get_basename">get_basename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child" title="gio.File.get_child">get_child</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child-for-display-name" title="gio.File.get_child_for_display_name">get_child_for_display_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">get_parent</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parse-name" title="gio.File.get_parse_name">get_parse_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">get_path</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-relative-path" title="gio.File.get_relative_path">get_relative_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>descendant</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">get_uri</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri-scheme" title="gio.File.get_uri_scheme">get_uri_scheme</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--has-prefix" title="gio.File.has_prefix">has_prefix</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>prefix</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--has-uri-scheme" title="gio.File.has_uri_scheme">has_uri_scheme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--is-native" title="gio.File.is_native">is_native</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents" title="gio.File.load_contents">load_contents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-async" title="gio.File.load_contents_async">load_contents_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-finish" title="gio.File.load_contents_finish">load_contents_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory" title="gio.File.make_directory">make_directory</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory-with-parents" title="gio.File.make_directory_with_parents">make_directory_with_parents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-symbolic-link" title="gio.File.make_symbolic_link">make_symbolic_link</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor" title="gio.File.monitor">monitor</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-directory" title="gio.File.monitor_directory">monitor_directory</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-file" title="gio.File.monitor_file">monitor_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume" title="gio.File.mount_enclosing_volume">mount_enclosing_volume</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume-finish" title="gio.File.mount_enclosing_volume_finish">mount_enclosing_volume_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">mount_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable-finish" title="gio.File.mount_mountable_finish">mount_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--move" title="gio.File.move">move</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-default-handler" title="gio.File.query_default_handler">query_default_handler</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-exists" title="gio.File.query_exists">query_exists</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-file-type" title="gio.File.query_file_type">query_file_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-async" title="gio.File.query_filesystem_info_async">query_filesystem_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-finish" title="gio.File.query_filesystem_info_finish">query_filesystem_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-async" title="gio.File.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-finish" title="gio.File.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-settable-attributes" title="gio.File.query_settable_attributes">query_settable_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-writable-namespace" title="gio.File.query_writable_namespace">query_writable_namespace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read" title="gio.File.read">read</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-async" title="gio.File.read_async">read_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-finish" title="gio.File.read_finish">read_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace" title="gio.File.replace">replace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-async" title="gio.File.replace_async">replace_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents" title="gio.File.replace_contents">replace_contents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-async" title="gio.File.replace_contents_async">replace_contents_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-finish" title="gio.File.replace_contents_finish">replace_contents_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-finish" title="gio.File.replace_finish">replace_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--resolve-relative-path" title="gio.File.resolve_relative_path">resolve_relative_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>relative_path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute" title="gio.File.set_attribute">set_attribute</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-byte-string" title="gio.File.set_attribute_byte_string">set_attribute_byte_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-int32" title="gio.File.set_attribute_int32">set_attribute_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-int64" title="gio.File.set_attribute_int64">set_attribute_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-string" title="gio.File.set_attribute_string">set_attribute_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-uint32" title="gio.File.set_attribute_uint32">set_attribute_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-uint64" title="gio.File.set_attribute_uint64">set_attribute_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">set_attributes_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-finish" title="gio.File.set_attributes_finish">set_attributes_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">set_attributes_from_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">set_dispay_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-async" title="gio.File.set_display_name_async">set_display_name_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-finish" title="gio.File.set_display_name_finish">set_display_name_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--trash" title="gio.File.trash">trash</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">unmount_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable-finish" title="gio.File.unmount_mountable_finish">unmount_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parse_name</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id2941337"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-giofile.html" title="gio.File">gio.File</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id2862959"></a><h2>Prerequisites</h2><p>
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is implemented by
+ <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id2891480"></a><h2>Description</h2><p>
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is a high
+ level abstraction for manipulating files on a virtual file system.
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are lightweight,
+ immutable objects that do no I/O upon creation. It is necessary to understand that
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ objects do not represent files, merely an identifier for a file. All file content
+ I/O is implemented as streaming operations (see
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a> and
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>).
+ </p><p>
+ To construct a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, you can use
+ it's constructor either with a path, an uri or a commandline argument.
+ <code class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></code>()
+ from a utf8 string gotten from
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parse-name" title="gio.File.get_parse_name">gio.File.get_parse_name</a></code>().
+ </p><p>
+ One way to think of a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is as
+ an abstraction of a pathname. For normal files the system pathname is what is stored internally,
+ but as <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are extensible it
+ could also be something else that corresponds to a pathname in a userspace implementation of a filesystem.
+ </p><p>
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s make up hierarchies of
+ directories and files that correspond to the files on a filesystem. You can move through the
+ file system with GFile using
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">gio.File.get_parent</a></code>()
+ to get an identifier for the parent directory,
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child" title="gio.File.get_child">gio.File.get_child</a></code>()
+ to get a child within a directory,
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--resolve-relative-path" title="gio.File.resolve_relative_path">gio.File.resolve_relative_path</a></code>()
+ to resolve a relative path between two <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
+ There can be multiple hierarchies, so you may not end up at the same root if you repeatedly call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">gio.File.get_parent</a></code>()
+ on two different files.
+ </p><p>
+ All <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s have a basename (get with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-basename" title="gio.File.get_basename">gio.File.get_basename</a></code>()
+ ). These names are byte strings that are used to identify the file on the filesystem
+ (relative to its parent directory) and there is no guarantees that they have any particular charset
+ encoding or even make any sense at all. If you want to use filenames in a user interface you should
+ use the display name that you can get by requesting the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>().
+ This is guaranteed to be in utf8 and can be used in a user interface. But always store the real basename or the
+ GFile to use to actually access the file, because there is no way to go from a display name to the actual name.
+ </p><p>
+ Using <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> as an identifier has the same
+ weaknesses as using a path in that there may be multiple aliases for the same file. For instance,
+ hard or soft links may cause two different <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
+ to refer to the same file. Other possible causes for aliases are: case insensitive filesystems, short and
+ long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the same file
+ you can query for the gio.FILE_ATTRIBUTE_ID_FILE attribute. Note that
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> does some trivial canonicalization
+ of pathnames passed in, so that trivial differences in the path string used at creation
+ (duplicated slashes, slash at end of path, "." or ".." path segments, etc) does not create different
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
+ </p><p>
+ Many <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> operations have both synchronous
+ and asynchronous versions to suit your application. Asynchronous versions of synchronous functions simply
+ have _async() appended to their function names. The asynchronous I/O functions call a
+ GAsyncReadyCallback which is then used to finalize the operation, producing a GAsyncResult
+ which is then passed to the function's matching _finish() operation.
+ </p><p>
+ Some <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> operations do not have
+ synchronous analogs, as they may take a very long time to finish, and blocking may leave an application
+ unusable. Notable cases include:
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">gio.File.mount_mountable</a></code>()
+ to mount a mountable file.
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">gio.File.unmount_mountable</a></code>()
+ to unmount a mountable file.
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable" title="gio.File.eject_mountable">gio.File.eject_mountable</a></code>()
+ to eject a mountable file.
+ </p><p>
+ One notable feature of <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are
+ entity tags, or "etags" for short. Entity tags are somewhat like a more abstract
+ version of the traditional mtime, and can be used to quickly determine if the file
+ has been modified from the version on the file system. See the HTTP 1.1
+ specification for HTTP Etag headers, which are a very similar concept.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofile"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.File</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td><td>a command line string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td><td>a string containing a relative or absolute path.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td><td>a string containing a URI.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> either from a commandline,
+ a path or an uri.
+ </p></div><div class="refsect1" title="Methods"><a name="id2955856"></a><h2>Methods</h2><div class="refsect2" title="gio.File.append_to"><a name="method-giofile--append-to"></a><h3>gio.File.append_to</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">append_to</code>() method gets an output stream for
+ appending data to the file. If the file doesn't already exist it is created.
+ </p><p>
+ By default files created are generally readable by everyone, but if you pass
+ gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+ current user, to the level that is supported on the target filesystem.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If
+ the operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ Some file systems don't allow all file names, and may return an
+ gio.ERROR_INVALID_FILENAME error. If the file is a directory the
+ gio.ERROR_IS_DIRECTORY error will be returned. Other errors are possible too,
+ and depend on what kind of filesystem the file is on.
+ </p></div><div class="refsect2" title="gio.File.append_to_async"><a name="method-giofile--append-to-async"></a><h3>gio.File.append_to_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">append_to_async</code>() method asynchronously opens file for appending.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to" title="gio.File.append_to">gio.File.append_to</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-finish" title="gio.File.append_to_finish">gio.File.append_to_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.append_to_finish"><a name="method-giofile--append-to-finish"></a><h3>gio.File.append_to_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a valid
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">append_to_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-async" title="gio.File.append_to_async">gio.File.append_to_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.copy"><a name="method-giofile--copy"></a><h3>gio.File.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">copy</code>() method copies the file source to
+ the location specified by destination. Can not handle recursive copies of directories.
+ </p><p>
+ If the flag gio.FILE_COPY_OVERWRITE is specified an already existing
+ destination file is overwritten.
+ </p><p>
+ If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will
+ be copied as symlinks, otherwise the target of the source symlink will be copied.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If progress_callback is not <code class="literal">None</code>, then the operation can be
+ monitored by setting this to a GFileProgressCallback function. user_data
+ will be passed to this function. It is guaranteed that this callback will be
+ called after all data has been transferred with the total number of bytes
+ copied during the operation.
+ </p><p>
+ If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+ independent on the status of the destination.
+ </p><p>
+ If gio.FILE_COPY_OVERWRITE is not specified and the target exists,
+ then the error gio.ERROR_EXISTS is returned.
+ </p><p>
+ If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error
+ is returned. If trying to overwrite a directory with a directory the
+ gio.ERROR_WOULD_MERGE error is returned.
+ </p><p>
+ If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE
+ is specified and the target is a file, then the gio.ERROR_WOULD_RECURSE error is returned.
+ </p><p>
+ If you are interested in copying the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> object
+ itself (not the on-disk file), see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--dup" title="gio.File.dup">gio.File.dup</a></code>().
+ </p></div><div class="refsect2" title="gio.File.copy_async"><a name="method-giofile--copy-async"></a><h3>gio.File.copy_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">copy_async</code>() method copies the file source to
+ the location specified by destination asynchronously. For details of the behaviour,
+ see <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>().
+ </p><p>
+ If progress_callback is not <code class="literal">None</code>, then that function that will
+ be called just like in
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>(),
+ however the callback will run in the main loop, not in the thread that is doing the I/O operation.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-finish" title="gio.File.copy_finish">gio.File.copy_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.copy_attributes"><a name="method-giofile--copy-attributes"></a><h3>gio.File.copy_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ to copy attributes to.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were copied successfully,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">copy_attributes</code>() method copies the file attributes
+ from source to destination.
+ </p><p>
+ Normally only a subset of the file attributes are copied, those that are copies
+ in a normal file copy operation (which for instance does not include e.g. owner).
+ However if gio.FILE_COPY_ALL_METADATA is specified in flags, then all the metadata
+ that is possible to copy is copied. This is useful when implementing move by copy + delete source.
+ </p></div><div class="refsect2" title="gio.File.copy_finish"><a name="method-giofile--copy-finish"></a><h3>gio.File.copy_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
+ <code class="literal">False</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">copy_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-async" title="gio.File.copy_async">gio.File.copy_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.create"><a name="method-giofile--create"></a><h3>gio.File.create</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">create</code>() method creates a new file and returns
+ an output stream for writing to it. The file must not already exist.
+ </p><p>
+ By default files created are generally readable by everyone, but if you pass
+ gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+ current user, to the level that is supported on the target filesystem.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If a file or directory with this name already exists the gio.ERROR_EXISTS
+ error will be returned. Some file systems don't allow all file names, and
+ may return an gio.ERROR_INVALID_FILENAME error, and if the name is to long
+ gio.ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too,
+ and depend on what kind of filesystem the file is on.
+ </p></div><div class="refsect2" title="gio.File.create_async"><a name="method-giofile--create-async"></a><h3>gio.File.create_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">create_async</code>() method asynchronously creates a new
+ file and returns an output stream for writing to it. The file must not already exist.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">gio.File.create</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-finish" title="gio.File.create_finish">gio.File.create_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.create_finish"><a name="method-giofile--create-finish"></a><h3>gio.File.create_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">create_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">gio.File.create_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.delete"><a name="method-giofile--delete"></a><h3>gio.File.delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">delete</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file was deleted,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">deleted</code>() method deletes a file. If the file is a
+ directory, it will only be deleted if it is empty.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.dup"><a name="method-giofile--dup"></a><h3>gio.File.dup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">dup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ that is a duplicate of the given <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">dup</code>() method duplicates a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ handle. This operation does not duplicate the actual file or directory represented
+ by the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>; see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>()
+ if attempting to copy a file.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.eject_mountable"><a name="method-giofile--eject-mountable"></a><h3>gio.File.eject_mountable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject_mountable</code>() method starts an asynchronous eject on a
+ mountable. When this operation has completed, callback will be called with
+ user_user data, and the operation can be finalized with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable-finish" title="gio.File.eject_mountable_finish">gio.File.eject_mountable_finish</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.eject_mountable_finish"><a name="method-giofile--eject-mountable-finish"></a><h3>gio.File.eject_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file was ejected successfully,
+ <code class="literal">False</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">create_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">gio.File.create_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.enumerate_children"><a name="method-giofile--enumerate-children"></a><h3>gio.File.enumerate_children</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">enumerate_children</code>() method gets the requested information
+ about the files in a directory. The result is a GFileEnumerator object that will give out
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a> objects
+ for all the files in the directory.
+ </p><p>
+ The attribute value is a string that specifies the file attributes that should be gathered.
+ It is not an error if it's not possible to read a particular requested attribute from a file -
+ it just won't be set. attribute should be a comma-separated list of attribute or attribute
+ wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all
+ attributes in the standard namespace. An example attribute query be "standard::*,owner::user".
+ The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. If the file
+ is not a directory, the gio.FILE_ERROR_NOTDIR error will be returned.
+ Other errors are possible too.
+ </p></div><div class="refsect2" title="gio.File.enumerate_children_async"><a name="method-giofile--enumerate-children-async"></a><h3>gio.File.enumerate_children_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">enumerate_children_async</code>() method asynchronously gets the
+ requested information about the files in a directory. The result is a
+ <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ object that will give out <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ objects for all the files in the directory.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">enumerate_children</a></code>()
+ which is the synchronous version of this call.
+ </p></div><div class="refsect2" title="gio.File.eject_mountable_finish"><a name="method-giofile--enumerate-children-finish"></a><h3>gio.File.eject_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ or <code class="literal">None</code> if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">enumerate_children_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-async" title="gio.File.enumerate_children_async">gio.File.enumerate_children_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.equal"><a name="method-giofile--equal"></a><h3>gio.File.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>file2</code></strong> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if file1 and file2 are equal.
+ <code class="literal">False</code> if either is not a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">equal</code>() method checks equality of two given
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
+ Note that two <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
+ that differ can still refer to the same file on the filesystem due to various
+ forms of filename aliasing.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.find_enclosing_mount"><a name="method-giofile--find-enclosing-mount"></a><h3>gio.File.find_enclosing_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">find_enclosing_mount</code>() method gets a
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> for the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </p><p>
+ If the interface for file does not have a mount (e.g. possibly a remote share),
+ error will be set to gio.ERROR_NOT_FOUND and <code class="literal">None</code> will be returned.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.find_enclosing_mount_async"><a name="method-giofile--find-enclosing-mount-async"></a><h3>gio.File.find_enclosing_mount_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">find_enclosing_mount_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">find_enclosing_mount_async</code>() method asynchronously
+ gets the mount for the file.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount" title="gio.File.find_enclosing_mount">gio.File.find_enclosing_mount</a></code>()
+ which is the synchronous version of this call.
+ </p></div><div class="refsect2" title="gio.File.find_enclosing_mount_finish"><a name="method-giofile--find-enclosing-mount-finish"></a><h3>gio.File.find_enclosing_mount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">find_enclosing_mount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ or <code class="literal">None</code> if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">find_enclosing_mount_finish</code>() method finishes an asynchronous
+ find mount started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-async" title="gio.File.find_enclosing_mount_async">gio.File.find_enclosing_mount_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.get_basename"><a name="method-giofile--get-basename"></a><h3>gio.File.get_basename</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_basename</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>string containing the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s
+ base name, or <code class="literal">None</code> if given
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is invalid.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_basename</code>() method gets the base name
+ (the last component of the path) for a given
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </p><p>
+ If called for the top level of a system (such as the filesystem root or
+ a uri like sftp://host/) it will return a single directory separator
+ (and on Windows, possibly a drive letter).
+ </p><p>
+ The base name is a byte string (*not* UTF-8). It has no defined encoding
+ or rules other than it may not contain zero bytes. If you want to use filenames
+ in a user interface you should use the display name that you can get by requesting
+ the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>().
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_child"><a name="method-giofile--get-child"></a><h3>gio.File.get_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>string containing the child's basename.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ to a child specified by name.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_child</code>() method gets a child of file
+ with basename equal to name.
+ </p><p>
+ Note that the file with that specific name might not exist, but you can
+ still have a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ that points to it. You can use this for instance to create that file.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_child_for_display_name"><a name="method-giofile--get-child-for-display-name"></a><h3>gio.File.get_child_for_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child_for_display_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display_name</code></strong> :</span></p></td><td>string to a possible child.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ to the specified child or <code class="literal">None</code>
+ if the display name couldn't be converted.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_child_for_display_name</code>() method gets the
+ child of file for a given display_name (i.e. a UTF8 version of the name).
+ If this function fails, it returns NULL and error will be set. This is very
+ useful when constructing a GFile for a new file and the user entered the filename
+ in the user interface, for instance when you select a directory and type a filename
+ in the file selector.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_parent"><a name="method-giofile--get-parent"></a><h3>gio.File.get_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_parent</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ structure to the parent of the given
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> or
+ <code class="literal">None</code> if there is no parent.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_parent</code>() method gets the parent directory for the file.
+ If the file represents the root directory of the file system, then <code class="literal">None</code>
+ will be returned.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_parse_name"><a name="method-giofile--get-parse-name"></a><h3>gio.File.get_parse_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_parse_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s parse name.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_parse_name</code>() method gets the parse name
+ of the file. A parse name is a UTF-8 string that describes the file such
+ that one can get the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ back using
+ <code class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></code>().
+ </p><p>
+ This is generally used to show the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ as a nice full-pathname kind of string in a user interface, like in a location entry.
+ </p><p>
+ For local files with names that can safely be converted to UTF8 the pathname is used,
+ otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped).
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_path"><a name="method-giofile--get-path"></a><h3>gio.File.get_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_path</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s path,
+ or <code class="literal">None</code> if no such path exists.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_path</code>() method gets the local pathname for
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, if one exists.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_relative_path"><a name="method-giofile--get-relative-path"></a><h3>gio.File.get_relative_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_relative_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>descendant</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>descendant</code></strong> :</span></p></td><td>input <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>string with the relative path from descendant to parent,
+ or <code class="literal">None</code> if descendant doesn't have parent as prefix.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_relative_path</code>() method gets the path for
+ descendant relative to parent.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_uri"><a name="method-giofile--get-uri"></a><h3>gio.File.get_uri</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uri</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s URI.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_uri</code>() method gets the URI for the file.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.get_uri_scheme"><a name="method-giofile--get-uri-scheme"></a><h3>gio.File.get_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uri_scheme</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the URI scheme for the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_uri_scheme</code>() method gets the URI scheme for a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ RFC 3986 decodes the scheme as:
+ </p><pre class="programlisting">
+URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+</pre><p>
+ Common schemes include "file", "http", "ftp", etc.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.has_prefix"><a name="method-giofile--has-prefix"></a><h3>gio.File.has_prefix</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_prefix</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>prefix</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>prefix</code></strong> :</span></p></td><td>input <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the files's parent, grandparent,
+ etc is prefix. <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">has_prefix</code>() method checks whether file has the prefix
+ specified by prefix. In other word, if the names of inital elements of files pathname
+ match prefix. Only full pathname elements are matched, so a path like /foo is not
+ considered a prefix of /foobar, only of /foo/bar.
+ </p><p>
+ This call does no blocking i/o, as it works purely on names. As such it can sometimes
+ return <code class="literal">False</code> even if file is inside a prefix (from a filesystem point
+ of view), because the prefix of file is an alias of prefix.
+ </p></div><div class="refsect2" title="gio.File.has_uri_scheme"><a name="method-giofile--has-uri-scheme"></a><h3>gio.File.has_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_uri_scheme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uri_scheme</code></strong> :</span></p></td><td>a string containing a URI scheme.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s
+ backend supports the given URI scheme, <code class="literal">False</code> if URI scheme
+ is <code class="literal">None</code>, not supported, or
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is invalid.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">has_uri_scheme</code>() method checks to see if a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ has a given URI scheme.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.is_native"><a name="method-giofile--is-native"></a><h3>gio.File.is_native</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_native</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if file is native.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">is_native</code>() method checks to see if a file
+ is native to the platform.
+ </p><p>
+ A native file s one expressed in the platform-native filename format, e.g.
+ "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it
+ might be on a locally mounted remote filesystem.
+ </p><p>
+ On some systems non-native files may be available using the native filesystem
+ via a userspace filesystem (FUSE), in these cases this call will return
+ <code class="literal">False</code>, but
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">gio.File.get_path</a></code>()
+ will still return a native path.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.load_contents"><a name="method-giofile--load-contents"></a><h3>gio.File.load_contents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_contents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a three tuple containing the contents of the file,
+ the length of the contents of the file and the current entity tag for the file.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">load_contents</code>() method loads the content of the file into memory.
+ The data is always zero-terminated, but this is not included in the resultant length.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.load_contents_async"><a name="method-giofile--load-contents-async"></a><h3>gio.File.load_contents_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_contents_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">load_contents_async</code>() method starts an asynchronous load of the file's contents.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents" title="gio.File.load_contents">gio.File.load_contents</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the load operation has completed, callback will be called with user data. To finish
+ the operation, call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-finish" title="gio.File.load_contents_finish">gio.File.load_contents_finish</a></code>()
+ with the GAsyncResult returned by the callback.
+ </p></div><div class="refsect2" title="gio.File.load_contents_finish"><a name="method-giofile--load-contents-finish"></a><h3>gio.File.load_contents_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_contents_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a three tuple containing the contents of the file,
+ the length of the contents of the file and the current entity tag for the file.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">load_contents_finish</code>() method finishes an asynchronous
+ find mount started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-async" title="gio.File.load_contents_async">gio.File.load_contents_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.make_directory"><a name="method-giofile--make-directory"></a><h3>gio.File.make_directory</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_directory</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful creation,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">make_directory</code>() method creates a directory.
+ Note that this will only create a child directory of the immediate parent directory
+ of the path or URI given by the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ To recursively create directories, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory-with-parents" title="gio.File.make_directory_with_parents">gio.File.make_directory_with_parents</a></code>().
+ This function will fail if the parent directory does not exist, setting error to
+ gio.ERROR_NOT_FOUND. If the file system doesn't support creating directories, this
+ function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
+ </p><p>
+ For a local <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> the newly
+ created directory will have the default (current) ownership and permissions of the current process.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.make_directory_with_parents"><a name="method-giofile--make-directory-with-parents"></a><h3>gio.File.make_directory_with_parents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_directory_with_parents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if all directories have been successfully created,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">make_directory_with_parents</code>() method creates a directory
+ and any parent directories that may not exist similar to 'mkdir -p'. If the file system
+ does not support creating directories, this function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
+ </p><p>
+ For a local <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> the newly
+ created directories will have the default (current) ownership and permissions of the current process.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.make_symbolic_link"><a name="method-giofile--make-symbolic-link"></a><h3>gio.File.make_symbolic_link</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_symbolic_link</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>symlink_value</code></em> :</span></p></td><td>a string with the value of the new symlink.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on the creation of a new symlink,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">make_symbolic_link</code>() method creates a symbolic link.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.monitor"><a name="method-giofile--monitor"></a><h3>gio.File.monitor</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">monitor</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+ a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+ for the given file, or <code class="literal">None</code> on error
+ </td></tr></tbody></table><p>
+ The <code class="methodname">monitor</code>() method obtains a file or directory
+ monitor for the given file, depending on the type of the file.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.monitor_directory"><a name="method-giofile--monitor-directory"></a><h3>gio.File.monitor_directory</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">monitor_directory</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+ a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+ for the given file, or <code class="literal">None</code> on error
+ </td></tr></tbody></table><p>
+ The <code class="methodname">monitor_directory</code>() method obtains a directory monitor
+ for the given file. This may fail if directory monitoring is not supported.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.monitor_file"><a name="method-giofile--monitor-file"></a><h3>gio.File.monitor_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">monitor_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+ a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+ for the given file, or <code class="literal">None</code> on error
+ </td></tr></tbody></table><p>
+ The <code class="methodname">monitor_file</code>() method obtains a file monitor for the
+ given file. If no file notification mechanism exists, then regular polling
+ of the file is used.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.mount_enclosing_volume"><a name="method-giofile--mount-enclosing-volume"></a><h3>gio.File.mount_enclosing_volume</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_enclosing_volume</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td><td>a
+ <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ or <code class="literal">None</code> to avoid user interaction.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request
+ is satisfied, or <code class="literal">None</code>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">mount_enclosing_volume</code>() method starts a mount_operation,
+ mounting the volume that contains the file location.
+ </p><p>
+ When this operation has completed, callback will be called with user_user data,
+ and the operation can be finalized with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume-finish" title="gio.File.mount_enclosing_volume_finish">gio.File.mount_enclosing_volume_finish</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.mount_enclosing_volume_finish"><a name="method-giofile--mount-enclosing-volume-finish"></a><h3>gio.File.mount_enclosing_volume_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_enclosing_volume_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if successful. If an error has occurred,
+ this function will return <code class="literal">False</code> and set error appropriately if present.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">mount_enclosing_volume_finish</code>() method finishes an asynchronous
+ find mount started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume" title="gio.File.mount_enclosing_volume">gio.File.mount_enclosing_volume</a></code>().
+ </p></div><div class="refsect2" title="gio.File.mount_mountable"><a name="method-giofile--mount-mountable"></a><h3>gio.File.mount_mountable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td><td>a
+ <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ or <code class="literal">None</code> to avoid user interaction.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request
+ is satisfied, or <code class="literal">None</code>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">mount_mountable</code>() method mounts a file of type
+ gio.FILE_TYPE_MOUNTABLE. Using mount_operation, you can request callbacks when,
+ for instance, passwords are needed during authentication.
+ </p><p>
+ When this operation has completed, callback will be called with user_user data,
+ and the operation can be finalized with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable-finish" title="gio.File.mount_mountable_finish">gio.File.mount_mountable_finish</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.mount_mountable_finish"><a name="method-giofile--mount-mountable-finish"></a><h3>gio.File.mount_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">mount_mountable_finish</code>() method finishes an asynchronous
+ find mount started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">gio.File.mount_mountable</a></code>().
+ </p></div><div class="refsect2" title="gio.File.move"><a name="method-giofile--move"></a><h3>gio.File.move</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">move</code>() method tries to move the file or directory
+ source to the location specified by destination. If native move operations are
+ supported then this is used, otherwise a copy + delete fallback is used. The native
+ implementation may support moving directories (for instance on moves inside the same
+ filesystem), but the fallback code does not.
+ </p><p>
+ If the flag gio.FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten.
+ </p><p>
+ If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied
+ as symlinks, otherwise the target of the source symlink will be copied.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If progress_callback is not <code class="literal">None</code>, then the operation can be monitored
+ by setting this to a GFileProgressCallback function. progress_callback_data will be passed
+ to this function. It is guaranteed that this callback will be called after all data has been
+ transferred with the total number of bytes copied during the operation.
+ </p><p>
+ If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+ independent on the status of the destination.
+ </p><p>
+ If gio.FILE_COPY_OVERWRITE is not specified and the target exists, then the error
+ gio.ERROR_EXISTS is returned.
+ </p><p>
+ If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error is returned.
+ If trying to overwrite a directory with a directory the gio.ERROR_WOULD_MERGE error is returned.
+ </p><p>
+ If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE is specified
+ and the target is a file, then the gio.ERROR_WOULD_RECURSE error may be returned
+ (if the native move operation isn't available).
+ </p></div><div class="refsect2" title="gio.File.query_default_handler"><a name="method-giofile--query-default-handler"></a><h3>gio.File.query_default_handler</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_default_handler</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ if the handle was found, <code class="literal">None</code> if there were errors.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_default_handler</code>() method returns the
+ <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a> that
+ is registered as the default application to handle the file specified by file.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.query_exists"><a name="method-giofile--query-exists"></a><h3>gio.File.query_exists</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_exists</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file exists (and can be detected
+ without error), <code class="literal">False</code> otherwise (or if cancelled).
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_exists</code>() method is an tility function to check
+ if a particular file exists. This is implemented using
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
+ and as such does blocking I/O.
+ </p><p>
+ Note that in many cases it is racy to first check for file existence and then execute
+ something based on the outcome of that, because the file might have been created or
+ removed in between the operations. The general approach to handling that is to not check,
+ but just do the operation and handle the errors as they come.
+ </p><p>
+ As an example of race-free checking, take the case of reading a file, and if it doesn't
+ exist, creating it. There are two racy versions: read it, and on error create it; and:
+ check if it exists, if not create it. These can both result in two processes creating the
+ file (with perhaps a partially written file as the result). The correct approach is to
+ always try to create the file with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">gio.File.create</a></code>()
+ which will either atomically create the file or fail with a gio.ERROR_EXISTS error.
+ </p><p>
+ However, in many cases an existence check is useful in a user interface, for instance
+ to make a menu item sensitive/insensitive, so that you don't have to fool users that
+ something is possible and then just show and error dialog. If you do this, you should
+ make sure to also handle the errors that can happen due to races when you execute the operation.
+ </p></div><div class="refsect2" title="gio.File.query_file_type"><a name="method-giofile--query-file-type"></a><h3>gio.File.query_file_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_file_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+ a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+ <a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_file_type</code>() method it's an utility function to inspect
+ the <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ of a file. This is implemented using
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
+ and as such does blocking I/O.
+ </p><p>
+ The primary use case of this method is to check if a file is a regular file, directory, or symlink.
+ </p></div><div class="refsect2" title="gio.File.query_filesystem_info"><a name="method-giofile--query-filesystem-info"></a><h3>gio.File.query_filesystem_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_filesystem_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ or <code class="literal">None</code> if there was an error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_filesystem_info</code>() method it's similar to
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>(),
+ but obtains information about the filesystem the file is on, rather than the
+ file itself. For instance the amount of space available and the type of the filesystem.
+ </p><p>
+ The attribute value is a string that specifies the file attributes that should be gathered.
+ It is not an error if it's not possible to read a particular requested attribute from a file -
+ it just won't be set. attribute should be a comma-separated list of attribute or attribute
+ wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes
+ in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes
+ of interest are gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes),
+ gio.FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE
+ (type of the filesystem).
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. Other errors
+ are possible too, and depend on what kind of filesystem the file is on.
+ </p></div><div class="refsect2" title="gio.File.query_filesystem_info_async"><a name="method-giofile--query-filesystem-info-async"></a><h3>gio.File.query_filesystem_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_filesystem_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_filesystem_info_async</code>() method asynchronously
+ gets the requested information about the filesystem that the specified file is on.
+ The result is a GFileInfo object that contains key-value attributes
+ (such as type or size for the file).
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-finish" title="gio.File.query_filesystem_info_finish">gio.File.query_filesystem_info_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.query_filesystem_info_finish"><a name="method-giofile--query-filesystem-info-finish"></a><h3>gio.File.query_filesystem_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_filesystem_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ or <code class="literal">None</code> if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_filesystem_info_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-async" title="gio.File.query_filesystem_info_async">gio.File.query_filesystem_info_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.query_filesystem_info"><a name="method-giofile--query-info"></a><h3>gio.File.query_filesystem_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+ a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ for the given file or <code class="literal">None</code> if there was an error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info</code>() method gets the requested
+ information about specified file. The result is a
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ object that contains key-value attributes (such as the type or size of the file).
+ </p><p>
+ The attribute value is a string that specifies the file attributes that should
+ be gathered. It is not an error if it's not possible to read a particular
+ requested attribute from a file - it just won't be set. attribute should be
+ a comma-separated list of attribute or attribute wildcards. The wildcard "*"
+ means all attributes, and a wildcard like "standard::*" means all attributes
+ in the standard namespace. An example attribute query be "standard::*,owner::user".
+ The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ For symlinks, normally the information about the target of the symlink is returned,
+ rather than information about the symlink itself. However if you pass
+ gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about
+ the symlink itself will be returned. Also, for symlinks that point to non-existing
+ files the information about the symlink itself will be returned.
+ </p><p>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be
+ returned. Other errors are possible too, and depend on what kind of
+ filesystem the file is on.
+ </p></div><div class="refsect2" title="gio.File.query_info_async"><a name="method-giofile--query-info-async"></a><h3>gio.File.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+ a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info_async</code>() method asynchronously gets the
+ requested information about specified file. The result is a
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ object that contains key-value attributes (such as type or size for the file).
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">query_info</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-finish" title="gio.File.query_info_finish">gio.File.query_info_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.query_info_finish"><a name="method-giofile--query-info-finish"></a><h3>gio.File.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ for the given file or <code class="literal">None</code> if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-async" title="gio.File.query_info_async">gio.File.query_info_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.query_settable_attributes"><a name="method-giofile--query-settable-attributes"></a><h3>gio.File.query_settable_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_settable_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of
+ <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
+ describing the settable attributes.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_settable_attributes</code>() method obtain the
+ list of settable attributes for the file.
+ </p><p>
+ Returns the type and full attribute name of all the attributes that can be
+ set on this file. This doesn't mean setting it will always succeed though,
+ you might get an access failure, or some specific file may not support a specific attribute.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.query_writable_namespace"><a name="method-giofile--query-writable-namespace"></a><h3>gio.File.query_writable_namespace</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_writable_namespace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of
+ <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
+ describing the writable namespaces.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_writable_namespace</code>() method obtain the
+ list of attribute namespaces where new attributes can be created by a user.
+ An example of this is extended attributes (in the "xattr" namespace).
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.read"><a name="method-giofile--read"></a><h3>gio.File.read</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read</code>() method opens a file for reading. The result
+ is a <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ that can be used to read the contents of the file.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.
+ If the file is a directory, the gio.ERROR_IS_DIRECTORY error will be returned.
+ Other errors are possible too, and depend on what kind of filesystem the file is on.
+ </p></div><div class="refsect2" title="gio.File.read_async"><a name="method-giofile--read-async"></a><h3>gio.File.read_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_async</code>() method asynchronously opens file for reading.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read" title="gio.File.read">read</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-finish" title="gio.File.read_finish">gio.File.read_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.read_finish"><a name="method-giofile--read-finish"></a><h3>gio.File.read_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ file or <code class="literal">None</code> if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-async" title="gio.File.read_async">gio.File.read_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.replace"><a name="method-giofile--replace"></a><h3>gio.File.replace</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
+ or <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">replace</code>() method returns an output stream for
+ overwriting the file, possibly creating a backup copy of the file first.
+ If the file doesn't exist, it will be created.
+ </p><p>
+ This will try to replace the file in the safest way possible so that any
+ errors during the writing will not affect an already existing copy of the file.
+ For instance, for local files it may write to a temporary file and then atomically
+ rename over the destination when the stream is closed.
+ </p><p>
+ By default files created are generally readable by everyone, but if you pass
+ gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to
+ the current user, to the level that is supported on the target filesystem.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ If you pass in a non-<code class="literal">None</code> etag value, then this value is compared
+ to the current entity tag of the file, and if they differ an gio.ERROR_WRONG_ETAG error
+ is returned. This generally means that the file has been changed since you last read it.
+ You can get the new etag from
+ <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--get-etag" title="gio.FileOutputStream.get_etag">gio.FileOutputStream.get_etag</a></code>()
+ after you've finished writing and closed the GFileOutputStream. When you load a new file you can use
+ <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>()
+ to get the etag of the file.
+ </p><p>
+ If make_backup is <code class="literal">True</code>, this function will attempt to make a backup
+ of the current file before overwriting it. If this fails a gio.ERROR_CANT_CREATE_BACKUP
+ error will be returned. If you want to replace anyway, try again
+ with make_backup set to <code class="literal">False</code>.
+ </p><p>
+ If the file is a directory the gio.ERROR_IS_DIRECTORY error will be returned, and
+ if the file is some other form of non-regular file then a gio.ERROR_NOT_REGULAR_FILE
+ error will be returned. Some file systems don't allow all file names, and may return an
+ gio.ERROR_INVALID_FILENAME error, and if the name is to long gio.ERROR_FILENAME_TOO_LONG
+ will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
+ </p></div><div class="refsect2" title="gio.File.replace_async"><a name="method-giofile--replace-async"></a><h3>gio.File.replace_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
+ or <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">replace_async</code>() method asynchronously overwrites the file,
+ replacing the contents, possibly creating a backup copy of the file first.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace" title="gio.File.replace">replace</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-finish" title="gio.File.replace_finish">gio.File.replace_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.replace_contents"><a name="method-giofile--replace-contents"></a><h3>gio.File.replace_contents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_contents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>contents</code></em> :</span></p></td><td>a string containing the new contents for file.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>the old entity tag for the document
+ or <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new entity tag for the document.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">replace_contents</code>() method replaces the contents
+ of file with contents of length bytes. If etag is specified (not NULL) any existing
+ file must have that etag, or the error gio.ERROR_WRONG_ETAG will be returned.
+ </p><p>
+ If make_backup is <code class="literal">True</code>, this function will attempt to make a backup of file.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ The returned etag can be used to verify that the file hasn't changed the next time it is saved over.
+ </p></div><div class="refsect2" title="gio.File.replace_contents_async"><a name="method-giofile--replace-contents-async"></a><h3>gio.File.replace_contents_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_contents_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>contents</code></em> :</span></p></td><td>a string containing the new contents for file.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
+ or <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">replace_contents_async</code>() method starts an asynchronous
+ replacement of file with the given contents of length bytes. etag will
+ replace the document's current entity tag.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents" title="gio.File.replace_contents">replace_contents</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-finish" title="gio.File.replace_contents_finish">gio.File.replace_contents_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.replace_contents_finish"><a name="method-giofile--replace-contents-finish"></a><h3>gio.File.replace_contents_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_contents_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new entity tag for the document.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">replace_contents_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-async" title="gio.File.replace_contents_async">gio.File.replace_contents_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.replace_finish"><a name="method-giofile--replace-finish"></a><h3>gio.File.replace_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ or <code class="literal">None</code> if an error occurred.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">replace_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-async" title="gio.File.replace_async">gio.File.replace_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.resolve_relative_path"><a name="method-giofile--resolve-relative-path"></a><h3>gio.File.resolve_relative_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">resolve_relative_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>relative_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>relative_path</code></strong> :</span></p></td><td>a given relative path string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ to the resolved path. <code class="literal">None</code> if relative_path is <code class="literal">None</code>
+ or if file is invalid.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">resolve_relative_path</code>() method resolves a
+ relative path for file to an absolute path.
+ </p><p>
+ This call does no blocking i/o.
+ </p></div><div class="refsect2" title="gio.File.set_attribute"><a name="method-giofile--set-attribute"></a><h3>gio.File.set_attribute</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>the type of the attribute .
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value_p</code></em> :</span></p></td><td>the value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute</code>() method sets an attribute in
+ the file with attribute name attribute to value.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attribute_byte_string"><a name="method-giofile--set-attribute-byte-string"></a><h3>gio.File.set_attribute_byte_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_byte_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a string containing the attribute's new value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute_byte_string</code>() method Sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING to value. If attribute is of a different type,
+ this operation will fail, returning <code class="literal">False</code>.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attribute_int32"><a name="method-giofile--set-attribute-int32"></a><h3>gio.File.set_attribute_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>an int containing the attribute's new value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute_int32</code>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_INT32 to value. If attribute is of a different type,
+ this operation will fail.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attribute_int64"><a name="method-giofile--set-attribute-int64"></a><h3>gio.File.set_attribute_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a long containing the attribute's new value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute_int64</code>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_INT64 to value. If attribute is of a different type,
+ this operation will fail.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attribute_string"><a name="method-giofile--set-attribute-string"></a><h3>gio.File.set_attribute_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a string containing the attribute's new value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute_string</code>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type,
+ this operation will fail.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attribute_uint32"><a name="method-giofile--set-attribute-uint32"></a><h3>gio.File.set_attribute_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>an int containing the attribute's new value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute_uint32</code>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_UINT32 to value. If attribute is of a different type,
+ this operation will fail.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attribute_uint64"><a name="method-giofile--set-attribute-uint64"></a><h3>gio.File.set_attribute_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a long containing the attribute's new value.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attribute_uint64</code>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_UINT64 to value. If attribute is of a different type,
+ this operation will fail.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_attributes_async"><a name="method-giofile--set-attributes-async"></a><h3>gio.File.set_attributes_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attributes_async</code>() method asynchronously
+ sets the attributes of file with info.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">set_attributes_from_info</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-finish" title="gio.File.set_attributes_finish">gio.File.set_attributes_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.set_attributes_finish"><a name="method-giofile--set-attributes-finish"></a><h3>gio.File.set_attributes_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were set correctly,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attributes_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">gio.File.set_attributes_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.set_attributes_from_info"><a name="method-giofile--set-attributes-from-info"></a><h3>gio.File.set_attributes_from_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes_from_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were set correctly,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_attributes_from_info</code>() method tries to set
+ all attributes in the GFileInfo on the target values, not stopping on the first error.
+ </p>
+ If there is any error during this operation then error will be set to the
+ first error. Error on particular fields are flagged by setting the "status"
+ field in the attribute value to gio.FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
+ which means you can also detect further errors.
+ <p>
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_display_name"><a name="method-giofile--set-display-name"></a><h3>gio.File.set_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_display_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display_name</code></em> :</span></p></td><td>a string conaining the name to display.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ specifying what file was renamed to, or <code class="literal">None</code> if there was an error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_display_name</code>() method renames file to
+ the specified display name.
+ </p><p>
+ The display name is converted from UTF8 to the correct encoding for the
+ target filesystem if possible and the file is renamed to this.
+ </p><p>
+ If you want to implement a rename operation in the user interface the
+ edit name (gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
+ initial value in the rename widget, and then the result after editing
+ should be passed to
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">gio.File.set_dispay_name</a></code>().
+ </p><p>
+ On success the resulting converted filename is returned.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.set_display_name_async"><a name="method-giofile--set-display-name-async"></a><h3>gio.File.set_display_name_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_display_name_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display_name</code></em> :</span></p></td><td>a string conaining the name to display.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_display_name_async</code>() method asynchronously
+ sets the display name for a given GFile.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">set_display_name</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-finish" title="gio.File.set_display_name_finish">gio.File.set_display_name_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.set_display_name_finish"><a name="method-giofile--set-display-name-finish"></a><h3>gio.File.set_display_name_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_display_name_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_display_name_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-async" title="gio.File.set_display_name_async">gio.File.set_display_name_async</a></code>().
+ </p></div><div class="refsect2" title="gio.File.trash"><a name="method-giofile--trash"></a><h3>gio.File.trash</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">trash</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful trash, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">trash</code>() method sends file to the "Trashcan", if possible.
+ This is similar to deleting it, but the user can recover it before emptying the trashcan.
+ Not all file systems support trashing, so this call can return the gio.ERROR_NOT_SUPPORTED error.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p></div><div class="refsect2" title="gio.File.unmount_mountable"><a name="method-giofile--unmount-mountable"></a><h3>gio.File.unmount_mountable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">unmount_mountable</code>() method unmounts a file of type gio.FILE_TYPE_MOUNTABLE.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable-finish" title="gio.File.unmount_mountable_finish">gio.File.unmount_mountable_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.File.unmount_mountable_finish"><a name="method-giofile--unmount-mountable-finish"></a><h3>gio.File.unmount_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation finished successfully,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">unmount_mountable_finish</code>() method finishes an asynchronous
+ copy operation started with
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">gio.File.unmount_mountable</a></code>().
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2980981"></a><h2>Functions</h2><div class="refsect2" title="gio.file_parse_name"><a name="function-gio--file-parse-name"></a><h3>gio.file_parse_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">file_parse_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parse_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>parse_name</code></em> :</span></p></td><td>a file name or path to be parsed.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">parse_name</code>() function constructs a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ with the given parse_name (i.e. something given by g_file_get_parse_name()).
+ This operation never fails, but the returned object might not support any I/O
+ operation if the parse_name cannot be parsed.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioemblemedicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileattributeinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.EmblemedIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileAttributeInfo</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileattributeinfo.html b/docs/html/class-giofileattributeinfo.html
new file mode 100644
index 0000000..d46cd57
--- /dev/null
+++ b/docs/html/class-giofileattributeinfo.html
@@ -0,0 +1,11 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileAttributeInfo</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofile.html" title="gio.File"><link rel="next" href="class-giofileenumerator.html" title="gio.FileEnumerator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileAttributeInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofile.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileenumerator.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileAttributeInfo"><a name="class-giofileattributeinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileAttributeInfo</h2><p>gio.FileAttributeInfo — Information about a specific attribute.</p></div><div class="refsect1" title="Synopsis"><a name="id2998044"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileAttributeInfo</span></span>(<span class="ooclass"><span class="classname">__builtin__.object</span></span>):
+</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2970693"></a><h2>Ancestry</h2><pre class="synopsis">+-- __builtin__.object
+ +-- <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo">gio.FileAttributeInfo</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2970712"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
+ contains information about a specific attribute.
+ </p></div><div class="refsect1" title="gio.FileAttributeInfo Attributes"><a name="attributes-giofileattributeinfo"></a><h2>gio.FileAttributeInfo Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"name"</td><td valign="top">Read</td><td valign="top">The name of the attribute.</td></tr><tr valign="top"><td valign="top">"type"</td><td valign="top">Read</td><td valign="top">the
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ type of the attribute.</td></tr><tr valign="top"><td valign="top">"flags"</td><td valign="top">Read</td><td valign="top">a set of
+ <a class="xref" href="gio-constants.html#gio-file-attribute-flags-constants" title="Gio File Attribute Flags Constants">Gio File Attribute Flags Constants</a>.
+ </td></tr></tbody></table></div></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofile.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileenumerator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.File </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileEnumerator</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileenumerator.html b/docs/html/class-giofileenumerator.html
new file mode 100644
index 0000000..8d276df
--- /dev/null
+++ b/docs/html/class-giofileenumerator.html
@@ -0,0 +1,126 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileEnumerator</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><link rel="next" href="class-giofileicon.html" title="gio.FileIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileEnumerator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileattributeinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileEnumerator"><a name="class-giofileenumerator"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileEnumerator</h2><p>gio.FileEnumerator — Enumerated Files Routines.</p></div><div class="refsect1" title="Synopsis"><a name="id2987317"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileEnumerator</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close" title="gio.FileEnumerator.close">close</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">close_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-finish" title="gio.FileEnumerator.close_finish">close_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--get-container" title="gio.FileEnumerator.get_container">get_container</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--has-pending" title="gio.FileEnumerator.has_pending">has_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--is-closed" title="gio.FileEnumerator.is_closed">is_closed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-file" title="gio.FileEnumerator.next_file">next_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">next_files_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-finish" title="gio.FileEnumerator.next_files_finish">next_files_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--set-pending" title="gio.FileEnumerator.set_pending">set_pending</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pending</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2905573"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator">gio.FileEnumerator</a>
+</pre></div><div class="refsect1" title="gio.FileEnumerator Properties"><a name="properties-giofileenumerator"></a><h2>gio.FileEnumerator Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"container"</td><td valign="top">Write - Construct only</td><td valign="top">The container that is being enumerated.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2896442"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ allows you to operate on a set of
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
+ returning a
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ structure for each file enumerated (e.g.
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">gio.File.enumerate_children</a></code>()
+ will return a The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ for each of the children within a directory).
+ </p><p>
+ To get the next file's information from a
+ The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a> use
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-file" title="gio.FileEnumerator.next_file">gio.FileEnumerator.next_file</a></code>()
+ or its asynchronous version,
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">gio.FileEnumerator.next_files_async</a></code>().
+ Note that the asynchronous version will return a list of
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>s,
+ whereas the synchronous will only return the next file in the enumerator.
+ </p><p>
+ To close a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ use <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close" title="gio.FileEnumerator.close">close</a></code>,
+ or its asynchronous version,
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">close_async</a></code>.
+ Once a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+ is closed, no further actions may be performed on it.
+ </p></div><div class="refsect1" title="Methods"><a name="id2985488"></a><h2>Methods</h2><div class="refsect2" title="gio.FileEnumerator.close"><a name="method-giofileenumerator--close"></a><h3>gio.FileEnumerator.close</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success or
+ <code class="literal">False</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">close</code>() method releases all resources used by this
+ enumerator, making the
+ <a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
+ return gio.ERROR_CLOSED on all calls.
+ </p><p>
+ This will be automatically called when the last reference is dropped,
+ but you might want to call this function to make sure resources are released
+ as early as possible.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.close_async"><a name="method-giofileenumerator--close-async"></a><h3>gio.FileEnumerator.close_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>io_priority</code></strong> :</span></p></td><td>The
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a> of the request.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">close_async</code>() method asynchronously closes the file enumerator.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned in
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-finish" title="gio.FileEnumerator.close_finish">gio.FileEnumerator.close_finish</a></code>().
+ </p></div><div class="refsect2" title="gio.FileEnumerator.close_finish"><a name="method-giofileenumerator--close-finish"></a><h3>gio.FileEnumerator.close_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a GAsyncResult.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the close operation
+ has finished successfully.</td></tr></tbody></table><p>
+ The <code class="methodname">close_finish</code>() method finishes closing a file enumerator, started from
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">gio.FileEnumerator.close_async</a></code>().
+ </p><p>
+ If the file enumerator was already closed when
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">gio.FileEnumerator.close_async</a></code>()
+ was called, then this function will report gio.ERROR_CLOSED in error, and return <code class="literal">False</code>.
+ If the file enumerator had pending operation when the close operation was started, then this function will report
+ gio.ERROR_PENDING, and return <code class="literal">False</code>. If cancellable was not <code class="literal">None</code>, then the operation
+ may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be set, and <code class="literal">False</code> will be returned.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.get_container"><a name="method-giofileenumerator--get-container"></a><h3>gio.FileEnumerator.get_container</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_container</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ which is being enumerated. </td></tr></tbody></table><p>
+ The <code class="methodname">get_container</code>() method gets the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ container which is being enumerated.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.has_pending"><a name="method-giofileenumerator--has-pending"></a><h3>gio.FileEnumerator.has_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the enumerator has pending operations.</td></tr></tbody></table><p>
+ The <code class="methodname">has_pending</code>() method checks if the file enumerator has pending operations.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.is_closed"><a name="method-giofileenumerator--is-closed"></a><h3>gio.FileEnumerator.is_closed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_closed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the enumerator is closed.</td></tr></tbody></table><p>
+ The <code class="methodname">is_closed</code>() method checks if the file enumerator has been closed.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.next_file"><a name="method-giofileenumerator--next-file"></a><h3>gio.FileEnumerator.next_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ or <code class="literal">None</code> on error or end of enumerator.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">next_file</code>() method returns information for the next
+ file in the enumerated object. Will block until the information is available.
+ The <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ returned from this function will contain attributes that match the attribute string
+ that was passed when the GFileEnumerator was created.
+ </p><p>
+ On error, returns <code class="literal">None</code> and sets error to the error. If the enumerator
+ is at the end, <code class="literal">None</code> will be returned and error will be unset.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.next_files_async"><a name="method-giofileenumerator--next-files-async"></a><h3>gio.FileEnumerator.next_files_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_files_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>num_files</code></strong> :</span></p></td><td>The number of file info objects to request.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>io_priority</code></strong> :</span></p></td><td>The
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a> of the request.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">next_files_async</code>() method requests information for a number
+ of files from the enumerator asynchronously. When all i/o for the operation is finished
+ the callback will be called with the requested information.
+ </p><p>
+ The callback can be called with less than num_files files in case of error or at the
+ end of the enumerator. In case of a partial error the callback will be called with any
+ succeeding items and no error, and on the next request the error will be reported. If a
+ request is cancelled the callback will be called with gio.ERROR_CANCELLED.
+ </p><p>
+ During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors.
+ </p><p>
+ Any outstanding i/o request with higher priority (lower numerical value) will be executed
+ before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+ </p></div><div class="refsect2" title="gio.FileEnumerator.next_files_finish"><a name="method-giofileenumerator--next-files-finish"></a><h3>gio.FileEnumerator.next_files_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_files_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a GAsyncResult.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>s.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">next_files_finish</code>() method finishes the
+ asynchronous operation started with
+ <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">gio.FileEnumerator.next_files_async</a></code>().
+ </p></div><div class="refsect2" title="gio.FileEnumerator.set_pending"><a name="method-giofileenumerator--set-pending"></a><h3>gio.FileEnumerator.set_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_pending</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pending</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pending</code></strong> :</span></p></td><td>A boolean value.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">push_current</code>() method sets the file enumerator as having pending operations.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileattributeinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileAttributeInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileicon.html b/docs/html/class-giofileicon.html
new file mode 100644
index 0000000..e5cdaa6
--- /dev/null
+++ b/docs/html/class-giofileicon.html
@@ -0,0 +1,21 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileIcon</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileenumerator.html" title="gio.FileEnumerator"><link rel="next" href="class-giofileinfo.html" title="gio.FileInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileenumerator.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileinfo.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileIcon"><a name="class-giofileicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileIcon</h2><p>gio.FileIcon — Icons pointing to an image file.</p></div><div class="refsect1" title="Synopsis"><a name="id2969942"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon">gio.LoadableIcon</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giofileicon.html#constructor-giofileicon" title="Constructor">gio.FileIcon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileicon.html#method-giofileicon--get-file" title="gio.FileIcon.get_file">get_file</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3005596"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giofileicon.html" title="gio.FileIcon">gio.FileIcon</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2981159"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
+ specifies an icon by pointing to an image file to be used as icon.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofileicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.FileIcon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td><td>a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
+ for the given file, or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ Creates a new icon for a file.
+ </p></div><div class="refsect1" title="Methods"><a name="id2977931"></a><h2>Methods</h2><div class="refsect2" title="gio.FileIcon.get_file"><a name="method-giofileicon--get-file"></a><h3>gio.FileIcon.get_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_file</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ or <code class="literal">None</code>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_file</code>() method gets the
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ associated with the given icon.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileenumerator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileEnumerator </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileInfo</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileinfo.html b/docs/html/class-giofileinfo.html
new file mode 100644
index 0000000..49d5d7b
--- /dev/null
+++ b/docs/html/class-giofileinfo.html
@@ -0,0 +1,42 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileInfo</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileicon.html" title="gio.FileIcon"><link rel="next" href="class-giofileinputstream.html" title="gio.FileInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileInfo"><a name="class-giofileinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileInfo</h2><p>gio.FileInfo — File Information and Attributes</p></div><div class="refsect1" title="Synopsis"><a name="id2943926"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileInfo</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giofileinfo.html#constructor-giofileinfo" title="Constructor">gio.FileInfo</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--clear-status">clear_status</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--copy-into">copy_into</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--dup">dup</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-as-string">get_attribute_as_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-boolean">get_attribute_boolean</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-byte-string">get_attribute_byte_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-data">get_attribute_data</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-int32">get_attribute_int32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-int64">get_attribute_int64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-object">get_attribute_object</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-status">get_attribute_status</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-string">get_attribute_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-type">get_attribute_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-uint32">get_attribute_uint32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-uint64">get_attribute_uint64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-content-type">get_content_type</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-display-name">get_display_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-edit-name">get_edit_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-etag">get_etag</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-file-type">get_file_type</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-icon">get_icon</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-backup">get_is_backup</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-hidden">get_is_hidden</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-symlink">get_is_symlink</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-modification-time">get_modification_time</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-name">get_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-size">get_size</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-sort-order">get_sort_order</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-symlink-target">get_symlink_target</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--has-attribute">has_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--list-attributes">list_attributes</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name_space</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--remove-attribute">remove_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute">set_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-boolean">set_attribute_boolean</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-byte-string">set_attribute_byte_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-data">set_attribute_data</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int32">set_attribute_int32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int64">set_attribute_int64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int64">set_attribute_mask</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-object">set_attribute_object</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-status">set_attribute_status</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-string">set_attribute_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-uint32">set_attribute_uint32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-uint64">set_attribute_uint64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-content-type">set_content_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-display-name">set_display_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-edit-name">set_edit_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>edit_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-file-type">set_file_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-icon">set_icon</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-is-hidden">set_is_hidden</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_hidden</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-is-symlink">set_is_symlink</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_symlink</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-modification-time">set_modification_time</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mtime</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-name">set_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-size">set_size</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-sort-order">set_sort_order</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sort_order</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-symlink-tarset">set_symlink_tarset</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_target</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--unset-attribute-mask">unset_attribute_mask</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3009428"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo">gio.FileInfo</a>
+</pre></div><div class="refsect1" title="Description"><a name="id3009454"></a><h2>Description</h2><p>
+ Functionality for manipulating basic metadata for files.
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ implements methods for getting information that all files should contain,
+ and allows for manipulation of extended attributes.
+ </p><p>
+ See <PYGTKDOCLINK HREF="class-giofileattribute"><code class="classname">gio.FileAttribute</code></PYGTKDOCLINK>
+ for more information on how GIO handles file attributes.
+ </p><p>
+ To obtain a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ for a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, use
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
+ (or its async variant). To obtain a
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ for a file input or output stream, use
+ <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>() or
+ <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">gio.FileOutputStream.query_info</a></code>()
+ (or their async variants).
+ </p><p>
+ To change the actual attributes of a file, you should then set the attribute in the
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a> and call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">gio.File.set_attributes_from_info</a></code>() or
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">gio.File.set_attributes_async</a></code>()
+ on a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </p><p>
+ However, not all attributes can be changed in the file. For instance, the
+ actual size of a file cannot be changed via
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-size">gio.FileInfo.set_size</PYGTKDOCLINK></code>(). You may call
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-settable-attributes" title="gio.File.query_settable_attributes">gio.File.query_settable_attributes</a></code>() and
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-writable-namespace" title="gio.File.query_writable_namespace">gio.File.query_writable_namespace</a></code>()
+ to discover the settable attributes of a particular file at runtime.
+ </p><p>
+ <PYGTKDOCLINK HREF="class-giofileattributematcher"><code class="classname">gio.FileAttributeMatcher</code></PYGTKDOCLINK>
+ allows for searching through a GFileInfo for attributes.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofileinfo"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.FileInfo</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+ </p></div><div class="refsect1" title="Methods"><a name="id3041977"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileinputstream.html b/docs/html/class-giofileinputstream.html
new file mode 100644
index 0000000..e9fe926
--- /dev/null
+++ b/docs/html/class-giofileinputstream.html
@@ -0,0 +1,65 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileInputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileinfo.html" title="gio.FileInfo"><link rel="next" href="class-giofilemonitor.html" title="gio.FileMonitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilemonitor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileInputStream"><a name="class-giofileinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileInputStream</h2><p>gio.FileInputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id3042014"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-finish" title="gio.FileInputStream.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3008278"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+ +-- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream">gio.FileInputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3049931"></a><h2>Implemented Interfaces</h2><p>
+ <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ implements
+ <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id3049957"></a><h2>Description</h2><p>
+ <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ provides input streams that take their content from a file.
+ </p><p>
+ <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ implements <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>,
+ which allows the input stream to jump to arbitrary positions in the file, provided the filesystem
+ of the file allows it. In addition to the generic g_seekable_ API,
+ <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+ has its own API for seeking and positioning. To find the position of a file input stream, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">gio.Seekable.tell</a></code>().
+ To find out if a file input stream supports seeking, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">gio.Seekable.can_seek</a></code>().
+ To position a file input stream, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">gio.Seekable.seek</a></code>().
+ </p></div><div class="refsect1" title="Methods"><a name="id3048183"></a><h2>Methods</h2><div class="refsect2" title="gio.FileInputStream.query_info"><a name="method-giofileinputstream--query-info"></a><h3>gio.FileInputStream.query_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info</code>() method queries a file input stream
+ the given attributes. This function blocks while querying the stream.
+ For the asynchronous (non-blocking) version of this function, see
+ <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">gio.FileInputStream.query_info_async</a></code>().
+ While the stream is blocked, the stream will set the pending flag internally,
+ and any other operations on the stream will fail with gio.ERROR_PENDING.
+ </p></div><div class="refsect2" title="gio.FileInputStream.query_info_async"><a name="method-giofileinputstream--query-info-async"></a><h3>gio.FileInputStream.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info_async</code>() method queries the stream
+ information asynchronously. When the operation is finished callback will be
+ called. You can then call
+ <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-finish" title="gio.FileInputStream.query_info_finish">gio.FileInputStream.query_info_finish</a></code>()
+ to get the result of the operation.
+ </p><p>
+ For the synchronous version of this function, see
+ <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </p></div><div class="refsect2" title="gio.FileInputStream.query_info_finish"><a name="method-giofileinputstream--query-info-finish"></a><h3>gio.FileInputStream.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">gio.FileInputStream.query_info_async</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilemonitor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileMonitor</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilemonitor.html b/docs/html/class-giofilemonitor.html
new file mode 100644
index 0000000..523cc9e
--- /dev/null
+++ b/docs/html/class-giofilemonitor.html
@@ -0,0 +1,21 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileMonitor</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileinputstream.html" title="gio.FileInputStream"><link rel="next" href="class-giofileoutputstream.html" title="gio.FileOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileMonitor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileMonitor"><a name="class-giofilemonitor"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileMonitor</h2><p>gio.FileMonitor — File Monitor</p></div><div class="refsect1" title="Synopsis"><a name="id3048023"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileMonitor</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--cancel">cancel</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--emit-event">emit_event</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>other_file</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--is-cancelled">is_cancelled</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--set-rate-limit">set_rate_limit</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit_msecs</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3048819"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor">gio.FileMonitor</a>
+</pre></div><div class="refsect1" title="gio.FileMonitor Properties"><a name="properties-giofilemonitor"></a><h2>gio.FileMonitor Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"cancelled"</td><td valign="top">Read</td><td valign="top">
+ Whether the monitor has been cancelled. Default value: <code class="literal">False</code>.
+ </td></tr><tr valign="top"><td valign="top">"rate-limit"</td><td valign="top">Read/Write</td><td valign="top">
+ The limit of the monitor to watch for changes, in milliseconds.
+ Allowed values: &gt;= 0. Default value: 800.
+ </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gio.FileMonitor Signal Prototypes"><a name="signal-prototypes-giofilemonitor"></a><h2>gio.FileMonitor Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><PYGTKDOCLINK HREF="signal-giofilemonitor--aborted">"changed"</PYGTKDOCLINK></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filemonitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>file</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>other_file</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3049064"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+ monitors a file or directory for changes.
+ </p><p>
+ To obtain a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+ for a file or directory, use
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor" title="gio.File.monitor">gio.FileMonitor.monitor</a></code>(),
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-file" title="gio.File.monitor_file">gio.FileMonitor.monitor_file</a></code>(), or
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-directory" title="gio.File.monitor_directory">gio.FileMonitor.monitor_directory</a></code>().
+ </p><p>
+ To get informed about changes to the file or directory you are monitoring,
+ connect to the "changed" signal.
+ </p></div><div class="refsect1" title="Methods"><a name="id3049123"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileoutputstream.html b/docs/html/class-giofileoutputstream.html
new file mode 100644
index 0000000..7ef0ad5
--- /dev/null
+++ b/docs/html/class-giofileoutputstream.html
@@ -0,0 +1,84 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileOutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilemonitor.html" title="gio.FileMonitor"><link rel="next" href="class-giofilterinputstream.html" title="gio.FilterInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilemonitor.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilterinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileOutputStream"><a name="class-giofileoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileOutputStream</h2><p>gio.FileOutputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id3049158"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--get-etag" title="gio.FileOutputStream.get_etag">get_etag</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish" title="gio.FileOutputStream.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3049369"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+ +-- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream">gio.FileOutputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3049402"></a><h2>Implemented Interfaces</h2><p>
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ implements
+ <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id3049428"></a><h2>Description</h2><p>
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ provides output streams that write their content to a file.
+ </p><p>
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ implements <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>,
+ which allows the output stream to jump to arbitrary positions in the file and to truncate
+ the file, provided the filesystem of the file supports these operations. In addition to the
+ generic gio.Seekable. API,
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+ has its own API for seeking and positioning. To find the position of a file output stream, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">gio.Seekable.tell</a></code>().
+ To find out if a file output stream supports seeking, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">gio.Seekable.can_seek</a></code>().
+ To position a file output stream, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">gio.Seekable.seek</a></code>().
+ To find out if a file output stream supports truncating, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_truncate" title="gio.Seekable.can_truncate">gio.FileOutputStream.can_truncate</a></code>().
+ To truncate a file output stream, use
+ <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate">gio.Seekable.truncate</a></code>().
+ </p></div><div class="refsect1" title="Methods"><a name="id3049521"></a><h2>Methods</h2><div class="refsect2" title="gio.FileOutputStream.get_etag"><a name="method-giofileoutputstream--get-etag"></a><h3>gio.FileOutputStream.get_etag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_etag</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the entity tag for the stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_etag</code>() method gets the entity tag
+ for the file when it has been written. This must be called after the
+ stream has been written and closed, as the etag can change while writing.
+ </p></div><div class="refsect2" title="gio.FileOutputStream.query_info"><a name="method-giofileoutputstream--query-info"></a><h3>gio.FileOutputStream.query_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info</code>() method queries a file input stream
+ the given attributes. This function blocks while querying the stream.
+ For the asynchronous (non-blocking) version of this function, see
+ <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">gio.FileOutputStream.query_info_async</a></code>().
+ While the stream is blocked, the stream will set the pending flag internally,
+ and any other operations on the stream will fail with gio.ERROR_PENDING.
+ </p><p>
+ Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED),
+ the stream has pending operations (with error being set to gio.ERROR_PENDING), or
+ if querying info is not supported for the stream's interface (with error being set to
+ gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be set, and <code class="literal">None</code> will be returned.
+ </p></div><div class="refsect2" title="gio.FileOutputStream.query_info_async"><a name="method-giofileoutputstream--query-info-async"></a><h3>gio.FileOutputStream.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info_async</code>() method queries the stream
+ information asynchronously. When the operation is finished callback will be
+ called. You can then call
+ <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish" title="gio.FileOutputStream.query_info_finish">gio.FileOutputStream.query_info_finish</a></code>()
+ to get the result of the operation.
+ </p><p>
+ For the synchronous version of this function, see
+ <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">gio.FileOutputStream.query_info</a></code>().
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </p></div><div class="refsect2" title="gio.FileOutputStream.query_info_finish"><a name="method-giofileoutputstream--query-info-finish"></a><h3>gio.FileOutputStream.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+ or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">gio.FileOutputStream.query_info_async</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilemonitor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilterinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FilterInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilterinputstream.html b/docs/html/class-giofilterinputstream.html
new file mode 100644
index 0000000..ebdfb0d
--- /dev/null
+++ b/docs/html/class-giofilterinputstream.html
@@ -0,0 +1,22 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FilterInputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><link rel="next" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FilterInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilteroutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FilterInputStream"><a name="class-giofilterinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FilterInputStream</h2><p>gio.FilterInputStream — Filter Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id3053641"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FilterInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream" title="gio.FilterInputStream.get_base_stream">get_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream" title="gio.FilterInputStream.get_close_base_stream">get_close_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream" title="gio.FilterInputStream.set_close_base_stream">set_close_base_stream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3053740"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+ +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
+</pre></div><div class="refsect1" title="gio.FilterInputStream Properties"><a name="properties-giofilterinputstream"></a><h2>gio.FilterInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The underlying base stream on which the io ops will be done.</td></tr><tr valign="top"><td valign="top">"close-base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">If the base stream should be closed when the filter stream is closed.
+ Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3053871"></a><h2>Description</h2><p>
+ Filter Input Stream.
+ </p></div><div class="refsect1" title="Methods"><a name="id3053882"></a><h2>Methods</h2><div class="refsect2" title="gio.FilterInputStream.get_base_stream"><a name="method-giofilterinputstream--get-base-stream"></a><h3>gio.FilterInputStream.get_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_base_stream</code>() method gets the base
+ stream for the filter stream.
+ </p></div><div class="refsect2" title="gio.FilterInputStream.get_close_base_stream"><a name="method-giofilterinputstream--get-close-base-stream"></a><h3>gio.FilterInputStream.get_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the base stream
+ will be closed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_close_base_stream</code>() method returns
+ whether the base stream will be closed when stream is closed.
+ </p></div><div class="refsect2" title="gio.FilterInputStream.set_close_base_stream"><a name="method-giofilterinputstream--set-close-base-stream"></a><h3>gio.FilterInputStream.set_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_base_stream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_base</code></strong> :</span></p></td><td><code class="literal">True</code> to close the base stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_close_base_stream</code>() method sets whether
+ the base stream will be closed when stream is closed.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilteroutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FilterOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilteroutputstream.html b/docs/html/class-giofilteroutputstream.html
new file mode 100644
index 0000000..8653c9e
--- /dev/null
+++ b/docs/html/class-giofilteroutputstream.html
@@ -0,0 +1,22 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FilterOutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilterinputstream.html" title="gio.FilterInputStream"><link rel="next" href="class-gioicon.html" title="gio.Icon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FilterOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilterinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FilterOutputStream"><a name="class-giofilteroutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FilterOutputStream</h2><p>gio.FilterOutputStream — Filter Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id3054131"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FilterOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream" title="gio.FilterOutputStream.get_base_stream">get_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream" title="gio.FilterOutputStream.get_close_base_stream">get_close_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream" title="gio.FilterOutputStream.set_close_base_stream">set_close_base_stream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3054230"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+ +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+</pre></div><div class="refsect1" title="gio.FilterOutputStream Properties"><a name="properties-giofilteroutputstream"></a><h2>gio.FilterOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The underlying base stream on which the io ops will be done.</td></tr><tr valign="top"><td valign="top">"close-base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">If the base stream should be closed when the filter stream is closed.
+ Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3054362"></a><h2>Description</h2><p>
+ Filter Output Stream.
+ </p></div><div class="refsect1" title="Methods"><a name="id3054373"></a><h2>Methods</h2><div class="refsect2" title="gio.FilterOutputStream.get_base_stream"><a name="method-giofilteroutputstream--get-base-stream"></a><h3>gio.FilterOutputStream.get_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_base_stream</code>() method gets the base
+ stream for the filter stream.
+ </p></div><div class="refsect2" title="gio.FilterOutputStream.get_close_base_stream"><a name="method-giofilteroutputstream--get-close-base-stream"></a><h3>gio.FilterOutputStream.get_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the base stream
+ will be closed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_close_base_stream</code>() method returns
+ whether the base stream will be closed when stream is closed.
+ </p></div><div class="refsect2" title="gio.FilterOutputStream.set_close_base_stream"><a name="method-giofilteroutputstream--set-close-base-stream"></a><h3>gio.FilterOutputStream.set_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_base_stream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_base</code></strong> :</span></p></td><td><code class="literal">True</code> to close the base stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_close_base_stream</code>() method sets whether
+ the base stream will be closed when stream is closed.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilterinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FilterInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Icon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioicon.html b/docs/html/class-gioicon.html
new file mode 100644
index 0000000..aed7157
--- /dev/null
+++ b/docs/html/class-gioicon.html
@@ -0,0 +1,81 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Icon</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"><link rel="next" href="class-gioinputstream.html" title="gio.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Icon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilteroutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Icon"><a name="class-gioicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Icon</h2><p>gio.Icon — Interface for icons.</p></div><div class="refsect1" title="Synopsis"><a name="id3054622"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Icon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--equal" title="gio.Icon.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">to_string</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3054729"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a>
+</pre></div><div class="refsect1" title="Known Derived Interfaces"><a name="id3054756"></a><h2>Known Derived Interfaces</h2><p>
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> is required by
+ <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>.
+ </p></div><div class="refsect1" title="Known Implementation"><a name="id3054782"></a><h2>Known Implementation</h2><p>
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> is implemented by
+ <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>,
+ <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>,
+ <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>,
+ <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
+ </p></div><div class="refsect1" title="Description"><a name="id3058254"></a><h2>Description</h2><p>
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ is a very minimal interface for icons. It provides functions for checking
+ the equality of two icons, hashing of icons and serializing an icon to and from strings.
+ </p><p>
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ does not provide the actual pixmap for the icon as this is out of GIO's
+ scope, however implementations of
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ may contain the name of an icon (see
+ <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>),
+ or the path to an icon (see
+ <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>).
+ </p><p>
+ To check if two GIcons are equal, see
+ <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--equal" title="gio.Icon.equal">gio.Icon.equal</a></code>().
+ </p><p>
+ For serializing a <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>,
+ use <code class="methodname"><PYGTKDOCLINK HREF="method-gioicon-%20-to-string">gio.Icon.to_string</PYGTKDOCLINK></code>() and
+ <code class="methodname"><PYGTKDOCLINK HREF="method-gioicon-%20-new-from-string">gio.Icon.new_from_string</PYGTKDOCLINK></code>().
+ </p><p>
+ If your application or library provides one or more
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ implementations you need to ensure that each GType is registered
+ with the type system prior to calling
+ <code class="methodname"><PYGTKDOCLINK HREF="function-gioicon--new-from-string">gio.icon_new_from_string</PYGTKDOCLINK></code>().
+ </p></div><div class="refsect1" title="Methods"><a name="id3058365"></a><h2>Methods</h2><div class="refsect2" title="gio.Icon.equal"><a name="method-gioicon--equal"></a><h3>gio.Icon.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon2</code></em> :</span></p></td><td>the second
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">equal</code>() method checks if two icons are equal.
+ </p></div><div class="refsect2" title="gio.Icon.to_string"><a name="method-gioicon--to-string"></a><h3>gio.Icon.to_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">to_string</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>An UTF8 string or <code class="literal">None</code>
+ if icon can't be serialized.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">to_string</code>() method generates a textual
+ representation of icon that can be used for serialization such as when
+ passing icon to a different process or saving it to persistent storage. Use
+ <code class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></code>()
+ to get icon back from the returned string.
+ </p><p>
+ The encoding of the returned string is proprietary to GIcon except in the following two cases
+ </p><p>
+ If icon is a <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>,
+ the returned string is a native path (such as /path/to/my icon.png) without escaping
+ if the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+ for icon is a native file. If the file is not native, the returned string is the result of
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>()
+ (such as sftp://path/to/my%20icon.png).
+ </p><p>
+ If icon is a <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+ with exactly one name, the encoding is simply the name (such as network-server).
+ </p></div></div><div class="refsect1" title="Functions"><a name="id3058543"></a><h2>Functions</h2><div class="refsect2" title="gio.icon_new_from_string"><a name="function-gio--icon-new-from-string"></a><h3>gio.icon_new_from_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">icon_new_from_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td><td>A string obtained via
+ <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">gio.Icon.to_string</a></code>().
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>An object implementing the
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ interface or <code class="literal">None</code> if error is set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">icon_new_from_string</code>() function generate a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ instance from str. This function can fail if str is not valid - see
+ <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">gio.Icon.to_string</a></code>()
+ for discussion.
+ </p><p>
+ If your application or library provides one or more GIcon implementations you need
+ to ensure that each GType is registered with the type system prior to calling
+ <code class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilteroutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FilterOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.InputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioinputstream.html b/docs/html/class-gioinputstream.html
new file mode 100644
index 0000000..bb06b9b
--- /dev/null
+++ b/docs/html/class-gioinputstream.html
@@ -0,0 +1,242 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.InputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioicon.html" title="gio.Icon"><link rel="next" href="class-gioloadableicon.html" title="gio.LoadableIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.InputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioloadableicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.InputStream"><a name="class-gioinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.InputStream</h2><p>gio.InputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id3058682"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.InputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--clear-pending" title="gio.InputStream.clear_pending">clear_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">close</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-async" title="gio.InputStream.close_async">close_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-finish" title="gio.InputStream.close_finish">close_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--has-pending" title="gio.InputStream.has_pending">has_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--is-closed" title="gio.InputStream.is_closed">is_closed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">read</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-async" title="gio.InputStream.read_async">read_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-finish" title="gio.InputStream.read_finish">read_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-part" title="gio.InputStream.read_part">read_part</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--set-pending" title="gio.InputStream.set_pending">set_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">skip</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-async" title="gio.InputStream.skip_async">skip_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-finish" title="gio.InputStream.skip_finish">skip_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3059219"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+</pre></div><div class="refsect1" title="Description"><a name="id3059241"></a><h2>Description</h2><p>
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ has functions to read from a stream (
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">gio.InputStream.read</a></code>()
+ ), to close a stream (
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">gio.InputStream.close</a></code>()
+ ) and to skip some content (
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">gio.InputStream.skip</a></code>()
+ ).
+ </p><p>
+ To copy the content of an input stream to an output stream without manually
+ handling the reads and writes, use
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--skip">gio.OutputStream.splice</PYGTKDOCLINK></code>().
+ </p><p>
+ All of these functions have async variants too.
+ </p></div><div class="refsect1" title="Methods"><a name="id3059295"></a><h2>Methods</h2><div class="refsect2" title="gio.InputStream.clear_pending"><a name="method-gioinputstream--clear-pending"></a><h3>gio.InputStream.clear_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">clear_pending</code>() method clears the pending flag on stream.
+ </p></div><div class="refsect2" title="gio.InputStream.close"><a name="method-gioinputstream--close"></a><h3>gio.InputStream.close</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success
+ <code class="literal">False</code> on failure.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">close</code>() method closes the stream, releasing
+ resources related to it.
+ </p><p>
+ Once the stream is closed, all other operations will return gio.ERROR_CLOSED.
+ Closing a stream multiple times will not return an error.
+ </p><p>
+ Streams will be automatically closed when the last reference is dropped, but
+ you might want to call this function to make sure resources are released as
+ early as possible.
+ </p><p>
+ Some streams might keep the backing store of the stream (e.g. a file descriptor)
+ open after the stream is closed. See the documentation for the individual
+ stream for details.
+ </p><p>
+ On failure the first error that happened will be reported, but the close operation
+ will finish as much as possible. A stream that failed to close will still return
+ gio.ERROR_CLOSED for all operations. Still, it is important to check and report
+ the error to the user.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </p></div><div class="refsect2" title="gio.InputStream.close_async"><a name="method-gioinputstream--close-async"></a><h3>gio.InputStream.close_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">close_async</code>() method asynchronously requests an
+ asynchronous closes of the stream, releasing resources related to it.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">gio.InputStream.close</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-finish" title="gio.InputStream.close_finish">gio.InputStream.close_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.InputStream.close_finish"><a name="method-gioinputstream--close-finish"></a><h3>gio.InputStream.close_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream was closed successfully.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">close_finish</code>() method finishes an asynchronous
+ file append operation started with
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-async" title="gio.InputStream.close_async">gio.InputStream.close_async</a></code>().
+ </p></div><div class="refsect2" title="gio.InputStream.has_pending"><a name="method-gioinputstream--has-pending"></a><h3>gio.InputStream.has_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if stream has pending actions.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">has_pending</code>() method checks if an input stream has pending actions.
+ </p></div><div class="refsect2" title="gio.InputStream.is_closed"><a name="method-gioinputstream--is-closed"></a><h3>gio.InputStream.is_closed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_closed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream is closed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">is_closed</code>() method checks if an input stream is closed.
+ </p></div><div class="refsect2" title="gio.InputStream.read"><a name="method-gioinputstream--read"></a><h3>gio.InputStream.read</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>optionally the number of bytes that will be read from the stream.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read, or -1 on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read</code>() method tries to read count bytes from
+ the stream into the buffer starting at buffer. Will block during this read.
+ </p><p>
+ This function is similar to
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-part" title="gio.InputStream.read_part">gio.InputStream.read_part</a></code>(),
+ except it tries to read as many bytes as requested, only stopping on an error or end of stream.
+ </p><p>
+ On a successful read of count bytes, or if we reached the end of the stream,
+ <code class="literal">True</code> is returned, and bytes_read is set to the number of bytes read into buffer.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </p><p>
+ If there is an error during the operation <code class="literal">False</code> is returned and error
+ is set to indicate the error status, bytes_read is updated to contain the number of
+ bytes read into buffer before the error occurred.
+ </p></div><div class="refsect2" title="gio.InputStream.read_async"><a name="method-gioinputstream--read-async"></a><h3>gio.InputStream.read_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td>the number of bytes that will be read from the stream.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_async</code>() method requests an asynchronous read
+ of count bytes from the stream into the buffer.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">gio.InputStream.read</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-finish" title="gio.InputStream.read_finish">gio.InputStream.read_finish</a></code>()
+ to get the result of the operation.
+ </p><p>
+ During an async request no other sync and async calls are allowed, and
+ will result in gio.ERROR_PENDING errors.
+ </p><p>
+ A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </p><p>
+ On success, the number of bytes read into the buffer will be passed to the callback.
+ It is not an error if this is not the same as the requested size, as it can happen e.g.
+ near the end of a file, but generally we try to read as many bytes as requested. Zero
+ is returned on end of file (or if count is zero), but never otherwise.
+ </p><p>
+ Any outstanding i/o request with higher priority (lower numerical value) will be
+ executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+ </p><p>
+ The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so
+ they are optional for inheriting classes. However, if you override one you must override all.
+ </p></div><div class="refsect2" title="gio.InputStream.read_finish"><a name="method-gioinputstream--read-finish"></a><h3>gio.InputStream.read_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read in, or -1 on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_finish</code>() method finishes an asynchronous
+ stream read operation started by
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-async" title="gio.InputStream.read_async">gio.InputStream.read_async</a></code>().
+ </p></div><div class="refsect2" title="gio.InputStream.read_part"><a name="method-gioinputstream--read-part"></a><h3>gio.InputStream.read_part</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_part</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>optionally the number of bytes that will be read from the stream.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read, or -1 on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">read_part</code>() method tries to read count bytes from
+ the stream into the buffer starting at buffer. Will block during this read.
+ </p><p>
+ If count is zero returns zero and does nothing. A value of count larger than
+ G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </p><p>
+ On success, the number of bytes read into the buffer is returned. It is
+ not an error if this is not the same as the requested size, as it can
+ happen e.g. near the end of a file. Zero is returned on end of file
+ (or if count is zero), but never otherwise.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </p><p>
+ On error -1 is returned and error is set accordingly.
+ </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+ This method roughly corresponds to C GIO g_input_stream_read.
+ </div></div><div class="refsect2" title="gio.InputStream.set_pending"><a name="method-gioinputstream--set-pending"></a><h3>gio.InputStream.set_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if pending was previously
+ unset and is now set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_pending</code>() method sets stream to have actions pending.
+ If the pending flag is already set or stream is closed,
+ it will return <code class="literal">False</code> and set error.
+ </p></div><div class="refsect2" title="gio.InputStream.skip"><a name="method-gioinputstream--skip"></a><h3>gio.InputStream.skip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be skipped from the stream.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes skipped, or -1 on error
+ </td></tr></tbody></table><p>
+ The <code class="methodname">skip</code>() method tries to skip count bytes
+ from the stream. Will block during the operation.
+ </p><p>
+ This is identical to
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">read</a></code>(),
+ from a behaviour standpoint, but the bytes that are skipped are not
+ returned to the user. Some streams have an implementation that is more
+ efficient than reading the data.
+ </p><p>
+ This function is optional for inherited classes, as the default implementation emulates it using read.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+ triggering the cancellable object from another thskip. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </p></div><div class="refsect2" title="gio.InputStream.skip_async"><a name="method-gioinputstream--skip-async"></a><h3>gio.InputStream.skip_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skip_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td>the number of bytes that will be skipped from the stream.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncskipyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+ <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+ of the request.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">skip_async</code>() method request an asynchronous
+ skip of count bytes from the stream.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">gio.InputStream.skip</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-finish" title="gio.InputStream.skip_finish">gio.InputStream.skip_finish</a></code>()
+ to get the result of the operation.
+ </p><p>
+ During an async request no other sync and async calls are allowed, and
+ will result in gio.ERROR_PENDING errors.
+ </p><p>
+ A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </p><p>
+ On success, the number of bytes skipped will be passed to the callback. It is
+ not an error if this is not the same as the requested size, as it can happen
+ e.g. near the end of a file, but generally we try to skip as many bytes as requested.
+ Zero is returned on end of file (or if count is zero), but never otherwise.
+ </p><p>
+ Any outstanding i/o request with higher priority (lower numerical value) will be
+ executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+ </p><p>
+ The asyncronous methods have a default fallback that uses thskips to implement asynchronicity, so
+ they are optional for inheriting classes. However, if you override one you must override all.
+ </p></div><div class="refsect2" title="gio.InputStream.skip_finish"><a name="method-gioinputstream--skip-finish"></a><h3>gio.InputStream.skip_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skip_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes skipped in, or -1 on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">skip_finish</code>() method finishes an asynchronous
+ stream skip operation started by
+ <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-async" title="gio.InputStream.skip_async">gio.InputStream.skip_async</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioloadableicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Icon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.LoadableIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioloadableicon.html b/docs/html/class-gioloadableicon.html
new file mode 100644
index 0000000..b894302
--- /dev/null
+++ b/docs/html/class-gioloadableicon.html
@@ -0,0 +1,51 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.LoadableIcon</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioinputstream.html" title="gio.InputStream"><link rel="next" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.LoadableIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomemoryinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.LoadableIcon"><a name="class-gioloadableicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.LoadableIcon</h2><p>gio.LoadableIcon — Interface for icons.</p></div><div class="refsect1" title="Synopsis"><a name="id3061338"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.LoadableIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load" title="gio.LoadableIcon.load">load</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">load_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-finish" title="gio.LoadableIcon.load_finish">load_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>res</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3061526"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon">gio.LoadableIcon</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id3061553"></a><h2>Prerequisites</h2><p>
+ <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a> requires
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>. and
+ <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ </p></div><div class="refsect1" title="Known Implementation"><a name="id3061587"></a><h2>Known Implementation</h2><p>
+ <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a> is implemented by
+ <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id3061613"></a><h2>Description</h2><p>
+ <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>
+ extends the <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ interface and adds the ability to load icons from streams.
+ </p></div><div class="refsect1" title="Methods"><a name="id3061641"></a><h2>Methods</h2><div class="refsect2" title="gio.LoadableIcon.load"><a name="method-gioloadableicon--load"></a><h3>gio.LoadableIcon.load</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>an integer
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2 tuple containing a
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ to read the icon from and a string containing the icon type.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">load</code>() method loads a loadable icon.
+ For the asynchronous version of this function, see
+ <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">gio.LoadableIcon.load_async</a></code>().
+ </p></div><div class="refsect2" title="gio.LoadableIcon.load_async"><a name="method-gioloadableicon--load-async"></a><h3>gio.LoadableIcon.load_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>an integer
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">load_async</code>() method loads an icon asynchronously.
+ </p><p>
+ For more details, see
+ <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load" title="gio.LoadableIcon.load">gio.LoadableIcon.load</a></code>()
+ which is the synchronous version of this call.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-finish" title="gio.LoadableIcon.load_finish">gio.LoadableIcon.load_finish</a></code>()
+ to get the result of the operation.
+ </p></div><div class="refsect2" title="gio.LoadableIcon.load_finish"><a name="method-gioloadableicon--load-finish"></a><h3>gio.LoadableIcon.load_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td><td>a
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2 tuple containing a
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ to read the icon from and a string containing the icon type.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">load_finish</code>() method finishes an asynchronous
+ icon load started in
+ <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">gio.LoadableIcon.load_async</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomemoryinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.InputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MemoryInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomemoryinputstream.html b/docs/html/class-giomemoryinputstream.html
new file mode 100644
index 0000000..b9276a9
--- /dev/null
+++ b/docs/html/class-giomemoryinputstream.html
@@ -0,0 +1,32 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MemoryInputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioloadableicon.html" title="gio.LoadableIcon"><link rel="next" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MemoryInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioloadableicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomemoryoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MemoryInputStream"><a name="class-giomemoryinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MemoryInputStream</h2><p>gio.MemoryInputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id3062166"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MemoryInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#constructor-giomemoryinputstream" title="Constructor">gio.MemoryInputStream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#method-giomemoryinputstream--add-data" title="gio.MemoryInputStream.add_data">add_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data" title="gio.memory_input_stream_new_from_data">gio.memory_input_stream_new_from_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3062283"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+ +-- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream">gio.MemoryInputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3062316"></a><h2>Implemented Interfaces</h2><p>
+ <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+ implements
+ <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id3062343"></a><h2>Description</h2><p>
+ <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+ is a class for using arbitrary memory chunks as input for GIO streaming input operations.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomemoryinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.MemoryInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>.
+ </td></tr></tbody></table><p>
+ Creates an empty
+ <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>.
+ </p></div><div class="refsect1" title="Methods"><a name="id3062443"></a><h2>Methods</h2><div class="refsect2" title="gio.MemoryInputStream.add_data"><a name="method-giomemoryinputstream--add-data"></a><h3>gio.MemoryInputStream.add_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>input data.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">add_data</code>() method appends data to data
+ that can be read from the input stream
+ </p></div></div><div class="refsect1" title="Functions"><a name="id3062524"></a><h2>Functions</h2><div class="refsect2" title="gio.memory_input_stream_new_from_data"><a name="function-gio--memory-input-stream-new-from-data"></a><h3>gio.memory_input_stream_new_from_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">memory_input_stream_new_from_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>input data.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
+ <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+ read from data
+ </td></tr></tbody></table><p>
+ The <code class="methodname">memory_input_stream_new_from_data</code>() function creates
+ a new <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+ with data in memory.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioloadableicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomemoryoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.LoadableIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MemoryOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomemoryoutputstream.html b/docs/html/class-giomemoryoutputstream.html
new file mode 100644
index 0000000..cebe8e3
--- /dev/null
+++ b/docs/html/class-giomemoryoutputstream.html
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MemoryOutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><link rel="next" href="class-giomount.html" title="gio.Mount"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MemoryOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomemoryinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomount.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MemoryOutputStream"><a name="class-giomemoryoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MemoryOutputStream</h2><p>gio.MemoryOutputStream — Streaming output operations on memory chunks</p></div><div class="refsect1" title="Synopsis"><a name="id3062660"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MemoryOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#constructor-giomemoryoutputstream" title="Constructor">gio.MemoryOutputStream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents" title="gio.MemoryOutputStream.get_contents">get_contents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size" title="gio.MemoryOutputStream.get_data_size">get_data_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size" title="gio.MemoryOutputStream.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3062772"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+ +-- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream">gio.MemoryOutputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3062805"></a><h2>Implemented Interfaces</h2><p>
+ <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>
+ implements
+ <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+ </p></div><div class="refsect1" title="Description"><a name="id3062832"></a><h2>Description</h2><p>
+ <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>
+ is a class for using arbitrary memory chunks as output for GIO streaming output operations.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomemoryoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.MemoryOutputStream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new
+ <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
+ </p></div><div class="refsect1" title="Methods"><a name="id3062924"></a><h2>Methods</h2><div class="refsect2" title="gio.MemoryOutputStream.get_contents"><a name="method-giomemoryoutputstream--get-contents"></a><h3>gio.MemoryOutputStream.get_contents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_contents</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's data
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_contents</code>() method gets any loaded data
+ from the ostream.
+ </p><p>
+ Note that the returned data may become invalid on the next write or truncate
+ operation on the stream.
+ </p></div><div class="refsect2" title="gio.MemoryOutputStream.get_data_size"><a name="method-giomemoryoutputstream--get-data-size"></a><h3>gio.MemoryOutputStream.get_data_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_data_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes written to the stream
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_data_size</code>() method returns the number
+ of bytes from the start up to including the last byte written in the
+ stream that has not been truncated away.
+ </p></div><div class="refsect2" title="gio.MemoryOutputStream.get_size"><a name="method-giomemoryoutputstream--get-size"></a><h3>gio.MemoryOutputStream.get_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes allocated for the data buffer
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_size</code>() method gets the size of the
+ currently allocated data area (availible from
+ <code class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents" title="gio.MemoryOutputStream.get_contents">gio.MemoryOutputStream.get_contents</a></code>()
+ ).
+ </p><p>
+ Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
+ </p><p>
+ If you want the number of bytes currently written to the stream, use
+ <code class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size" title="gio.MemoryOutputStream.get_data_size">gio.MemoryOutputStream.get_data_size</a></code>().
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomemoryinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomount.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MemoryInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Mount</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomount.html b/docs/html/class-giomount.html
new file mode 100644
index 0000000..5486311
--- /dev/null
+++ b/docs/html/class-giomount.html
@@ -0,0 +1,242 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Mount</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><link rel="next" href="class-giomountoperation.html" title="gio.MountOperation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Mount</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomemoryoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomountoperation.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Mount"><a name="class-giomount"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Mount</h2><p>gio.Mount — Mount management</p></div><div class="refsect1" title="Synopsis"><a name="id3063181"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Mount</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--can-eject" title="gio.Mount.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--can-unmount" title="gio.Mount.can_unmount">can_unmount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject" title="gio.Mount.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject-finish" title="gio.Mount.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-drive" title="gio.Mount.get_drive">get_drive</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-icon" title="gio.Mount.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-name" title="gio.Mount.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-root" title="gio.Mount.get_root">get_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">get_uuid</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-volume" title="gio.Mount.get_volume">get_volume</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type" title="gio.Mount.guess_content_type">guess_content_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-finish" title="gio.Mount.guess_content_type_finish">guess_content_type_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-sync" title="gio.Mount.guess_content_type_sync">guess_content_type_sync</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">is_shadowed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount" title="gio.Mount.remount">remount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount-finish" title="gio.Mount.remount_finish">remount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--shadow" title="gio.Mount.shadow">shadow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount" title="gio.Mount.unmount">unmount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount-finish" title="gio.Mount.unmount_finish">unmount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unshadow" title="gio.Mount.unshadow">unshadow</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3063948"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-giomount.html" title="gio.Mount">gio.Mount</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id3063974"></a><h2>Prerequisites</h2><p>
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> requires
+ <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ </p></div><div class="refsect1" title="gio.Mount Signal Prototypes"><a name="signal-prototypes-giomount"></a><h2>gio.Mount Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--aborted" title='The "aborted" gio.Mount Signal'>"aborted"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--changed" title='The "changed" gio.Mount Signal'>"changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--unmounted" title='The "unmounted" gio.Mount Signal'>"unmounted"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3064204"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ interface represents user-visible mounts. Note, when porting from GnomeVFS,
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ is the moral equivalent of GnomeVFSVolume.
+
+ </p><p>
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ is a "mounted" filesystem that you can access. Mounted is in quotes because
+ it's not the same as a unix mount, it might be a gvfs mount, but you can still
+ access the files on it if you use GIO. Might or might not be related to a volume object.
+ </p><p>
+ Unmounting a GMount instance is an asynchronous operation. For more information
+ about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount
+ a <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> instance,
+ first call
+ g_mount_unmount()
+ with (at least) the GMount instance and a GAsyncReadyCallback. The callback will
+ be fired when the operation has resolved (either with success or failure), and a
+ GAsyncReady structure will be passed to the callback. That callback should then call
+ g_mount_unmount_finish()
+ with the GMount and the GAsyncReady data to see if the operation was completed successfully.
+ If an error is present when g_mount_unmount_finish() is called, then it will be filled
+ with any error information.
+ </p></div><div class="refsect1" title="Methods"><a name="id3064273"></a><h2>Methods</h2><div class="refsect2" title="gio.Mount.can_eject"><a name="method-giomount--can-eject"></a><h3>gio.Mount.can_eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount can be ejected,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_eject</code>() method checks if a mount can be ejected.
+ </p></div><div class="refsect2" title="gio.Mount.can_unmount"><a name="method-giomount--can-unmount"></a><h3>gio.Mount.can_unmount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_unmount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount can be unmounted,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_eject</code>() method checks if a mount can be unmounted.
+ </p></div><div class="refsect2" title="gio.Mount.eject"><a name="method-giomount--eject"></a><h3>gio.Mount.eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
+ <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject</code>() method asynchronously ejects a mount.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject-finish" title="gio.Mount.eject_finish">gio.Mount.eject_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Mount.eject_finish"><a name="method-giomount--eject-finish"></a><h3>gio.Mount.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been ejected
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject_finish</code>() method finishes ejecting a mount.
+ </p></div><div class="refsect2" title="gio.Mount.get_drive"><a name="method-giomount--get-drive"></a><h3>gio.Mount.get_drive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_drive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ or <code class="literal">None</code> if mount is not associated with a volume or a drive.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_drive</code>() method gets the drive for the mount.
+ </p><p>
+ This is a convenience method for getting the
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ and then using that object to get the
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>.
+ </p></div><div class="refsect2" title="gio.Mount.get_icon"><a name="method-giomount--get-icon"></a><h3>gio.Mount.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ for the mount.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_icon</code>() method gets the icon for mount.
+ </p></div><div class="refsect2" title="gio.Mount.get_name"><a name="method-giomount--get-name"></a><h3>gio.Mount.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name for the given mount.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_name</code>() method gets the name of mount.
+ </p></div><div class="refsect2" title="gio.Mount.get_root"><a name="method-giomount--get-root"></a><h3>gio.Mount.get_root</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_root</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_root</code>() method gets the root directory on mount.
+ </p></div><div class="refsect2" title="gio.Mount.get_uuid"><a name="method-giomount--get-uuid"></a><h3>gio.Mount.get_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uuid</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the UUID for mount or <code class="literal">None</code>
+ if no UUID can be computed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_uuid</code>() method gets the UUID for the mount.
+ The reference is typically based on the file system UUID for the mount in
+ question and should be considered an opaque string. Returns <code class="literal">None</code>
+ if there is no UUID available
+ </p></div><div class="refsect2" title="gio.Mount.get_volume"><a name="method-giomount--get-volume"></a><h3>gio.Mount.get_volume</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volume</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ or <code class="literal">None</code> if mount is not associated with a volume.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_volume</code>() method gets the volume for the mount.
+ </p></div><div class="refsect2" title="gio.Mount.guess_content_type"><a name="method-giomount--guess-content-type"></a><h3>gio.Mount.guess_content_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">guess_content_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">guess_content_type</code>() method asynchronously tries to guess the type of
+ content stored on mount. Returns one or more textual identifiers of well-known content
+ types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory
+ cards. See the shared-mime-info specification for more on x-content types.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-finish" title="gio.Mount.guess_content_type_finish">gio.Mount.guess_content_type_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Mount.guess_content_type_finish"><a name="method-giomount--guess-content-type-finish"></a><h3>gio.Mount.guess_content_type_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">guess_content_type_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of types or <code class="literal">None</code> on error.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">guess_content_type_finish</code>() method finishes guessing content
+ types of mount. If any errors occured during the operation, error will be set to
+ contain the errors and FALSE will be returned. In particular, you may get an
+ gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
+ </p></div><div class="refsect2" title="gio.Mount.guess_content_type_sync"><a name="method-giomount--guess-content-type-sync"></a><h3>gio.Mount.guess_content_type_sync</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">guess_content_type_sync</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">guess_content_type_sync</code>() method tries to guess
+ the type of content stored on mount. Returns one or more textual identifiers
+ of well-known content types (typically prefixed with "x-content/"), e.g.
+ x-content/image-dcf for camera memory cards. See the shared-mime-info specification
+ for more on x-content types.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ This is an synchronous operation and as such may block doing IO; see
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type" title="gio.Mount.guess_content_type">gio.Mount.guess_content_type</a></code>()
+ for the asynchronous version.
+ </p></div><div class="refsect2" title="gio.Mount.is_shadowed"><a name="method-giomount--is-shadowed"></a><h3>gio.Mount.is_shadowed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_shadowed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if mount is shadowed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">is_shadowed</code>() method determines if mount
+ is shadowed. Applications or libraries should avoid displaying mount
+ in the user interface if it is shadowed.
+ </p><p>
+ A mount is said to be shadowed if there exists one or more user visible
+ objects (currently
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ objects) with a root that is inside the root of mount.
+ </p><p>
+ One application of shadow mounts is when exposing a single file system
+ that is used to address several logical volumes. In this situation, a
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ implementation would create two
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ objects (for example, one for the camera functionality of the device
+ and one for a SD card reader on the device) with activation URIs
+ gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/.
+ When the underlying mount (with root gphoto2://[usb:001,002]/) is
+ mounted, said
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ implementation would create two
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ objects (each with their root matching the corresponding volume
+ activation root) that would shadow the original mount.
+ </p><p>
+ The proxy monitor in GVfs 2.26 and later, automatically creates and
+ manage shadow mounts (and shadows the underlying mount) if the activation
+ root on a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ is set.
+ </p></div><div class="refsect2" title="gio.Mount.remount"><a name="method-giomount--remount"></a><h3>gio.Mount.remount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
+ <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>mount_operation</code></strong> :</span></p></td><td>a <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ or <code class="literal">None</code> to avoid user interaction.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">remount</code>() method asynchronously remounts a mount.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount-finish" title="gio.Mount.remount_finish">gio.Mount.remount_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Mount.remount_finish"><a name="method-giomount--remount-finish"></a><h3>gio.Mount.remount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been remounted
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">remount_finish</code>() method finishes remounting a mount.
+ </p></div><div class="refsect2" title="gio.Mount.shadow"><a name="method-giomount--shadow"></a><h3>gio.Mount.shadow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">shadow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">shadow</code>() method increments the shadow
+ count on mount. Usually used by
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ implementations when creating a shadow mount for mount, see
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
+ for more information. The caller will need to emit the "changed"
+ signal on mount manually.
+ </p></div><div class="refsect2" title="gio.Mount.unmount"><a name="method-giomount--unmount"></a><h3>gio.Mount.unmount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
+ <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">unmount</code>() method asynchronously unmounts a mount.
+ </p><p>
+ If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount-finish" title="gio.Mount.unmount_finish">gio.Mount.unmount_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Mount.unmount_finish"><a name="method-giomount--unmount-finish"></a><h3>gio.Mount.unmount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been unmounted
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">unmount_finish</code>() method finishes unmounting a mount.
+ </p></div><div class="refsect2" title="gio.Mount.unshadow"><a name="method-giomount--unshadow"></a><h3>gio.Mount.unshadow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unshadow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">unshadow</code>() method decrements the shadow
+ count on mount. Usually used by
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ implementations when destroying a shadow mount for mount, see
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
+ for more information. The caller will need to emit the "changed"
+ signal on mount manually.
+ </p></div></div><div class="refsect1" title="Signals"><a name="id3066751"></a><h2>Signals</h2><div class="refsect2" title='The "aborted" gio.Mount Signal'><a name="signal-giomount--aborted"></a><h3>The "aborted" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted by the backend when e.g. a device becomes unavailable while a
+ mount operation is in progress.
+ </p><p>
+ Implementations of <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ should handle this signal by dismissing open password dialogs.
+ </p></div><div class="refsect2" title='The "changed" gio.Mount Signal'><a name="signal-giomount--changed"></a><h3>The "changed" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when the mount has been changed.
+ </p></div><div class="refsect2" title='The "unmounted" gio.Mount Signal'><a name="signal-giomount--unmounted"></a><h3>The "unmounted" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ This signal is emitted when the
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ have been unmounted.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomemoryoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomountoperation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MemoryOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MountOperation</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomountoperation.html b/docs/html/class-giomountoperation.html
new file mode 100644
index 0000000..19cc014
--- /dev/null
+++ b/docs/html/class-giomountoperation.html
@@ -0,0 +1,123 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MountOperation</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomount.html" title="gio.Mount"><link rel="next" href="class-giooutputstream.html" title="gio.OutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MountOperation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomount.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giooutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MountOperation"><a name="class-giomountoperation"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MountOperation</h2><p>gio.MountOperation — Authentication methods for mountable locations.</p></div><div class="refsect1" title="Synopsis"><a name="id3067203"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MountOperation</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giomountoperation.html#constructor-giomountoperation" title="Constructor">gio.MountOperation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-anonymous" title="gio.MountOperation.get_anonymous">get_anonymous</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-choice" title="gio.MountOperation.get_choice">get_choice</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-domain" title="gio.MountOperation.get_domain">get_domain</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-password" title="gio.MountOperation.get_password">get_password</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-password-save" title="gio.MountOperation.get_password_save">get_password_save</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-username" title="gio.MountOperation.get_username">get_username</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--reply" title="gio.MountOperation.reply">replay</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-anonymous" title="gio.MountOperation.set_anonymous">set_anonymous</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anonymous</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-choice" title="gio.MountOperation.set_choice">set_choice</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>choice</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-domain" title="gio.MountOperation.set_domain">set_domain</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-password" title="gio.MountOperation.set_password">set_password</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>password</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-password-save" title="gio.MountOperation.set_password_save">set_password_save</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>save</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-username" title="gio.MountOperation.set_username">set_username</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>username</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3067569"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation">gio.MountOperation</a>
+</pre></div><div class="refsect1" title="gio.MountOperation Properties"><a name="properties-giomountoperation"></a><h2>gio.MountOperation Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"anonymous"</td><td valign="top">Read/Write</td><td valign="top">
+ Whether to use an anonymous user when authenticating.
+ Default value: <code class="literal">False</code>
+ </td></tr><tr valign="top"><td valign="top">"choice"</td><td valign="top">Read/Write</td><td valign="top">
+ The index of the user's choice when a question is asked during
+ the mount operation. See the "ask-question" signal.
+ Allowed values: &gt;= 0 Default value: 0
+ </td></tr><tr valign="top"><td valign="top">"domain"</td><td valign="top">Read/Write</td><td valign="top">
+ The domain to use for the mount operation. Default value: <code class="literal">None</code>
+ </td></tr><tr valign="top"><td valign="top">"password"</td><td valign="top">Read/Write</td><td valign="top">
+ The password that is used for authentication when carrying out the
+ mount operation. Default value: <code class="literal">None</code>
+ </td></tr><tr valign="top"><td valign="top">"password-save"</td><td valign="top">Read/Write</td><td valign="top">
+ Determines if and how the password information should be saved.
+ Default value: gio.PASSWORD_SAVE_NEVER
+ </td></tr><tr valign="top"><td valign="top">"username"</td><td valign="top">Read/Write</td><td valign="top">
+ The user name that is used for authentication when carrying out the
+ mount operation. Default value: <code class="literal">None</code>
+ </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gio.MountOperation Signal Prototypes"><a name="signal-prototypes-giomountoperation"></a><h2>gio.MountOperation Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--aborted" title='The "aborted" gio.MountOperation Signal'>"aborted"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--ask-password" title='The "ask-password" gio.MountOperation Signal'>"ask-password"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_user</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_domain</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--ask-question" title='The "ask-question" gio.MountOperation Signal'>"ask-question"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>choices</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--reply" title='The "reply" gio.MountOperation Signal'>"reply"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>result</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3068159"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ provides a mechanism for authenticating mountable operations, such as loop mounting files,
+ hard drive partitions or server locations.
+ </p><p>
+ Mounting operations are handed a
+ <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ that then can use if they require any privileges or authentication for their volumes to be
+ mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing
+ a remote server protocol which requires user credentials such as FTP or WebDAV.
+ </p><p>
+ Users should instantiate a subclass of this that implements all the various callbacks
+ to show the required dialogs, such as
+ <PYGTKDOCLINK HREF="class-gtkmountoperation"><code class="classname">gtk.MountOperation</code></PYGTKDOCLINK>.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomountoperation"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.MountOperation</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new mount operation.
+ </p></div><div class="refsect1" title="Methods"><a name="id3068276"></a><h2>Methods</h2><div class="refsect2" title="gio.MountOperation.get_anonymous"><a name="method-giomountoperation--get-anonymous"></a><h3>gio.MountOperation.get_anonymous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_anonymous</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if mount operation is anonymous.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_anonymous</code>() method check to see whether
+ the mount operation is being used for an anonymous user
+ </p></div><div class="refsect2" title="gio.MountOperation.get_choice"><a name="method-giomountoperation--get-choice"></a><h3>gio.MountOperation.get_choice</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_choice</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer containing an index of the user's
+ choice from the choice's list, or 0.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_anonymous</code>() method gets a choice
+ from the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.get_domain"><a name="method-giomountoperation--get-domain"></a><h3>gio.MountOperation.get_domain</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_domain</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string set to the domain.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_domain</code>() method gets the domain
+ of the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.get_password"><a name="method-giomountoperation--get-password"></a><h3>gio.MountOperation.get_password</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_password</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the password within
+ the mountoperation.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_password</code>() method gets a password
+ from the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.get_password_save"><a name="method-giomountoperation--get-password-save"></a><h3>gio.MountOperation.get_password_save</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_password_save</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
+ flag.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_password_save</code>() method gets the state
+ of saving passwords for the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.get_username"><a name="method-giomountoperation--get-username"></a><h3>gio.MountOperation.get_username</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_username</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the user name.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_username</code>() method get the user
+ name from the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.reply"><a name="method-giomountoperation--reply"></a><h3>gio.MountOperation.reply</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reply</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">reply</code>() method emits the "reply" signal.
+ </p></div><div class="refsect2" title="gio.MountOperation.set_anonymous"><a name="method-giomountoperation--set-anonymous"></a><h3>gio.MountOperation.set_anonymous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_anonymous</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anonymous</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>anonymous</code></em> :</span></p></td><td>boolean value.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_anonymous</code>() method sets the mount operation
+ to use an anonymous user if anonymous is <code class="literal">True</code>.
+ </p></div><div class="refsect2" title="gio.MountOperation.set_choice"><a name="method-giomountoperation--set-choice"></a><h3>gio.MountOperation.set_choice</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_choice</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>choice</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>choice</code></em> :</span></p></td><td>an integer.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_choice</code>() method sets a default choice for the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.set_domain"><a name="method-giomountoperation--set-domain"></a><h3>gio.MountOperation.set_domain</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_domain</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td><td>the domain to set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_domain</code>() method sets the mount operation's domain.
+ </p></div><div class="refsect2" title="gio.MountOperation.set_password"><a name="method-giomountoperation--set-password"></a><h3>gio.MountOperation.set_password</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_password</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>password</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td><td>password to set.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_password</code>() method sets the mount
+ operation's password to password.
+ </p></div><div class="refsect2" title="gio.MountOperation.set_password_save"><a name="method-giomountoperation--set-password-save"></a><h3>gio.MountOperation.set_password_save</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_password_save</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>save</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>save</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_password_save</code>() method sets the state
+ of saving passwords for the mount operation.
+ </p></div><div class="refsect2" title="gio.MountOperation.set_username"><a name="method-giomountoperation--set-username"></a><h3>gio.MountOperation.set_username</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_username</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>username</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td><td>input username.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_anonymous</code>() method sets the user
+ name within op to username.
+ </p></div></div><div class="refsect1" title="Signals"><a name="id3069199"></a><h2>Signals</h2><div class="refsect2" title='The "aborted" gio.MountOperation Signal'><a name="signal-giomountoperation--aborted"></a><h3>The "aborted" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
+ Implementations of <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ should handle this signal by dismissing open password dialogs.
+ </p></div><div class="refsect2" title='The "ask-password" gio.MountOperation Signal'><a name="signal-giomountoperation--ask-password"></a><h3>The "ask-password" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_user</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_domain</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td><td>string containing a message to display to the user.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>default_user</code></em> :</span></p></td><td>string containing the default user name.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>default_domain</code></em> :</span></p></td><td>string containing the default domain.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+ <a class="xref" href="gio-constants.html#gio-ask-password-flags-constants" title="Gio Ask Password Flags Constants">Gio Ask Password Flags Constants</a>
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ This signal is emitted when a mount operation asks the user for a password.
+ If the message contains a line break, the first line should be presented as a heading.
+ For example, it may be used as the primary text in a
+ <PYGTKDOCLINK HREF="class-gtkmessagedialog"><code class="classname">gtk.MessageDialog</code></PYGTKDOCLINK>.
+ </p></div><div class="refsect2" title='The "ask-question" gio.MountOperation Signal'><a name="signal-giomountoperation--ask-question"></a><h3>The "ask-question" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>choices</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td><td>string containing a message to display to the user.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>choices</code></em> :</span></p></td><td>a list of strings for each possible choice.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ This signal is emitted when asking the user a question and gives a list of choices
+ for the user to choose from. If the message contains a line break, the first line should be
+ presented as a heading. For example, it may be used as the primary text in a
+ <PYGTKDOCLINK HREF="class-gtkmessagedialog"><code class="classname">gtk.MessageDialog</code></PYGTKDOCLINK>.
+ </p></div><div class="refsect2" title='The "reply" gio.MountOperation Signal'><a name="signal-giomountoperation--reply"></a><h3>The "reply" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>result</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
+ indicating how the request was handled</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ This signal is emitted when the user has replied to the mount operation.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomount.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giooutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Mount </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.OutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giooutputstream.html b/docs/html/class-giooutputstream.html
new file mode 100644
index 0000000..10b06d9
--- /dev/null
+++ b/docs/html/class-giooutputstream.html
@@ -0,0 +1,19 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.OutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomountoperation.html" title="gio.MountOperation"><link rel="next" href="class-gioseekable.html" title="gio.Seekable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.OutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomountoperation.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioseekable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.OutputStream"><a name="class-giooutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.OutputStream</h2><p>gio.OutputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id3070025"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.OutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--clear-pending">clear_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close">close</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close-async">close_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close-finish">close_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush">flush</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush-async">flush_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush-finish">flush_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--has-pending">has_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--is-closed">is_closed</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--set-pending">set_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice">splice</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.OUTPUT_STREAM_SPLICE_NONE</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice-async">splice_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>source</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.OUTPUT_STREAM_SPLICE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice-finish">splice_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write">write</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write-async">write_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write-finish">write_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3070746"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+</pre></div><div class="refsect1" title="Description"><a name="id3070772"></a><h2>Description</h2><p>
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+ has functions to write from a stream (
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write">gio.OutputStream.write</PYGTKDOCLINK></code>()
+ ), to close a stream (
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close">gio.OutputStream.close</PYGTKDOCLINK></code>()
+ ) and to flush pending writes (
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush">gio.OutputStream.flush</PYGTKDOCLINK></code>()
+ ).
+ </p><p>
+ To copy the content of an input stream to an output stream without manually
+ handling the reads and writes, use
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice">gio.OutputStream.splice</PYGTKDOCLINK></code>().
+ </p><p>
+ All of these functions have async variants too.
+ </p></div><div class="refsect1" title="Methods"><a name="id3070836"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomountoperation.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioseekable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MountOperation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Seekable</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioseekable.html b/docs/html/class-gioseekable.html
new file mode 100644
index 0000000..8e98b67
--- /dev/null
+++ b/docs/html/class-gioseekable.html
@@ -0,0 +1,55 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Seekable</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giooutputstream.html" title="gio.OutputStream"><link rel="next" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Seekable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giooutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giosimpleasyncresult.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Seekable"><a name="class-gioseekable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Seekable</h2><p>gio.Seekable — Stream seeking interface.</p></div><div class="refsect1" title="Synopsis"><a name="id3070872"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Seekable</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">tell</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">can_seek</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">seek</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_truncate" title="gio.Seekable.can_truncate">can_truncate</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate">truncate</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3071051"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-gioseekable.html" title="gio.Seekable">gio.Seekable</a>
+</pre></div><div class="refsect1" title="Known Implementation"><a name="id3071078"></a><h2>Known Implementation</h2><p>
+ <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a> is implemented by
+ <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>,
+ <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>,
+ <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a> and
+ <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
+ </p></div><div class="refsect1" title="Description"><a name="id3071128"></a><h2>Description</h2><p>
+ <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+ is implemented by streams (implementations of
+ <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a> or
+ <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>)
+ that support seeking.
+ </p></div><div class="refsect1" title="Methods"><a name="id3071163"></a><h2>Methods</h2><div class="refsect2" title="gio.Seekable.tell"><a name="method-gioseekable--tell"></a><h3>gio.Seekable.tell</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">tell</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+ the offset from the beginning of the buffer
+ </td></tr></tbody></table><p>
+ Tells the current position within the stream.
+ </p></div><div class="refsect2" title="gio.Seekable.can_seek"><a name="method-gioseekable--can_seek"></a><h3>gio.Seekable.can_seek</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_seek</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if this
+ <code class="classname">gio.Seekable</code> can be seeked with
+ the <code class="methodname">seek</code>() method, <code class="literal">False</code>
+ if not. </td></tr></tbody></table><p>
+ The <code class="methodname">can_seek</code>() method checks if the
+ <a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek"><code class="methodname">seek</code>()</a>
+ can be used on this <code class="classname">gio.Seekable</code>.
+ </p></div><div class="refsect2" title="gio.Seekable.seek"><a name="method-gioseekable--seek"></a><h3>gio.Seekable.seek</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">seek</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset that is added to the position determined by the <code class="literal">type</code> parameter.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>0=current position, 1=start of the file, 2=end of the file.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>a <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful seek,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ Seeks in the stream by the given <code class="literal">offset</code>, modified by <code class="literal">type</code>.
+ </p><p>
+ If <code class="literal">cancellable</code> is not <code class="literal">None</code>, then the
+ operation can be cancelled by triggering the cancellable object from another thread.
+ </p></div><div class="refsect2" title="gio.Seekable.can_truncate"><a name="method-gioseekable--can_truncate"></a><h3>gio.Seekable.can_truncate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_truncate</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if this
+ <code class="classname">gio.Seekable</code> can be truncated with
+ the <code class="methodname">truncate</code>() method, <code class="literal">False</code>
+ if not. </td></tr></tbody></table><p>
+ The <code class="methodname">can_truncate</code>() method checks if the
+ <a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate"><code class="methodname">truncate</code>()</a>
+ can be used on this <code class="classname">gio.Seekable</code>.
+ </p></div><div class="refsect2" title="gio.Seekable.truncate"><a name="method-gioseekable--truncate"></a><h3>gio.Seekable.truncate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">truncate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset at which the stream should be truncated
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>a <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if successful,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ Truncates a stream with a given <code class="literal">offset</code>.
+ </p><p>
+ If <code class="literal">cancellable</code> is not <code class="literal">None</code>, then the
+ operation can be cancelled by triggering the cancellable object from another thread.
+ </p><p>
+ If an operation was partially finished when the operation was cancelled the
+ partial result will be returned, without an error.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giooutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giosimpleasyncresult.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.OutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.SimpleAsyncResult</td></tr></table></div></body></html>
diff --git a/docs/html/class-giosimpleasyncresult.html b/docs/html/class-giosimpleasyncresult.html
new file mode 100644
index 0000000..a9a07fe
--- /dev/null
+++ b/docs/html/class-giosimpleasyncresult.html
@@ -0,0 +1,87 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.SimpleAsyncResult</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioseekable.html" title="gio.Seekable"><link rel="next" href="class-giothemedicon.html" title="gio.ThemedIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.SimpleAsyncResult</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioseekable.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giothemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.SimpleAsyncResult"><a name="class-giosimpleasyncresult"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.SimpleAsyncResult</h2><p>gio.SimpleAsyncResult — Simple asynchronous results implementation.</p></div><div class="refsect1" title="Synopsis"><a name="id3071813"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.SimpleAsyncResult</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete" title="gio.SimpleAsyncResult.complete">complete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">complete_in_idle</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean" title="gio.SimpleAsyncResult.get_op_res_gboolean">get_op_res_gboolean</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize" title="gio.SimpleAsyncResult.get_op_res_gssize">get_op_res_gssize</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error" title="gio.SimpleAsyncResult.propagate_error">propagate_error</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation" title="gio.SimpleAsyncResult.set_handle_cancellation">set_handle_cancellation</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle_cancellation</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean" title="gio.SimpleAsyncResult.set_op_res_gboolean">set_op_res_gboolean</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize" title="gio.SimpleAsyncResult.set_op_res_gssize">set_op_res_gssize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3072030"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult">gio.SimpleAsyncResult</a>
+</pre></div><div class="refsect1" title="Implemented Interface"><a name="id3072056"></a><h2>Implemented Interface</h2><p>
+ <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a> implements
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </p></div><div class="refsect1" title="Description"><a name="id3072083"></a><h2>Description</h2><p>
+ Implements <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ for simple cases. Most of the time, this will be all an application needs, and will be used transparently
+ Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions.
+ </p><p>
+ <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>
+ handles GAsyncReadyCallbacks, error reporting, operation cancellation and the final state of an
+ operation, completely transparent to the application. Results can be returned as a pointer e.g.
+ for functions that return data that is collected asynchronously, a boolean value for checking the
+ success or failure of an operation, or a gssize for operations which return the number of bytes modified
+ by the operation; all of the simple return cases are covered.
+ </p><p>
+ Most of the time, an application will not need to know of the details of this API; it is handled
+ transparently, and any necessary operations are handled by GAsyncResult's interface. However, if
+ implementing a new GIO module, for writing language bindings, or for complex applications that need
+ better control of how asynchronous operations are completed, it is important to understand this functionality.
+ </p><p>
+ <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>
+ are tagged with the calling function to ensure that asynchronous functions and
+ their finishing functions are used together correctly.
+ </p><p>
+ An asynchronous operation can be made to ignore a cancellation event by calling
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation" title="gio.SimpleAsyncResult.set_handle_cancellation">gio.SimpleAsyncResult.set_handle_cancellation</a></code>()
+ with a
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ for the operation and <code class="literal">False</code>. This is useful for operations that are dangerous to cancel,
+ such as close (which would cause a leak if cancelled before being run).
+ </p><p>
+ <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+ can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available.
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete" title="gio.SimpleAsyncResult.complete">gio.SimpleAsyncResult.complete</a></code>()
+ will finish an I/O task directly within the main event loop.
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">gio.SimpleAsyncResult.complete_in_idle</a></code>()
+ will integrate the I/O task into the main event loop as an idle function.
+
+ </p><p>
+ To set the results of an asynchronous function,
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean" title="gio.SimpleAsyncResult.set_op_res_gboolean">gio.SimpleAsyncResult.set_op_res_gboolean</a></code>(), and
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize" title="gio.SimpleAsyncResult.set_op_res_gssize">gio.SimpleAsyncResult.set_op_res_gssize</a></code>()
+ are provided, setting the operation's result to a gboolean, or gssize, respectively.
+ </p><p>
+ Likewise, to get the result of an asynchronous function,
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean" title="gio.SimpleAsyncResult.get_op_res_gboolean">gio.SimpleAsyncResult.get_op_res_gboolean</a></code>() and
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize" title="gio.SimpleAsyncResult.get_op_res_gssize">gio.SimpleAsyncResult.get_op_res_gssize</a></code>()
+ are provided, getting the operation's result as a gboolean and gssize, respectively.
+ </p></div><div class="refsect1" title="Methods"><a name="id3072281"></a><h2>Methods</h2><div class="refsect2" title="gio.SimpleAsyncResult.complete"><a name="method-giosimpleasyncresult--complete"></a><h3>gio.SimpleAsyncResult.complete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">complete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">complete</code>() method completes an asynchronous I/O job.
+ Must be called in the main thread, as it invokes the callback that should be called
+ in the main thread. If you are in a different thread use
+ <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">gio.SimpleAsyncResult.complete_in_idle</a></code>().
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.complete_in_idle"><a name="method-giosimpleasyncresult--complete-in-idle"></a><h3>gio.SimpleAsyncResult.complete_in_idle</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">complete_in_idle</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+ The <code class="methodname">complete_in_idle</code>() method completes an asynchronous
+ function in the main event loop using an idle function.
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.get_op_res_gboolean"><a name="method-giosimpleasyncresult--get-op-res-gboolean"></a><h3>gio.SimpleAsyncResult.get_op_res_gboolean</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_op_res_gboolean</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation's result was
+ <code class="literal">True</code>, <code class="literal">False</code> if the operation's result
+ was <code class="literal">False</code>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_op_res_gboolean</code>() method gets the operation
+ result boolean from within the asynchronous result.
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.get_op_res_gssize"><a name="method-giosimpleasyncresult--get-op-res-gssize"></a><h3>gio.SimpleAsyncResult.get_op_res_gssize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_op_res_gssize</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a gssize returned from the asynchronous function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_op_res_gssize</code>() method gets a gssize
+ from the asynchronous result.
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.propagate_error"><a name="method-giosimpleasyncresult--propagate-error"></a><h3>gio.SimpleAsyncResult.propagate_error</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">propagate_error</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the error was propegated
+ to dest. <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">propagate_error</code>() method propagates an error
+ from within the simple asynchronous result to a given destination.
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_handle_cancellation"><a name="method-giosimpleasyncresult--set-handle-cancellation"></a><h3>gio.SimpleAsyncResult.set_handle_cancellation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_handle_cancellation</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle_cancellation</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>handle_cancellation</code></strong> :</span></p></td><td>a boolean.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_handle_cancellation</code>() method sets whether
+ to handle cancellation within the asynchronous operation.
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_op_res_gboolean"><a name="method-giosimpleasyncresult--set-op-res-gboolean"></a><h3>gio.SimpleAsyncResult.set_op_res_gboolean</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_op_res_gboolean</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>op_res</code></strong> :</span></p></td><td>a boolean.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_op_res_gboolean</code>() method sets the operation
+ result to a boolean within the asynchronous result.
+ </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_op_res_gssize"><a name="method-giosimpleasyncresult--set-op-res-gssize"></a><h3>gio.SimpleAsyncResult.set_op_res_gssize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_op_res_gssize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>op_res</code></strong> :</span></p></td><td>a gssize.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_op_res_gssize</code>() method sets the operation
+ result within the asynchronous result to the given op_res.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioseekable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giothemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Seekable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.ThemedIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-giothemedicon.html b/docs/html/class-giothemedicon.html
new file mode 100644
index 0000000..6c2991d
--- /dev/null
+++ b/docs/html/class-giothemedicon.html
@@ -0,0 +1,42 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.ThemedIcon</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><link rel="next" href="class-giovolume.html" title="gio.Volume"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.ThemedIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giosimpleasyncresult.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giovolume.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.ThemedIcon"><a name="class-giothemedicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.ThemedIcon</h2><p>gio.ThemedIcon — Icon theming support.</p></div><div class="refsect1" title="Synopsis"><a name="id3072870"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.ThemedIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giothemedicon.html#constructor-giothemedicon" title="Constructor">gio.ThemedIcon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--append-name" title="gio.ThemedIcon.append_name">append_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--get-names" title="gio.ThemedIcon.get_names">get_names</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--prepend-name" title="gio.ThemedIcon.prepend_name">prepend_name</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3072981"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon">gio.ThemedIcon</a>
+</pre></div><div class="refsect1" title="gio.ThemedIcon Properties"><a name="properties-giomountoperation"></a><h2>gio.ThemedIcon Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"name"</td><td valign="top">Write/Contruct Only</td><td valign="top">
+ The icon name. Default value: <code class="literal">None</code>
+ </td></tr><tr valign="top"><td valign="top">"names"</td><td valign="top">Read/Write/Contruct Only</td><td valign="top">
+ A list of icon names.
+ </td></tr><tr valign="top"><td valign="top">"use-default-fallbacks"</td><td valign="top">Read/Write/Contruct Only</td><td valign="top">
+ Whether to use the default fallbacks found by shortening the
+ icon name at '-' characters. If the "names" array has more
+ than one element, ignores any past the first.
+ </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3073135"></a><h2>Description</h2><p>
+ <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+ is an implementation of <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon
+ theme, so that icons can be looked up quickly.
+ </p><p>
+ <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+ does not provide actual pixmaps for icons, just the icon names. Ideally something like
+ <code class="methodname"><PYGTKDOCLINK HREF="method-gtkicontheme--choose-icon">gtk.IconTheme.choose_icon</PYGTKDOCLINK></code>()
+ should be used to resolve the list of names so that fallback icons work nicely
+ with themes that inherit other themes
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giothemedicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.ThemedIcon</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>use_default_fallbacks</code></em></span><span class="initializer">=False</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td><td>a string containing an icon name.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>.
+ </td></tr></tbody></table><p>
+ Creates a new themed icon from icon name, if instead of an icon name you
+ provide a list of icon names, the <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+ will be constructed using the items in the list.
+ </p></div><div class="refsect1" title="Methods"><a name="id3073301"></a><h2>Methods</h2><div class="refsect2" title="gio.ThemedIcon.append_name"><a name="method-giothemedicon--append-name"></a><h3>gio.ThemedIcon.append_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>name of icon to append to list of icons from within icon.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">append_name</code>() method appends a name to
+ the list of icons from within icon.
+ </p></div><div class="refsect2" title="gio.ThemedIcon.get_names"><a name="method-giothemedicon--get-names"></a><h3>gio.ThemedIcon.get_names</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_names</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of icon names.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_names</code>() method gets the names
+ of icons from within icon.
+ </p></div><div class="refsect2" title="gio.ThemedIcon.prepend_name"><a name="method-giothemedicon--prepend-name"></a><h3>gio.ThemedIcon.prepend_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">prepend_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>name of icon to prepend to list of icons from within icon.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">prepend_name</code>() method prepends a name to
+ the list of icons from within icon.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giosimpleasyncresult.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giovolume.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.SimpleAsyncResult </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Volume</td></tr></table></div></body></html>
diff --git a/docs/html/class-giounixinputstream.html b/docs/html/class-giounixinputstream.html
new file mode 100644
index 0000000..dce3d2f
--- /dev/null
+++ b/docs/html/class-giounixinputstream.html
@@ -0,0 +1,37 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.unix.InputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="prev" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="next" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.unix.InputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="giounix-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGio Unix Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giounixoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.unix.InputStream"><a name="class-giounixinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.unix.InputStream</h2><p>gio.unix.InputStream — Streaming input operations for UNIX file descriptors.</p></div><div class="refsect1" title="Synopsis"><a name="id2988538"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.unix.InputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giounixinputstream.html#constructor-giounixinputstream" title="Constructor">gio.unix.InputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--get-close-fd" title="gio.unix.InputStream.get_close_fd">get_close_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--get-fd" title="gio.unix.InputStream.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--set-close-fd" title="gio.unix.InputStream.set_close_fd">set_close_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2988427"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+ +-- <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream">gio.unix.InputStream</a>
+</pre></div><div class="refsect1" title="gio.unix.InputStream Properties"><a name="properties-giounixinputstream"></a><h2>gio.unix.InputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"close-fd"</td><td valign="top">Read - Write</td><td valign="top">Whether to close the file descriptor when the stream is closed.
+ Default value: <code class="literal">True</code>.</td></tr><tr valign="top"><td valign="top">"fd"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The file descriptor that the stream reads from. Default value: -1.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3013603"></a><h2>Description</h2><p>
+ <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+ implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+ for reading from a UNIX file descriptor, including asynchronous operations.
+ The file descriptor must be selectable, so it doesn't work with opened files.
+ </p><p>
+ Note that <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+ belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+ when using it.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giounixinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.unix.InputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a UNIX file descriptor.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>close_fd</code></em> :</span></p></td><td><code class="literal">True</code>
+ to close the file descriptor when done
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+ from the given fd.
+ </p><p>
+ If close_fd is <code class="literal">True</code>, the file descriptor will be closed when the stream is closed.
+ </p></div><div class="refsect1" title="Methods"><a name="id2900757"></a><h2>Methods</h2><div class="refsect2" title="gio.unix.InputStream.get_close_fd"><a name="method-giounixinputstream--get-close-fd"></a><h3>gio.unix.InputStream.get_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file descriptor is closed when done.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_close_fd</code>() method returns whether the file
+ descriptor of stream will be closed when the stream is closed.
+ </p></div><div class="refsect2" title="gio.unix.InputStream.get_fd"><a name="method-giounixinputstream--get-fd"></a><h3>gio.unix.InputStream.get_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The file descriptor of stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_fd</code>() method return the UNIX file descriptor
+ that the stream reads from.
+ </p></div><div class="refsect2" title="gio.unix.InputStream.set_close_fd"><a name="method-giounixinputstream--set-close-fd"></a><h3>gio.unix.InputStream.set_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_fd</code></strong> :</span></p></td><td><code class="literal">True</code> to close the file descriptor when done .
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_close_fd</code>() method sets whether the file descriptor
+ of stream shall be closed when the stream is closed.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="giounix-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="giounix-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giounixoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGio Unix Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.unix.OutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giounixoutputstream.html b/docs/html/class-giounixoutputstream.html
new file mode 100644
index 0000000..4093d8f
--- /dev/null
+++ b/docs/html/class-giounixoutputstream.html
@@ -0,0 +1,37 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.unix.OutputStream</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="prev" href="class-giounixinputstream.html" title="gio.unix.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.unix.OutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giounixinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Unix Class Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="gio.unix.OutputStream"><a name="class-giounixoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.unix.OutputStream</h2><p>gio.unix.OutputStream — Streaming output operations for UNIX file descriptors.</p></div><div class="refsect1" title="Synopsis"><a name="id3002723"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.unix.OutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giounixoutputstream.html#constructor-giounixoutputstream" title="Constructor">gio.unix.OutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd" title="gio.unix.OutputStream.get_close_fd">get_close_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--get-fd" title="gio.unix.OutputStream.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd" title="gio.unix.OutputStream.set_close_fd">set_close_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3051906"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+ +-- <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream">gio.unix.OutputStream</a>
+</pre></div><div class="refsect1" title="gio.unix.OutputStream Properties"><a name="properties-giounixoutputstream"></a><h2>gio.unix.OutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"close-fd"</td><td valign="top">Read - Write</td><td valign="top">Whether to close the file descriptor when the stream is closed.
+ Default value: <code class="literal">True</code>.</td></tr><tr valign="top"><td valign="top">"fd"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The file descriptor that the stream writes to. Default value: -1.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3009608"></a><h2>Description</h2><p>
+ <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+ implements <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+ for writing to a UNIX file descriptor, including asynchronous operations.
+ The file descriptor must be selectable, so it doesn't work with opened files.
+ </p><p>
+ Note that <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+ belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+ when using it.
+ </p></div><div class="refsect1" title="Constructor"><a name="constructor-giounixoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.unix.OutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a UNIX file descriptor.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>close_fd</code></em> :</span></p></td><td><code class="literal">True</code>
+ to close the file descriptor when done
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+ <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+ </td></tr></tbody></table><p>
+ Creates a new <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+ from the given fd.
+ </p><p>
+ If close_fd is <code class="literal">True</code>, the file descriptor will be closed when the stream is closed.
+ </p></div><div class="refsect1" title="Methods"><a name="id3005969"></a><h2>Methods</h2><div class="refsect2" title="gio.unix.OutputStream.get_close_fd"><a name="method-giounixoutputstream--get-close-fd"></a><h3>gio.unix.OutputStream.get_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file descriptor is closed when done.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_close_fd</code>() method returns whether the file
+ descriptor of stream will be closed when the stream is closed.
+ </p></div><div class="refsect2" title="gio.unix.OutputStream.get_fd"><a name="method-giounixoutputstream--get-fd"></a><h3>gio.unix.OutputStream.get_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The file descriptor of stream.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_fd</code>() method return the UNIX file descriptor
+ that the stream reads from.
+ </p></div><div class="refsect2" title="gio.unix.OutputStream.set_close_fd"><a name="method-giounixoutputstream--set-close-fd"></a><h3>gio.unix.OutputStream.set_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_fd</code></strong> :</span></p></td><td><code class="literal">True</code> to close the file descriptor when done .
+ </td></tr></tbody></table><p>
+ The <code class="methodname">set_close_fd</code>() method sets whether the file descriptor
+ of stream shall be closed when the stream is closed.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giounixinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="giounix-class-reference.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">gio.unix.InputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/docs/html/class-giovolume.html b/docs/html/class-giovolume.html
new file mode 100644
index 0000000..957cbad
--- /dev/null
+++ b/docs/html/class-giovolume.html
@@ -0,0 +1,176 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Volume</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giothemedicon.html" title="gio.ThemedIcon"><link rel="next" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Volume</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giothemedicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giovolumemonitor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Volume"><a name="class-giovolume"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Volume</h2><p>gio.Volume — Volume management.</p></div><div class="refsect1" title="Synopsis"><a name="id3073521"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Volume</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--can-eject" title="gio.Volume.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--can-mount" title="gio.Volume.can_mount">can_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject" title="gio.Volume.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject-finish" title="gio.Volume.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--enumerate-identifiers" title="gio.Volume.enumerate_identifiers">enumerate_identifiers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-activation-root" title="gio.Volume.get_activation_root">get_activation_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-drive" title="gio.Volume.get_drive">get_drive</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-icon" title="gio.Volume.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">get_identifier</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">get_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-name" title="gio.Volume.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-uuid" title="gio.Volume.get_uuid">get_uuid</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount" title="gio.Volume.mount">mount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">mount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--should-automount" title="gio.Volume.should_automount">should_automount</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3074016"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+ +-- <a class="link" href="class-giovolume.html" title="gio.Volume">gio.Volume</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id3074042"></a><h2>Prerequisites</h2><p>
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a> requires
+ <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ </p></div><div class="refsect1" title="gio.Volume Signal Prototypes"><a name="signal-prototypes-giovolume"></a><h2>gio.Volume Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giovolume.html#signal-giovolume--changed" title='The "changed" gio.Volume Signal'>"changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolume.html#signal-giovolume--removed" title='The "removed" gio.Volume Signal'>"removed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3074212"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ interface represents user-visible objects that can be mounted. Note, when porting
+ from GnomeVFS, <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ is the moral equivalent of GnomeVFSDrive.
+ </p><p>
+ Mounting a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ instance is an asynchronous operation. For more information about asynchronous operations.
+ To mount a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>, first call
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount" title="gio.Volume.mount">gio.Volume.mount</a></code>()
+ with (at least) the <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ instance, optionally a
+ <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ object and a GAsyncReadyCallback.
+ </p><p>
+ Typically, one will only want to pass <code class="literal">None</code> for the GMountOperation
+ if automounting all volumes when a desktop session starts since it's not desirable
+ to put up a lot of dialogs asking for credentials.
+ </p><p>
+ The callback will be fired when the operation has resolved (either with success or failure),
+ and a GAsyncReady structure will be passed to the callback. That callback should then call
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
+ with the GVolume instance and the GAsyncReady data to see if the operation was completed
+ successfully. If an error is present when
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
+ is called, then it will be filled with any error information.
+ </p><p>
+ It is sometimes necessary to directly access the underlying operating system object behind a volume
+ (e.g. for passing a volume to an application via the commandline). For this purpose, GIO allows to obtain
+ an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs,
+ filesystem labels, traditional Unix devices (e.g. /dev/sda2), uuids. GIO uses predefind strings
+ as names for the different kinds of identifiers:
+ "hal-udi", "label", etc. Use
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">gio.Volume.get_identifier</a></code>()
+ to obtain an identifier for a volume.
+ </p></div><div class="refsect1" title="Methods"><a name="id3074347"></a><h2>Methods</h2><div class="refsect2" title="gio.Volume.can_eject"><a name="method-giovolume--can-eject"></a><h3>gio.Volume.can_eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume can be ejected,
+ <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_eject</code>() method checks if a volume can be ejected.
+ </p></div><div class="refsect2" title="gio.Volume.can_mount"><a name="method-giovolume--can-mount"></a><h3>gio.Volume.can_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume can be mounted
+ for media changes, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">can_mount</code>() method checks if a volume
+ can be mounted.
+ </p></div><div class="refsect2" title="gio.Volume.eject"><a name="method-giovolume--eject"></a><h3>gio.Volume.eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject</code>() method asynchronously ejects a volume.
+ </p><p>
+ When the operation is finished, callback will be called. You can then call
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject-finish" title="gio.Volume.eject_finish">gio.Volume.eject_finish</a></code>()
+ to obtain the result of the operation.
+ </p></div><div class="refsect2" title="gio.Volume.eject_finish"><a name="method-giovolume--eject-finish"></a><h3>gio.Volume.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume has been ejected
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">eject_finish</code>() method finishes ejecting a volume.
+ If any errors occured during the operation, error will be set to contain the
+ errors and <code class="literal">False</code> will be returned.
+ </p></div><div class="refsect2" title="gio.Volume.enumerate_identifiers"><a name="method-giovolume--enumerate-identifiers"></a><h3>gio.Volume.enumerate_identifiers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_identifiers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of strings containing kinds of identifiers.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">enumerate_identifiers</code>() method gets the kinds
+ of identifiers that volume has. Use
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">gio.Volume.get_identifier</a></code>()
+ to obtain the identifiers themselves.
+ </p></div><div class="refsect2" title="gio.Volume.get_activation_root"><a name="method-giovolume--get-activation-root"></a><h3>gio.Volume.get_activation_root</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_activation_root</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the activation root of volume or <code class="literal">None</code>.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_activation_root</code>() method gets the activation
+ root for a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ if it is known ahead of mount time. Returns <code class="literal">None</code> otherwise.
+ If not <code class="literal">None</code> and if volume is mounted, then the result of
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-root" title="gio.Mount.get_root">gio.Mount.get_root</a></code>()
+ on the GMount object obtained from
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">gio.Volume.get_mount</a></code>()
+ will always either be equal or a prefix of what this function returns.
+ In other words, in code:
+ </p><pre class="programlisting">
+mount = volume.get_mount() # mounted, so never None
+mount_root = mount.get_root()
+volume_activation_root = volume.get_activation_root() # assume not None
+</pre><p>
+ then the expression
+ </p><pre class="programlisting">
+volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mount_root)
+</pre><p>
+ will always be <code class="literal">True</code>.
+ </p><p>
+ Activation roots are typically used in
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ implementations to find the underlying mount to shadow, see
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
+ for more details.
+ </p></div><div class="refsect2" title="gio.Volume.get_drive"><a name="method-giovolume--get-drive"></a><h3>gio.Volume.get_drive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_drive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+ or <code class="literal">None</code> if volume is not associated with a drive.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_drive</code>() method gets the drive for the volume.
+ </p></div><div class="refsect2" title="gio.Volume.get_icon"><a name="method-giovolume--get-icon"></a><h3>gio.Volume.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ for the volume.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_icon</code>() method gets the icon for volume.
+ </p></div><div class="refsect2" title="gio.Volume.get_identifier"><a name="method-giovolume--get-identifier"></a><h3>gio.Volume.get_identifier</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_identifier</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing the requested identfier, or
+ <code class="literal">None</code> if the
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ doesn't have this kind of identifier.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_identifier</code>() method gets the identifier of
+ the given kind for volume.
+ </p></div><div class="refsect2" title="gio.Volume.get_mount"><a name="method-giovolume--get-mount"></a><h3>gio.Volume.get_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ or <code class="literal">None</code> if volume isn't mounted.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_mount</code>() method gets the mount for the volume.
+ </p></div><div class="refsect2" title="gio.Volume.get_name"><a name="method-giovolume--get-name"></a><h3>gio.Volume.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing volume's name.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_name</code>() method gets the name of volume.
+ </p></div><div class="refsect2" title="gio.Volume.get_uuid"><a name="method-giovolume--get-uuid"></a><h3>gio.Volume.get_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uuid</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the UUID for volume or <code class="literal">None</code>
+ if no UUID can be computed.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_uuid</code>() method gets the UUID for the volume.
+ The reference is typically based on the file system UUID for the volume in
+ question and should be considered an opaque string.
+ Returns <code class="literal">None</code> if there is no UUID available.
+ </p></div><div class="refsect2" title="gio.Volume.mount"><a name="method-giovolume--mount"></a><h3>gio.Volume.mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>mount_operation</code></strong> :</span></p></td><td>A
+ <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+ or <code class="literal">None</code> to avoid user interaction.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>Flags affecting the operation
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+ object, <code class="literal">None</code> to ignore.
+ </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">mount</code>() method mounts a volume. This is an
+ asynchronous operation, and is finished by calling
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
+ with the volume and GAsyncResult returned in the callback.
+ </p></div><div class="refsect2" title="gio.Volume.mount_finish"><a name="method-giovolume--mount-finish"></a><h3>gio.Volume.mount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume has been mounted
+ successfully, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">mounted</code>() method finishes mounting a volume.
+ If any errors occured during the operation, error will be set to contain
+ the errors and <code class="literal">False</code> will be returned.
+ </p><p>
+ If the mount operation succeeded,
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">get_mount</a></code>()
+ on volume is guaranteed to return the mount right after calling this function;
+ there's no need to listen for the 'mount-added' signal on
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>.
+ </p></div><div class="refsect2" title="gio.Volume.should_automount"><a name="method-giovolume--should-automount"></a><h3>gio.Volume.should_automount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">should_automount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume should
+ be automatically mounted.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">should_automount</code>() method returns whether
+ the volume should be automatically mounted.
+ </p></div></div><div class="refsect1" title="Signals"><a name="id3076010"></a><h2>Signals</h2><div class="refsect2" title='The "changed" gio.Volume Signal'><a name="signal-giovolume--changed"></a><h3>The "changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>the volume</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when the volume has been changed.
+ </p></div><div class="refsect2" title='The "removed" gio.Volume Signal'><a name="signal-giovolume--removed"></a><h3>The "removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>the volume</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ This signal is emitted when the
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ have been removed. If the recipient is holding references to the object
+ they should release them so the object can be finalized.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giothemedicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giovolumemonitor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.ThemedIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.VolumeMonitor</td></tr></table></div></body></html>
diff --git a/docs/html/class-giovolumemonitor.html b/docs/html/class-giovolumemonitor.html
new file mode 100644
index 0000000..697d14f
--- /dev/null
+++ b/docs/html/class-giovolumemonitor.html
@@ -0,0 +1,135 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.VolumeMonitor</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giovolume.html" title="gio.Volume"><link rel="next" href="gio-functions.html" title="gio Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.VolumeMonitor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giovolume.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.VolumeMonitor"><a name="class-giovolumemonitor"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.VolumeMonitor</h2><p>gio.VolumeMonitor — Volume Monitor.</p></div><div class="refsect1" title="Synopsis"><a name="id3076316"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.VolumeMonitor</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives" title="gio.VolumeMonitor.get_connected_drives">get_connected_drives</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid" title="gio.VolumeMonitor.get_mount_for_uuid">get_mount_for_uuid</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-mounts" title="gio.VolumeMonitor.get_mounts">get_mounts</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid" title="gio.VolumeMonitor.get_volume_for_uuid">get_volume_for_uuid</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-volumes" title="gio.VolumeMonitor.get_volumes">get_volumes</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount" title="gio.volume_monitor_adopt_orphan_mount">gio.volume_monitor_adopt_orphan_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-get" title="gio.volume_monitor_get">gio.volume_monitor_get</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3076513"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+ +-- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor">gio.VolumeMonitor</a>
+</pre></div><div class="refsect1" title="gio.VolumeMonitor Signal Prototypes"><a name="signal-prototypes-giovolumemonitor"></a><h2>gio.VolumeMonitor Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed" title='The "drive-changed" gio.Volume Signal'>"drive-changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected" title='The "drive-connected" gio.Volume Signal'>"drive-connected"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected" title='The "drive-disconnected" gio.Volume Signal'>"drive-disconnected"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button" title='The "drive-eject-button" gio.Volume Signal'>"drive-eject-button"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-added" title='The "mount-added" gio.Volume Signal'>"mount-added"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed" title='The "mount-changed" gio.Volume Signal'>"mount-changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount" title='The "mount-pre-unmount" gio.Volume Signal'>"mount-pre-unmount"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed" title='The "mount-removed" gio.Volume Signal'>"mount-removed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-added" title='The "volume-added" gio.Volume Signal'>"volume-added"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed" title='The "volume-changed" gio.Volume Signal'>"volume-changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed" title='The "volume-removed" gio.Volume Signal'>"volume-removed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3077360"></a><h2>Description</h2><p>
+ The <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ is for listing the user interesting devices and volumes on the computer. In other words,
+ what a file selector or file manager would show in a sidebar.
+ </p></div><div class="refsect1" title="Methods"><a name="id3077381"></a><h2>Methods</h2><div class="refsect2" title="gio.VolumeMonitor.get_connected_drives"><a name="method-giovolumemonitor--get-connected-drives"></a><h3>gio.VolumeMonitor.get_connected_drives</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_connected_drives</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of connected
+ <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a> objects.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_connected_drives</code>() method gets a list
+ of drives connected to the system.
+ </p></div><div class="refsect2" title="gio.VolumeMonitor.get_mount_for_uuid"><a name="method-giovolumemonitor--get-mount-for-uuid"></a><h3>gio.VolumeMonitor.get_mount_for_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_mount_for_uuid</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uuid</code></strong> :</span></p></td><td>The UUID to look for.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ or <code class="literal">None</code> if no such mount is available.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_mount_for_uuid</code>() method finds a
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ object by it's UUID (see
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">gio.Mount.get_uuid</a></code>())
+ </p></div><div class="refsect2" title="gio.VolumeMonitor.get_mounts"><a name="method-giovolumemonitor--get-mounts"></a><h3>gio.VolumeMonitor.get_mounts</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_mounts</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ objects.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_mounts</code>() method gets a list of the mounts on the system.
+ </p></div><div class="refsect2" title="gio.VolumeMonitor.get_volume_for_uuid"><a name="method-giovolumemonitor--get-volume-for-uuid"></a><h3>gio.VolumeMonitor.get_volume_for_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volume_for_uuid</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uuid</code></strong> :</span></p></td><td>The UUID to look for.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ or <code class="literal">None</code> if no such volume is available.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_mount_for_uuid</code>() method finds a
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ object by it's UUID (see
+ <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">gio.Mount.get_uuid</a></code>())
+ </p></div><div class="refsect2" title="gio.VolumeMonitor.get_volumes"><a name="method-giovolumemonitor--get-volumes"></a><h3>gio.VolumeMonitor.get_volumes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ objects.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">get_volumes</code>() method gets a list of the volumes on the system.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id3077838"></a><h2>Functions</h2><div class="refsect2" title="gio.volume_monitor_adopt_orphan_mount"><a name="function-gio--volume-monitor-adopt-orphan-mount"></a><h3>gio.volume_monitor_adopt_orphan_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">volume_monitor_adopt_orphan_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ object that is the parent for mount or <code class="literal">None</code> if no wants to adopt the
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>.
+ </td></tr></tbody></table><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method will be deprecated starting from GIO 2.20</p></div><p>
+ The <code class="methodname">volume_monitor_adopt_orphan_mount</code>() function should
+ be called by any <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ implementation when a new <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ object is created that is not associated with a
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a> object.
+ It must be called just before emitting the mount_added signal.
+ </p><p>
+ If the return value is not <code class="literal">None</code>, the caller must associate the returned
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ object with the
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>.
+ This involves returning it in it's
+ <code class="methodname"><PYGTKDOCLINK HREF="method-giomount--get-volumes">gio.Mount.get_volumes</PYGTKDOCLINK></code>()
+ implementation. The caller must also listen for the "removed" signal on the
+ returned object and give up it's reference when handling that signal
+ </p><p>
+ Similary, if implementing
+ <code class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount" title="gio.volume_monitor_adopt_orphan_mount">gio.volume_monitor_adopt_orphan_mount</a></code>(),
+ the implementor must take a reference to mount and return it in it's
+ <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">gio.Volume.get_mount</a></code>()
+ implemented. Also, the implementor must listen for the "unmounted" signal
+ on mount and give up it's reference upon handling that signal.
+ </p><p>
+ There are two main use cases for this function.
+ </p><p>
+ One is when implementing a user space file system driver that reads blocks of
+ a block device that is already represented by the native volume monitor
+ (for example a CD Audio file system driver). Such a driver will generate it's own
+ <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+ object that needs to be assoicated with the
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ object that represents the volume.
+ </p><p>
+ The other is for implementing a
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ whose sole purpose is to return
+ <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+ objects representing entries in the users "favorite servers" list or similar.
+ </p></div><div class="refsect2" title="gio.volume_monitor_get"><a name="function-gio--volume-monitor-get"></a><h3>gio.volume_monitor_get</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">volume_monitor_get</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A reference to the
+ <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+ used by gio.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">volume_monitor_get</code>() function gets the
+ volume monitor used by gio.
+ </p></div></div><div class="refsect1" title="Signals"><a name="id3078150"></a><h2>Signals</h2><div class="refsect2" title='The "drive-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-changed"></a><h3>The "drive-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that changed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a drive changes.
+ </p></div><div class="refsect2" title='The "drive-connected" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-connected"></a><h3>The "drive-connected" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that was connected</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a drive is connected to the system.
+ </p></div><div class="refsect2" title='The "drive-disconnected" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-disconnected"></a><h3>The "drive-disconnected" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that was disconnected</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a drive is disconnected from the system.
+ </p></div><div class="refsect2" title='The "drive-eject-button" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-eject-button"></a><h3>The "drive-eject-button" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive where the eject button was pressed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when the eject button is pressed on drive.
+ </p></div><div class="refsect2" title='The "mount-added" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-added"></a><h3>The "mount-added" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>a Mount that was added.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a mount is added.
+ </p></div><div class="refsect2" title='The "mount-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-changed"></a><h3>The "mount-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that changed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a mount changes.
+ </p></div><div class="refsect2" title='The "mount-pre-unmount" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-pre-unmount"></a><h3>The "mount-pre-unmount" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that is being unmounted.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a mount is about to be removed.
+ </p></div><div class="refsect2" title='The "mount-removed" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-removed"></a><h3>The "mount-removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that was removed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a mount is removed.
+ </p></div><div class="refsect2" title='The "volume-added" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-added"></a><h3>The "volume-added" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that was added.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a mountable volume is added to the system.
+ </p></div><div class="refsect2" title='The "volume-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-changed"></a><h3>The "volume-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that changed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when mountable volume is changed.
+ </p></div><div class="refsect2" title='The "volume-removed" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-removed"></a><h3>The "volume-removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that was removed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+ with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+ method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+ Emitted when a mountable volume is removed from the system.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giovolume.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Volume </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-glibmaincontext.html b/docs/html/class-glibmaincontext.html
new file mode 100644
index 0000000..071c992
--- /dev/null
+++ b/docs/html/class-glibmaincontext.html
@@ -0,0 +1,29 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib.MainContext</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="next" href="class-glibmainloop.html" title="glib.MainLoop"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib.MainContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-glibmainloop.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib.MainContext"><a name="class-glibmaincontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib.MainContext</h2><p>glib.MainContext — an object representing a set of event sources to be handled
+in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</p></div><div class="refsect1" title="Synopsis"><a name="id2944631"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">glib.MainContext</span></span>:
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-glibmaincontext.html#constructor-glibmaincontext" title="Constructor">glib.MainContext</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration">iteration</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>may_block</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmaincontext.html#method-glibmaincontext--pending" title="glib.MainContext.pending">pending</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2944564"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-glibmaincontext.html" title="glib.MainContext">glib.MainContext</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2944547"></a><h2>Description</h2><p>A <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+represents a set of event sources that can be run in a single thread. File
+descriptors (plain files, pipes or sockets) and timeouts are the standard
+event sources for <code class="literal">GTK</code> and <code class="literal">PyGTK</code> though
+others can be added. Each event source is assigned a priority. The default
+priority, <code class="literal">glib.PRIORITY_DEFAULT</code>, is 0. Values less
+than 0 denote higher priorities. Values greater than 0 denote lower
+priorities. Events from high priority sources are always processed before
+events from lower priority sources. Single iterations of a <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+can be run with the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">iteration</code>()</a>
+method.</p></div><div class="refsect1" title="Constructor"><a name="constructor-glibmaincontext"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">glib.MainContext</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+ object.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+object.</p></div><div class="refsect1" title="Methods"><a name="id2927746"></a><h2>Methods</h2><div class="refsect2" title="glib.MainContext.iteration"><a name="method-glibmaincontext--iteration"></a><h3>glib.MainContext.iteration</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iteration</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>may_block</code></em> :</span></p></td><td>if <code class="literal">TRUE</code> the call may block
+ waiting for an event.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if events were
+ dispatched.</td></tr></tbody></table><p>The <code class="methodname">iteration</code>() method runs a single
+iteration. This involves:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">checking to see if any associated event sources are ready
+to be processed;</li><li class="listitem">then if no events sources are ready and
+<em class="parameter"><code>may_block</code></em> is <code class="literal">TRUE</code>, waiting for a
+source to become ready;</li><li class="listitem">and finally, dispatching the highest priority events
+sources that are ready</li></ul></div><p>Note that even when <em class="parameter"><code>may_block</code></em> is
+<code class="literal">TRUE</code>, it is still possible for
+<code class="methodname">iteration</code>() to return <code class="literal">FALSE</code>,
+since the the wait may be interrupted for other reasons than an event source
+becoming ready.</p></div><div class="refsect2" title="glib.MainContext.pending"><a name="method-glibmaincontext--pending"></a><h3>glib.MainContext.pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pending</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if events are
+ pending.</td></tr></tbody></table><p>The <code class="methodname">pending</code>() method checks if any
+associated sources have pending events.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-glibmainloop.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGlibClass Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib.MainLoop</td></tr></table></div></body></html>
diff --git a/docs/html/class-glibmainloop.html b/docs/html/class-glibmainloop.html
new file mode 100644
index 0000000..d0894dc
--- /dev/null
+++ b/docs/html/class-glibmainloop.html
@@ -0,0 +1,38 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib.MainLoop</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmaincontext.html" title="glib.MainContext"><link rel="next" href="glib-functions.html" title="glib Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib.MainLoop</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmaincontext.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib.MainLoop"><a name="class-glibmainloop"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib.MainLoop</h2><p>glib.MainLoop — an object representing the main event loop of a PyGTK
+ application.</p></div><div class="refsect1" title="Synopsis"><a name="id2931024"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">glib.MainLoop</span></span>:
+<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-glibmainloop.html#constructor-glibmainloop" title="Constructor">glib.MainLoop</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>context</code></em></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>is_running</code></em></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--get-context" title="glib.MainLoop.get_context">get_context</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--is-running" title="glib.MainLoop.is_running">is_running</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit">quit</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run">run</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2928263"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-glibmainloop.html" title="glib.MainLoop">glib.MainLoop</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2928260"></a><h2>Description</h2><p><a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+represents a main event loop. A <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+is created with the <a class="link" href="class-glibmainloop.html#constructor-glibmainloop" title="Constructor">glib.MainLoop</a>()
+constructor. After adding the initial event sources, the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method is called. This continuously checks for new events from each of the
+event sources and dispatches them. Finally, the processing of an event from
+one of the sources leads to a call to the <a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit"><code class="methodname">quit</code>()</a>
+method to exit the main loop, and the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method returns.</p><p>It is possible to create new instances of <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+recursively. This is often used in <code class="literal">PyGTK</code> applications
+when showing modal dialog boxes. Note that event sources are associated with
+a particular <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>,
+and will be checked and dispatched for all main loops associated with that
+<a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>.</p><p><code class="literal">PyGTK</code> contains wrappers of some of these
+functions, e.g. the <PYGTKDOCLINK HREF="function-gtk--main"><code class="function">gtk.main</code>()</PYGTKDOCLINK>, <PYGTKDOCLINK HREF="function-gtk--main-quit"><code class="function">gtk.main_quit</code>()</PYGTKDOCLINK>
+and <PYGTKDOCLINK HREF="function-gtk--events-pending"><code class="function">gtk.events_pending</code>()</PYGTKDOCLINK>
+functions.</p></div><div class="refsect1" title="Constructor"><a name="constructor-glibmainloop"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">glib.MainLoop</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>context</code></em></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>is_running</code></em></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td><td>a <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+ or <code class="literal">None</code> to use the default
+ context.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>is_running</code></em> :</span></p></td><td>if <code class="literal">TRUE</code> indicates that the
+ loop is running. This is not very important since calling the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+ method will set this to <code class="literal">TRUE</code>
+ anyway.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+ object.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+object.</p></div><div class="refsect1" title="Methods"><a name="id2965766"></a><h2>Methods</h2><div class="refsect2" title="glib.MainLoop.get_context"><a name="method-glibmainloop--get-context"></a><h3>glib.MainLoop.get_context</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_context</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+ the mainloop is associated with</td></tr></tbody></table><p>The <code class="methodname">get_context</code>() method returns the
+<a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+that the mainloop was created with.</p></div><div class="refsect2" title="glib.MainLoop.is_running"><a name="method-glibmainloop--is-running"></a><h3>glib.MainLoop.is_running</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_running</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the mainloop is
+ currently being run.</td></tr></tbody></table><p>The <code class="methodname">is_running</code>() method checks to see
+if the mainloop is currently being run via the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method.</p></div><div class="refsect2" title="glib.MainLoop.quit"><a name="method-glibmainloop--quit"></a><h3>glib.MainLoop.quit</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">quit</span>()</code></pre><p>The <code class="methodname">quit</code>() method stops the mainloop
+from running. Any subsequent calls to the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method will return immediately.</p></div><div class="refsect2" title="glib.MainLoop.run"><a name="method-glibmainloop--run"></a><h3>glib.MainLoop.run</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">run</span>()</code></pre><p>The <code class="methodname">run</code>() method runs a mainloop until
+the <a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit"><code class="methodname">quit</code>()</a>
+method is called. If this is called for the thread of the loop's <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>,
+it will process events from the loop, otherwise it will simply wait.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-glibmaincontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glib-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib.MainContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobject.html b/docs/html/class-gobject.html
new file mode 100644
index 0000000..4c1e07c
--- /dev/null
+++ b/docs/html/class-gobject.html
@@ -0,0 +1,176 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GObject</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="next" href="class-gobjectgboxed.html" title="gobject.GBoxed"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GObject</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GObject"><a name="class-gobject"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gobject.GObject</span></h2><p>gobject.GObject — the base class</p></div><div class="refsect1" title="Synopsis"><a name="id2976775"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GObject</span></span>:
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property">get_property</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-properties" title="gobject.GObject.get_properties">get_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>first_property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property">set_property</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-properties" title="gobject.GObject.set_properties">set_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span><span class="initializer">=value</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--freeze-notify" title="gobject.GObject.freeze_notify">freeze_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--notify" title="gobject.GObject.notify">notify</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--thaw-notify" title="gobject.GObject.thaw_notify">thaw_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-data" title="gobject.GObject.get_data">get_data</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-data" title="gobject.GObject.set_data">set_data</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>data</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect">connect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-after" title="gobject.GObject.connect_after">connect_after</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-object" title="gobject.GObject.connect_object">connect_object</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-object-after" title="gobject.GObject.connect_object_after">connect_object_after</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--disconnect" title="gobject.GObject.disconnect">disconnect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-disconnect" title="gobject.GObject.handler_disconnect">handler_disconnect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-is-connected" title="gobject.GObject.handler_is_connected">handler_is_connected</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-block" title="gobject.GObject.handler_block">handler_block</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-unblock" title="gobject.GObject.handler_unblock">handler_unblock</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-block-by-func" title="gobject.GObject.handler_block_by_func">handler_block_by_func</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-unblock-by-func" title="gobject.GObject.handler_unblock_by_func">handler_unblock_by_func</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit">emit</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission">stop_emission</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--emit-stop-by-name" title="gobject.GObject.emit_stop_by_name">emit_stop_by_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--chain" title="gobject.GObject.chain">chain</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2918029"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+</pre></div><div class="refsect1" title="Attributes"><a name="id2919060"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"props"</td><td valign="top">Read/Write</td><td valign="top">
+ <p>This attribute gives full access to GObject properties as
+ simple attributes. It can be used to iterate over all the object
+ properties, and can be used both on class or instance objects.</p>
+ <p>Examples:</p>
+ <pre class="programlisting">
+button = Button()
+button_label = button.props.label
+button.props.label = 'Click on this fancy button'
+for pspec in button.props:
+ print pspec
+ print button.get_property(pspec.name)
+label_pspec = Button.props.label
+button_label = button.get_property(label_pspec.name)
+ </pre>
+ </td></tr><tr valign="top"><td valign="top">"__doc__"</td><td valign="top">Read</td><td valign="top">The documentation for the object type. Uses
+ "__gdoc__" if no specific documentation set.</td></tr><tr valign="top"><td valign="top">"__gdoc__"</td><td valign="top">Read</td><td valign="top">The generated documentation for the underlying GObject
+ type.</td></tr><tr valign="top"><td valign="top">"__gtype__"</td><td valign="top">Read</td><td valign="top">The underlying GObject type.</td></tr><tr valign="top"><td valign="top">"__grefcount__"</td><td valign="top">Read</td><td valign="top">The reference count for the underlying GObject.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gobject.GObject Signal Prototypes"><a name="signal-prototypes-gobject"></a><h2>gobject.GObject Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gobject.html#signal-gobject--notify" title='The GObject "notify" Signal'>notify</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>property_spec</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id2915885"></a><h2>Description</h2><p>The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ class is the base class providing the common attributes and methods for
+ the PyGTK classes. The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ class is not a user interface widget class.</p><p>The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+ class provides the signal management methods, the object property access
+ methods and the object data management methods.</p></div><div class="refsect1" title="Methods"><a name="id2915857"></a><h2>Methods</h2><div class="refsect2" title="gobject.GObject.get_property"><a name="method-gobject--get-property"></a><h3>gobject.GObject.get_property</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_property</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing the property name for the
+GObject</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Python object containing the value of the
+property</td></tr></tbody></table><p>The <code class="methodname">get_property</code>() method returns the
+value of the property specified by <em class="parameter"><code>property_name</code></em> or
+None if there is no value associated with the property.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class.</p></div><div class="refsect2" title="gobject.GObject.get_properties"><a name="method-gobject--get-properties"></a><h3>gobject.GObject.get_properties</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>first_property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td><td>a string containing the first property name for the
+GObject</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional property names
+</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the property values
+requested</td></tr></tbody></table><p>The <code class="methodname">get_properties</code>() method returns a tuple containing
+the values of the properties requested, or
+None if there is no value associated with the property.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class.</p></div><div class="refsect2" title="gobject.GObject.set_property"><a name="method-gobject--set-property"></a><h3>gobject.GObject.set_property</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_property</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing the property
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a Python object containing the property value
+to be set</td></tr></tbody></table><p>The <code class="methodname">set_property</code>() method sets the
+property specified by <em class="parameter"><code>property_name</code></em> to the specified
+<em class="parameter"><code>value</code></em>.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</p></div><div class="refsect2" title="gobject.GObject.set_properties"><a name="method-gobject--set-properties"></a><h3>gobject.GObject.set_properties</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span><span class="initializer">=value</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>the property name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a Python object containing the property value
+to be set</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional property name and value
+kwargs</td></tr></tbody></table><p>The <code class="methodname">set_properties</code>() method sets the
+property specified by <em class="parameter"><code>property_name</code></em> to the specified
+<em class="parameter"><code>value</code></em>, followed by pairs of property name
+and value as keyword arguments.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</p></div><div class="refsect2" title="gobject.GObject.freeze_notify"><a name="method-gobject--freeze-notify"></a><h3>gobject.GObject.freeze_notify</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">freeze_notify</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">freeze_notify</code>() method freezes the
+object's property-changed notification queue so that "notify" signals are
+blocked until the <code class="methodname">thaw_notify</code>() method is
+called.</p></div><div class="refsect2" title="gobject.GObject.notify"><a name="method-gobject--notify"></a><h3>gobject.GObject.notify</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">notify</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing a property
+name</td></tr></tbody></table><p>The <code class="methodname">notify</code>() method causes the "notify"
+signal for the property specified by <em class="parameter"><code>property_name</code></em> to
+be emitted.</p></div><div class="refsect2" title="gobject.GObject.thaw_notify"><a name="method-gobject--thaw-notify"></a><h3>gobject.GObject.thaw_notify</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">thaw_notify</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">thaw_notify</code>() method thaws the
+object's property-changed notification queue so that "notify" signals are
+emitted.</p></div><div class="refsect2" title="gobject.GObject.get_data"><a name="method-gobject--get-data"></a><h3>gobject.GObject.get_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_data</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td><td>a string used as the key</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Python object containing the associated
+data</td></tr></tbody></table><p>The <code class="methodname">get_data</code>() method returns the
+Python object associated with the specified <em class="parameter"><code>key</code></em> or
+None if there is no data associated with the <em class="parameter"><code>key</code></em> or
+if there is no key associated with the object.</p></div><div class="refsect2" title="gobject.GObject.set_data"><a name="method-gobject--set-data"></a><h3>gobject.GObject.set_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_data</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>data</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td><td>a string used as a key</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>a Python object that is the value to be
+associated with the key</td></tr></tbody></table><p>The <code class="methodname">set_data</code>() method associates the
+specified Python object (<em class="parameter"><code>data</code></em>) with
+<em class="parameter"><code>key</code></em>.</p></div><div class="refsect2" title="gobject.GObject.connect"><a name="method-gobject--connect"></a><h3>gobject.GObject.connect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional optional
+parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer identifier</td></tr></tbody></table><p>The <code class="methodname">connect</code>() method adds a function or
+method (<em class="parameter"><code>handler</code></em>)to the end of the list of signal
+handlers for the named <em class="parameter"><code>detailed_signal</code></em> but before the
+default class signal handler. An optional set of parameters may be specified
+after the <em class="parameter"><code>handler</code></em> parameter. These will all be passed
+to the signal handler when invoked.</p><p>For example if a function handler was connected to a signal
+using:</p><pre class="programlisting">
+ handler_id = object.connect("signal_name", handler, arg1, arg2, arg3)
+</pre><p>The handler should be defined as:</p><pre class="programlisting">
+ def handler(object, arg1, arg2, arg3):
+</pre><p>A method handler connected to a signal using:</p><pre class="programlisting">
+ handler_id = object.connect("signal_name", self.handler, arg1, arg2)
+</pre><p>requires an additional argument when defined:</p><pre class="programlisting">
+ def handler(self, object, arg1, arg2)
+</pre><p>A <code class="exceptionname">TypeError</code> exception is raised
+if <em class="parameter"><code>detailed_signal</code></em> identifies a signal name that is
+not associated with the object.</p></div><div class="refsect2" title="gobject.GObject.connect_after"><a name="method-gobject--connect-after"></a><h3>gobject.GObject.connect_after</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_after</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional optional
+parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">connect_after</code>() method is similar
+to the <code class="methodname">connect</code>() method except that the
+<em class="parameter"><code>handler</code></em> is added to the signal handler list after the
+default class signal handler. Otherwise the details of
+<em class="parameter"><code>handler</code></em> definition and invocation are the
+same.</p></div><div class="refsect2" title="gobject.GObject.connect_object"><a name="method-gobject--connect-object"></a><h3>gobject.GObject.connect_object</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_object</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>a GObject</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">connect_object</code>() method is the same
+as the <code class="methodname">connect</code>() method except that the
+<em class="parameter"><code>handler</code></em> is invoked with the specified
+<em class="parameter"><code>gobject</code></em> in place of the object invoking the
+<code class="methodname">connect_object</code>() method. For example, a call with a
+function handler:</p><pre class="programlisting">
+ handler_id = object("signal_name", handler, gobject)
+</pre><p>will cause the <em class="parameter"><code>handler</code></em> to be invoked
+as:</p><pre class="programlisting">
+ handler(gobject)
+</pre><p>Likewise a method handler will be invoked as:</p><pre class="programlisting">
+ self.handler(gobject)
+</pre><p>This can be helpful in invoking PyGTK widget methods that
+require no arguments except the widget itself (e.g.
+<code class="methodname">widget.destroy</code>()) by using the class method as the
+handler. For example, a Button "clicked" signal can be set up to invoke the
+Window <code class="methodname">destroy</code>() method as:</p><pre class="programlisting">
+ handler_id = button.connect_object("clicked", Window.destroy, window)
+</pre><p>When the button is clicked the handler is invoked as:</p><pre class="programlisting">
+ Window.destroy(window)
+</pre><p>which is the same as:</p><pre class="programlisting">
+ window.destroy()
+</pre><p>Additional arguments may be passed to the handler as with the
+<code class="methodname">connect</code>() method handler invocations.</p></div><div class="refsect2" title="gobject.GObject.connect_object_after"><a name="method-gobject--connect-object-after"></a><h3>gobject.GObject.connect_object_after</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_object_after</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>a GObject</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">connect_object_after</code>() method is
+similar to the <code class="methodname">connect_object</code>() method except that
+the <em class="parameter"><code>handler</code></em> is added to the signal handler list after
+the default class signal handler. Otherwise the details of
+<em class="parameter"><code>handler</code></em> definition and invocation are the
+same.</p></div><div class="refsect2" title="gobject.GObject.disconnect"><a name="method-gobject--disconnect"></a><h3>gobject.GObject.disconnect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">disconnect</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">disconnect</code>() method removes the
+signal handler with the specified <em class="parameter"><code>handler_id</code></em> from the
+list of signal handlers for the object.</p></div><div class="refsect2" title="gobject.GObject.handler_disconnect"><a name="method-gobject--handler-disconnect"></a><h3>gobject.GObject.handler_disconnect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_disconnect</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">handler_disconnect</code>() method removes
+the signal handler with the specified <em class="parameter"><code>handler_id</code></em> from
+the list of signal handlers for the object.</p></div><div class="refsect2" title="gobject.GObject.handler_is_connected"><a name="method-gobject--handler-is-connected"></a><h3>gobject.GObject.handler_is_connected</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_is_connected</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the signal handler
+is connected to the object.</td></tr></tbody></table><p>The <code class="methodname">handler_is_connected</code>() method
+returns <code class="literal">TRUE</code> if the signal handler with the specified
+<em class="parameter"><code>handler_id</code></em> is connected to the object.</p></div><div class="refsect2" title="gobject.GObject.handler_block"><a name="method-gobject--handler-block"></a><h3>gobject.GObject.handler_block</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_block</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">handler_block</code>() method blocks the
+signal handler with the specified <em class="parameter"><code>handler_id</code></em> from
+being invoked until it is unblocked.</p></div><div class="refsect2" title="gobject.GObject.handler_unblock"><a name="method-gobject--handler-unblock"></a><h3>gobject.GObject.handler_unblock</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_unblock</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table></div><div class="refsect2" title="gobject.GObject.handler_block_by_func"><a name="method-gobject--handler-block-by-func"></a><h3>gobject.GObject.handler_block_by_func</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_block_by_func</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callable</code></em> :</span></p></td><td>a callable python object</td></tr></tbody></table><p>The <code class="methodname">handler_block_by_func</code>() method blocks the
+all signal handler connected to a specific <em class="parameter"><code>callable</code></em> from
+being invoked until the callable is unblocked.</p></div><div class="refsect2" title="gobject.GObject.handler_unblock_by_func"><a name="method-gobject--handler-unblock-by-func"></a><h3>gobject.GObject.handler_unblock_by_func</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_unblock_by_func</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callable</code></em> :</span></p></td><td>a callable python object</td></tr></tbody></table><p>The <code class="methodname">handler_unblock_by_func</code>() method unblocks
+all signal handler connected to a specified <em class="parameter"><code>callable</code></em>
+thereby allowing it to be invoked when the associated signals are
+emitted.</p></div><div class="refsect2" title="gobject.GObject.emit"><a name="method-gobject--emit"></a><h3>gobject.GObject.emit</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">emit</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a PyObject*</td></tr></tbody></table><p>The <code class="methodname">emit</code>() method causes the object to
+emit the signal specified by <em class="parameter"><code>detailed_signal</code></em>. The
+additional parameters must match the number and type of the required signal
+handler parameters. In most cases no additional parameters are needed. for
+example:</p><pre class="programlisting">
+ button.emit("clicked")
+</pre><p>is all that is required to emit the "clicked" signal for a
+button. The most common case requiring additional parameters occurs when
+emitting an event signal; for example:</p><pre class="programlisting">
+ button.emit("button_press_event", event)
+</pre></div><div class="refsect2" title="gobject.GObject.stop_emission"><a name="method-gobject--stop-emission"></a><h3>gobject.GObject.stop_emission</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">stop_emission</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr></tbody></table><p>The <code class="methodname">stop_emission</code>() method stops the
+current emission of the signal specified by
+<em class="parameter"><code>detailed_signal</code></em>. Any signal handlers in the list
+still to be run will not be invoked.</p></div><div class="refsect2" title="gobject.GObject.emit_stop_by_name"><a name="method-gobject--emit-stop-by-name"></a><h3>gobject.GObject.emit_stop_by_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">emit_stop_by_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr></tbody></table><p>The <code class="methodname">emit_stop_by_name</code>() method stops
+the current emission of the signal specified by
+<em class="parameter"><code>detailed_signal</code></em>. Any signal handlers in the list
+still to be run will not be invoked.</p></div><div class="refsect2" title="gobject.GObject.chain"><a name="method-gobject--chain"></a><h3>gobject.GObject.chain</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">chain</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Python object</td></tr></tbody></table><p>The chain() method does something.</p></div></div><div class="refsect1" title="Signals"><a name="id2941077"></a><h2>Signals</h2><div class="refsect2" title='The GObject "notify" Signal'><a name="signal-gobject--notify"></a><h3>The GObject "notify" Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>property_spec</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>the gobject that received the
+signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>property_spec</code></em> :</span></p></td><td>the <PYGTKDOCLINK HREF="class-gobjectgparamspec"><code class="classname">gobject.GParamSpec</code></PYGTKDOCLINK> of the property that was
+changed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
+any)</td></tr></tbody></table><p>The "notify" signal is emitted on a gobject when one of its
+properties has been changed. Note that getting this signal doesn't guarantee
+that the value of the property has actually changed, it may also be emitted
+when the setter for the property is called to reinstate the previous
+value. For example to be notified of the change of the title of a <PYGTKDOCLINK HREF="class-gtkwindow"><code class="classname">gtk.Window</code></PYGTKDOCLINK> you could
+connect to the "notify" signal similar to:</p><pre class="programlisting">
+ window.connect("notify::title", callback)
+</pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGObject Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GBoxed</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectgboxed.html b/docs/html/class-gobjectgboxed.html
new file mode 100644
index 0000000..ead5e11
--- /dev/null
+++ b/docs/html/class-gobjectgboxed.html
@@ -0,0 +1,9 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GBoxed</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobject.html" title="gobject.GObject"><link rel="next" href="class-gobjectgpointer.html" title="gobject.GPointer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GBoxed</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GBoxed"><a name="class-gobjectgboxed"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GBoxed</h2><p>gobject.GBoxed — an object containing an opaque chunk of data</p></div><div class="refsect1" title="Synopsis"><a name="id2921885"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GBoxed</span></span>:
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobjectgboxed.html#method-gobjectgboxed--copy" title="gobject.GBoxed.copy">copy</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2959767"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed">gobject.GBoxed</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2946334"></a><h2>Description</h2><p><a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
+is an abstract base class that encapsulates an opaque chunk of data to
+provide an object-oriented interface and a type that is registered with the
+<code class="literal">GLIB</code> type system. A boxed type is registered with
+functions that provide for the copying and freeing of the underlying data
+structure - this allows PyGTK to encapsulate these as Python objects.</p></div><div class="refsect1" title="Methods"><a name="id2894420"></a><h2>Methods</h2><div class="refsect2" title="gobject.GBoxed.copy"><a name="method-gobjectgboxed--copy"></a><h3>gobject.GBoxed.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a copy of the <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
+ object</td></tr></tbody></table><p>The <code class="methodname">copy</code>() method makes and returns a copy of the boxed object.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GObject </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GPointer</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectginterface.html b/docs/html/class-gobjectginterface.html
new file mode 100644
index 0000000..b15ef7e
--- /dev/null
+++ b/docs/html/class-gobjectginterface.html
@@ -0,0 +1,4 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GInterface</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgpointer.html" title="gobject.GPointer"><link rel="next" href="gobject-functions.html" title="gobject Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GInterface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GInterface"><a name="class-gobjectginterface"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GInterface</h2><p>gobject.GInterface — an object representing a GInterface</p></div><div class="refsect1" title="Synopsis"><a name="id2932099"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GInterface</span></span>:
+</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2906935"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2862975"></a><h2>Description</h2><p><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface"><code class="classname">gobject.GInterface</code></a>
+is an abstract base class that encapsulates a GInterface.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GPointer </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectgpointer.html b/docs/html/class-gobjectgpointer.html
new file mode 100644
index 0000000..4b86cd9
--- /dev/null
+++ b/docs/html/class-gobjectgpointer.html
@@ -0,0 +1,8 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GPointer</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgboxed.html" title="gobject.GBoxed"><link rel="next" href="class-gobjectginterface.html" title="gobject.GInterface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GPointer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgboxed.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectginterface.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GPointer"><a name="class-gobjectgpointer"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GPointer</h2><p>gobject.GPointer — an object containing a completely opaque chunk of
+ data</p></div><div class="refsect1" title="Synopsis"><a name="id2972582"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GPointer</span></span>:
+</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2966821"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectgpointer.html" title="gobject.GPointer">gobject.GPointer</a>
+</pre></div><div class="refsect1" title="Description"><a name="id2912502"></a><h2>Description</h2><p><a class="link" href="class-gobjectgpointer.html" title="gobject.GPointer"><code class="classname">gobject.GPointer</code></a>
+is an abstract base class that encapsulates an opaque chunk of data and
+registers it with the <code class="literal">GLIB</code> type system. A pointer type
+has no methods and generic ways of copying and freeing the data. It
+shouldn't be used in PyGTK.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectgboxed.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectginterface.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GBoxed </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GInterface</td></tr></table></div></body></html>
diff --git a/docs/html/gio-class-reference.html b/docs/html/gio-class-reference.html
new file mode 100644
index 0000000..a7a8bb8
--- /dev/null
+++ b/docs/html/gio-class-reference.html
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGio Class Reference</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="gobject-constants.html" title="gobject Constants"><link rel="next" href="class-gioappinfo.html" title="gio.AppInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGio Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-gioappinfo.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGio Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="gio-class-reference"></a>PyGio Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-gioappinfo.html">gio.AppInfo</a></span><span class="refpurpose"> — Information about an installed application and methods to launch it (with file arguments).</span></dt><dt><span class="refentrytitle"><a href="class-gioapplaunchcontext.html">gio.AppLaunchContext</a></span><span class="refpurpose"> — Application launch context.</span></dt><dt><span class="refentrytitle"><a href="class-gioasyncresult.html">gio.AsyncResult</a></span><span class="refpurpose"> — Asynchronous Function Results.</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedinputstream.html">gio.BufferedInputStream</a></span><span class="refpurpose"> — Buffered Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedoutputstream.html">gio.BufferedOutputStream</a></span><span class="refpurpose"> — Buffered Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giocancellable.html">gio.Cancellable</a></span><span class="refpurpose"> — Thread-safe Operation Cancellation Stack.</span></dt><dt><span class="refentrytitle"><a href="class-giodatainputstream.html">gio.DataInputStream</a></span><span class="refpurpose"> — Data Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodataoutputstream.html">gio.DataOutputStream</a></span><span class="refpurpose"> — Data Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodrive.html">gio.Drive</a></span><span class="refpurpose"> — Virtual File System drive management.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblem.html">gio.Emblem</a></span><span class="refpurpose"> — An object for emblems.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblemedicon.html">gio.EmblemedIcon</a></span><span class="refpurpose"> — Icon with emblems.</span></dt><dt><span class="refentrytitle"><a href="class-giofile.html">gio.File</a></span><span class="refpurpose"> — File and Directory Handling.</span></dt><dt><span class="refentrytitle"><a href="class-giofileattributeinfo.html">gio.FileAttributeInfo</a></span><span class="refpurpose"> — Information about a specific attribute.</span></dt><dt><span class="refentrytitle"><a href="class-giofileenumerator.html">gio.FileEnumerator</a></span><span class="refpurpose"> — Enumerated Files Routines.</span></dt><dt><span class="refentrytitle"><a href="class-giofileicon.html">gio.FileIcon</a></span><span class="refpurpose"> — Icons pointing to an image file.</span></dt><dt><span class="refentrytitle"><a href="class-giofileinfo.html">gio.FileInfo</a></span><span class="refpurpose"> — File Information and Attributes</span></dt><dt><span class="refentrytitle"><a href="class-giofileinputstream.html">gio.FileInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilemonitor.html">gio.FileMonitor</a></span><span class="refpurpose"> — File Monitor</span></dt><dt><span class="refentrytitle"><a href="class-giofileoutputstream.html">gio.FileOutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilterinputstream.html">gio.FilterInputStream</a></span><span class="refpurpose"> — Filter Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giofilteroutputstream.html">gio.FilterOutputStream</a></span><span class="refpurpose"> — Filter Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-gioicon.html">gio.Icon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-gioinputstream.html">gio.InputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioloadableicon.html">gio.LoadableIcon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryinputstream.html">gio.MemoryInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryoutputstream.html">gio.MemoryOutputStream</a></span><span class="refpurpose"> — Streaming output operations on memory chunks</span></dt><dt><span class="refentrytitle"><a href="class-giomount.html">gio.Mount</a></span><span class="refpurpose"> — Mount management</span></dt><dt><span class="refentrytitle"><a href="class-giomountoperation.html">gio.MountOperation</a></span><span class="refpurpose"> — Authentication methods for mountable locations.</span></dt><dt><span class="refentrytitle"><a href="class-giooutputstream.html">gio.OutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioseekable.html">gio.Seekable</a></span><span class="refpurpose"> — Stream seeking interface.</span></dt><dt><span class="refentrytitle"><a href="class-giosimpleasyncresult.html">gio.SimpleAsyncResult</a></span><span class="refpurpose"> — Simple asynchronous results implementation.</span></dt><dt><span class="refentrytitle"><a href="class-giothemedicon.html">gio.ThemedIcon</a></span><span class="refpurpose"> — Icon theming support.</span></dt><dt><span class="refentrytitle"><a href="class-giovolume.html">gio.Volume</a></span><span class="refpurpose"> — Volume management.</span></dt><dt><span class="refentrytitle"><a href="class-giovolumemonitor.html">gio.VolumeMonitor</a></span><span class="refpurpose"> — Volume Monitor.</span></dt><dt><span class="refentrytitle"><a href="gio-functions.html">gio Functions</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="gio-constants.html">gio Constants</a></span><span class="refpurpose"> — the built-in constants of the gio module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-gioappinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AppInfo</td></tr></table></div></body></html>
diff --git a/docs/html/gio-constants.html b/docs/html/gio-constants.html
new file mode 100644
index 0000000..b1c8bb2
--- /dev/null
+++ b/docs/html/gio-constants.html
@@ -0,0 +1,414 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio Constants</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="gio-functions.html" title="gio Functions"><link rel="next" href="giounix-class-reference.html" title="PyGio Unix Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-functions.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="giounix-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio Constants"><a name="gio-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio Constants</h2><p>gio Constants — the built-in constants of the gio module</p></div><div class="refsect1" title="Synopsis"><a name="id3081545"></a><h2>Synopsis</h2><pre class="programlisting">
+<a class="xref" href="gio-constants.html#gio-app-info-constants" title="Gio AppInfo Create Flags Constants">Gio AppInfo Create Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-ask-password-flags-constants" title="Gio Ask Password Flags Constants">Gio Ask Password Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>
+<a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a>
+<a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
+<a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-attribute-constants" title="Gio File Attribute Constants">Gio File Attribute Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-attribute-flags-constants" title="Gio File Attribute Flags Constants">Gio File Attribute Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
+<a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
+<a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
+</pre></div><div class="refsect1" title="Description"><a name="gio-constants-description"></a><h2>Description</h2><div class="refsect2" title="Gio Ask Password Flags Constants"><a name="gio-ask-password-flags-constants"></a><h3>Gio Ask Password Flags Constants</h3><p>
+ Flags that are used to request specific information from the user, or to
+ notify the user of their choices in an authentication situation.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED</code></span></p></td><td>operation supports anonymous users.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_DOMAIN</code></span></p></td><td>operation requires a domain.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_PASSWORD</code></span></p></td><td>operation requires a password.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_USERNAME</code></span></p></td><td>operation requires a username.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_SAVING_SUPPORTED</code></span></p></td><td>operation supports saving settings.</td></tr></tbody></table></div><div class="refsect2" title="Gio AppInfo Create Flags Constants"><a name="gio-app-info-constants"></a><h3>Gio AppInfo Create Flags Constants</h3><p>
+ Flags used when creating a <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_NONE</code></span></p></td><td>No flags.</td></tr><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_NEEDS_TERMINAL</code></span></p></td><td>Application opens in a terminal window. </td></tr><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_SUPPORTS_URIS</code></span></p></td><td>Application supports URI arguments. </td></tr></tbody></table></div><div class="refsect2" title="Gio Data Stream Byte Order Constants"><a name="gio-data-stream-byte-order-constants"></a><h3>Gio Data Stream Byte Order Constants</h3><p>
+ Used to ensure proper endianness of streaming data sources across various machine architectures.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</code></span></p></td><td>Selects Big Endian byte order.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_HOST_ENDIAN</code></span></p></td><td>Selects endianness based on host machine's architecture.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN</code></span></p></td><td>Selects Little Endian byte order.</td></tr></tbody></table></div><div class="refsect2" title="Gio Data Stream Newline Type Constants"><a name="gio-data-stream-newline-type-constants"></a><h3>Gio Data Stream Newline Type Constants</h3><p>
+ Used when checking for or setting the line endings for a given file.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_LF</code></span></p></td><td>Selects "LF" line endings, common on most modern UNIX platforms.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_CR</code></span></p></td><td>Selects "CR" line endings.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_CR_LF</code></span></p></td><td>Selects "CR, LF" line ending, common on Microsoft Windows.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_ANY</code></span></p></td><td>Automatically try to handle any line ending type.</td></tr></tbody></table></div><div class="refsect2" title="Gio Emblem Origin Constants"><a name="gio-emblem-origin-constants"></a><h3>Gio Emblem Origin Constants</h3><p>
+ GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_DEVICE</code></span></p></td><td>Embleme adds device-specific information.</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_LIVEMETADATA</code></span></p></td><td>Emblem depicts live metadata, such as "readonly".</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_TAG</code></span></p></td><td>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future).</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_UNKNOWN</code></span></p></td><td>Emblem of unknown origin.</td></tr></tbody></table></div><div class="refsect2" title="Gio Error Constants"><a name="gio-error-constants"></a><h3>Gio Error Constants</h3><p>
+ GIOError Error codes returned by GIO functions.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.ERROR_ALREADY_MOUNTED</code></span></p></td><td>File is already mounted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_BUSY</code></span></p></td><td>File is busy.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CANCELLED</code></span></p></td><td>Operation was cancelled. See
+ <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CANT_CREATE_BACKUP</code></span></p></td><td>Backup couldn't be created.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CLOSED</code></span></p></td><td>File was closed.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_EXISTS</code></span></p></td><td>File already exists error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FAILED</code></span></p></td><td>Generic error condition for when any operation fails.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FAILED_HANDLED</code></span></p></td><td>Operation failed and a helper program has already interacted with
+ the user. Do not display any error dialog. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FILENAME_TOO_LONG</code></span></p></td><td>Filename is too many characters.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_HOST_NOT_FOUND</code></span></p></td><td>Host couldn't be found (remote operations).</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_INVALID_ARGUMENT</code></span></p></td><td>Invalid argument.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_INVALID_FILENAME</code></span></p></td><td>Filename is invalid or contains invalid characters.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_IS_DIRECTORY</code></span></p></td><td>File is a directory error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_DIRECTORY</code></span></p></td><td>File is not a directory.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_EMPTY</code></span></p></td><td>File is a directory that isn't empty.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_FOUND</code></span></p></td><td>File not found error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_MOUNTABLE_FILE</code></span></p></td><td>File cannot be mounted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_MOUNTED</code></span></p></td><td>File isn't mounted. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_REGULAR_FILE</code></span></p></td><td>File is not a regular file.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_SUPPORTED</code></span></p></td><td>Operation not supported for the current backend.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_SYMBOLIC_LINK</code></span></p></td><td>File is not a symbolic link.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NO_SPACE</code></span></p></td><td>No space left on drive. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_PENDING</code></span></p></td><td>Operations are still pending.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_PERMISSION_DENIED</code></span></p></td><td>Permission denied.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_READ_ONLY</code></span></p></td><td>File is read only. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TIMED_OUT</code></span></p></td><td>Operation timed out. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TOO_MANY_LINKS</code></span></p></td><td>File contains too many symbolic links. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TOO_MANY_OPEN_FILES</code></span></p></td><td>The current process has too many files open and can't open any
+ more. Duplicate descriptors do count toward this limit. Since 2.20</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_BLOCK</code></span></p></td><td>Operation would block.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_MERGE</code></span></p></td><td>Operation would merge files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_RECURSE</code></span></p></td><td>Operation would be recursive.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WRONG_ETAG</code></span></p></td><td>File's Entity Tag was incorrect. </td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Constants"><a name="gio-file-attribute-constants"></a><h3>Gio File Attribute Constants</h3><p>
+ The file attributes.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_TYPE</code></span></p></td><td>
+ "standard::type" A key in the "standard" namespace for storing file types. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a
+ <a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</code></span></p></td><td>
+ "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP</code></span></p></td><td>
+ "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</code></span></p></td><td>
+ "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink.
+ Typically the actual type is something else, if we followed the symlink to get the type. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</code></span></p></td><td>
+ "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_NAME</code></span></p></td><td>
+ "standard::name" A key in the "standard" namespace for getting the name of the file.
+ The name is the on-disk filename which may not be in any known encoding,
+ and can thus not be generally displayed as is. Use
+ gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user
+ interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</code></span></p></td><td>
+ "standard::display-name" A key in the "standard" namespace for getting the display
+ name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed
+ in the UI. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME</code></span></p></td><td>
+ "standard::edit-name" A key in the "standard" namespace for edit name of the file.
+ An edit name is similar to the display name, but it is meant to be used when you want
+ to rename the file in the UI. The display name might contain information you don't
+ want in the new filename (such as "(invalid unicode)" if the filename was in an
+ invalid encoding). Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME</code></span></p></td><td>
+ "standard::copy-name" A key in the "standard" namespace for getting the copy
+ name of the file. The copy name is an optional version of the name. If available
+ it's always in UTF8, and corresponds directly to the original filename (only transcoded
+ to UTF8). This is useful if you want to copy the file to another filesystem that might
+ have a different encoding. If the filename is not a valid string in the encoding selected
+ for the filesystem it is in then the copy name will not be set. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_ICON</code></span></p></td><td>
+ "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</code></span></p></td><td>
+ "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</code></span></p></td><td>
+ "standard::fast-content-type" A key in the "standard" namespace for getting the fast
+ content type. The fast content type isn't as reliable as the regular one, as it
+ only uses the filename to guess it, but it is faster to calculate than the regular
+ content type. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SIZE</code></span></p></td><td>
+ "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</code></span></p></td><td>
+ "standard::symlink-target" A key in the "standard" namespace for getting the target URI
+ for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER</code></span></p></td><td>
+ "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this
+ key to set the order files are displayed. Files with smaller sort order should be sorted first,
+ and files without sort order as if sort order was zero.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ETAG_VALUE</code></span></p></td><td>
+ "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ID_FILE</code></span></p></td><td>
+ "id::file" A key in the "id" namespace for getting a file identifier. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files,
+ to avoid recursive directory scanning.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ID_FILESYSTEM</code></span></p></td><td>
+ "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and
+ drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_READ</code></span></p></td><td>
+ "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+ if the user is able to read the file.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE</code></span></p></td><td>
+ "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+ if the user is able to write to the file.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</code></span></p></td><td>
+ "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+ if the user is able to execute the file.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE</code></span></p></td><td>
+ "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+ if the user is able to delete the file.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH</code></span></p></td><td>
+ "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+ if the user is able to move the file to the trash.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME</code></span></p></td><td>
+ "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+ if the user is able to rename the file.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</code></span></p></td><td>
+ "mountable::can-mount" A key in the "mountable" namespace for checking if
+ a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</code></span></p></td><td>
+ "mountable::can-unmount" A key in the "mountable" namespace for checking if a file
+ (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</code></span></p></td><td>
+ "mountable::can-eject" A key in the "mountable" namespace for checking if a file
+ (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</code></span></p></td><td>
+ "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</code></span></p></td><td>
+ "mountable::hal-udi" A key in the "mountable" namespace for getting the
+ HAL UDI for the mountable file. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_MODIFIED</code></span></p></td><td>
+ "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC</code></span></p></td><td>
+ "time::modified-usec" A key in the "time" namespace for getting the miliseconds
+ of the time the file was last modified. This should be used in conjunction
+ with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_ACCESS</code></span></p></td><td>
+ "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC</code></span></p></td><td>
+ "time::access-usec" A key in the "time" namespace for getting the microseconds of
+ the time the file was last accessed. This should be used in conjunction
+ with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CHANGED</code></span></p></td><td>
+ "time::changed" A key in the "time" namespace for getting the time the
+ file was last changed. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed.
+ This corresponds to the traditional UNIX ctime.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC</code></span></p></td><td>
+ "time::changed-usec" A key in the "time" namespace for getting the microseconds
+ of the time the file was last changed. This should be used in conjunction
+ with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CREATED</code></span></p></td><td>
+ "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created.
+ This corresponds to the NTFS ctime.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CREATED_USEC</code></span></p></td><td>
+ "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the
+ file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_DEVICE</code></span></p></td><td>
+ "unix::device" A key in the "unix" namespace for getting the device id of the device the file
+ is located on (see stat() documentation). This attribute is only available
+ for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_INODE</code></span></p></td><td>
+ "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only
+ available for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_MODE</code></span></p></td><td>
+ "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g.
+ whether the file is a regular file, symlink, etc). See lstat() documentation.
+ This attribute is only available for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_NLINK</code></span></p></td><td>
+ "unix::nlink" A key in the "unix" namespace for getting the number of hard links
+ for a file. See lstat() documentation. This attribute is only available for UNIX
+ file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_UID</code></span></p></td><td>
+ "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute
+ is only available for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_GID</code></span></p></td><td>
+ "unix::gid" A key in the "unix" namespace for getting the group ID for the file.
+ This attribute is only available for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_RDEV</code></span></p></td><td>
+ "unix::rdev" A key in the "unix" namespace for getting the device ID for the file
+ (if it is a special file). See lstat() documentation. This attribute is only available
+ for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</code></span></p></td><td>
+ "unix::block-size" A key in the "unix" namespace for getting the block size for
+ the file system. This attribute is only available for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_BLOCKS</code></span></p></td><td>
+ "unix::blocks" A key in the "unix" namespace for getting the number of blocks allocated
+ for the file. This attribute is only available for UNIX file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</code></span></p></td><td>
+ "unix::is-mountpoint" A key in the "unix" namespace for checking if the file represents
+ a UNIX mount point. This attribute is <code class="literal">True</code> if the file is a UNIX mount point.
+ This attribute is only available for UNIX file systems. Corresponding
+ GFileAttributeType
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_DOS_IS_ARCHIVE</code></span></p></td><td>
+ "dos::is-archive" A key in the "dos" namespace for checking if the file's archive
+ flag is set. This attribute is <code class="literal">True</code> if the archive flag is set.
+ This attribute is only available for DOS file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_DOS_IS_SYSTEM</code></span></p></td><td>
+ "dos::is-system" A key in the "dos" namespace for checking if the file's backup
+ flag is set. This attribute is <code class="literal">True</code> if the backup flag is set.
+ This attribute is only available for DOS file systems. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+ G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_USER</code></span></p></td><td>
+ "owner::user" A key in the "owner" namespace for getting the user name
+ of the file's owner. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_USER_REAL</code></span></p></td><td>
+ "owner::user-real" A key in the "owner" namespace for getting the real name
+ of the user that owns the file. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+ G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_GROUP</code></span></p></td><td>
+ "owner::group" A key in the "owner" namespace for getting the file owner's
+ group. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_THUMBNAIL_PATH</code></span></p></td><td>
+ "thumbnail::path" A key in the "thumbnail" namespace for getting the path
+ to the thumbnail image. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_THUMBNAILING_FAILED</code></span></p></td><td>
+ "thumbnail::failed" A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute
+ is <code class="literal">True</code> if thumbnailing failed. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+ G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_PREVIEW_ICON</code></span></p></td><td>
+ "preview::icon" A key in the "preview" namespace for getting a
+ <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ that can be used to get preview of the file. For example, it
+ may be a low resolution thumbnail without metadata. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+ G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a GIcon.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE</code></span></p></td><td>
+ "filesystem::size" A key in the "filesystem" namespace for getting the total
+ size (in bytes) of the file system, used in
+ <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></code>().
+ Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_FREE</code></span></p></td><td>
+ "filesystem::free" A key in the "filesystem" namespace for getting the number of bytes of free space left
+ on the file system. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE</code></span></p></td><td>
+ "filesystem::type" A key in the "filesystem" namespace for getting the file system's type. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_READONLY</code></span></p></td><td>
+ "filesystem::readonly" A key in the "filesystem" namespace for checking if the
+ file system is read only. Is set to <code class="literal">True</code> if the file system
+ is read only. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_GVFS_BACKEND</code></span></p></td><td>
+ "gvfs::backend" A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_SELINUX_CONTEXT</code></span></p></td><td>
+ "selinux::context" A key in the "selinux" namespace for getting the file's SELinux context. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ Note that this attribute is only available if GLib has been built with SELinux support.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TRASH_ITEM_COUNT</code></span></p></td><td>
+ "trash::item-count" A key in the "trash" namespace. When requested against "trash:///" returns the number
+ of (toplevel) items in the trash folder. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_UINT32.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</code></span></p></td><td>
+ "filesystem::use-preview" A key in the "filesystem" namespace for hinting a file manager
+ application whether it should preview (e.g. thumbnail) files on the file system.
+ The value for this key contain a GFilesystemPreviewType.
+ </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_DESCRIPTION</code></span></p></td><td>
+ "standard::description" A key in the "standard" namespace for getting the description
+ of the file. The description is a utf8 string that describes the file, generally containing
+ the filename, but can also contain furter information. Example descriptions could be
+ "filename (on hostname)" for a remote file or "filename (in trash)" for a
+ file in the trash. This is useful for instance as the window title when
+ displaying a directory or for a bookmarks menu. Corresponding
+ <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Type Constants"><a name="gio-file-attribute-type-constants"></a><h3>Gio File Attribute Type Constants</h3><p>
+ The data types for file attributes.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</code></span></p></td><td>a boolean value.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</code></span></p></td><td>a zero terminated string of non-zero bytes.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INT32</code></span></p></td><td>a signed 4-byte/32-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INT64</code></span></p></td><td>a signed 8-byte/64-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INVALID</code></span></p></td><td>indicates an invalid or uninitalized type.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_OBJECT</code></span></p></td><td>a <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_STRING</code></span></p></td><td>a null terminated UTF8 string.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_UINT32</code></span></p></td><td>an unsigned 4-byte/32-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_UINT64</code></span></p></td><td>an unsigned 8-byte/64-bit integer.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Flags Constants"><a name="gio-file-attribute-flags-constants"></a><h3>Gio File Attribute Flags Constants</h3><p>
+ Flags specifying the behaviour of an attribute.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_NONE</code></span></p></td><td>no flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</code></span></p></td><td>copy the attribute values when the file is copied.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</code></span></p></td><td>copy the attribute values when the file is moved.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Create Flags Constants"><a name="gio-file-create-flags-constants"></a><h3>Gio File Create Flags Constants</h3><p>
+ Flags used when an operation may create a file.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_PRIVATE</code></span></p></td><td>Create a file that can only be accessed by the current user.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_REPLACE_DESTINATION</code></span></p></td><td>
+ Replace the destination as if it didn't exist before. Don't try
+ to keep any old permissions, replace instead of following links. This is
+ generally useful if you're doing a "copy over" rather than a "save new version of"
+ replace operation. You can think of it as "unlink destination" before writing
+ to it, although the implementation may not be exactly like that.
+ </td></tr></tbody></table></div><div class="refsect2" title="Gio File Copy Flags Constants"><a name="gio-file-copy-flags-constants"></a><h3>Gio File Copy Flags Constants</h3><p>
+ Flags used when copying or moving files.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_OVERWRITE</code></span></p></td><td>Overwrite any existing files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_BACKUP</code></span></p></td><td>Make a backup of any existing files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NOFOLLOW_SYMLINKS</code></span></p></td><td>Don't follow symlinks.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_ALL_METADATA</code></span></p></td><td>Copy all file metadata instead of just default set used for copy
+ (see <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NO_FALLBACK_FOR_MOVE</code></span></p></td><td>Don't use copy and delete fallback if native move not supported.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_TARGET_DEFAULT_PERMS</code></span></p></td><td>Leaves target file with default perms, instead of setting the source file perms.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Monitor Flags Constants"><a name="gio-file-monitor-flags-constants"></a><h3>Gio File Monitor Flags Constants</h3><p>
+ Flags used to set what a
+ <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+ will watch for.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_MONITOR_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_MONITOR_WATCH_MOUNTS</code></span></p></td><td>Watch for mount events.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Query Info Flags Constants"><a name="gio-file-query-info-flags-constants"></a><h3>Gio File Query Info Flags Constants</h3><p>
+ Flags used when querying a
+ <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.FileInfo</code></a>.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_QUERY_INFO_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</code></span></p></td><td>Don't follow symlinks.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Type Constants"><a name="gio-file-type-constants"></a><h3>Gio File Type Constants</h3><p>
+ Indicates the file's on-disk type.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_DIRECTORY</code></span></p></td><td>File handle represents a directory.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_MOUNTABLE</code></span></p></td><td>File is a mountable location.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_REGULAR</code></span></p></td><td>File handle represents a regular file.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SHORTCUT</code></span></p></td><td>File is a shortcut (Windows systems).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SPECIAL</code></span></p></td><td>File is a "special" file, such as a socket, fifo, block device, or character device.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SYMBOLIC_LINK</code></span></p></td><td>File handle represents a symbolic link (Unix systems).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_UNKNOWN</code></span></p></td><td>File's type is unknown.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Mount Flags Constants"><a name="gio-mount-mount-flags-constants"></a><h3>Gio Mount Mount Flags Constants</h3><p>
+ Flags used when mounting a mount.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_MOUNT_NONE</code></span></p></td><td>No flags set.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Unmount Flags Constants"><a name="gio-mount-unmount-flags-constants"></a><h3>Gio Mount Unmount Flags Constants</h3><p>
+ Flags used when unmounting a mount.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_UNMOUNT_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_UNMOUNT_FORCE</code></span></p></td><td>Unmount even if there are outstanding file operations on the mount.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Operation Result Constants"><a name="gio-mount-operation-result-constants"></a><h3>Gio Mount Operation Result Constants</h3><p>
+ returned as a result when a request for information is send by the mounting operation.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_HANDLED</code></span></p></td><td>The request was fulfilled and the user specified data is now available.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_ABORTED</code></span></p></td><td>The user requested the mount operation to be aborted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_UNHANDLED</code></span></p></td><td>The request was unhandled (i.e. not implemented).</td></tr></tbody></table></div><div class="refsect2" title="Gio Password Save Constants"><a name="gio-password-save-constants"></a><h3>Gio Password Save Constants</h3><p>
+ is used to indicate the lifespan of a saved password.
+ </p><p>
+ Gvfs stores passwords in the Gnome keyring when this flag allows it to,
+ and later retrieves it again from there.
+ </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_FOR_SESSION</code></span></p></td><td>save a password for the session.</td></tr><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_NEVER</code></span></p></td><td>never save a password.</td></tr><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_PERMANENTLY</code></span></p></td><td>save a password permanently.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="giounix-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGio Unix Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/gio-functions.html b/docs/html/gio-functions.html
new file mode 100644
index 0000000..80287e6
--- /dev/null
+++ b/docs/html/gio-functions.html
@@ -0,0 +1,74 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio Functions</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><link rel="next" href="gio-constants.html" title="gio Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giovolumemonitor.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio Functions"><a name="gio-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio Functions</h2><p>gio Functions</p></div><div class="refsect1" title="Synopsis"><a name="id3079975"></a><h2>Synopsis</h2><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-can-be-executable" title="gio.content_type_can_be_executable">gio.content_type_can_be_executable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-equals" title="gio.content_type_equals">gio.content_type_equals</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-from-mime-type" title="gio.content_type_from_mime_type">gio.content_type_from_mime_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mime_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-description" title="gio.content_type_get_description">gio.content_type_get_description</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-icon" title="gio.content_type_get_icon">gio.content_type_get_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-mime-type" title="gio.content_type_get_mime_type">gio.content_type_get_mime_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-guess" title="gio.content_type_guess">gio.content_type_guess</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>want_uncertain</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-is-a" title="gio.content_type_is_a">gio.content_type_is_a</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>supertype</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-is-unknown" title="gio.content_type_is_unknown">gio.content_type_is_unknown</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-types-get-registered" title="gio.content_types_get_registered">gio.content_types_get_registered</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--io-error-from-errno" title="gio.io_error_from_errno">gio.io_error_from_errno</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>err_no</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id3080327"></a><h2>Description</h2><p>
+ These functions are part of the <code class="literal">PyGObject</code> gio module
+ but are not directly associated with a specific class
+ </p></div><div class="refsect1" title="Functions"><a name="id3080346"></a><h2>Functions</h2><div class="refsect2" title="gio.content_type_can_be_executable"><a name="function-gio--content-type-can-be-executable"></a><h3>gio.content_type_can_be_executable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_can_be_executable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file type corresponds
+ to a type that can be executable, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_can_be_executable</code>() function checks
+ if a content type can be executable. Note that for instance things like text files
+ can be executables (i.e. scripts and batch files).
+ </p></div><div class="refsect2" title="gio.content_type_equals"><a name="function-gio--content-type-equals"></a><h3>gio.content_type_equals</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_equals</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type1</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type2</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the two strings are
+ identical or equivalent, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_equals</code>() function compares
+ two content types for equality.
+ </p></div><div class="refsect2" title="gio.content_type_from_mime_type"><a name="function-gio--content-type-from-mime-type"></a><h3>gio.content_type_from_mime_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_from_mime_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mime_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td><td>a mime type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The content type or <code class="literal">None</code> when does not know.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_from_mime_type</code>() function tries
+ to find a content type based on the mime type name.
+ </p></div><div class="refsect2" title="gio.content_type_get_description"><a name="function-gio--content-type-get-description"></a><h3>gio.content_type_get_description</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_get_description</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a short description of the content type type.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_get_description</code>() function
+ gets the human readable description of the content type.
+ </p></div><div class="refsect2" title="gio.content_type_get_icon"><a name="function-gio--content-type-get-icon"></a><h3>gio.content_type_get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_get_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+ corresponding to the content type.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_get_icon</code>() function
+ gets the icon for a content type.
+ </p></div><div class="refsect2" title="gio.content_type_get_mime_type"><a name="function-gio--content-type-get-mime-type"></a><h3>gio.content_type_get_mime_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_get_mime_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the registered mime-type for the given type,
+ or <code class="literal">None</code> if unknown.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_get_mime_type</code>() function
+ gets the mime-type for the content type. If one is registered
+ </p></div><div class="refsect2" title="gio.content_type_guess"><a name="function-gio--content-type-guess"></a><h3>gio.content_type_guess</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_guess</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>want_uncertain</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td><td>a string, or <code class="literal">None</code>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>a stream of data, or <code class="literal">None</code>.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>want_uncertain</code></em> :</span></p></td><td>a flag indicating the certainty of the result.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string indicating a guessed content type for the given data.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_guess</code>() function guesses
+ the content type based on example data. If the function is uncertain,
+ result_uncertain will be set to <code class="literal">True</code>. Either filename
+ or data may be <code class="literal">None</code>, in which case the guess will be
+ based solely on the other argument.
+ </p></div><div class="refsect2" title="gio.content_type_is_a"><a name="function-gio--content-type-is-a"></a><h3>gio.content_type_is_a</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_is_a</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>supertype</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><em class="parameter"><code>supertype</code></em> :</span></p></td><td>a string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if type is a kind of
+ supertype, <code class="literal">False</code> otherwise.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_is_a</code>() function determines
+ if type is a subset of supertype.
+ </p></div><div class="refsect2" title="gio.content_type_is_unknown"><a name="function-gio--content-type-is-unknown"></a><h3>gio.content_type_is_unknown</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_is_unknown</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the type is the unknown type.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_type_is_unknown</code>() function checks if
+ the content type is the generic "unknown" type. On unix this is the
+ "application/octet-stream" mimetype, while on win32 it is "*".
+ </p></div><div class="refsect2" title="gio.content_types_get_registered"><a name="function-gio--content-types-get-registered"></a><h3>gio.content_types_get_registered</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_types_get_registered</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the registered content types.
+ </td></tr></tbody></table><p>
+ The <code class="methodname">content_types_get_registered</code>() function
+ gets a list of strings containing all the registered content types
+ known to the system.
+ </p></div><div class="refsect2" title="gio.io_error_from_errno"><a name="function-gio--io-error-from-errno"></a><h3>gio.io_error_from_errno</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">io_error_from_errno</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>err_no</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>err_no</code></em> :</span></p></td><td>Error number.
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+ <a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
+ </td></tr></tbody></table><p>
+ The <code class="methodname">io_error_from_errno</code>() function converts
+ error codes into GIO error codes.
+ </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giovolumemonitor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.VolumeMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio Constants</td></tr></table></div></body></html>
diff --git a/docs/html/giounix-class-reference.html b/docs/html/giounix-class-reference.html
new file mode 100644
index 0000000..9a1b532
--- /dev/null
+++ b/docs/html/giounix-class-reference.html
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGio Unix Class Reference</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="gio-constants.html" title="gio Constants"><link rel="next" href="class-giounixinputstream.html" title="gio.unix.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGio Unix Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-giounixinputstream.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGio Unix Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="giounix-class-reference"></a>PyGio Unix Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-giounixinputstream.html">gio.unix.InputStream</a></span><span class="refpurpose"> — Streaming input operations for UNIX file descriptors.</span></dt><dt><span class="refentrytitle"><a href="class-giounixoutputstream.html">gio.unix.OutputStream</a></span><span class="refpurpose"> — Streaming output operations for UNIX file descriptors.</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-giounixinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.unix.InputStream</td></tr></table></div></body></html>
diff --git a/docs/html/glib-class-reference.html b/docs/html/glib-class-reference.html
new file mode 100644
index 0000000..13ca630
--- /dev/null
+++ b/docs/html/glib-class-reference.html
@@ -0,0 +1,3 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGlibClass Reference</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="pygobject-introduction.html" title="Introduction"><link rel="next" href="class-glibmaincontext.html" title="glib.MainContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGlibClass Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pygobject-introduction.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-glibmaincontext.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGlibClass Reference"><div class="titlepage"><div><div><h2 class="title"><a name="glib-class-reference"></a>PyGlibClass Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-glibmaincontext.html">glib.MainContext</a></span><span class="refpurpose"> — an object representing a set of event sources to be handled
+in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</span></dt><dt><span class="refentrytitle"><a href="class-glibmainloop.html">glib.MainLoop</a></span><span class="refpurpose"> — an object representing the main event loop of a PyGTK
+ application.</span></dt><dt><span class="refentrytitle"><a href="glib-functions.html">glib Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="glib-constants.html">glib Constants</a></span><span class="refpurpose"> — the built-in constants of the glib module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pygobject-introduction.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-glibmaincontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Introduction </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib.MainContext</td></tr></table></div></body></html>
diff --git a/docs/html/glib-constants.html b/docs/html/glib-constants.html
new file mode 100644
index 0000000..fd86c99
--- /dev/null
+++ b/docs/html/glib-constants.html
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Constants</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-functions.html" title="glib Functions"><link rel="next" href="gobject-class-reference.html" title="PyGObject Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Constants"><a name="glib-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Constants</h2><p>glib Constants — the built-in constants of the glib module</p></div><div class="refsect1" title="Synopsis"><a name="id2961354"></a><h2>Synopsis</h2><pre class="programlisting">
+<a class="xref" href="glib-constants.html#glib-io-condition-constants" title="Glib IO Condition Constants">Glib IO Condition Constants</a>
+<a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+<a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a>
+<a class="xref" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">Glib User Directory Constants</a>
+<a class="xref" href="glib-constants.html#glib-version-constants" title="Glib Version Constants">Glib Version Constants</a>
+</pre></div><div class="refsect1" title="Description"><a name="glib-constants-description"></a><h2>Description</h2><div class="refsect2" title="Glib IO Condition Constants"><a name="glib-io-condition-constants"></a><h3>Glib IO Condition Constants</h3><p>The IO Condition constants are a set of bit-flags that specify a
+condition to watch for on an event source.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.IO_IN</code></span></p></td><td>There is data to read</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_OUT</code></span></p></td><td>Data can be written (without blocking).</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_PRI</code></span></p></td><td>There is urgent data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_ERR</code></span></p></td><td>Error condition.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_HUP</code></span></p></td><td>Hung up (the connection has been broken, usually for
+ pipes and sockets).</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_NVAL</code></span></p></td><td>Invalid request. The file descriptor is not
+ open.</td></tr></tbody></table></div><div class="refsect2" title="Glib Priority Constants"><a name="glib-priority-constants"></a><h3>Glib Priority Constants</h3><p>The Priority constants specify </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_HIGH</code></span></p></td><td>Use this for high priority event sources.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_DEFAULT</code></span></p></td><td>Use this for default priority event sources. This
+ priority is used when adding timeout functions with the <a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add"><code class="function">glib.timeout_add</code>()</a>
+ function. This priority is also used for events from the X
+ server.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_HIGH_IDLE</code></span></p></td><td>Use this for high priority idle functions. For example,
+ glib.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
+ and, glib.PRIORITY_HIGH_IDLE + 20, for redrawing
+ operations. (This is done to ensure that any pending resizes are
+ processed before any pending redraws, so that widgets are not
+ redrawn twice unnecessarily.)</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_DEFAULT_IDLE</code></span></p></td><td>Use this for default priority idle functions. This
+ priority is used when adding idle functions with the <a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add"><code class="function">glib.idle_add</code>()</a>
+ function.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_LOW</code></span></p></td><td>Use this for very low priority background
+ tasks.</td></tr></tbody></table></div><div class="refsect2" title="Glib Spawn Flag Constants"><a name="glib-spawn-flag-constants"></a><h3>Glib Spawn Flag Constants</h3><p>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+function.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</code></span></p></td><td>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <code class="function">exec</code>() in the child.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code></span></p></td><td>the child will not be automatically reaped; you must
+call <code class="function">waitpid</code>() or handle <code class="literal">SIGCHLD</code>
+yourself, or the child will become a zombie.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_SEARCH_PATH</code></span></p></td><td><em class="parameter"><code>argv</code></em>[0] need not be an absolute
+path, it will be looked for in the user's <code class="envar">PATH</code>.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code></span></p></td><td>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code></span></p></td><td>the child's standard error will be discarded.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code></span></p></td><td>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_FILE_AND_ARGV_ZERO</code></span></p></td><td>the first element of <em class="parameter"><code>argv</code></em> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and passes all
+of <em class="parameter"><code>argv</code></em> to the child.</td></tr></tbody></table></div><div class="refsect2" title="Glib User Directory Constants"><a name="glib-user-directory-constants"></a><h3>Glib User Directory Constants</h3><p>The User Directory constants are integer values that are currently used only as arguments to
+ <a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir"><code class="function">glib.get_user_special_dir</code>()</a>
+ function. See function documentation for details.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DESKTOP</code></span></p></td><td>the user's Desktop directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DOCUMENTS</code></span></p></td><td>the user's Documents directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DOWNLOAD</code></span></p></td><td>the user's Downloads directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_MUSIC</code></span></p></td><td>the user's Music directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_PICTURES</code></span></p></td><td>the user's Pictures directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_PUBLIC_SHARE</code></span></p></td><td>the user's shared directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_TEMPLATES</code></span></p></td><td>the user's Templates directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_VIDEOS</code></span></p></td><td>the user's Movies directory</td></tr></tbody></table></div><div class="refsect2" title="Glib Version Constants"><a name="glib-version-constants"></a><h3>Glib Version Constants</h3><p>The Version constants specify the version of
+<code class="literal">Glib</code> used by PyGObject as a 3-tuple containing the major,
+minor and patch release numbers.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.glib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
+ numbers of glib.</td></tr><tr><td><p><span class="term"><code class="literal">glib.pyglib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
+ numbers of the python bindings.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGObject Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/glib-functions.html b/docs/html/glib-functions.html
new file mode 100644
index 0000000..b1f8138
--- /dev/null
+++ b/docs/html/glib-functions.html
@@ -0,0 +1,280 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Functions</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmainloop.html" title="glib.MainLoop"><link rel="next" href="glib-constants.html" title="glib Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Functions"><a name="glib-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Functions</h2><p>glib Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id2931079"></a><h2>Synopsis</h2><pre class="programlisting">
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add">glib.idle_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add">glib.timeout_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add-seconds" title="glib.timeout_add_seconds">glib.timeout_add_seconds</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch">glib.io_add_watch</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--source-remove" title="glib.source_remove">glib.source_remove</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-context-default" title="glib.main_context_default">glib.main_context_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--markup-escape-text" title="glib.markup_escape_text">glib.markup_escape_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--child-watch-add" title="glib.child_watch_add">glib.child_watch_add</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async">glib.spawn_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-current-time" title="glib.get_current_time">glib.get_current_time</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-cache-dir" title="glib.get_user_cache_dir">glib.get_user_cache_dir</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-config-dir" title="glib.get_user_config_dir">glib.get_user_config_dir</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-data-dir" title="glib.get_user_data_dir">glib.get_user_data_dir</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir">glib.get_user_special_dir</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>directory</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-depth" title="glib.main_depth">glib.main_depth</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--threads-init" title="glib.threads_init">glib.threads_init</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name">glib.filename_display_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename">glib.filename_display_basename</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-from-utf8" title="glib.filename_from_utf8">glib.filename_from_utf8</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id2936267"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGObject</code> glib
+module but are not directly associated with a specific class.</p></div><div class="refsect1" title="Functions"><a name="id2929777"></a><h2>Functions</h2><div class="refsect2" title="glib.idle_add"><a name="function-glib--idle-add"></a><h3>glib.idle_add</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.idle_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call when
+<code class="literal">PyGTK</code> is idle</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>optionals arguments to be passed to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID</td></tr></tbody></table><p>The <code class="function">glib.idle_add</code>() function adds a
+function (specified by <em class="parameter"><code>callback</code></em>) to be called
+whenever there are no higher priority events pending to the default main
+loop. The function is given the default idle priority,
+<code class="literal">glib.PRIORITY_DEFAULT_IDLE</code>. Additional arguments to
+pass to <em class="parameter"><code>callback</code></em> can be specified after
+<em class="parameter"><code>callback</code></em>. The idle priority can be specified as a
+keyword-value pair with the keyword "priority". If
+<em class="parameter"><code>callback</code></em> returns <code class="literal">FALSE</code> it is
+automatically removed from the list of event sources and will not be called
+again.</p></div><div class="refsect2" title="glib.timeout_add"><a name="function-glib--timeout-add"></a><h3>glib.timeout_add</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.timeout_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td><td>the time between calls to the function, in
+milliseconds </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more arguments that will be passed to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event
+source</td></tr></tbody></table><p>The <code class="function">glib.timeout_add</code>() function sets a
+function (specified by <em class="parameter"><code>callback</code></em>) to be called at
+regular intervals (specified by <em class="parameter"><code>interval</code></em>, with the
+default priority, <code class="literal">glib.PRIORITY_DEFAULT</code>. Additional
+arguments to pass to <em class="parameter"><code>callback</code></em> can be specified after
+<em class="parameter"><code>callback</code></em>. The idle priority may be specified as a
+keyword-value pair with the keyword "priority".</p><p>The function is called repeatedly until it returns
+<code class="literal">FALSE</code>, at which point the timeout is automatically
+destroyed and the function will not be called again. The first call to the
+function will be at the end of the first interval. Note that timeout
+functions may be delayed, due to the processing of other event sources. Thus
+they should not be relied on for precise timing. After each call to the
+timeout function, the time of the next timeout is recalculated based on the
+current time and the given interval (it does not try to 'catch up' time lost
+in delays).</p></div><div class="refsect2" title="glib.timeout_add_seconds"><a name="function-glib--timeout-add-seconds"></a><h3>glib.timeout_add_seconds</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.timeout_add_seconds</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td><td>the time between calls to the function, in
+seconds </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more arguments that will be passed to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event
+source</td></tr></tbody></table><p>The <code class="function">glib.timeout_add_seconds</code>() is similar to
+ <code class="function">glib.timeout_add</code>() except
+ that <em class="parameter"><code>interval</code></em> must be specified in seconds, not
+ milliseconds, and the function should cause less CPU wakeups, which is important
+ for laptops' batteries.</p><p>Unlike <code class="function">glib.timeout_add</code>(), this function operates at
+ whole second granularity. The initial starting point of the timer is determined
+ by the implementation and the implementation is expected to group multiple timers
+ together so that they fire all at the same time. To allow this grouping, the
+ interval to the first timer is rounded and can deviate up to one second from the
+ specified interval. Subsequent timer iterations will generally run at the
+ specified interval.</p><p>Note that timeout functions may be delayed, due to the processing of other
+ event sources. Thus they should not be relied on for precise timing. After each
+ call to the timeout function, the time of the next timeout is recalculated based
+ on the current time and the given interval.</p><p>The grouping of timers to fire at the same time results in a more power and
+ CPU efficient behavior so if your timer is in multiples of seconds and you don't
+ require the first timer exactly one second from now, the use of
+ <code class="function">glib.timeout_add_seconds</code>() is preferred
+ over <code class="function">glib.timeout_add</code>().</p></div><div class="refsect2" title="glib.io_add_watch"><a name="function-glib--io-add-watch"></a><h3>glib.io_add_watch</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.io_add_watch</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a Python file object or an integer file
+descriptor ID</td></tr><tr><td><p><span class="term"><em class="parameter"><code>condition</code></em> :</span></p></td><td>a condition mask</td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional arguments to pass to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event source</td></tr></tbody></table><p>The <code class="function">glib.io_add_watch</code>() function
+arranges for the file (specified by <em class="parameter"><code>fd</code></em>) to be
+monitored by the main loop for the specified
+<em class="parameter"><code>condition</code></em>. <em class="parameter"><code>fd</code></em> may be a Python
+file object or an integer file descriptor. The value of condition is a
+combination of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.IO_IN</code></span></p></td><td>There is data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_OUT</code></span></p></td><td>Data can be written (without blocking). </td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_PRI</code></span></p></td><td>There is urgent data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_ERR</code></span></p></td><td>Error condition.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_HUP</code></span></p></td><td>Hung up (the connection has been broken, usually for
+pipes and sockets).</td></tr></tbody></table><p>Additional arguments to pass to <em class="parameter"><code>callback</code></em>
+can be specified after <em class="parameter"><code>callback</code></em>. The idle priority
+may be specified as a keyword-value pair with the keyword "priority". The
+signature of the callback function is:</p><pre class="programlisting">
+ def callback(source, cb_condition, ...)
+</pre><p>where <em class="parameter"><code>source</code></em> is
+<em class="parameter"><code>fd</code></em>, the file descriptor;
+<em class="parameter"><code>cb_condition</code></em> is the condition that triggered the
+signal; and, <em class="parameter"><code>...</code></em> are the zero or more arguments that
+were passed to the <code class="function">glib.io_add_watch</code>()
+function.</p><p>If the callback function returns <code class="literal">FALSE</code> it
+will be automatically removed from the list of event sources and will not be
+called again. If it returns <code class="literal">TRUE</code> it will be called again
+when the condition is matched.</p></div><div class="refsect2" title="glib.source_remove"><a name="function-glib--source-remove"></a><h3>glib.source_remove</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.source_remove</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td><td>an integer ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the event source was
+removed</td></tr></tbody></table><p>The <code class="function">glib.source_remove</code>() function
+removes the event source specified by tag (as returned by the <a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add"><code class="function">glib.idle_add</code>()</a>,
+<a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add"><code class="function">glib.timeout_add</code></a>()
+and <a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch"><code class="function">glib.io_add_watch</code>()</a>
+functions)</p></div><div class="refsect2" title="glib.main_context_default"><a name="function-glib--main-context-default"></a><h3>glib.main_context_default</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.main_context_default</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default glib.MainContext
+object</td></tr></tbody></table><p>The <code class="function">glib.main_context_default</code>() function
+returns the default glib.MainContext object.</p></div><div class="refsect2" title="glib.markup_escape_text"><a name="function-glib--markup-escape-text"></a><h3>glib.markup_escape_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.markup_escape_text</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>text</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td><td>the UTF-8 string to be
+escaped</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the escaped text</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">glib.markup_escape_text</code>() function
+escapes the string specified by <em class="parameter"><code>text</code></em> so that the
+markup parser will parse it verbatim. Less than, greater than, ampersand,
+etc. are replaced with the corresponding entities. This function would
+typically be used when writing out a file to be parsed with the markup
+parser.</p><p>Note that this function doesn't protect whitespace and line
+endings from being processed according to the XML rules for normalization of
+line endings and attribute values.</p></div><div class="refsect2" title="glib.child_watch_add"><a name="function-glib--child-watch-add"></a><h3>glib.child_watch_add</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.child_watch_add</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pid</code></strong> :</span></p></td><td>process id of a child process to watch</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>function</code></strong> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>the optional data to pass to
+<em class="parameter"><code>function</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>priority</code></strong> :</span></p></td><td>the priority of the idle source - one of the
+<a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the id of event source.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">glib.child_watch_add</code>() function sets
+the function specified by <em class="parameter"><code>function</code></em> to be called with
+the user data specified by <em class="parameter"><code>data</code></em> when the child
+indicated by <em class="parameter"><code>pid</code></em> exits. The signature for the
+callback is:</p><pre class="programlisting">
+def callback(pid, condition, user_data)
+</pre><p>where <em class="parameter"><code>pid</code></em> is is the child process id,
+<em class="parameter"><code>condition</code></em> is the status information about the child
+process and <em class="parameter"><code>user_data</code></em> is <em class="parameter"><code>data</code></em>
+PyGTK supports only a single callback per process id.</p></div><div class="refsect2" title="glib.spawn_async"><a name="function-glib--spawn-async"></a><h3>glib.spawn_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.spawn_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>argv</code></strong> :</span></p></td><td>a sequence of strings containing the arguments
+of the child process</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>envp</code></strong> :</span></p></td><td>the child's environment or
+<code class="literal">None</code> to inherit the parent's
+environment.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>working_directory</code></strong> :</span></p></td><td>the child's current working directory, or
+<code class="literal">None</code> to inherit parent's</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags from the <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>child_setup</code></strong> :</span></p></td><td>a function to run in the child just before
+calling <code class="function">exec</code>()</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>the user data for the
+<em class="parameter"><code>child_setup</code></em> function</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_input</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> return the file
+descriptor for the child's stdin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_output</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> return the file
+descriptor for the child's stdout</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_error</code></strong> :</span></p></td><td>if <code class="literal">TRUE</code> return the file
+descriptor for the child's stderr</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 4-tuple containing the child's process id and
+the stdin, stdout and stderr file descriptor integers.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">glib.spawn_async</code>() function executes
+a child program asynchronously (your program will not block waiting for the
+child to exit). The child program is specified by the only argument that
+must be provided, <em class="parameter"><code>argv</code></em>. <em class="parameter"><code>argv</code></em>
+should be a sequence of strings, to be passed as the argument vector for the
+child. The first string in <em class="parameter"><code>argv</code></em> is of course the name
+of the program to execute. By default, the name of the program must be a
+full path; the <code class="envar">PATH</code> shell variable will only be searched if
+you pass the <code class="literal">glib.SPAWN_SEARCH_PATH</code> flag in
+<em class="parameter"><code>flags</code></em>. The function returns a 4-tuple containing the
+child's process id and the file descriptors for the child's stdin, stdout
+and stderr. The stdin, stdout and stderr file descriptors are returned only
+ofthe corresponding <em class="parameter"><code>standard_input</code></em>,
+<em class="parameter"><code>standard_output</code></em> or
+<em class="parameter"><code>standard_error</code></em> params are
+<code class="literal">TRUE</code>.</p><p>On Windows, the low-level child process creation API
+(<code class="function">CreateProcess</code>()) doesn't use argument vectors, but a
+command line. The C runtime library's <code class="function">spawn*</code>() family
+of functions (which <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+eventually calls) paste the argument vector elements into a command line,
+and the C runtime startup code does a corresponding reconstruction of an
+argument vector from the command line, to be passed to
+<code class="function">main</code>(). Complications arise when you have argument
+vector elements that contain spaces of double quotes. The
+<code class="function">spawn*</code>() functions don't do any quoting or escaping,
+but on the other hand the startup code does do unquoting and unescaping in
+order to enable receiving arguments with embedded spaces or double
+quotes. To work around this asymmetry, the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+function will do quoting and escaping on argument vector elements that need
+it before calling the C runtime <code class="function">spawn</code>()
+function.</p><p><em class="parameter"><code>envp</code></em> is a sequence of strings, where each
+ string has the form <code class="literal">KEY=VALUE</code>. This will become the
+ child's environment. If <em class="parameter"><code>envp</code></em> is
+ <em class="parameter"><code>None</code></em> or not specified, the child inherits its
+ parent's environment.</p><p><em class="parameter"><code>flags</code></em> should be the bitwise
+<code class="literal">OR</code> of the <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a> you want to affect the
+function's behaviour. The <code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code>
+flag means that the child will not automatically be reaped; you must use a
+GChildWatch source to be notified about the death of the child
+process. Eventually you must call g_spawn_close_pid() on the child_pid, in
+order to free resources which may be associated with the child process. (On
+Unix, using a GChildWatch source is equivalent to calling
+<code class="function">waitpid</code>() or handling the <code class="literal">SIGCHLD</code>
+signal manually. On Windows, calling g_spawn_close_pid() is equivalent to
+calling <code class="function">CloseHandle</code>() on the process handle
+returned).</p><p><code class="literal">glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</code> means
+that the parent's open file descriptors will be inherited by the child;
+otherwise all descriptors except stdin/stdout/stderr will be closed before
+calling <code class="function">exec</code>() in the
+child. <code class="literal">glib.SPAWN_SEARCH_PATH</code> means that
+<em class="parameter"><code>argv</code></em>[0] need not be an absolute path, it will be
+looked for in the user's
+<code class="envar">PATH</code>. <code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code>
+means that the child's standard output will be discarded, instead of going
+to the same location as the parent's standard output. If you use this flag,
+<em class="parameter"><code>standard_output</code></em> must be
+<code class="literal">None</code>. <code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code>
+means that the child's standard error will be discarded, instead of going to
+the same location as the parent's standard error. If you use this flag,
+<em class="parameter"><code>standard_error</code></em> must be
+<code class="literal">None</code>. <code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code>
+means that the child will inherit the parent's standard input (by default,
+the child's standard input is attached to
+<code class="filename">/dev/null</code>). If you use this flag,
+<em class="parameter"><code>standard_input</code></em> must be
+<code class="literal">None</code>. <code class="literal">glib.SPAWN_FILE_AND_ARGV_ZERO</code>
+means that the first element of <em class="parameter"><code>argv</code></em> is the file to
+execute, while the remaining elements are the actual argument vector to pass
+to the file. Normally the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+function uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and
+passes all of <em class="parameter"><code>argv</code></em> to the child.</p><p><em class="parameter"><code>child_setup</code></em> and
+<em class="parameter"><code>user_data</code></em> are a function and user data. On POSIX
+platforms, the function is called in the child after GLib has performed all
+the setup it plans to perform (including creating pipes, closing file
+descriptors, etc.) but before calling <code class="function">exec</code>(). That is,
+<em class="parameter"><code>child_setup</code></em> is called just before calling
+<code class="function">exec</code>() in the child. Obviously actions taken in this
+function will only affect the child, not the parent. On Windows, there is no
+separate <code class="function">fork</code>() and <code class="function">exec</code>()
+functionality. Child processes are created and run right away with one API
+call,
+<code class="function">CreateProcess</code>(). <em class="parameter"><code>child_setup</code></em> is
+called in the parent process just before creating the child process. You
+should carefully consider what you do in <em class="parameter"><code>child_setup</code></em>
+if you intend your software to be portable to Windows.</p><p>The returned child process id can be used to send signals to the
+child, or to wait for the child if you specified the
+<code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code> flag. On Windows, child
+pid will be returned only if you specified the
+<code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code> flag.</p><p>The caller of the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+must close any returned file descriptors when they are no longer in
+use.</p><p>If <em class="parameter"><code>standard_input</code></em> is
+<code class="literal">None</code>, the child's standard input is attached to
+<code class="filename">/dev/null</code> unless
+<code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code> is set.</p><p>If <em class="parameter"><code>standard_error</code></em> is
+<code class="literal">None</code>, the child's standard error goes to the same
+location as the parent's standard error unless
+<code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code> is set.</p><p>If <em class="parameter"><code>standard_output</code></em> is
+<code class="literal">None</code>, the child's standard output goes to the same
+location as the parent's standard output unless
+<code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code> is set.</p><p>If an error occurs, the glib.GError exception will be
+raised.</p></div><div class="refsect2" title="glib.get_current_time"><a name="function-glib--get-current-time"></a><h3>glib.get_current_time</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.get_current_time</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current time as the number of seconds and
+microseconds from the epoch.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">glib.get_current_time</code>() function
+reurns the current time of day as the number of seconds and microseconds
+from the epoch.</p></div><div class="refsect2" title="glib.get_user_cache_dir"><a name="function-glib--get-user-cache-dir"></a><h3>glib.get_user_cache_dir</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.get_user_cache_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+ a strings with a path to user's cache directory.
+ </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to store non-essential,
+ cached data specific to particular user.</p><p>On UNIX platforms this is determined using the mechanisms
+ described in the
+ <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
+ Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_config_dir"><a name="function-glib--get-user-config-dir"></a><h3>glib.get_user_config_dir</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.get_user_config_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+ a strings with a path to user's configuration directory.
+ </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to store user-specific
+ application configuration information such as user preferences
+ and settings. </p><p>On UNIX platforms this is determined using the mechanisms
+ described in the
+ <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
+ Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_data_dir"><a name="function-glib--get-user-data-dir"></a><h3>glib.get_user_data_dir</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.get_user_data_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+ a strings with a path to user's data directory.
+ </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to access application
+ data such as icons that is customized for a particular
+ user</p><p>On UNIX platforms this is determined using the mechanisms
+ described in the
+ <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
+ Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_special_dir"><a name="function-glib--get-user-special-dir"></a><h3>glib.get_user_special_dir</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.get_user_special_dir</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>directory</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>directory</em></span> :</span></p></td><td>
+ the logical id of special directory,
+ see <a class="link" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">User
+ Directory constants</a> for the list of supported
+ values
+ </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+ a strings with a path to the requested directory.
+ </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns the full path of a special directory using its
+ logical id.</p><p>On Unix this is done using the XDG special user
+ directories. For compatibility with existing practise,
+ <a class="link" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">glib.USER_DIRECTORY_DESKTOP</a>
+ falls back to <code class="literal">$HOME/Desktop</code> when XDG
+ special user directories have not been set up.</p><p>Depending on the platform, the user might be able to
+ change the path of the special directory without requiring the
+ session to restart; GLib will not reflect any change once the
+ special directories are loaded.</p></div><div class="refsect2" title="glib.main_depth"><a name="function-glib--main-depth"></a><h3>glib.main_depth</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.main_depth</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the depth of the stack of calls to the main
+context.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">main_depth</code>() function returns the depth
+of the stack of calls in the main context. That is, when called from the
+toplevel, it gives 0. When called from within a callback from the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">glib.MainContext.iteration</code>()</a>
+method (or the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">glib.MainLoop.run</code>()</a>
+method, etc.) it returns 1. When called from within a callback to a
+recursive call to the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">glib.MainContext.iteration</code>()</a>
+method), it returns 2. And so forth.</p></div><div class="refsect2" title="glib.threads_init"><a name="function-glib--threads-init"></a><h3>glib.threads_init</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.threads_init</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code></code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">threads_init</code>() function initializes the
+ the use of Python threading in the glib module. This function is
+ different than the <PYGTKDOCLINK HREF="function-gdk--threads-init"><code class="function">gtk.gdk.threads_init</code>()</PYGTKDOCLINK>
+ function as that function also initializes the gdk threads.</p></div><div class="refsect2" title="glib.signal_accumulator_true_handled"><a name="function-glib--signal-accumulator-true-handled"></a><h3>glib.signal_accumulator_true_handled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.signal_accumulator_true_handled</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">signal_accumulator_true_handled</code>()
+ function is only used as accumulator argument when registering
+ signals.</p></div><div class="refsect2" title="glib.filename_display_name"><a name="function-glib--filename-display-name"></a><h3>glib.filename_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.filename_display_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>filename</em></span> :</span></p></td><td>a pathname in the file name
+ encoding</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an UTF8 rendition of
+ <em class="parameter"><code>filename</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_display_name</code>() function
+ converts a filename into a valid UTF-8 string. The conversion is not
+ necessarily reversible, so you should keep the original around and use
+ the return value of this function only for display purposes. Unlike
+ g_filename_to_utf8(), the result is guaranteed to be non-None even if
+ the filename actually isn't in the file name encoding.</p><p>If you know the whole pathname of the file you should use the
+ <a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename"><code class="function">glib.filename_display_basename</code>()</a>
+ function, since that allows location-based translation of
+ filenames.</p></div><div class="refsect2" title="glib.filename_display_basename"><a name="function-glib--filename-display-basename"></a><h3>glib.filename_display_basename</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.filename_display_basename</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>filename</em></span> :</span></p></td><td>an absolute pathname in the file name
+ encoding</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an UTF8 rendition of
+ <em class="parameter"><code>filename</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_display_basename</code>() function
+ returns the display basename for the particular filename, guaranteed
+ to be valid UTF-8. The display name might not be identical to the
+ filename, for instance there might be problems converting it to UTF-8,
+ and some files can be translated in the display.</p><p>You must pass the whole absolute pathname to this functions so
+ that translation of well known locations can be done.</p><p>This function is preferred over the <a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name"><code class="function">glib.filename_display_name</code>()</a>
+ function if you know the whole path, as it allows translation.</p></div><div class="refsect2" title="glib.filename_from_utf8"><a name="function-glib--filename-from-utf8"></a><h3>glib.filename_from_utf8</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.filename_from_utf8</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>utf8string</em></span> :</span></p></td><td>a UTF-8 encoded string.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a filename encoded in the GLib filename
+ encoding.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_from_utf8</code>() function converts
+ a string from UTF-8 to the encoding GLib uses for filenames. Note that
+ on Windows GLib uses UTF-8 for filenames.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib.MainLoop </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib Constants</td></tr></table></div></body></html>
diff --git a/docs/html/gobject-class-reference.html b/docs/html/gobject-class-reference.html
new file mode 100644
index 0000000..bbf2133
--- /dev/null
+++ b/docs/html/gobject-class-reference.html
@@ -0,0 +1,2 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGObject Class Reference</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="glib-constants.html" title="glib Constants"><link rel="next" href="class-gobject.html" title="gobject.GObject"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGObject Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-gobject.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGObject Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="gobject-class-reference"></a>PyGObject Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-gobject.html">gobject.GObject</a></span><span class="refpurpose"> — the base class</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgboxed.html">gobject.GBoxed</a></span><span class="refpurpose"> — an object containing an opaque chunk of data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgpointer.html">gobject.GPointer</a></span><span class="refpurpose"> — an object containing a completely opaque chunk of
+ data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectginterface.html">gobject.GInterface</a></span><span class="refpurpose"> — an object representing a GInterface</span></dt><dt><span class="refentrytitle"><a href="gobject-functions.html">gobject Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="gobject-constants.html">gobject Constants</a></span><span class="refpurpose"> — the built-in constants of the gobject module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-gobject.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GObject</td></tr></table></div></body></html>
diff --git a/docs/html/gobject-constants.html b/docs/html/gobject-constants.html
new file mode 100644
index 0000000..969e25f
--- /dev/null
+++ b/docs/html/gobject-constants.html
@@ -0,0 +1,63 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Constants</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-functions.html" title="gobject Functions"><link rel="next" href="gio-class-reference.html" title="PyGio Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Constants"><a name="gobject-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Constants</h2><p>gobject Constants — the built-in constants of the gobject module</p></div><div class="refsect1" title="Synopsis"><a name="id2897732"></a><h2>Synopsis</h2><pre class="programlisting">
+<a class="xref" href="gobject-constants.html#gobject-param-constants" title="GObject Param Flag Constants">GObject Param Flag Constants</a>
+<a class="xref" href="gobject-constants.html#gobject-signal-constants" title="GObject Signal Flag Constants">GObject Signal Flag Constants</a>
+<a class="xref" href="gobject-constants.html#gobject-type-constants" title="GObject Built-in Type Constants">GObject Built-in Type Constants</a>
+<a class="xref" href="gobject-constants.html#gobject-version-constants" title="GObject Version Constants">GObject Version Constants</a>
+</pre></div><div class="refsect1" title="Description"><a name="gobject-constants-description"></a><h2>Description</h2><div class="refsect2" title="GObject Param Flag Constants"><a name="gobject-param-constants"></a><h3>GObject Param Flag Constants</h3><p>The Param Flag constants are a set of bit-flags that specify
+certain aspects of parameters that can be configured.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.PARAM_READABLE</code></span></p></td><td>The parameter is readable</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_WRITABLE</code></span></p></td><td>The parameter is writable</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_CONSTRUCT</code></span></p></td><td>The parameter will be set upon object
+ construction</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_CONSTRUCT_ONLY</code></span></p></td><td>The parameter will only be set upon object
+ construction</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_LAX_VALIDATION</code></span></p></td><td>Upon parameter conversion strict validation is not
+ required</td></tr></tbody></table></div><div class="refsect2" title="GObject Signal Flag Constants"><a name="gobject-signal-constants"></a><h3>GObject Signal Flag Constants</h3><p>The Signal Flag constants are a set of bit-flags that specify a
+signal's behavior. The overall signal description outlines how especially
+the <code class="literal">RUN</code> flags control the stages of a signal
+emission.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_FIRST</code></span></p></td><td>Invoke the object method handler in the first emission
+ stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_LAST</code></span></p></td><td>Invoke the object method handler in the third emission
+ stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_CLEANUP</code></span></p></td><td>Invoke the object method handler in the last emission
+ stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_RECURSE</code></span></p></td><td>Signals being emitted for an object while currently
+ being in emission for this very object will not be emitted
+ recursively, but instead cause the first emission to be
+ restarted.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_DETAILED</code></span></p></td><td>This signal supports "::detail" appendices to the
+ signal name upon handler connections and emissions.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_ACTION</code></span></p></td><td>Action signals are signals that may freely be emitted
+ on alive objects from user code via the <a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit"><code class="methodname">gobject.emit</code>()</a>
+ method and friends, without the need of being embedded into
+ extra code that performs pre or post emission adjustments on the
+ object. They can also be thought of as object methods which can
+ be called generically by third-party code.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_HOOKS</code></span></p></td><td>No emissions hooks are supported for this
+ signal.</td></tr></tbody></table></div><div class="refsect2" title="GObject Spawn Flag Constants"><a name="gobject-spawn-flag-constants"></a><h3>GObject Spawn Flag Constants</h3><p>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <PYGTKDOCLINK HREF="function-gobject--spawn-async"><code class="function">gobject.spawn_async</code>()</PYGTKDOCLINK>
+function.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN</code></span></p></td><td>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <code class="function">exec</code>() in the child.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_DO_NOT_REAP_CHILD</code></span></p></td><td>the child will not be automatically reaped; you must
+call <code class="function">waitpid</code>() or handle <code class="literal">SIGCHLD</code>
+yourself, or the child will become a zombie.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_SEARCH_PATH</code></span></p></td><td><em class="parameter"><code>argv</code></em>[0] need not be an absolute
+path, it will be looked for in the user's <code class="envar">PATH</code>.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_STDOUT_TO_DEV_NULL</code></span></p></td><td>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_STDERR_TO_DEV_NULL</code></span></p></td><td>the child's standard error will be discarded.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_CHILD_INHERITS_STDIN</code></span></p></td><td>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_FILE_AND_ARGV_ZERO</code></span></p></td><td>the first element of <em class="parameter"><code>argv</code></em> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <PYGTKDOCLINK HREF="function-gobject--spawn-async"><code class="function">gobject.spawn_async</code>()</PYGTKDOCLINK>
+uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and passes all
+of <em class="parameter"><code>argv</code></em> to the child.</td></tr></tbody></table></div><div class="refsect2" title="GObject Built-in Type Constants"><a name="gobject-type-constants"></a><h3>GObject Built-in Type Constants</h3><p>The Built-in Type constants specify the pre-defined types used
+by gobject.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INVALID</code></span></p></td><td>An invalid type, used as error return value in some
+ functions.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_NONE</code></span></p></td><td>A fundamental type indicating no type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INTERFACE</code></span></p></td><td>The fundamental type from which all interfaces are
+ derived.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_CHAR</code></span></p></td><td>The fundamental type corresponding to a
+ character. This maps to a string in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_UCHAR</code></span></p></td><td>The fundamental type corresponding to an unsigned
+ character. This maps to a string in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_BOOLEAN</code></span></p></td><td>The fundamental type corresponding to a True or False
+ value. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INT</code></span></p></td><td>The fundamental type corresponding to an
+ integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_UINT</code></span></p></td><td>he fundamental type corresponding to an unsigned
+ integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_LONG</code></span></p></td><td>The fundamental type corresponding to a long
+ integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_ULONG</code></span></p></td><td>The fundamental type corresponding to an unsigned
+ integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INT64</code></span></p></td><td>The fundamental type corresponding to an long long
+ integer. This maps to a long integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_UINT64</code></span></p></td><td>The fundamental type corresponding to an unsigned long
+ long integer. This maps to a long integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_ENUM</code></span></p></td><td>The fundamental type corresponding to an enumeration
+ type. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_FLAGS</code></span></p></td><td>The fundamental type corresponding to a flag
+ type. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_FLOAT</code></span></p></td><td>The fundamental type corresponding to a floating point
+ number. This maps to a float in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_DOUBLE</code></span></p></td><td>The fundamental type corresponding to a double
+ floating point number. This maps to a float in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_STRING</code></span></p></td><td>The fundamental type corresponding to a string.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_POINTER</code></span></p></td><td>The fundamental type corresponding to a pointer to an
+ anonymous type. This has no corresponding Python type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_BOXED</code></span></p></td><td>The fundamental type corresponding to a boxed object
+ type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_PARAM</code></span></p></td><td>The fundamental type corresponding to a GParamSpec
+ type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_OBJECT</code></span></p></td><td>The fundamental type corresponding to a GObject
+ type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_PYOBJECT</code></span></p></td><td>The fundamental type corresponding to a Python Object
+ type.</td></tr></tbody></table></div><div class="refsect2" title="GObject Version Constants"><a name="gobject-version-constants"></a><h3>GObject Version Constants</h3><p>The Version constants specify the version of
+<code class="literal">GLIB</code> used by PyGTK as a 3-tuple containing the major,
+minor and patch release numbers.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.glib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
+ numbers.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGio Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/gobject-functions.html b/docs/html/gobject-functions.html
new file mode 100644
index 0000000..1f76f55
--- /dev/null
+++ b/docs/html/gobject-functions.html
@@ -0,0 +1,134 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Functions</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectginterface.html" title="gobject.GInterface"><link rel="next" href="gobject-constants.html" title="gobject Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectginterface.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Functions"><a name="gobject-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Functions</h2><p>gobject Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id2940979"></a><h2>Synopsis</h2><pre class="programlisting">
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-name" title="gobject.type_name">gobject.type_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-from-name" title="gobject.type_from_name">gobject.type_from_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type_name</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-parent" title="gobject.type_parent">gobject.type_parent</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-is-a" title="gobject.type_is_a">gobject.type_is_a</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>parent_type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-children" title="gobject.type_children">gobject.type_children</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-interfaces" title="gobject.type_interfaces">gobject.type_interfaces</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-register" title="gobject.type_register">gobject.type_register</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>class</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-new" title="gobject.signal_new">gobject.signal_new</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>signal_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>return_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>param_types</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-list-names" title="gobject.signal_list_names">gobject.signal_list_names</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-list-ids" title="gobject.signal_list_ids">gobject.signal_list_ids</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup">gobject.signal_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-name" title="gobject.signal_name">gobject.signal_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-query1" title="gobject.signal_query">gobject.signal_query</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-query2" title="gobject.signal_query">gobject.signal_query</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--list-properties" title="gobject.list_properties">gobject.list_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--new" title="gobject.new">gobject.new</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-accumulator-true-handled" title="gobject.signal_accumulator_true_handled">gobject.signal_accumulator_true_handled</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--add-emission-hook" title="gobject.add_emission_hook">gobject.add_emission_hook</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--remove-emission-hook" title="gobject.remove_emission_hook">gobject.remove_emission_hook</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hook_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject---install-metaclass" title="gobject._install_metaclass">gobject._install_metaclass</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>metaclass</code></em></span></span>)</code>
+ </pre></div><div class="refsect1" title="Description"><a name="id2917583"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGTK</code> gobject
+module but are not directly associated with a specific class.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+ Many functions that previously were in this namespace got moved to <a class="link" href="glib-functions.html" title="glib Functions"><code class="literal">glib</code></a> namespace instead. They
+ are still available in <code class="literal">gobject</code> for backward compatibility, but
+ not documented here. If you miss documentation for some function, be sure to
+ check <a class="link" href="glib-functions.html" title="glib Functions"><code class="literal">glib</code></a> first.
+ </p></div></div><div class="refsect1" title="Functions"><a name="id2972661"></a><h2>Functions</h2><div class="refsect2" title="gobject.type_name"><a name="function-gobject--type-name"></a><h3>gobject.type_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><p>The <code class="function">gobject.type_name</code>() function returns
+the unique name that is assigned to the specified
+<em class="parameter"><code>type</code></em>. <em class="parameter"><code>type</code></em> can be a GObject
+type, type ID or instance. This function raises a TypeError exception
+if <em class="parameter"><code>type</code></em> isn't a <code class="literal">PyGTK</code> type.</p></div><div class="refsect2" title="gobject.type_from_name"><a name="function-gobject--type-from-name"></a><h3>gobject.type_from_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_from_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td><td>a string containing the name of a
+type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the type ID named
+<em class="parameter"><code>type_name</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_from_name</code>() function
+returns the type ID of the <code class="literal">PyGTK</code> type with the name
+specified by <em class="parameter"><code>type_name</code></em>. This function raises a
+RuntimeError exception if no type matches
+<em class="parameter"><code>type_name</code></em>.</p></div><div class="refsect2" title="gobject.type_parent"><a name="function-gobject--type-parent"></a><h3>gobject.type_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_parent</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the parent type ID</td></tr></tbody></table><p>The <code class="function">gobject.type_parent</code>() function returns
+the direct parent type ID of the specified <em class="parameter"><code>type</code></em>.
+<em class="parameter"><code>type</code></em> can be a GObject type, type ID or instance. If
+<em class="parameter"><code>type</code></em> has no parent, i.e. is a fundamental type, the
+RuntimeError exception is raised. </p></div><div class="refsect2" title="gobject.type_is_a"><a name="function-gobject--type-is-a"></a><h3>gobject.type_is_a</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_is_a</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>parent_type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><em class="parameter"><code>parent_type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if
+<em class="parameter"><code>parent_type</code></em> is an ancestor of
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_is_a</code>() function returns
+<code class="literal">TRUE</code> if the specified <em class="parameter"><code>type</code></em> is a
+descendant of the type specified by <em class="parameter"><code>parent_type</code></em>. This
+function also returns <code class="literal">TRUE</code> if
+<em class="parameter"><code>parent_type</code></em> is an interface and
+<em class="parameter"><code>type</code></em> conforms to it.</p></div><div class="refsect2" title="gobject.type_children"><a name="function-gobject--type-children"></a><h3>gobject.type_children</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_children</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the child types of
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_children</code>() function
+returns a list containing the child types of the specified
+<em class="parameter"><code>type</code></em>.</p></div><div class="refsect2" title="gobject.type_interfaces"><a name="function-gobject--type-interfaces"></a><h3>gobject.type_interfaces</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_interfaces</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the interface types supported by
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_interfaces</code>() function
+returns a list of the interface types supported by
+<em class="parameter"><code>type</code></em>. <em class="parameter"><code>type</code></em> can be a GObject
+type, type ID or instance. This function returns a RuntimeError exception if
+type is not a valid type or has no interfaces.</p></div><div class="refsect2" title="gobject.type_register"><a name="function-gobject--type-register"></a><h3>gobject.type_register</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_register</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>class</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td><td>a Python class that is a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a></td></tr></tbody></table><p>The <code class="function">gobject.type_register</code>() function
+registers the specified Python <em class="parameter"><code>class</code></em> as a PyGTK type.
+class must be a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>. The function generates a name for the new type.</p></div><div class="refsect2" title="gobject.signal_new"><a name="function-gobject--signal-new"></a><h3>gobject.signal_new</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_new</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>signal_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>return_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>param_types</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>signal_name</code></em> :</span></p></td><td>a string containing the name of the
+signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>the object type that the signal is associated
+with</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>the signal flags</td></tr><tr><td><p><span class="term"><em class="parameter"><code>return_type</code></em> :</span></p></td><td>the return type of the signal
+handler</td></tr><tr><td><p><span class="term"><em class="parameter"><code>param_types</code></em> :</span></p></td><td>the parameter types passed to the signal
+handler</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a unique integer signal ID</td></tr></tbody></table><p>The <code class="function">gobject.signal_new</code>() function registers
+a signal with the specified <em class="parameter"><code>signal_name</code></em> for the
+specified object <em class="parameter"><code>type</code></em>. The value of
+<em class="parameter"><code>flags</code></em> is a combination of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_FIRST</code></span></p></td><td>Invoke the object method handler in the first emission
+stage. </td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_LAST</code></span></p></td><td>Invoke the object method handler in the third emission
+stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_CLEANUP</code></span></p></td><td>Invoke the object method handler in the last emission
+stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_RECURSE</code></span></p></td><td>Signals being emitted for an object while currently
+being in emission for this very object will not be emitted recursively, but
+instead cause the first emission to be restarted.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_DETAILED</code></span></p></td><td>This signal supports "::detail" appendixes to the
+signal name upon handler connections and emissions.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_ACTION</code></span></p></td><td>Action signals are signals that may freely be emitted
+on alive objects from user code via <a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit"><code class="methodname">gobject.emit()</code>()</a>
+and friends, without the need of being embedded into extra code that
+performs pre or post emission adjustments on the object. They can also be
+thought of as generically callable object methods.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_HOOKS</code></span></p></td><td> No emissions hooks are supported for this
+signal.</td></tr></tbody></table><p><em class="parameter"><code>return_type</code></em> is the type of the return
+value from a signal handler and may be a gobject type, type ID or instance.
+The <em class="parameter"><code>param_types</code></em> parameter is a list of additional
+types that are passed to the signal handler. Each parameter type may be
+specified as a gobject type, type ID or instance. For example, to add a
+signal to the gtk.Window type called "my-signal" that calls a handler with a
+gtk.Button widget and an integer value and a return value that is a
+boolean, use:</p><pre class="programlisting">
+ gobject.signal_new("my_signal", gtk.Window, gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN, (gtk.Button, gobject.TYPE_INT))
+</pre></div><div class="refsect2" title="gobject.signal_list_names"><a name="function-gobject--signal-list-names"></a><h3>gobject.signal_list_names</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_list_names</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the signal names supported by
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.signal_list_names</code>() function
+returns a list of the names of the signals that are supported by the
+specified GObject <em class="parameter"><code>type</code></em></p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The type keyword is available in PyGTK 2.6 and above.</p></div></div><div class="refsect2" title="gobject.signal_list_ids"><a name="function-gobject--signal-list-ids"></a><h3>gobject.signal_list_ids</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_list_ids</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the signal ids supported by
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_list_ids</code>() function
+returns a list of the integer ids of the signals that are supported by the
+GObject specified by <em class="parameter"><code>type</code></em></p></div><div class="refsect2" title="gobject.signal_lookup"><a name="function-gobject--signal-lookup"></a><h3>gobject.signal_lookup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_lookup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>the name of a signal for
+<em class="parameter"><code>type</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the integer id of a signal supported by
+<em class="parameter"><code>type</code></em> or 0.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_lookup</code>() function
+returns the id of the signal with the name specified by
+<em class="parameter"><code>name</code></em> that is supported by the GObject specified
+specified by<em class="parameter"><code>type</code></em>. 0 is returned if the signal is not
+found.</p></div><div class="refsect2" title="gobject.signal_name"><a name="function-gobject--signal-name"></a><h3>gobject.signal_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>signal_id</code></strong> :</span></p></td><td>an integer signal id</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the signal or
+<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_name</code>() function returns
+the name of the signal that has the signal id specified by
+<em class="parameter"><code>id</code></em>.</p></div><div class="refsect2" title="gobject.signal_query"><a name="function-gobject--signal-query1"></a><h3>gobject.signal_query</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_query</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>the name of a signal for
+<em class="parameter"><code>type</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 6-tuple containing signal information or
+<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_query</code>() function returns
+a 6-tuple containing information about the signal with the name specified by
+<em class="parameter"><code>name</code></em> that is supported by the GObject specified by
+<em class="parameter"><code>type</code></em>. If the signal is not found
+<code class="literal">None</code> is returned.</p><p>The signal information 6-tuple contains:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the integer signal id</li><li class="listitem">the signal name</li><li class="listitem">the GType that the signal is registered for</li><li class="listitem">the signal flags (see the <a class="xref" href="gobject-constants.html#gobject-signal-constants" title="GObject Signal Flag Constants">GObject Signal Flag Constants</a>)</li><li class="listitem">the GType of the return from the signal callback
+function</li><li class="listitem">a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <code class="literal">PyGTK</code> signal callback parameters.</li></ul></div></div><div class="refsect2" title="gobject.signal_query"><a name="function-gobject--signal-query2"></a><h3>gobject.signal_query</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_query</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>signal_id</code></strong> :</span></p></td><td>the integer id of a signal</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 6-tuple containing signal information or
+<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_query</code>() function returns
+a 6-tuple containing information about the signal with the id specified by
+<em class="parameter"><code>signal_id</code></em>. If the signal is not found
+<code class="literal">None</code> is returned.</p><p>The signal information 6-tuple contains:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the integer signal id</li><li class="listitem">the signal name</li><li class="listitem">the GType that the signal is registered for</li><li class="listitem">the signal flags (see the <a class="xref" href="gobject-constants.html#gobject-signal-constants" title="GObject Signal Flag Constants">GObject Signal Flag Constants</a>)</li><li class="listitem">the GType of the return from the signal callback
+function</li><li class="listitem">a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <code class="literal">PyGTK</code> signal callback parameters.</li></ul></div></div><div class="refsect2" title="gobject.list_properties"><a name="function-gobject--list-properties"></a><h3>gobject.list_properties</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.list_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the properties (as GParam objects)
+supported by <em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.list_properties</code>() function
+returns a list of the properties (as GParam objects) supported by
+<em class="parameter"><code>type</code></em>.</p></div><div class="refsect2" title="gobject.new"><a name="function-gobject--new"></a><h3>gobject.new</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.new</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more property-value
+pairs</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new object if the specified
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.new</code>() function returns a new
+object of the specified <em class="parameter"><code>type</code></em>. type must specify a
+type that is a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>. A
+TypeError exception is raised if <em class="parameter"><code>type</code></em> specifies an
+abstract class or a type that is not a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>. A set
+of property-value pairs may be specified to set the value of the object's
+properties.</p></div><div class="refsect2" title="gobject.signal_accumulator_true_handled"><a name="function-gobject--signal-accumulator-true-handled"></a><h3>gobject.signal_accumulator_true_handled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.signal_accumulator_true_handled</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">signal_accumulator_true_handled</code>()
+ function is only used as accumulator argument when registering
+ signals.</p></div><div class="refsect2" title="gobject.add_emission_hook"><a name="function-gobject--add-emission-hook"></a><h3>gobject.add_emission_hook</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.add_emission_hook</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>type</em></span> :</span></p></td><td>a Python GObject instance or
+ type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>a signal name</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>callback</em></span> :</span></p></td><td>a function</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>...</em></span> :</span></p></td><td>zero or more extra arguments that will be
+ passed to callback.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the hook id, for later use with <PYGTKDOCLINK HREF="function-gobject--signal-remove-emission-hook"><code class="function">gobject.signal_remove_emission_hook</code>()</PYGTKDOCLINK>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">add_emission_hook</code>() function adds an
+ emission hook for the signal specified by <em class="parameter"><code>name</code></em>,
+ which will get called for any emission of that signal, independent of
+ the instance. This is possible only for signals which don't have the
+ <code class="literal">gobject.SIGNAL_NO_HOOKS</code> flag set.</p></div><div class="refsect2" title="gobject.remove_emission_hook"><a name="function-gobject--remove-emission-hook"></a><h3>gobject.remove_emission_hook</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.remove_emission_hook</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hook_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>type</em></span> :</span></p></td><td>a Python GObject instance or
+ type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>a signal name</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>hook_id</em></span> :</span></p></td><td>the id of the emission hook as returned by the
+ <a class="link" href="gobject-functions.html#function-gobject--add-emission-hook" title="gobject.add_emission_hook"><code class="function">gobject.add_emission_hook</code>()</a>)
+ function.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">remove_emission_hook</code>() function deletes
+ an emission hook.</p></div><div class="refsect2" title="gobject._install_metaclass"><a name="function-gobject---install-metaclass"></a><h3>gobject._install_metaclass</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject._install_metaclass</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>metaclass</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>metaclass</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">_install_metaclass</code>() function installs
+ the metaclass specified by <em class="parameter"><code>metaclass</code></em>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectginterface.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GInterface </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject Constants</td></tr></table></div></body></html>
diff --git a/docs/html/index.html b/docs/html/index.html
new file mode 100644
index 0000000..fe8c44c
--- /dev/null
+++ b/docs/html/index.html
@@ -0,0 +1,6 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGObject Reference Manual</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><meta name="description" content="This reference describes the classes of the python gobject module."><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="next" href="pygobject-introduction.html" title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGObject Reference Manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr></table><hr></div><div class="book" title="PyGObject Reference Manual"><div class="titlepage"><div><div><h1 class="title"><a name="pygobject-reference"></a>PyGObject Reference Manual</h1></div><div><p class="releaseinfo">for PyGObject version 2.21.2</p></div><div><p class="pubdate">2010-06-10
+</p></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>This reference describes the classes of the python gobject
+module.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="pygobject-introduction.html">Introduction</a></span></dt><dd><dl><dt><span class="sect1"><a href="pygobject-introduction.html#pygobject-reference-format">Reference Page Format</a></span></dt></dl></dd><dt><span class="chapter"><a href="glib-class-reference.html">PyGlibClass Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-glibmaincontext.html">glib.MainContext</a></span><span class="refpurpose"> — an object representing a set of event sources to be handled
+in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</span></dt><dt><span class="refentrytitle"><a href="class-glibmainloop.html">glib.MainLoop</a></span><span class="refpurpose"> — an object representing the main event loop of a PyGTK
+ application.</span></dt><dt><span class="refentrytitle"><a href="glib-functions.html">glib Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="glib-constants.html">glib Constants</a></span><span class="refpurpose"> — the built-in constants of the glib module</span></dt></dl></dd><dt><span class="chapter"><a href="gobject-class-reference.html">PyGObject Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-gobject.html">gobject.GObject</a></span><span class="refpurpose"> — the base class</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgboxed.html">gobject.GBoxed</a></span><span class="refpurpose"> — an object containing an opaque chunk of data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgpointer.html">gobject.GPointer</a></span><span class="refpurpose"> — an object containing a completely opaque chunk of
+ data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectginterface.html">gobject.GInterface</a></span><span class="refpurpose"> — an object representing a GInterface</span></dt><dt><span class="refentrytitle"><a href="gobject-functions.html">gobject Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="gobject-constants.html">gobject Constants</a></span><span class="refpurpose"> — the built-in constants of the gobject module</span></dt></dl></dd><dt><span class="chapter"><a href="gio-class-reference.html">PyGio Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-gioappinfo.html">gio.AppInfo</a></span><span class="refpurpose"> — Information about an installed application and methods to launch it (with file arguments).</span></dt><dt><span class="refentrytitle"><a href="class-gioapplaunchcontext.html">gio.AppLaunchContext</a></span><span class="refpurpose"> — Application launch context.</span></dt><dt><span class="refentrytitle"><a href="class-gioasyncresult.html">gio.AsyncResult</a></span><span class="refpurpose"> — Asynchronous Function Results.</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedinputstream.html">gio.BufferedInputStream</a></span><span class="refpurpose"> — Buffered Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedoutputstream.html">gio.BufferedOutputStream</a></span><span class="refpurpose"> — Buffered Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giocancellable.html">gio.Cancellable</a></span><span class="refpurpose"> — Thread-safe Operation Cancellation Stack.</span></dt><dt><span class="refentrytitle"><a href="class-giodatainputstream.html">gio.DataInputStream</a></span><span class="refpurpose"> — Data Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodataoutputstream.html">gio.DataOutputStream</a></span><span class="refpurpose"> — Data Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodrive.html">gio.Drive</a></span><span class="refpurpose"> — Virtual File System drive management.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblem.html">gio.Emblem</a></span><span class="refpurpose"> — An object for emblems.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblemedicon.html">gio.EmblemedIcon</a></span><span class="refpurpose"> — Icon with emblems.</span></dt><dt><span class="refentrytitle"><a href="class-giofile.html">gio.File</a></span><span class="refpurpose"> — File and Directory Handling.</span></dt><dt><span class="refentrytitle"><a href="class-giofileattributeinfo.html">gio.FileAttributeInfo</a></span><span class="refpurpose"> — Information about a specific attribute.</span></dt><dt><span class="refentrytitle"><a href="class-giofileenumerator.html">gio.FileEnumerator</a></span><span class="refpurpose"> — Enumerated Files Routines.</span></dt><dt><span class="refentrytitle"><a href="class-giofileicon.html">gio.FileIcon</a></span><span class="refpurpose"> — Icons pointing to an image file.</span></dt><dt><span class="refentrytitle"><a href="class-giofileinfo.html">gio.FileInfo</a></span><span class="refpurpose"> — File Information and Attributes</span></dt><dt><span class="refentrytitle"><a href="class-giofileinputstream.html">gio.FileInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilemonitor.html">gio.FileMonitor</a></span><span class="refpurpose"> — File Monitor</span></dt><dt><span class="refentrytitle"><a href="class-giofileoutputstream.html">gio.FileOutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilterinputstream.html">gio.FilterInputStream</a></span><span class="refpurpose"> — Filter Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giofilteroutputstream.html">gio.FilterOutputStream</a></span><span class="refpurpose"> — Filter Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-gioicon.html">gio.Icon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-gioinputstream.html">gio.InputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioloadableicon.html">gio.LoadableIcon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryinputstream.html">gio.MemoryInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryoutputstream.html">gio.MemoryOutputStream</a></span><span class="refpurpose"> — Streaming output operations on memory chunks</span></dt><dt><span class="refentrytitle"><a href="class-giomount.html">gio.Mount</a></span><span class="refpurpose"> — Mount management</span></dt><dt><span class="refentrytitle"><a href="class-giomountoperation.html">gio.MountOperation</a></span><span class="refpurpose"> — Authentication methods for mountable locations.</span></dt><dt><span class="refentrytitle"><a href="class-giooutputstream.html">gio.OutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioseekable.html">gio.Seekable</a></span><span class="refpurpose"> — Stream seeking interface.</span></dt><dt><span class="refentrytitle"><a href="class-giosimpleasyncresult.html">gio.SimpleAsyncResult</a></span><span class="refpurpose"> — Simple asynchronous results implementation.</span></dt><dt><span class="refentrytitle"><a href="class-giothemedicon.html">gio.ThemedIcon</a></span><span class="refpurpose"> — Icon theming support.</span></dt><dt><span class="refentrytitle"><a href="class-giovolume.html">gio.Volume</a></span><span class="refpurpose"> — Volume management.</span></dt><dt><span class="refentrytitle"><a href="class-giovolumemonitor.html">gio.VolumeMonitor</a></span><span class="refpurpose"> — Volume Monitor.</span></dt><dt><span class="refentrytitle"><a href="gio-functions.html">gio Functions</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="gio-constants.html">gio Constants</a></span><span class="refpurpose"> — the built-in constants of the gio module</span></dt></dl></dd><dt><span class="chapter"><a href="giounix-class-reference.html">PyGio Unix Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-giounixinputstream.html">gio.unix.InputStream</a></span><span class="refpurpose"> — Streaming input operations for UNIX file descriptors.</span></dt><dt><span class="refentrytitle"><a href="class-giounixoutputstream.html">gio.unix.OutputStream</a></span><span class="refpurpose"> — Streaming output operations for UNIX file descriptors.</span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Introduction</td></tr></table></div></body></html>
diff --git a/docs/html/index.sgml b/docs/html/index.sgml
new file mode 100644
index 0000000..e9b5432
--- /dev/null
+++ b/docs/html/index.sgml
@@ -0,0 +1,532 @@
+<ANCHOR id="pygobject-reference" href="pygobject/index.html">
+ <ANCHOR id="class-glibmaincontext" href="pygobject/class-glibmaincontext.html">
+ <ANCHOR id="constructor-glibmaincontext" href="pygobject/class-glibmaincontext.html#constructor-glibmaincontext">
+ <ANCHOR id="method-glibmaincontext--iteration" href="pygobject/class-glibmaincontext.html#method-glibmaincontext--iteration">
+ <ANCHOR id="method-glibmaincontext--pending" href="pygobject/class-glibmaincontext.html#method-glibmaincontext--pending">
+ <ANCHOR id="class-glibmainloop" href="pygobject/class-glibmainloop.html">
+ <ANCHOR id="constructor-glibmainloop" href="pygobject/class-glibmainloop.html#constructor-glibmainloop">
+ <ANCHOR id="method-glibmainloop--get-context" href="pygobject/class-glibmainloop.html#method-glibmainloop--get-context">
+ <ANCHOR id="method-glibmainloop--is-running" href="pygobject/class-glibmainloop.html#method-glibmainloop--is-running">
+ <ANCHOR id="method-glibmainloop--quit" href="pygobject/class-glibmainloop.html#method-glibmainloop--quit">
+ <ANCHOR id="method-glibmainloop--run" href="pygobject/class-glibmainloop.html#method-glibmainloop--run">
+ <ANCHOR id="glib-functions" href="pygobject/glib-functions.html">
+ <ANCHOR id="function-glib--idle-add" href="pygobject/glib-functions.html#function-glib--idle-add">
+ <ANCHOR id="function-glib--timeout-add" href="pygobject/glib-functions.html#function-glib--timeout-add">
+ <ANCHOR id="function-glib--timeout-add-seconds" href="pygobject/glib-functions.html#function-glib--timeout-add-seconds">
+ <ANCHOR id="function-glib--io-add-watch" href="pygobject/glib-functions.html#function-glib--io-add-watch">
+ <ANCHOR id="function-glib--source-remove" href="pygobject/glib-functions.html#function-glib--source-remove">
+ <ANCHOR id="function-glib--main-context-default" href="pygobject/glib-functions.html#function-glib--main-context-default">
+ <ANCHOR id="function-glib--markup-escape-text" href="pygobject/glib-functions.html#function-glib--markup-escape-text">
+ <ANCHOR id="function-glib--child-watch-add" href="pygobject/glib-functions.html#function-glib--child-watch-add">
+ <ANCHOR id="function-glib--spawn-async" href="pygobject/glib-functions.html#function-glib--spawn-async">
+ <ANCHOR id="function-glib--get-current-time" href="pygobject/glib-functions.html#function-glib--get-current-time">
+ <ANCHOR id="function-glib--get-user-cache-dir" href="pygobject/glib-functions.html#function-glib--get-user-cache-dir">
+ <ANCHOR id="function-glib--get-user-config-dir" href="pygobject/glib-functions.html#function-glib--get-user-config-dir">
+ <ANCHOR id="function-glib--get-user-data-dir" href="pygobject/glib-functions.html#function-glib--get-user-data-dir">
+ <ANCHOR id="function-glib--get-user-special-dir" href="pygobject/glib-functions.html#function-glib--get-user-special-dir">
+ <ANCHOR id="function-glib--main-depth" href="pygobject/glib-functions.html#function-glib--main-depth">
+ <ANCHOR id="function-glib--threads-init" href="pygobject/glib-functions.html#function-glib--threads-init">
+ <ANCHOR id="function-glib--signal-accumulator-true-handled" href="pygobject/glib-functions.html#function-glib--signal-accumulator-true-handled">
+ <ANCHOR id="function-glib--filename-display-name" href="pygobject/glib-functions.html#function-glib--filename-display-name">
+ <ANCHOR id="function-glib--filename-display-basename" href="pygobject/glib-functions.html#function-glib--filename-display-basename">
+ <ANCHOR id="function-glib--filename-from-utf8" href="pygobject/glib-functions.html#function-glib--filename-from-utf8">
+ <ANCHOR id="glib-constants" href="pygobject/glib-constants.html">
+ <ANCHOR id="glib-constants-description" href="pygobject/glib-constants.html#glib-constants-description">
+ <ANCHOR id="glib-io-condition-constants" href="pygobject/glib-constants.html#glib-io-condition-constants">
+ <ANCHOR id="glib-priority-constants" href="pygobject/glib-constants.html#glib-priority-constants">
+ <ANCHOR id="glib-spawn-flag-constants" href="pygobject/glib-constants.html#glib-spawn-flag-constants">
+ <ANCHOR id="glib-user-directory-constants" href="pygobject/glib-constants.html#glib-user-directory-constants">
+ <ANCHOR id="glib-version-constants" href="pygobject/glib-constants.html#glib-version-constants">
+ <ANCHOR id="class-gobject" href="pygobject/class-gobject.html">
+ <ANCHOR id="signal-prototypes-gobject" href="pygobject/class-gobject.html#signal-prototypes-gobject">
+ <ANCHOR id="method-gobject--get-property" href="pygobject/class-gobject.html#method-gobject--get-property">
+ <ANCHOR id="method-gobject--get-properties" href="pygobject/class-gobject.html#method-gobject--get-properties">
+ <ANCHOR id="method-gobject--set-property" href="pygobject/class-gobject.html#method-gobject--set-property">
+ <ANCHOR id="method-gobject--set-properties" href="pygobject/class-gobject.html#method-gobject--set-properties">
+ <ANCHOR id="method-gobject--freeze-notify" href="pygobject/class-gobject.html#method-gobject--freeze-notify">
+ <ANCHOR id="method-gobject--notify" href="pygobject/class-gobject.html#method-gobject--notify">
+ <ANCHOR id="method-gobject--thaw-notify" href="pygobject/class-gobject.html#method-gobject--thaw-notify">
+ <ANCHOR id="method-gobject--get-data" href="pygobject/class-gobject.html#method-gobject--get-data">
+ <ANCHOR id="method-gobject--set-data" href="pygobject/class-gobject.html#method-gobject--set-data">
+ <ANCHOR id="method-gobject--connect" href="pygobject/class-gobject.html#method-gobject--connect">
+ <ANCHOR id="method-gobject--connect-after" href="pygobject/class-gobject.html#method-gobject--connect-after">
+ <ANCHOR id="method-gobject--connect-object" href="pygobject/class-gobject.html#method-gobject--connect-object">
+ <ANCHOR id="method-gobject--connect-object-after" href="pygobject/class-gobject.html#method-gobject--connect-object-after">
+ <ANCHOR id="method-gobject--disconnect" href="pygobject/class-gobject.html#method-gobject--disconnect">
+ <ANCHOR id="method-gobject--handler-disconnect" href="pygobject/class-gobject.html#method-gobject--handler-disconnect">
+ <ANCHOR id="method-gobject--handler-is-connected" href="pygobject/class-gobject.html#method-gobject--handler-is-connected">
+ <ANCHOR id="method-gobject--handler-block" href="pygobject/class-gobject.html#method-gobject--handler-block">
+ <ANCHOR id="method-gobject--handler-unblock" href="pygobject/class-gobject.html#method-gobject--handler-unblock">
+ <ANCHOR id="method-gobject--handler-block-by-func" href="pygobject/class-gobject.html#method-gobject--handler-block-by-func">
+ <ANCHOR id="method-gobject--handler-unblock-by-func" href="pygobject/class-gobject.html#method-gobject--handler-unblock-by-func">
+ <ANCHOR id="method-gobject--emit" href="pygobject/class-gobject.html#method-gobject--emit">
+ <ANCHOR id="method-gobject--stop-emission" href="pygobject/class-gobject.html#method-gobject--stop-emission">
+ <ANCHOR id="method-gobject--emit-stop-by-name" href="pygobject/class-gobject.html#method-gobject--emit-stop-by-name">
+ <ANCHOR id="method-gobject--chain" href="pygobject/class-gobject.html#method-gobject--chain">
+ <ANCHOR id="signal-gobject--notify" href="pygobject/class-gobject.html#signal-gobject--notify">
+ <ANCHOR id="class-gobjectgboxed" href="pygobject/class-gobjectgboxed.html">
+ <ANCHOR id="method-gobjectgboxed--copy" href="pygobject/class-gobjectgboxed.html#method-gobjectgboxed--copy">
+ <ANCHOR id="class-gobjectgpointer" href="pygobject/class-gobjectgpointer.html">
+ <ANCHOR id="class-gobjectginterface" href="pygobject/class-gobjectginterface.html">
+ <ANCHOR id="gobject-functions" href="pygobject/gobject-functions.html">
+ <ANCHOR id="function-gobject--type-name" href="pygobject/gobject-functions.html#function-gobject--type-name">
+ <ANCHOR id="function-gobject--type-from-name" href="pygobject/gobject-functions.html#function-gobject--type-from-name">
+ <ANCHOR id="function-gobject--type-parent" href="pygobject/gobject-functions.html#function-gobject--type-parent">
+ <ANCHOR id="function-gobject--type-is-a" href="pygobject/gobject-functions.html#function-gobject--type-is-a">
+ <ANCHOR id="function-gobject--type-children" href="pygobject/gobject-functions.html#function-gobject--type-children">
+ <ANCHOR id="function-gobject--type-interfaces" href="pygobject/gobject-functions.html#function-gobject--type-interfaces">
+ <ANCHOR id="function-gobject--type-register" href="pygobject/gobject-functions.html#function-gobject--type-register">
+ <ANCHOR id="function-gobject--signal-new" href="pygobject/gobject-functions.html#function-gobject--signal-new">
+ <ANCHOR id="function-gobject--signal-list-names" href="pygobject/gobject-functions.html#function-gobject--signal-list-names">
+ <ANCHOR id="function-gobject--signal-list-ids" href="pygobject/gobject-functions.html#function-gobject--signal-list-ids">
+ <ANCHOR id="function-gobject--signal-lookup" href="pygobject/gobject-functions.html#function-gobject--signal-lookup">
+ <ANCHOR id="function-gobject--signal-name" href="pygobject/gobject-functions.html#function-gobject--signal-name">
+ <ANCHOR id="function-gobject--signal-query1" href="pygobject/gobject-functions.html#function-gobject--signal-query1">
+ <ANCHOR id="function-gobject--signal-query2" href="pygobject/gobject-functions.html#function-gobject--signal-query2">
+ <ANCHOR id="function-gobject--list-properties" href="pygobject/gobject-functions.html#function-gobject--list-properties">
+ <ANCHOR id="function-gobject--new" href="pygobject/gobject-functions.html#function-gobject--new">
+ <ANCHOR id="function-gobject--signal-accumulator-true-handled" href="pygobject/gobject-functions.html#function-gobject--signal-accumulator-true-handled">
+ <ANCHOR id="function-gobject--add-emission-hook" href="pygobject/gobject-functions.html#function-gobject--add-emission-hook">
+ <ANCHOR id="function-gobject--remove-emission-hook" href="pygobject/gobject-functions.html#function-gobject--remove-emission-hook">
+ <ANCHOR id="function-gobject---install-metaclass" href="pygobject/gobject-functions.html#function-gobject---install-metaclass">
+ <ANCHOR id="gobject-constants" href="pygobject/gobject-constants.html">
+ <ANCHOR id="gobject-constants-description" href="pygobject/gobject-constants.html#gobject-constants-description">
+ <ANCHOR id="gobject-param-constants" href="pygobject/gobject-constants.html#gobject-param-constants">
+ <ANCHOR id="gobject-signal-constants" href="pygobject/gobject-constants.html#gobject-signal-constants">
+ <ANCHOR id="gobject-spawn-flag-constants" href="pygobject/gobject-constants.html#gobject-spawn-flag-constants">
+ <ANCHOR id="gobject-type-constants" href="pygobject/gobject-constants.html#gobject-type-constants">
+ <ANCHOR id="gobject-version-constants" href="pygobject/gobject-constants.html#gobject-version-constants">
+ <ANCHOR id="class-gioappinfo" href="pygobject/class-gioappinfo.html">
+ <ANCHOR id="constructor-gioappinfo" href="pygobject/class-gioappinfo.html#constructor-gioappinfo">
+ <ANCHOR id="method-gioappinfo--add-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--add-supports-type">
+ <ANCHOR id="method-gioappinfo--can-delete" href="pygobject/class-gioappinfo.html#method-gioappinfo--can-delete">
+ <ANCHOR id="method-gioappinfo--can-remove-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--can-remove-supports-type">
+ <ANCHOR id="method-gioappinfo--delete" href="pygobject/class-gioappinfo.html#method-gioappinfo--delete">
+ <ANCHOR id="method-gioappinfo--dup" href="pygobject/class-gioappinfo.html#method-gioappinfo--dup">
+ <ANCHOR id="method-gioappinfo--equal" href="pygobject/class-gioappinfo.html#method-gioappinfo--equal">
+ <ANCHOR id="method-gioappinfo--get-commandline" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-commandline">
+ <ANCHOR id="method-gioappinfo--get-description" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-description">
+ <ANCHOR id="method-gioappinfo--get-executable" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-executable">
+ <ANCHOR id="method-gioappinfo--get-icon" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-icon">
+ <ANCHOR id="method-gioappinfo--get-id" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-id">
+ <ANCHOR id="method-gioappinfo--get-name" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-name">
+ <ANCHOR id="method-gioappinfo--launch" href="pygobject/class-gioappinfo.html#method-gioappinfo--launch">
+ <ANCHOR id="method-gioappinfo--launch-uris" href="pygobject/class-gioappinfo.html#method-gioappinfo--launch-uris">
+ <ANCHOR id="method-gioappinfo--remove-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--remove-supports-type">
+ <ANCHOR id="method-gioappinfo--set-as-default-for-extension" href="pygobject/class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension">
+ <ANCHOR id="method-gioappinfo--set-as-default-for-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--set-as-default-for-type">
+ <ANCHOR id="method-gioappinfo--should-show" href="pygobject/class-gioappinfo.html#method-gioappinfo--should-show">
+ <ANCHOR id="method-gioappinfo--supports-files" href="pygobject/class-gioappinfo.html#method-gioappinfo--supports-files">
+ <ANCHOR id="method-gioappinfo--supports-uris" href="pygobject/class-gioappinfo.html#method-gioappinfo--supports-uris">
+ <ANCHOR id="function-gio--app-info-get-all" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-all">
+ <ANCHOR id="function-gio--app-info-get-all-for-type" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-all-for-type">
+ <ANCHOR id="function-gio--app-info-get-default-for-type" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-default-for-type">
+ <ANCHOR id="function-gio--app-info-get-default-for-uri-scheme" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme">
+ <ANCHOR id="function-gio--app-info-reset-type-association" href="pygobject/class-gioappinfo.html#function-gio--app-info-reset-type-association">
+ <ANCHOR id="class-gioapplaunchcontext" href="pygobject/class-gioapplaunchcontext.html">
+ <ANCHOR id="constructor-gioapplaunchcontext" href="pygobject/class-gioapplaunchcontext.html#constructor-gioapplaunchcontext">
+ <ANCHOR id="method-gioapplaunchcontext--get-display" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display">
+ <ANCHOR id="method-gioapplaunchcontext--get-startup-notify-id" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id">
+ <ANCHOR id="method-gioapplaunchcontext--launch-failed" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed">
+ <ANCHOR id="class-gioasyncresult" href="pygobject/class-gioasyncresult.html">
+ <ANCHOR id="method-gioasyncresult--get-source-object" href="pygobject/class-gioasyncresult.html#method-gioasyncresult--get-source-object">
+ <ANCHOR id="class-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html">
+ <ANCHOR id="properties-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html#properties-giobufferedinputstream">
+ <ANCHOR id="constructor-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html#constructor-giobufferedinputstream">
+ <ANCHOR id="method-giobufferedinputstream--fill" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill">
+ <ANCHOR id="method-giobufferedinputstream--fill-async" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async">
+ <ANCHOR id="method-giobufferedinputstream--fill-finish" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish">
+ <ANCHOR id="method-giobufferedinputstream--get-available" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--get-available">
+ <ANCHOR id="method-giobufferedinputstream--get-buffer-size" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size">
+ <ANCHOR id="method-giobufferedinputstream--read-byte" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte">
+ <ANCHOR id="method-giobufferedinputstream--set-buffer-size" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size">
+ <ANCHOR id="function-gio--buffered-input-stream-new-sized" href="pygobject/class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized">
+ <ANCHOR id="class-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html">
+ <ANCHOR id="properties-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html#properties-giobufferedoutputstream">
+ <ANCHOR id="constructor-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html#constructor-giobufferedoutputstream">
+ <ANCHOR id="method-giobufferedoutputstream--get-auto-grow" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow">
+ <ANCHOR id="method-giobufferedoutputstream--get-buffer-size" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size">
+ <ANCHOR id="method-giobufferedoutputstream--set-auto-grow" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow">
+ <ANCHOR id="method-giobufferedoutputstream--set-buffer-size" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size">
+ <ANCHOR id="function-gio--buffered-output-stream-new-sized" href="pygobject/class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized">
+ <ANCHOR id="class-giocancellable" href="pygobject/class-giocancellable.html">
+ <ANCHOR id="constructor-giocancellable" href="pygobject/class-giocancellable.html#constructor-giocancellable">
+ <ANCHOR id="method-giocancellable--cancel" href="pygobject/class-giocancellable.html#method-giocancellable--cancel">
+ <ANCHOR id="method-giocancellable--get-fd" href="pygobject/class-giocancellable.html#method-giocancellable--get-fd">
+ <ANCHOR id="method-giocancellable--is-cancelled" href="pygobject/class-giocancellable.html#method-giocancellable--is-cancelled">
+ <ANCHOR id="method-giocancellable--pop-current" href="pygobject/class-giocancellable.html#method-giocancellable--pop-current">
+ <ANCHOR id="method-giocancellable--push-current" href="pygobject/class-giocancellable.html#method-giocancellable--push-current">
+ <ANCHOR id="method-giocancellable--reset" href="pygobject/class-giocancellable.html#method-giocancellable--reset">
+ <ANCHOR id="method-giocancellable--set-error-if-cancelled" href="pygobject/class-giocancellable.html#method-giocancellable--set-error-if-cancelled">
+ <ANCHOR id="function-gio--cancellable-get-current" href="pygobject/class-giocancellable.html#function-gio--cancellable-get-current">
+ <ANCHOR id="class-giodatainputstream" href="pygobject/class-giodatainputstream.html">
+ <ANCHOR id="properties-giodatainputstream" href="pygobject/class-giodatainputstream.html#properties-giodatainputstream">
+ <ANCHOR id="constructor-giodatainputstream" href="pygobject/class-giodatainputstream.html#constructor-giodatainputstream">
+ <ANCHOR id="method-giodatainputstream--get-byte-order" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--get-byte-order">
+ <ANCHOR id="method-giodatainputstream--get-newline-type" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--get-newline-type">
+ <ANCHOR id="method-giodatainputstream--read-byte" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-byte">
+ <ANCHOR id="method-giodatainputstream--read-int16" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int16">
+ <ANCHOR id="method-giodatainputstream--read-int32" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int32">
+ <ANCHOR id="method-giodatainputstream--read-int64" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int64">
+ <ANCHOR id="method-giodatainputstream--read-line" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line">
+ <ANCHOR id="method-giodatainputstream--read-line-async" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line-async">
+ <ANCHOR id="method-giodatainputstream--read-line-finish" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line-finish">
+ <ANCHOR id="method-giodatainputstream--read-uint16" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint16">
+ <ANCHOR id="method-giodatainputstream--read-uint32" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint32">
+ <ANCHOR id="method-giodatainputstream--read-uint64" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint64">
+ <ANCHOR id="method-giodatainputstream--read-until" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until">
+ <ANCHOR id="method-giodatainputstream--read-until-async" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until-async">
+ <ANCHOR id="method-giodatainputstream--read-until-finish" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until-finish">
+ <ANCHOR id="method-giodatainputstream--set-byte-order" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--set-byte-order">
+ <ANCHOR id="method-giodatainputstream--set-newline-type" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--set-newline-type">
+ <ANCHOR id="class-giodataoutputstream" href="pygobject/class-giodataoutputstream.html">
+ <ANCHOR id="properties-giodataoutputstream" href="pygobject/class-giodataoutputstream.html#properties-giodataoutputstream">
+ <ANCHOR id="constructor-giodataoutputstream" href="pygobject/class-giodataoutputstream.html#constructor-giodataoutputstream">
+ <ANCHOR id="method-giodataoutputstream--get-byte-order" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order">
+ <ANCHOR id="method-giodataoutputstream--put-byte" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-byte">
+ <ANCHOR id="method-giodataoutputstream--put-int16" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int16">
+ <ANCHOR id="method-giodataoutputstream--put-int32" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int32">
+ <ANCHOR id="method-giodataoutputstream--put-int64" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int64">
+ <ANCHOR id="method-giodataoutputstream--put-string" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-string">
+ <ANCHOR id="method-giodataoutputstream--put-uint16" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint16">
+ <ANCHOR id="method-giodataoutputstream--put-uint32" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint32">
+ <ANCHOR id="method-giodataoutputstream--put-uint64" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint64">
+ <ANCHOR id="method-giodataoutputstream--set-byte-order" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order">
+ <ANCHOR id="class-giodrive" href="pygobject/class-giodrive.html">
+ <ANCHOR id="method-giodrive--can-eject" href="pygobject/class-giodrive.html#method-giodrive--can-eject">
+ <ANCHOR id="method-giodrive--can-poll-for-media" href="pygobject/class-giodrive.html#method-giodrive--can-poll-for-media">
+ <ANCHOR id="method-giodrive--eject" href="pygobject/class-giodrive.html#method-giodrive--eject">
+ <ANCHOR id="method-giodrive--eject-finish" href="pygobject/class-giodrive.html#method-giodrive--eject-finish">
+ <ANCHOR id="method-giodrive--enumerate-identifiers" href="pygobject/class-giodrive.html#method-giodrive--enumerate-identifiers">
+ <ANCHOR id="method-giodrive--get-icon" href="pygobject/class-giodrive.html#method-giodrive--get-icon">
+ <ANCHOR id="method-giodrive--get-identifier" href="pygobject/class-giodrive.html#method-giodrive--get-identifier">
+ <ANCHOR id="method-giodrive--get-name" href="pygobject/class-giodrive.html#method-giodrive--get-name">
+ <ANCHOR id="method-giodrive--get-volumes" href="pygobject/class-giodrive.html#method-giodrive--get-volumes">
+ <ANCHOR id="method-giodrive--has-media" href="pygobject/class-giodrive.html#method-giodrive--has-media">
+ <ANCHOR id="method-giodrive--has-volumes" href="pygobject/class-giodrive.html#method-giodrive--has-volumes">
+ <ANCHOR id="method-giodrive--is-media-check-automatic" href="pygobject/class-giodrive.html#method-giodrive--is-media-check-automatic">
+ <ANCHOR id="method-giodrive--is-media-removable" href="pygobject/class-giodrive.html#method-giodrive--is-media-removable">
+ <ANCHOR id="method-giodrive--poll-for-media" href="pygobject/class-giodrive.html#method-giodrive--poll-for-media">
+ <ANCHOR id="method-giodrive--poll-for-media-finish" href="pygobject/class-giodrive.html#method-giodrive--poll-for-media-finish">
+ <ANCHOR id="class-gioemblem" href="pygobject/class-gioemblem.html">
+ <ANCHOR id="properties-gioemblem" href="pygobject/class-gioemblem.html#properties-gioemblem">
+ <ANCHOR id="constructor-gioemblem" href="pygobject/class-gioemblem.html#constructor-gioemblem">
+ <ANCHOR id="method-gioemblem--get-icon" href="pygobject/class-gioemblem.html#method-gioemblem--get-icon">
+ <ANCHOR id="method-gioemblem--get-origin" href="pygobject/class-gioemblem.html#method-gioemblem--get-origin">
+ <ANCHOR id="function-gio--emblem-new-with-origin" href="pygobject/class-gioemblem.html#function-gio--emblem-new-with-origin">
+ <ANCHOR id="class-gioemblemedicon" href="pygobject/class-gioemblemedicon.html">
+ <ANCHOR id="constructor-gioemblemedicon" href="pygobject/class-gioemblemedicon.html#constructor-gioemblemedicon">
+ <ANCHOR id="method-gioemblemedicon--add-emblem" href="pygobject/class-gioemblemedicon.html#method-gioemblemedicon--add-emblem">
+ <ANCHOR id="method-gioemblemedicon--get-icon" href="pygobject/class-gioemblemedicon.html#method-gioemblemedicon--get-icon">
+ <ANCHOR id="class-giofile" href="pygobject/class-giofile.html">
+ <ANCHOR id="constructor-giofile" href="pygobject/class-giofile.html#constructor-giofile">
+ <ANCHOR id="method-giofile--append-to" href="pygobject/class-giofile.html#method-giofile--append-to">
+ <ANCHOR id="method-giofile--append-to-async" href="pygobject/class-giofile.html#method-giofile--append-to-async">
+ <ANCHOR id="method-giofile--append-to-finish" href="pygobject/class-giofile.html#method-giofile--append-to-finish">
+ <ANCHOR id="method-giofile--copy" href="pygobject/class-giofile.html#method-giofile--copy">
+ <ANCHOR id="method-giofile--copy-async" href="pygobject/class-giofile.html#method-giofile--copy-async">
+ <ANCHOR id="method-giofile--copy-attributes" href="pygobject/class-giofile.html#method-giofile--copy-attributes">
+ <ANCHOR id="method-giofile--copy-finish" href="pygobject/class-giofile.html#method-giofile--copy-finish">
+ <ANCHOR id="method-giofile--create" href="pygobject/class-giofile.html#method-giofile--create">
+ <ANCHOR id="method-giofile--create-async" href="pygobject/class-giofile.html#method-giofile--create-async">
+ <ANCHOR id="method-giofile--create-finish" href="pygobject/class-giofile.html#method-giofile--create-finish">
+ <ANCHOR id="method-giofile--delete" href="pygobject/class-giofile.html#method-giofile--delete">
+ <ANCHOR id="method-giofile--dup" href="pygobject/class-giofile.html#method-giofile--dup">
+ <ANCHOR id="method-giofile--eject-mountable" href="pygobject/class-giofile.html#method-giofile--eject-mountable">
+ <ANCHOR id="method-giofile--eject-mountable-finish" href="pygobject/class-giofile.html#method-giofile--eject-mountable-finish">
+ <ANCHOR id="method-giofile--enumerate-children" href="pygobject/class-giofile.html#method-giofile--enumerate-children">
+ <ANCHOR id="method-giofile--enumerate-children-async" href="pygobject/class-giofile.html#method-giofile--enumerate-children-async">
+ <ANCHOR id="method-giofile--enumerate-children-finish" href="pygobject/class-giofile.html#method-giofile--enumerate-children-finish">
+ <ANCHOR id="method-giofile--equal" href="pygobject/class-giofile.html#method-giofile--equal">
+ <ANCHOR id="method-giofile--find-enclosing-mount" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount">
+ <ANCHOR id="method-giofile--find-enclosing-mount-async" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount-async">
+ <ANCHOR id="method-giofile--find-enclosing-mount-finish" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount-finish">
+ <ANCHOR id="method-giofile--get-basename" href="pygobject/class-giofile.html#method-giofile--get-basename">
+ <ANCHOR id="method-giofile--get-child" href="pygobject/class-giofile.html#method-giofile--get-child">
+ <ANCHOR id="method-giofile--get-child-for-display-name" href="pygobject/class-giofile.html#method-giofile--get-child-for-display-name">
+ <ANCHOR id="method-giofile--get-parent" href="pygobject/class-giofile.html#method-giofile--get-parent">
+ <ANCHOR id="method-giofile--get-parse-name" href="pygobject/class-giofile.html#method-giofile--get-parse-name">
+ <ANCHOR id="method-giofile--get-path" href="pygobject/class-giofile.html#method-giofile--get-path">
+ <ANCHOR id="method-giofile--get-relative-path" href="pygobject/class-giofile.html#method-giofile--get-relative-path">
+ <ANCHOR id="method-giofile--get-uri" href="pygobject/class-giofile.html#method-giofile--get-uri">
+ <ANCHOR id="method-giofile--get-uri-scheme" href="pygobject/class-giofile.html#method-giofile--get-uri-scheme">
+ <ANCHOR id="method-giofile--has-prefix" href="pygobject/class-giofile.html#method-giofile--has-prefix">
+ <ANCHOR id="method-giofile--has-uri-scheme" href="pygobject/class-giofile.html#method-giofile--has-uri-scheme">
+ <ANCHOR id="method-giofile--is-native" href="pygobject/class-giofile.html#method-giofile--is-native">
+ <ANCHOR id="method-giofile--load-contents" href="pygobject/class-giofile.html#method-giofile--load-contents">
+ <ANCHOR id="method-giofile--load-contents-async" href="pygobject/class-giofile.html#method-giofile--load-contents-async">
+ <ANCHOR id="method-giofile--load-contents-finish" href="pygobject/class-giofile.html#method-giofile--load-contents-finish">
+ <ANCHOR id="method-giofile--make-directory" href="pygobject/class-giofile.html#method-giofile--make-directory">
+ <ANCHOR id="method-giofile--make-directory-with-parents" href="pygobject/class-giofile.html#method-giofile--make-directory-with-parents">
+ <ANCHOR id="method-giofile--make-symbolic-link" href="pygobject/class-giofile.html#method-giofile--make-symbolic-link">
+ <ANCHOR id="method-giofile--monitor" href="pygobject/class-giofile.html#method-giofile--monitor">
+ <ANCHOR id="method-giofile--monitor-directory" href="pygobject/class-giofile.html#method-giofile--monitor-directory">
+ <ANCHOR id="method-giofile--monitor-file" href="pygobject/class-giofile.html#method-giofile--monitor-file">
+ <ANCHOR id="method-giofile--mount-enclosing-volume" href="pygobject/class-giofile.html#method-giofile--mount-enclosing-volume">
+ <ANCHOR id="method-giofile--mount-enclosing-volume-finish" href="pygobject/class-giofile.html#method-giofile--mount-enclosing-volume-finish">
+ <ANCHOR id="method-giofile--mount-mountable" href="pygobject/class-giofile.html#method-giofile--mount-mountable">
+ <ANCHOR id="method-giofile--mount-mountable-finish" href="pygobject/class-giofile.html#method-giofile--mount-mountable-finish">
+ <ANCHOR id="method-giofile--move" href="pygobject/class-giofile.html#method-giofile--move">
+ <ANCHOR id="method-giofile--query-default-handler" href="pygobject/class-giofile.html#method-giofile--query-default-handler">
+ <ANCHOR id="method-giofile--query-exists" href="pygobject/class-giofile.html#method-giofile--query-exists">
+ <ANCHOR id="method-giofile--query-file-type" href="pygobject/class-giofile.html#method-giofile--query-file-type">
+ <ANCHOR id="method-giofile--query-filesystem-info" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info">
+ <ANCHOR id="method-giofile--query-filesystem-info-async" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info-async">
+ <ANCHOR id="method-giofile--query-filesystem-info-finish" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info-finish">
+ <ANCHOR id="method-giofile--query-info" href="pygobject/class-giofile.html#method-giofile--query-info">
+ <ANCHOR id="method-giofile--query-info-async" href="pygobject/class-giofile.html#method-giofile--query-info-async">
+ <ANCHOR id="method-giofile--query-info-finish" href="pygobject/class-giofile.html#method-giofile--query-info-finish">
+ <ANCHOR id="method-giofile--query-settable-attributes" href="pygobject/class-giofile.html#method-giofile--query-settable-attributes">
+ <ANCHOR id="method-giofile--query-writable-namespace" href="pygobject/class-giofile.html#method-giofile--query-writable-namespace">
+ <ANCHOR id="method-giofile--read" href="pygobject/class-giofile.html#method-giofile--read">
+ <ANCHOR id="method-giofile--read-async" href="pygobject/class-giofile.html#method-giofile--read-async">
+ <ANCHOR id="method-giofile--read-finish" href="pygobject/class-giofile.html#method-giofile--read-finish">
+ <ANCHOR id="method-giofile--replace" href="pygobject/class-giofile.html#method-giofile--replace">
+ <ANCHOR id="method-giofile--replace-async" href="pygobject/class-giofile.html#method-giofile--replace-async">
+ <ANCHOR id="method-giofile--replace-contents" href="pygobject/class-giofile.html#method-giofile--replace-contents">
+ <ANCHOR id="method-giofile--replace-contents-async" href="pygobject/class-giofile.html#method-giofile--replace-contents-async">
+ <ANCHOR id="method-giofile--replace-contents-finish" href="pygobject/class-giofile.html#method-giofile--replace-contents-finish">
+ <ANCHOR id="method-giofile--replace-finish" href="pygobject/class-giofile.html#method-giofile--replace-finish">
+ <ANCHOR id="method-giofile--resolve-relative-path" href="pygobject/class-giofile.html#method-giofile--resolve-relative-path">
+ <ANCHOR id="method-giofile--set-attribute" href="pygobject/class-giofile.html#method-giofile--set-attribute">
+ <ANCHOR id="method-giofile--set-attribute-byte-string" href="pygobject/class-giofile.html#method-giofile--set-attribute-byte-string">
+ <ANCHOR id="method-giofile--set-attribute-int32" href="pygobject/class-giofile.html#method-giofile--set-attribute-int32">
+ <ANCHOR id="method-giofile--set-attribute-int64" href="pygobject/class-giofile.html#method-giofile--set-attribute-int64">
+ <ANCHOR id="method-giofile--set-attribute-string" href="pygobject/class-giofile.html#method-giofile--set-attribute-string">
+ <ANCHOR id="method-giofile--set-attribute-uint32" href="pygobject/class-giofile.html#method-giofile--set-attribute-uint32">
+ <ANCHOR id="method-giofile--set-attribute-uint64" href="pygobject/class-giofile.html#method-giofile--set-attribute-uint64">
+ <ANCHOR id="method-giofile--set-attributes-async" href="pygobject/class-giofile.html#method-giofile--set-attributes-async">
+ <ANCHOR id="method-giofile--set-attributes-finish" href="pygobject/class-giofile.html#method-giofile--set-attributes-finish">
+ <ANCHOR id="method-giofile--set-attributes-from-info" href="pygobject/class-giofile.html#method-giofile--set-attributes-from-info">
+ <ANCHOR id="method-giofile--set-display-name" href="pygobject/class-giofile.html#method-giofile--set-display-name">
+ <ANCHOR id="method-giofile--set-display-name-async" href="pygobject/class-giofile.html#method-giofile--set-display-name-async">
+ <ANCHOR id="method-giofile--set-display-name-finish" href="pygobject/class-giofile.html#method-giofile--set-display-name-finish">
+ <ANCHOR id="method-giofile--trash" href="pygobject/class-giofile.html#method-giofile--trash">
+ <ANCHOR id="method-giofile--unmount-mountable" href="pygobject/class-giofile.html#method-giofile--unmount-mountable">
+ <ANCHOR id="method-giofile--unmount-mountable-finish" href="pygobject/class-giofile.html#method-giofile--unmount-mountable-finish">
+ <ANCHOR id="function-gio--file-parse-name" href="pygobject/class-giofile.html#function-gio--file-parse-name">
+ <ANCHOR id="class-giofileattributeinfo" href="pygobject/class-giofileattributeinfo.html">
+ <ANCHOR id="attributes-giofileattributeinfo" href="pygobject/class-giofileattributeinfo.html#attributes-giofileattributeinfo">
+ <ANCHOR id="class-giofileenumerator" href="pygobject/class-giofileenumerator.html">
+ <ANCHOR id="properties-giofileenumerator" href="pygobject/class-giofileenumerator.html#properties-giofileenumerator">
+ <ANCHOR id="method-giofileenumerator--close" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close">
+ <ANCHOR id="method-giofileenumerator--close-async" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close-async">
+ <ANCHOR id="method-giofileenumerator--close-finish" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close-finish">
+ <ANCHOR id="method-giofileenumerator--get-container" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--get-container">
+ <ANCHOR id="method-giofileenumerator--has-pending" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--has-pending">
+ <ANCHOR id="method-giofileenumerator--is-closed" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--is-closed">
+ <ANCHOR id="method-giofileenumerator--next-file" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-file">
+ <ANCHOR id="method-giofileenumerator--next-files-async" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-files-async">
+ <ANCHOR id="method-giofileenumerator--next-files-finish" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-files-finish">
+ <ANCHOR id="method-giofileenumerator--set-pending" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--set-pending">
+ <ANCHOR id="class-giofileicon" href="pygobject/class-giofileicon.html">
+ <ANCHOR id="constructor-giofileicon" href="pygobject/class-giofileicon.html#constructor-giofileicon">
+ <ANCHOR id="method-giofileicon--get-file" href="pygobject/class-giofileicon.html#method-giofileicon--get-file">
+ <ANCHOR id="class-giofileinfo" href="pygobject/class-giofileinfo.html">
+ <ANCHOR id="constructor-giofileinfo" href="pygobject/class-giofileinfo.html#constructor-giofileinfo">
+ <ANCHOR id="class-giofileinputstream" href="pygobject/class-giofileinputstream.html">
+ <ANCHOR id="method-giofileinputstream--query-info" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info">
+ <ANCHOR id="method-giofileinputstream--query-info-async" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info-async">
+ <ANCHOR id="method-giofileinputstream--query-info-finish" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info-finish">
+ <ANCHOR id="class-giofilemonitor" href="pygobject/class-giofilemonitor.html">
+ <ANCHOR id="properties-giofilemonitor" href="pygobject/class-giofilemonitor.html#properties-giofilemonitor">
+ <ANCHOR id="signal-prototypes-giofilemonitor" href="pygobject/class-giofilemonitor.html#signal-prototypes-giofilemonitor">
+ <ANCHOR id="class-giofileoutputstream" href="pygobject/class-giofileoutputstream.html">
+ <ANCHOR id="method-giofileoutputstream--get-etag" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--get-etag">
+ <ANCHOR id="method-giofileoutputstream--query-info" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info">
+ <ANCHOR id="method-giofileoutputstream--query-info-async" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info-async">
+ <ANCHOR id="method-giofileoutputstream--query-info-finish" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish">
+ <ANCHOR id="class-giofilterinputstream" href="pygobject/class-giofilterinputstream.html">
+ <ANCHOR id="properties-giofilterinputstream" href="pygobject/class-giofilterinputstream.html#properties-giofilterinputstream">
+ <ANCHOR id="method-giofilterinputstream--get-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream">
+ <ANCHOR id="method-giofilterinputstream--get-close-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream">
+ <ANCHOR id="method-giofilterinputstream--set-close-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream">
+ <ANCHOR id="class-giofilteroutputstream" href="pygobject/class-giofilteroutputstream.html">
+ <ANCHOR id="properties-giofilteroutputstream" href="pygobject/class-giofilteroutputstream.html#properties-giofilteroutputstream">
+ <ANCHOR id="method-giofilteroutputstream--get-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream">
+ <ANCHOR id="method-giofilteroutputstream--get-close-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream">
+ <ANCHOR id="method-giofilteroutputstream--set-close-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream">
+ <ANCHOR id="class-gioicon" href="pygobject/class-gioicon.html">
+ <ANCHOR id="method-gioicon--equal" href="pygobject/class-gioicon.html#method-gioicon--equal">
+ <ANCHOR id="method-gioicon--to-string" href="pygobject/class-gioicon.html#method-gioicon--to-string">
+ <ANCHOR id="function-gio--icon-new-from-string" href="pygobject/class-gioicon.html#function-gio--icon-new-from-string">
+ <ANCHOR id="class-gioinputstream" href="pygobject/class-gioinputstream.html">
+ <ANCHOR id="method-gioinputstream--clear-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--clear-pending">
+ <ANCHOR id="method-gioinputstream--close" href="pygobject/class-gioinputstream.html#method-gioinputstream--close">
+ <ANCHOR id="method-gioinputstream--close-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--close-async">
+ <ANCHOR id="method-gioinputstream--close-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--close-finish">
+ <ANCHOR id="method-gioinputstream--has-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--has-pending">
+ <ANCHOR id="method-gioinputstream--is-closed" href="pygobject/class-gioinputstream.html#method-gioinputstream--is-closed">
+ <ANCHOR id="method-gioinputstream--read" href="pygobject/class-gioinputstream.html#method-gioinputstream--read">
+ <ANCHOR id="method-gioinputstream--read-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-async">
+ <ANCHOR id="method-gioinputstream--read-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-finish">
+ <ANCHOR id="method-gioinputstream--read-part" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-part">
+ <ANCHOR id="method-gioinputstream--set-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--set-pending">
+ <ANCHOR id="method-gioinputstream--skip" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip">
+ <ANCHOR id="method-gioinputstream--skip-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip-async">
+ <ANCHOR id="method-gioinputstream--skip-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip-finish">
+ <ANCHOR id="class-gioloadableicon" href="pygobject/class-gioloadableicon.html">
+ <ANCHOR id="method-gioloadableicon--load" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load">
+ <ANCHOR id="method-gioloadableicon--load-async" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load-async">
+ <ANCHOR id="method-gioloadableicon--load-finish" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load-finish">
+ <ANCHOR id="class-giomemoryinputstream" href="pygobject/class-giomemoryinputstream.html">
+ <ANCHOR id="constructor-giomemoryinputstream" href="pygobject/class-giomemoryinputstream.html#constructor-giomemoryinputstream">
+ <ANCHOR id="method-giomemoryinputstream--add-data" href="pygobject/class-giomemoryinputstream.html#method-giomemoryinputstream--add-data">
+ <ANCHOR id="function-gio--memory-input-stream-new-from-data" href="pygobject/class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data">
+ <ANCHOR id="class-giomemoryoutputstream" href="pygobject/class-giomemoryoutputstream.html">
+ <ANCHOR id="constructor-giomemoryoutputstream" href="pygobject/class-giomemoryoutputstream.html#constructor-giomemoryoutputstream">
+ <ANCHOR id="method-giomemoryoutputstream--get-contents" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents">
+ <ANCHOR id="method-giomemoryoutputstream--get-data-size" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size">
+ <ANCHOR id="method-giomemoryoutputstream--get-size" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size">
+ <ANCHOR id="class-giomount" href="pygobject/class-giomount.html">
+ <ANCHOR id="signal-prototypes-giomount" href="pygobject/class-giomount.html#signal-prototypes-giomount">
+ <ANCHOR id="method-giomount--can-eject" href="pygobject/class-giomount.html#method-giomount--can-eject">
+ <ANCHOR id="method-giomount--can-unmount" href="pygobject/class-giomount.html#method-giomount--can-unmount">
+ <ANCHOR id="method-giomount--eject" href="pygobject/class-giomount.html#method-giomount--eject">
+ <ANCHOR id="method-giomount--eject-finish" href="pygobject/class-giomount.html#method-giomount--eject-finish">
+ <ANCHOR id="method-giomount--get-drive" href="pygobject/class-giomount.html#method-giomount--get-drive">
+ <ANCHOR id="method-giomount--get-icon" href="pygobject/class-giomount.html#method-giomount--get-icon">
+ <ANCHOR id="method-giomount--get-name" href="pygobject/class-giomount.html#method-giomount--get-name">
+ <ANCHOR id="method-giomount--get-root" href="pygobject/class-giomount.html#method-giomount--get-root">
+ <ANCHOR id="method-giomount--get-uuid" href="pygobject/class-giomount.html#method-giomount--get-uuid">
+ <ANCHOR id="method-giomount--get-volume" href="pygobject/class-giomount.html#method-giomount--get-volume">
+ <ANCHOR id="method-giomount--guess-content-type" href="pygobject/class-giomount.html#method-giomount--guess-content-type">
+ <ANCHOR id="method-giomount--guess-content-type-finish" href="pygobject/class-giomount.html#method-giomount--guess-content-type-finish">
+ <ANCHOR id="method-giomount--guess-content-type-sync" href="pygobject/class-giomount.html#method-giomount--guess-content-type-sync">
+ <ANCHOR id="method-giomount--is-shadowed" href="pygobject/class-giomount.html#method-giomount--is-shadowed">
+ <ANCHOR id="method-giomount--remount" href="pygobject/class-giomount.html#method-giomount--remount">
+ <ANCHOR id="method-giomount--remount-finish" href="pygobject/class-giomount.html#method-giomount--remount-finish">
+ <ANCHOR id="method-giomount--shadow" href="pygobject/class-giomount.html#method-giomount--shadow">
+ <ANCHOR id="method-giomount--unmount" href="pygobject/class-giomount.html#method-giomount--unmount">
+ <ANCHOR id="method-giomount--unmount-finish" href="pygobject/class-giomount.html#method-giomount--unmount-finish">
+ <ANCHOR id="method-giomount--unshadow" href="pygobject/class-giomount.html#method-giomount--unshadow">
+ <ANCHOR id="signal-giomount--aborted" href="pygobject/class-giomount.html#signal-giomount--aborted">
+ <ANCHOR id="signal-giomount--changed" href="pygobject/class-giomount.html#signal-giomount--changed">
+ <ANCHOR id="signal-giomount--unmounted" href="pygobject/class-giomount.html#signal-giomount--unmounted">
+ <ANCHOR id="class-giomountoperation" href="pygobject/class-giomountoperation.html">
+ <ANCHOR id="properties-giomountoperation" href="pygobject/class-giomountoperation.html#properties-giomountoperation">
+ <ANCHOR id="signal-prototypes-giomountoperation" href="pygobject/class-giomountoperation.html#signal-prototypes-giomountoperation">
+ <ANCHOR id="constructor-giomountoperation" href="pygobject/class-giomountoperation.html#constructor-giomountoperation">
+ <ANCHOR id="method-giomountoperation--get-anonymous" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-anonymous">
+ <ANCHOR id="method-giomountoperation--get-choice" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-choice">
+ <ANCHOR id="method-giomountoperation--get-domain" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-domain">
+ <ANCHOR id="method-giomountoperation--get-password" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-password">
+ <ANCHOR id="method-giomountoperation--get-password-save" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-password-save">
+ <ANCHOR id="method-giomountoperation--get-username" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-username">
+ <ANCHOR id="method-giomountoperation--reply" href="pygobject/class-giomountoperation.html#method-giomountoperation--reply">
+ <ANCHOR id="method-giomountoperation--set-anonymous" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-anonymous">
+ <ANCHOR id="method-giomountoperation--set-choice" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-choice">
+ <ANCHOR id="method-giomountoperation--set-domain" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-domain">
+ <ANCHOR id="method-giomountoperation--set-password" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-password">
+ <ANCHOR id="method-giomountoperation--set-password-save" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-password-save">
+ <ANCHOR id="method-giomountoperation--set-username" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-username">
+ <ANCHOR id="signal-giomountoperation--aborted" href="pygobject/class-giomountoperation.html#signal-giomountoperation--aborted">
+ <ANCHOR id="signal-giomountoperation--ask-password" href="pygobject/class-giomountoperation.html#signal-giomountoperation--ask-password">
+ <ANCHOR id="signal-giomountoperation--ask-question" href="pygobject/class-giomountoperation.html#signal-giomountoperation--ask-question">
+ <ANCHOR id="signal-giomountoperation--reply" href="pygobject/class-giomountoperation.html#signal-giomountoperation--reply">
+ <ANCHOR id="class-giooutputstream" href="pygobject/class-giooutputstream.html">
+ <ANCHOR id="class-gioseekable" href="pygobject/class-gioseekable.html">
+ <ANCHOR id="method-gioseekable--tell" href="pygobject/class-gioseekable.html#method-gioseekable--tell">
+ <ANCHOR id="method-gioseekable--can_seek" href="pygobject/class-gioseekable.html#method-gioseekable--can_seek">
+ <ANCHOR id="method-gioseekable--seek" href="pygobject/class-gioseekable.html#method-gioseekable--seek">
+ <ANCHOR id="method-gioseekable--can_truncate" href="pygobject/class-gioseekable.html#method-gioseekable--can_truncate">
+ <ANCHOR id="method-gioseekable--truncate" href="pygobject/class-gioseekable.html#method-gioseekable--truncate">
+ <ANCHOR id="class-giosimpleasyncresult" href="pygobject/class-giosimpleasyncresult.html">
+ <ANCHOR id="method-giosimpleasyncresult--complete" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete">
+ <ANCHOR id="method-giosimpleasyncresult--complete-in-idle" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle">
+ <ANCHOR id="method-giosimpleasyncresult--get-op-res-gboolean" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean">
+ <ANCHOR id="method-giosimpleasyncresult--get-op-res-gssize" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize">
+ <ANCHOR id="method-giosimpleasyncresult--propagate-error" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error">
+ <ANCHOR id="method-giosimpleasyncresult--set-handle-cancellation" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation">
+ <ANCHOR id="method-giosimpleasyncresult--set-op-res-gboolean" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean">
+ <ANCHOR id="method-giosimpleasyncresult--set-op-res-gssize" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize">
+ <ANCHOR id="class-giothemedicon" href="pygobject/class-giothemedicon.html">
+ <ANCHOR id="properties-giomountoperation" href="pygobject/class-giothemedicon.html#properties-giomountoperation">
+ <ANCHOR id="constructor-giothemedicon" href="pygobject/class-giothemedicon.html#constructor-giothemedicon">
+ <ANCHOR id="method-giothemedicon--append-name" href="pygobject/class-giothemedicon.html#method-giothemedicon--append-name">
+ <ANCHOR id="method-giothemedicon--get-names" href="pygobject/class-giothemedicon.html#method-giothemedicon--get-names">
+ <ANCHOR id="method-giothemedicon--prepend-name" href="pygobject/class-giothemedicon.html#method-giothemedicon--prepend-name">
+ <ANCHOR id="class-giovolume" href="pygobject/class-giovolume.html">
+ <ANCHOR id="signal-prototypes-giovolume" href="pygobject/class-giovolume.html#signal-prototypes-giovolume">
+ <ANCHOR id="method-giovolume--can-eject" href="pygobject/class-giovolume.html#method-giovolume--can-eject">
+ <ANCHOR id="method-giovolume--can-mount" href="pygobject/class-giovolume.html#method-giovolume--can-mount">
+ <ANCHOR id="method-giovolume--eject" href="pygobject/class-giovolume.html#method-giovolume--eject">
+ <ANCHOR id="method-giovolume--eject-finish" href="pygobject/class-giovolume.html#method-giovolume--eject-finish">
+ <ANCHOR id="method-giovolume--enumerate-identifiers" href="pygobject/class-giovolume.html#method-giovolume--enumerate-identifiers">
+ <ANCHOR id="method-giovolume--get-activation-root" href="pygobject/class-giovolume.html#method-giovolume--get-activation-root">
+ <ANCHOR id="method-giovolume--get-drive" href="pygobject/class-giovolume.html#method-giovolume--get-drive">
+ <ANCHOR id="method-giovolume--get-icon" href="pygobject/class-giovolume.html#method-giovolume--get-icon">
+ <ANCHOR id="method-giovolume--get-identifier" href="pygobject/class-giovolume.html#method-giovolume--get-identifier">
+ <ANCHOR id="method-giovolume--get-mount" href="pygobject/class-giovolume.html#method-giovolume--get-mount">
+ <ANCHOR id="method-giovolume--get-name" href="pygobject/class-giovolume.html#method-giovolume--get-name">
+ <ANCHOR id="method-giovolume--get-uuid" href="pygobject/class-giovolume.html#method-giovolume--get-uuid">
+ <ANCHOR id="method-giovolume--mount" href="pygobject/class-giovolume.html#method-giovolume--mount">
+ <ANCHOR id="method-giovolume--mount-finish" href="pygobject/class-giovolume.html#method-giovolume--mount-finish">
+ <ANCHOR id="method-giovolume--should-automount" href="pygobject/class-giovolume.html#method-giovolume--should-automount">
+ <ANCHOR id="signal-giovolume--changed" href="pygobject/class-giovolume.html#signal-giovolume--changed">
+ <ANCHOR id="signal-giovolume--removed" href="pygobject/class-giovolume.html#signal-giovolume--removed">
+ <ANCHOR id="class-giovolumemonitor" href="pygobject/class-giovolumemonitor.html">
+ <ANCHOR id="signal-prototypes-giovolumemonitor" href="pygobject/class-giovolumemonitor.html#signal-prototypes-giovolumemonitor">
+ <ANCHOR id="method-giovolumemonitor--get-connected-drives" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives">
+ <ANCHOR id="method-giovolumemonitor--get-mount-for-uuid" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid">
+ <ANCHOR id="method-giovolumemonitor--get-mounts" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-mounts">
+ <ANCHOR id="method-giovolumemonitor--get-volume-for-uuid" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid">
+ <ANCHOR id="method-giovolumemonitor--get-volumes" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-volumes">
+ <ANCHOR id="function-gio--volume-monitor-adopt-orphan-mount" href="pygobject/class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount">
+ <ANCHOR id="function-gio--volume-monitor-get" href="pygobject/class-giovolumemonitor.html#function-gio--volume-monitor-get">
+ <ANCHOR id="signal-giovolumemonitor--drive-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed">
+ <ANCHOR id="signal-giovolumemonitor--drive-connected" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected">
+ <ANCHOR id="signal-giovolumemonitor--drive-disconnected" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected">
+ <ANCHOR id="signal-giovolumemonitor--drive-eject-button" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button">
+ <ANCHOR id="signal-giovolumemonitor--mount-added" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-added">
+ <ANCHOR id="signal-giovolumemonitor--mount-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed">
+ <ANCHOR id="signal-giovolumemonitor--mount-pre-unmount" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount">
+ <ANCHOR id="signal-giovolumemonitor--mount-removed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed">
+ <ANCHOR id="signal-giovolumemonitor--volume-added" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-added">
+ <ANCHOR id="signal-giovolumemonitor--volume-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed">
+ <ANCHOR id="signal-giovolumemonitor--volume-removed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed">
+ <ANCHOR id="gio-functions" href="pygobject/gio-functions.html">
+ <ANCHOR id="function-gio--content-type-can-be-executable" href="pygobject/gio-functions.html#function-gio--content-type-can-be-executable">
+ <ANCHOR id="function-gio--content-type-equals" href="pygobject/gio-functions.html#function-gio--content-type-equals">
+ <ANCHOR id="function-gio--content-type-from-mime-type" href="pygobject/gio-functions.html#function-gio--content-type-from-mime-type">
+ <ANCHOR id="function-gio--content-type-get-description" href="pygobject/gio-functions.html#function-gio--content-type-get-description">
+ <ANCHOR id="function-gio--content-type-get-icon" href="pygobject/gio-functions.html#function-gio--content-type-get-icon">
+ <ANCHOR id="function-gio--content-type-get-mime-type" href="pygobject/gio-functions.html#function-gio--content-type-get-mime-type">
+ <ANCHOR id="function-gio--content-type-guess" href="pygobject/gio-functions.html#function-gio--content-type-guess">
+ <ANCHOR id="function-gio--content-type-is-a" href="pygobject/gio-functions.html#function-gio--content-type-is-a">
+ <ANCHOR id="function-gio--content-type-is-unknown" href="pygobject/gio-functions.html#function-gio--content-type-is-unknown">
+ <ANCHOR id="function-gio--content-types-get-registered" href="pygobject/gio-functions.html#function-gio--content-types-get-registered">
+ <ANCHOR id="function-gio--io-error-from-errno" href="pygobject/gio-functions.html#function-gio--io-error-from-errno">
+ <ANCHOR id="gio-constants" href="pygobject/gio-constants.html">
+ <ANCHOR id="gio-constants-description" href="pygobject/gio-constants.html#gio-constants-description">
+ <ANCHOR id="gio-ask-password-flags-constants" href="pygobject/gio-constants.html#gio-ask-password-flags-constants">
+ <ANCHOR id="gio-app-info-constants" href="pygobject/gio-constants.html#gio-app-info-constants">
+ <ANCHOR id="gio-data-stream-byte-order-constants" href="pygobject/gio-constants.html#gio-data-stream-byte-order-constants">
+ <ANCHOR id="gio-data-stream-newline-type-constants" href="pygobject/gio-constants.html#gio-data-stream-newline-type-constants">
+ <ANCHOR id="gio-emblem-origin-constants" href="pygobject/gio-constants.html#gio-emblem-origin-constants">
+ <ANCHOR id="gio-error-constants" href="pygobject/gio-constants.html#gio-error-constants">
+ <ANCHOR id="gio-file-attribute-constants" href="pygobject/gio-constants.html#gio-file-attribute-constants">
+ <ANCHOR id="gio-file-attribute-type-constants" href="pygobject/gio-constants.html#gio-file-attribute-type-constants">
+ <ANCHOR id="gio-file-attribute-flags-constants" href="pygobject/gio-constants.html#gio-file-attribute-flags-constants">
+ <ANCHOR id="gio-file-create-flags-constants" href="pygobject/gio-constants.html#gio-file-create-flags-constants">
+ <ANCHOR id="gio-file-copy-flags-constants" href="pygobject/gio-constants.html#gio-file-copy-flags-constants">
+ <ANCHOR id="gio-file-monitor-flags-constants" href="pygobject/gio-constants.html#gio-file-monitor-flags-constants">
+ <ANCHOR id="gio-file-query-info-flags-constants" href="pygobject/gio-constants.html#gio-file-query-info-flags-constants">
+ <ANCHOR id="gio-file-type-constants" href="pygobject/gio-constants.html#gio-file-type-constants">
+ <ANCHOR id="gio-mount-mount-flags-constants" href="pygobject/gio-constants.html#gio-mount-mount-flags-constants">
+ <ANCHOR id="gio-mount-unmount-flags-constants" href="pygobject/gio-constants.html#gio-mount-unmount-flags-constants">
+ <ANCHOR id="gio-mount-operation-result-constants" href="pygobject/gio-constants.html#gio-mount-operation-result-constants">
+ <ANCHOR id="gio-password-save-constants" href="pygobject/gio-constants.html#gio-password-save-constants">
+ <ANCHOR id="class-giounixinputstream" href="pygobject/class-giounixinputstream.html">
+ <ANCHOR id="properties-giounixinputstream" href="pygobject/class-giounixinputstream.html#properties-giounixinputstream">
+ <ANCHOR id="constructor-giounixinputstream" href="pygobject/class-giounixinputstream.html#constructor-giounixinputstream">
+ <ANCHOR id="method-giounixinputstream--get-close-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--get-close-fd">
+ <ANCHOR id="method-giounixinputstream--get-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--get-fd">
+ <ANCHOR id="method-giounixinputstream--set-close-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--set-close-fd">
+ <ANCHOR id="class-giounixoutputstream" href="pygobject/class-giounixoutputstream.html">
+ <ANCHOR id="properties-giounixoutputstream" href="pygobject/class-giounixoutputstream.html#properties-giounixoutputstream">
+ <ANCHOR id="constructor-giounixoutputstream" href="pygobject/class-giounixoutputstream.html#constructor-giounixoutputstream">
+ <ANCHOR id="method-giounixoutputstream--get-close-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd">
+ <ANCHOR id="method-giounixoutputstream--get-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--get-fd">
+ <ANCHOR id="method-giounixoutputstream--set-close-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd">
+ \ No newline at end of file
diff --git a/docs/html/pygobject-introduction.html b/docs/html/pygobject-introduction.html
new file mode 100644
index 0000000..0f15d2f
--- /dev/null
+++ b/docs/html/pygobject-introduction.html
@@ -0,0 +1,83 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Introduction</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="index.html" title="PyGObject Reference Manual"><link rel="next" href="glib-class-reference.html" title="PyGlibClass Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Introduction</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="glib-class-reference.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="pygobject-introduction"></a>Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="pygobject-introduction.html#pygobject-reference-format">Reference Page Format</a></span></dt></dl></div><p>This document describes many of the <code class="literal">PyGObject</code>
+ version 2.12 classes and their methods and associated
+ functions. Deprecated classes, functions and methods have been
+ specifically left out of this reference though classes that have become
+ deprecated since PyGObject 2.0 have been left in but annotated with a
+ deprecation warning. This document attempts to document as much of the
+ <code class="literal">PyGObject</code> <code class="literal">API</code> as possible but there
+ are undoubtedly errors and omissions. If you discover any of these please
+ file a bug report at <a class="ulink" href="http://bugzilla.gnome.org" target="_top">bugzilla.gnome.org</a> for the
+ <code class="literal">pygobject</code> project. Specific areas that have not been
+ documented include:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">The GParamSpec class</li></ul></div><p>This reference describes the API for <code class="literal">PyGObject</code> as
+ of version 2.11.0+ and assumes that the additional API changes for version
+ 2.12 will not be significant. There will undoubtedly be changes that are
+ not reflected in this reference. The differences in the API between
+ version 2.0 and previous versions are denoted in this reference with a
+ Note that describes the availability of the object, constructor, method or
+ function. Any of these that do not have a notation can be assumed to be
+ available in all versions of PyGObject from 2.0 and up. The source code
+ must be consulted if this reference and your version of
+ <code class="literal">PyGObject</code> seem to differ. You are encouraged to use the
+ latest version of <code class="literal">PyGObject</code> that is available. See the
+ <a class="ulink" href="http://www.pygtk.org" target="_top"><code class="literal">PyGTK</code>
+ homepage</a> for more information and more resources on how to use
+ PyGObject as well as help in its development.</p><p> The Reference contains a chapter for each
+ <code class="literal">PyGObject</code> module containing the class descriptions. The
+ class descriptions are arranged alphabetically within the
+ chapters. Currently there is one module chapter:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">The <code class="literal">gobject</code> module</span></p></td><td>The classes that are included in the
+<code class="literal">gobject</code> module of <code class="literal">PyGObject</code> and are
+accessed similar to: gobject.GObject. These classes are the base object
+classes that the <code class="literal">gtk</code> and <code class="literal">gtk.gdk</code>
+module classes are built on.</td></tr></tbody></table><div class="sect1" title="Reference Page Format"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pygobject-reference-format"></a>Reference Page Format</h2></div></div></div><p>Each <code class="literal">PyGObject</code> class is described in a reference
+page that has a number of sections in a fixed format. Each reference page
+will have a subset of the following sections:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">Name</span></p></td><td>The name and a one-line description of the
+class.</td></tr><tr><td><p><span class="term">Synopsis</span></p></td><td>A synopsis of the class and its methods and
+optionally a list of associated functions.</td></tr><tr><td><p><span class="term">Ancestry</span></p></td><td>The list of the parent classes of the class. This
+section may not be present in all class descriptions.</td></tr><tr><td><p><span class="term">Properties</span></p></td><td>A list of the properties (internal state)
+supported by the class. This section may not be present in all classes. The
+property descriptions include the name, the access operations (e.g. Read,
+Write), and a brief description. Properties are accessed using the <a class="link" href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property"><code class="methodname">gobject.set_property</code>()</a>
+and <a class="link" href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property"><code class="methodname">gobject.get_property</code>()</a>
+methods that are available to every <code class="literal">PyGObject</code> object. This
+section may not be present in all class descriptions.</td></tr><tr><td><p><span class="term">Attributes</span></p></td><td>A set of internal object state data accessible as Python
+ attributes (e.g. object.attr). The attribute descriptions include
+ a name by which the attribute data is accessed, the access mode
+ (e.g. Read, Write), and a brief description of the attribute. Most
+ <code class="literal">PyGObject</code> classes do not support attributes so
+ this section is not present in most class descriptions.</td></tr><tr><td><p><span class="term">Signal Prototypes</span></p></td><td>A list of the signals supported by the class including
+ the signal name and a synopsis of the signal handler function
+ prototype. This section may not be present in all class
+ descriptions.</td></tr><tr><td><p><span class="term">Description</span></p></td><td>A description of the class and possibly some of
+ the methods supported by the class.</td></tr><tr><td><p><span class="term">Constructor</span></p></td><td>The description of the class object constructor including
+ the synopsis with brief parameter descriptions and a description
+ of th use of the constructor. There may be more than one
+ constructor description if the constructor supports different
+ parameter lists. This section may not be present in all class
+ descriptions.</td></tr><tr><td><p><span class="term">Methods</span></p></td><td>A list of methods supported by the class. Each method
+ description includes: a synopsis of the method and its parameters
+ as well as a brief description of each parameter and return value
+ (if any); and, a description of the use of the method.</td></tr><tr><td><p><span class="term">Functions</span></p></td><td>A list of related functions. Each function description
+ includes a synopsis of the function and its parameters and return
+ value (if any), and a description of the use of the
+ function.</td></tr><tr><td><p><span class="term">Signals</span></p></td><td>A list of signals including a synopsis of the signal
+ handler prototype function with its parameters and return value
+ (if any). The signal emission conditions are briefly
+ described. This section is not present in all class descriptions;
+ specifically, the <code class="literal">gtk.gdk</code> classes do not
+ usually support signals.</td></tr></tbody></table><p>The function and method synopsis parameters are displayed in
+ <span class="bold"><strong>bold</strong></span> to denote Python keyword
+ parameters. Also if the parameter is optional its default value will be
+ displayed. For example the <a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup"><code class="function">gobject.signal_lookup</code>()</a>
+ function synopsis is:</p><pre class="programlisting">
+<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup">gobject.signal_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code>
+</pre><p>The parameters <em class="parameter"><code>name</code></em> and
+ <em class="parameter"><code>type</code></em> are keyword parameters that can be specified
+ in a call either by position or keyword (in which case position is not
+ important). The following calls have the same result:</p><pre class="programlisting">
+ id = gobject.signal_lookup("clicked", gtk.Button)
+ id = gobject.signal_lookup("clicked", type=gtk.Button)
+ id = gobject.signal_lookup(name="clicked", type=gtk.Button)
+ id = gobject.signal_lookup(type=gtk.Button, name="clicked")
+</pre><p>Parameters that are not keyword parameters are displayed in
+<span class="emphasis"><em>italic</em></span> and must be specified positionally but may also
+be optional.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="glib-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGObject Reference Manual </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGlibClass Reference</td></tr></table></div></body></html>
diff --git a/docs/html/pygobject.devhelp b/docs/html/pygobject.devhelp
new file mode 100644
index 0000000..b37be2a
--- /dev/null
+++ b/docs/html/pygobject.devhelp
@@ -0,0 +1,525 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<book xmlns="http://www.devhelp.net/book" title="PyGObject Reference Manual" link="index.html" author="" name="pygobject" language="python">
+ <chapters>
+ <sub name="Introduction" link="pygobject-introduction.html">
+ <sub name="Reference Page Format" link="pygobject-introduction.html#pygobject-reference-format"/>
+ </sub>
+ <sub name="PyGlibClass Reference" link="glib-class-reference.html">
+ <sub name="glib.MainContext" link="class-glibmaincontext.html"/>
+ <sub name="glib.MainLoop" link="class-glibmainloop.html"/>
+ <sub name="glib Functions" link="glib-functions.html"/>
+ <sub name="glib Constants" link="glib-constants.html"/>
+ </sub>
+ <sub name="PyGObject Class Reference" link="gobject-class-reference.html">
+ <sub name="gobject.GObject" link="class-gobject.html"/>
+ <sub name="gobject.GBoxed" link="class-gobjectgboxed.html"/>
+ <sub name="gobject.GPointer" link="class-gobjectgpointer.html"/>
+ <sub name="gobject.GInterface" link="class-gobjectginterface.html"/>
+ <sub name="gobject Functions" link="gobject-functions.html"/>
+ <sub name="gobject Constants" link="gobject-constants.html"/>
+ </sub>
+ <sub name="PyGio Class Reference" link="gio-class-reference.html">
+ <sub name="gio.AppInfo" link="class-gioappinfo.html"/>
+ <sub name="gio.AppLaunchContext" link="class-gioapplaunchcontext.html"/>
+ <sub name="gio.AsyncResult" link="class-gioasyncresult.html"/>
+ <sub name="gio.BufferedInputStream" link="class-giobufferedinputstream.html"/>
+ <sub name="gio.BufferedOutputStream" link="class-giobufferedoutputstream.html"/>
+ <sub name="gio.Cancellable" link="class-giocancellable.html"/>
+ <sub name="gio.DataInputStream" link="class-giodatainputstream.html"/>
+ <sub name="gio.DataOutputStream" link="class-giodataoutputstream.html"/>
+ <sub name="gio.Drive" link="class-giodrive.html"/>
+ <sub name="gio.Emblem" link="class-gioemblem.html"/>
+ <sub name="gio.EmblemedIcon" link="class-gioemblemedicon.html"/>
+ <sub name="gio.File" link="class-giofile.html"/>
+ <sub name="gio.FileAttributeInfo" link="class-giofileattributeinfo.html"/>
+ <sub name="gio.FileEnumerator" link="class-giofileenumerator.html"/>
+ <sub name="gio.FileIcon" link="class-giofileicon.html"/>
+ <sub name="gio.FileInfo" link="class-giofileinfo.html"/>
+ <sub name="gio.FileInputStream" link="class-giofileinputstream.html"/>
+ <sub name="gio.FileMonitor" link="class-giofilemonitor.html"/>
+ <sub name="gio.FileOutputStream" link="class-giofileoutputstream.html"/>
+ <sub name="gio.FilterInputStream" link="class-giofilterinputstream.html"/>
+ <sub name="gio.FilterOutputStream" link="class-giofilteroutputstream.html"/>
+ <sub name="gio.Icon" link="class-gioicon.html"/>
+ <sub name="gio.InputStream" link="class-gioinputstream.html"/>
+ <sub name="gio.LoadableIcon" link="class-gioloadableicon.html"/>
+ <sub name="gio.MemoryInputStream" link="class-giomemoryinputstream.html"/>
+ <sub name="gio.MemoryOutputStream" link="class-giomemoryoutputstream.html"/>
+ <sub name="gio.Mount" link="class-giomount.html"/>
+ <sub name="gio.MountOperation" link="class-giomountoperation.html"/>
+ <sub name="gio.OutputStream" link="class-giooutputstream.html"/>
+ <sub name="gio.Seekable" link="class-gioseekable.html"/>
+ <sub name="gio.SimpleAsyncResult" link="class-giosimpleasyncresult.html"/>
+ <sub name="gio.ThemedIcon" link="class-giothemedicon.html"/>
+ <sub name="gio.Volume" link="class-giovolume.html"/>
+ <sub name="gio.VolumeMonitor" link="class-giovolumemonitor.html"/>
+ <sub name="gio Functions" link="gio-functions.html"/>
+ <sub name="gio Constants" link="gio-constants.html"/>
+ </sub>
+ <sub name="PyGio Unix Class Reference" link="giounix-class-reference.html">
+ <sub name="gio.unix.InputStream" link="class-giounixinputstream.html"/>
+ <sub name="gio.unix.OutputStream" link="class-giounixoutputstream.html"/>
+ </sub>
+ </chapters>
+ <functions>
+ <function name="glib.MainContext" link="class-glibmaincontext.html#constructor-glibmaincontext"/>
+ <function name="glib.MainLoop" link="class-glibmainloop.html#constructor-glibmainloop"/>
+ <function name="gio.AppInfo" link="class-gioappinfo.html#constructor-gioappinfo"/>
+ <function name="gio.AppLaunchContext" link="class-gioapplaunchcontext.html#constructor-gioapplaunchcontext"/>
+ <function name="gio.BufferedInputStream" link="class-giobufferedinputstream.html#constructor-giobufferedinputstream"/>
+ <function name="gio.BufferedOutputStream" link="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream"/>
+ <function name="gio.Cancellable" link="class-giocancellable.html#constructor-giocancellable"/>
+ <function name="gio.DataInputStream" link="class-giodatainputstream.html#constructor-giodatainputstream"/>
+ <function name="gio.DataOutputStream" link="class-giodataoutputstream.html#constructor-giodataoutputstream"/>
+ <function name="gio.Emblem" link="class-gioemblem.html#constructor-gioemblem"/>
+ <function name="gio.EmblemedIcon" link="class-gioemblemedicon.html#constructor-gioemblemedicon"/>
+ <function name="gio.File" link="class-giofile.html#constructor-giofile"/>
+ <function name="gio.FileIcon" link="class-giofileicon.html#constructor-giofileicon"/>
+ <function name="gio.FileInfo" link="class-giofileinfo.html#constructor-giofileinfo"/>
+ <function name="gio.MemoryInputStream" link="class-giomemoryinputstream.html#constructor-giomemoryinputstream"/>
+ <function name="gio.MemoryOutputStream" link="class-giomemoryoutputstream.html#constructor-giomemoryoutputstream"/>
+ <function name="gio.MountOperation" link="class-giomountoperation.html#constructor-giomountoperation"/>
+ <function name="gio.ThemedIcon" link="class-giothemedicon.html#constructor-giothemedicon"/>
+ <function name="gio.unix.InputStream" link="class-giounixinputstream.html#constructor-giounixinputstream"/>
+ <function name="gio.unix.OutputStream" link="class-giounixoutputstream.html#constructor-giounixoutputstream"/>
+ <function name="glib.MainContext.iteration" link="class-glibmaincontext.html#method-glibmaincontext--iteration"/>
+ <function name="glib.MainContext.pending" link="class-glibmaincontext.html#method-glibmaincontext--pending"/>
+ <function name="glib.MainLoop.get_context" link="class-glibmainloop.html#method-glibmainloop--get-context"/>
+ <function name="glib.MainLoop.is_running" link="class-glibmainloop.html#method-glibmainloop--is-running"/>
+ <function name="glib.MainLoop.quit" link="class-glibmainloop.html#method-glibmainloop--quit"/>
+ <function name="glib.MainLoop.run" link="class-glibmainloop.html#method-glibmainloop--run"/>
+ <function name="glib.idle_add" link="glib-functions.html#function-glib--idle-add"/>
+ <function name="glib.timeout_add" link="glib-functions.html#function-glib--timeout-add"/>
+ <function name="glib.timeout_add_seconds" link="glib-functions.html#function-glib--timeout-add-seconds"/>
+ <function name="glib.io_add_watch" link="glib-functions.html#function-glib--io-add-watch"/>
+ <function name="glib.source_remove" link="glib-functions.html#function-glib--source-remove"/>
+ <function name="glib.main_context_default" link="glib-functions.html#function-glib--main-context-default"/>
+ <function name="glib.markup_escape_text" link="glib-functions.html#function-glib--markup-escape-text"/>
+ <function name="glib.child_watch_add" link="glib-functions.html#function-glib--child-watch-add"/>
+ <function name="glib.spawn_async" link="glib-functions.html#function-glib--spawn-async"/>
+ <function name="glib.get_current_time" link="glib-functions.html#function-glib--get-current-time"/>
+ <function name="glib.get_user_cache_dir" link="glib-functions.html#function-glib--get-user-cache-dir"/>
+ <function name="glib.get_user_config_dir" link="glib-functions.html#function-glib--get-user-config-dir"/>
+ <function name="glib.get_user_data_dir" link="glib-functions.html#function-glib--get-user-data-dir"/>
+ <function name="glib.get_user_special_dir" link="glib-functions.html#function-glib--get-user-special-dir"/>
+ <function name="glib.main_depth" link="glib-functions.html#function-glib--main-depth"/>
+ <function name="glib.threads_init" link="glib-functions.html#function-glib--threads-init"/>
+ <function name="glib.signal_accumulator_true_handled" link="glib-functions.html#function-glib--signal-accumulator-true-handled"/>
+ <function name="glib.filename_display_name" link="glib-functions.html#function-glib--filename-display-name"/>
+ <function name="glib.filename_display_basename" link="glib-functions.html#function-glib--filename-display-basename"/>
+ <function name="glib.filename_from_utf8" link="glib-functions.html#function-glib--filename-from-utf8"/>
+ <function name="Glib IO Condition Constants" link="glib-constants.html#glib-io-condition-constants"/>
+ <function name="Glib Priority Constants" link="glib-constants.html#glib-priority-constants"/>
+ <function name="Glib Spawn Flag Constants" link="glib-constants.html#glib-spawn-flag-constants"/>
+ <function name="Glib User Directory Constants" link="glib-constants.html#glib-user-directory-constants"/>
+ <function name="Glib Version Constants" link="glib-constants.html#glib-version-constants"/>
+ <function name="gobject.GObject.get_property" link="class-gobject.html#method-gobject--get-property"/>
+ <function name="gobject.GObject.get_properties" link="class-gobject.html#method-gobject--get-properties"/>
+ <function name="gobject.GObject.set_property" link="class-gobject.html#method-gobject--set-property"/>
+ <function name="gobject.GObject.set_properties" link="class-gobject.html#method-gobject--set-properties"/>
+ <function name="gobject.GObject.freeze_notify" link="class-gobject.html#method-gobject--freeze-notify"/>
+ <function name="gobject.GObject.notify" link="class-gobject.html#method-gobject--notify"/>
+ <function name="gobject.GObject.thaw_notify" link="class-gobject.html#method-gobject--thaw-notify"/>
+ <function name="gobject.GObject.get_data" link="class-gobject.html#method-gobject--get-data"/>
+ <function name="gobject.GObject.set_data" link="class-gobject.html#method-gobject--set-data"/>
+ <function name="gobject.GObject.connect" link="class-gobject.html#method-gobject--connect"/>
+ <function name="gobject.GObject.connect_after" link="class-gobject.html#method-gobject--connect-after"/>
+ <function name="gobject.GObject.connect_object" link="class-gobject.html#method-gobject--connect-object"/>
+ <function name="gobject.GObject.connect_object_after" link="class-gobject.html#method-gobject--connect-object-after"/>
+ <function name="gobject.GObject.disconnect" link="class-gobject.html#method-gobject--disconnect"/>
+ <function name="gobject.GObject.handler_disconnect" link="class-gobject.html#method-gobject--handler-disconnect"/>
+ <function name="gobject.GObject.handler_is_connected" link="class-gobject.html#method-gobject--handler-is-connected"/>
+ <function name="gobject.GObject.handler_block" link="class-gobject.html#method-gobject--handler-block"/>
+ <function name="gobject.GObject.handler_unblock" link="class-gobject.html#method-gobject--handler-unblock"/>
+ <function name="gobject.GObject.handler_block_by_func" link="class-gobject.html#method-gobject--handler-block-by-func"/>
+ <function name="gobject.GObject.handler_unblock_by_func" link="class-gobject.html#method-gobject--handler-unblock-by-func"/>
+ <function name="gobject.GObject.emit" link="class-gobject.html#method-gobject--emit"/>
+ <function name="gobject.GObject.stop_emission" link="class-gobject.html#method-gobject--stop-emission"/>
+ <function name="gobject.GObject.emit_stop_by_name" link="class-gobject.html#method-gobject--emit-stop-by-name"/>
+ <function name="gobject.GObject.chain" link="class-gobject.html#method-gobject--chain"/>
+ <function name="The GObject &quot;notify&quot; Signal" link="class-gobject.html#signal-gobject--notify"/>
+ <function name="gobject.GBoxed.copy" link="class-gobjectgboxed.html#method-gobjectgboxed--copy"/>
+ <function name="gobject.type_name" link="gobject-functions.html#function-gobject--type-name"/>
+ <function name="gobject.type_from_name" link="gobject-functions.html#function-gobject--type-from-name"/>
+ <function name="gobject.type_parent" link="gobject-functions.html#function-gobject--type-parent"/>
+ <function name="gobject.type_is_a" link="gobject-functions.html#function-gobject--type-is-a"/>
+ <function name="gobject.type_children" link="gobject-functions.html#function-gobject--type-children"/>
+ <function name="gobject.type_interfaces" link="gobject-functions.html#function-gobject--type-interfaces"/>
+ <function name="gobject.type_register" link="gobject-functions.html#function-gobject--type-register"/>
+ <function name="gobject.signal_new" link="gobject-functions.html#function-gobject--signal-new"/>
+ <function name="gobject.signal_list_names" link="gobject-functions.html#function-gobject--signal-list-names"/>
+ <function name="gobject.signal_list_ids" link="gobject-functions.html#function-gobject--signal-list-ids"/>
+ <function name="gobject.signal_lookup" link="gobject-functions.html#function-gobject--signal-lookup"/>
+ <function name="gobject.signal_name" link="gobject-functions.html#function-gobject--signal-name"/>
+ <function name="gobject.signal_query" link="gobject-functions.html#function-gobject--signal-query1"/>
+ <function name="gobject.signal_query" link="gobject-functions.html#function-gobject--signal-query2"/>
+ <function name="gobject.list_properties" link="gobject-functions.html#function-gobject--list-properties"/>
+ <function name="gobject.new" link="gobject-functions.html#function-gobject--new"/>
+ <function name="gobject.signal_accumulator_true_handled" link="gobject-functions.html#function-gobject--signal-accumulator-true-handled"/>
+ <function name="gobject.add_emission_hook" link="gobject-functions.html#function-gobject--add-emission-hook"/>
+ <function name="gobject.remove_emission_hook" link="gobject-functions.html#function-gobject--remove-emission-hook"/>
+ <function name="gobject._install_metaclass" link="gobject-functions.html#function-gobject---install-metaclass"/>
+ <function name="GObject Param Flag Constants" link="gobject-constants.html#gobject-param-constants"/>
+ <function name="GObject Signal Flag Constants" link="gobject-constants.html#gobject-signal-constants"/>
+ <function name="GObject Spawn Flag Constants" link="gobject-constants.html#gobject-spawn-flag-constants"/>
+ <function name="GObject Built-in Type Constants" link="gobject-constants.html#gobject-type-constants"/>
+ <function name="GObject Version Constants" link="gobject-constants.html#gobject-version-constants"/>
+ <function name="gio.AppInfo.add_supports_type" link="class-gioappinfo.html#method-gioappinfo--add-supports-type"/>
+ <function name="gio.AppInfo.can_delete" link="class-gioappinfo.html#method-gioappinfo--can-delete"/>
+ <function name="gio.AppInfo.can_remove_supports_type" link="class-gioappinfo.html#method-gioappinfo--can-remove-supports-type"/>
+ <function name="gio.AppInfo.delete" link="class-gioappinfo.html#method-gioappinfo--delete"/>
+ <function name="gio.AppInfo.dup" link="class-gioappinfo.html#method-gioappinfo--dup"/>
+ <function name="gio.AppInfo.equal" link="class-gioappinfo.html#method-gioappinfo--equal"/>
+ <function name="gio.AppInfo.get_commandline" link="class-gioappinfo.html#method-gioappinfo--get-commandline"/>
+ <function name="gio.AppInfo.get_description" link="class-gioappinfo.html#method-gioappinfo--get-description"/>
+ <function name="gio.AppInfo.get_executable" link="class-gioappinfo.html#method-gioappinfo--get-executable"/>
+ <function name="gio.AppInfo.get_icon" link="class-gioappinfo.html#method-gioappinfo--get-icon"/>
+ <function name="gio.AppInfo.get_id" link="class-gioappinfo.html#method-gioappinfo--get-id"/>
+ <function name="gio.AppInfo.get_name" link="class-gioappinfo.html#method-gioappinfo--get-name"/>
+ <function name="gio.AppInfo.launch" link="class-gioappinfo.html#method-gioappinfo--launch"/>
+ <function name="gio.AppInfo.launch_uris" link="class-gioappinfo.html#method-gioappinfo--launch-uris"/>
+ <function name="gio.AppInfo.remove_supports_type" link="class-gioappinfo.html#method-gioappinfo--remove-supports-type"/>
+ <function name="gio.AppInfo.set_as_default_for_extension" link="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension"/>
+ <function name="gio.AppInfo.set_as_default_for_type" link="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type"/>
+ <function name="gio.AppInfo.should_show" link="class-gioappinfo.html#method-gioappinfo--should-show"/>
+ <function name="gio.AppInfo.supports_files" link="class-gioappinfo.html#method-gioappinfo--supports-files"/>
+ <function name="gio.AppInfo.supports_uris" link="class-gioappinfo.html#method-gioappinfo--supports-uris"/>
+ <function name="gio.app_info_get_all" link="class-gioappinfo.html#function-gio--app-info-get-all"/>
+ <function name="gio.app_info_get_all_for_type" link="class-gioappinfo.html#function-gio--app-info-get-all-for-type"/>
+ <function name="gio.app_info_get_default_for_type" link="class-gioappinfo.html#function-gio--app-info-get-default-for-type"/>
+ <function name="gio.app_info_get_default_for_uri_scheme" link="class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme"/>
+ <function name="gio.app_info_reset_type_association" link="class-gioappinfo.html#function-gio--app-info-reset-type-association"/>
+ <function name="gio.AppLaunchContext.get_display" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display"/>
+ <function name="gio.AppLaunchContext.get_startup_notify_id" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id"/>
+ <function name="gio.AppLaunchContext.launch_failed" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed"/>
+ <function name="gio.AsyncResult.get_source_object" link="class-gioasyncresult.html#method-gioasyncresult--get-source-object"/>
+ <function name="gio.BufferedInputStream.fill" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill"/>
+ <function name="gio.BufferedInputStream.fill_async" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async"/>
+ <function name="gio.BufferedInputStream.fill_finish" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish"/>
+ <function name="gio.BufferedInputStream.get_available" link="class-giobufferedinputstream.html#method-giobufferedinputstream--get-available"/>
+ <function name="gio.BufferedInputStream.get_buffer_size" link="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size"/>
+ <function name="gio.BufferedInputStream.read_byte" link="class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte"/>
+ <function name="gio.BufferedInputStream.set_buffer_size" link="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size"/>
+ <function name="gio.buffered_input_stream_new_sized" link="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized"/>
+ <function name="gio.BufferedOutputStream.get_auto_grow" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow"/>
+ <function name="gio.BufferedOutputStream.get_buffer_size" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size"/>
+ <function name="gio.BufferedOutputStream.set_auto_grow" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow"/>
+ <function name="gio.BufferedOutputStream.set_buffer_size" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size"/>
+ <function name="gio.buffered_output_stream_new_sized" link="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized"/>
+ <function name="gio.Cancellable.cancel" link="class-giocancellable.html#method-giocancellable--cancel"/>
+ <function name="gio.Cancellable.get_fd" link="class-giocancellable.html#method-giocancellable--get-fd"/>
+ <function name="gio.Cancellable.is_cancelled" link="class-giocancellable.html#method-giocancellable--is-cancelled"/>
+ <function name="gio.Cancellable.pop_current" link="class-giocancellable.html#method-giocancellable--pop-current"/>
+ <function name="gio.Cancellable.push_current" link="class-giocancellable.html#method-giocancellable--push-current"/>
+ <function name="gio.Cancellable.reset" link="class-giocancellable.html#method-giocancellable--reset"/>
+ <function name="gio.Cancellable.set_error_if_cancelled" link="class-giocancellable.html#method-giocancellable--set-error-if-cancelled"/>
+ <function name="gio.cancellable_get_current" link="class-giocancellable.html#function-gio--cancellable-get-current"/>
+ <function name="gio.DataInputStream.get_byte_order" link="class-giodatainputstream.html#method-giodatainputstream--get-byte-order"/>
+ <function name="gio.DataInputStream.get_newline_type" link="class-giodatainputstream.html#method-giodatainputstream--get-newline-type"/>
+ <function name="gio.DataInputStream.read_byte" link="class-giodatainputstream.html#method-giodatainputstream--read-byte"/>
+ <function name="gio.DataInputStream.read_int16" link="class-giodatainputstream.html#method-giodatainputstream--read-int16"/>
+ <function name="gio.DataInputStream.read_int32" link="class-giodatainputstream.html#method-giodatainputstream--read-int32"/>
+ <function name="gio.DataInputStream.read_int64" link="class-giodatainputstream.html#method-giodatainputstream--read-int64"/>
+ <function name="gio.DataInputStream.read_line" link="class-giodatainputstream.html#method-giodatainputstream--read-line"/>
+ <function name="gio.DataInputStream.read_line_async" link="class-giodatainputstream.html#method-giodatainputstream--read-line-async"/>
+ <function name="gio.DataInputStream.read_line_finish" link="class-giodatainputstream.html#method-giodatainputstream--read-line-finish"/>
+ <function name="gio.DataInputStream.read_uint16" link="class-giodatainputstream.html#method-giodatainputstream--read-uint16"/>
+ <function name="gio.DataInputStream.read_uint32" link="class-giodatainputstream.html#method-giodatainputstream--read-uint32"/>
+ <function name="gio.DataInputStream.read_uint64" link="class-giodatainputstream.html#method-giodatainputstream--read-uint64"/>
+ <function name="gio.DataInputStream.read_until" link="class-giodatainputstream.html#method-giodatainputstream--read-until"/>
+ <function name="gio.DataInputStream.read_until_async" link="class-giodatainputstream.html#method-giodatainputstream--read-until-async"/>
+ <function name="gio.DataInputStream.read_until_finish" link="class-giodatainputstream.html#method-giodatainputstream--read-until-finish"/>
+ <function name="gio.DataInputStream.set_byte_order" link="class-giodatainputstream.html#method-giodatainputstream--set-byte-order"/>
+ <function name="gio.DataInputStream.set_newline_type" link="class-giodatainputstream.html#method-giodatainputstream--set-newline-type"/>
+ <function name="gio.DataOutputStream.get_byte_order" link="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order"/>
+ <function name="gio.DataOutputStream.put_byte" link="class-giodataoutputstream.html#method-giodataoutputstream--put-byte"/>
+ <function name="gio.DataOutputStream.put_int16" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int16"/>
+ <function name="gio.DataOutputStream.put_int32" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int32"/>
+ <function name="gio.DataOutputStream.put_int64" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int64"/>
+ <function name="gio.DataOutputStream.put_string" link="class-giodataoutputstream.html#method-giodataoutputstream--put-string"/>
+ <function name="gio.DataOutputStream.put_uint16" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16"/>
+ <function name="gio.DataOutputStream.put_uint32" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32"/>
+ <function name="gio.DataOutputStream.put_uint64" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64"/>
+ <function name="gio.DataOutputStream.set_byte_order" link="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order"/>
+ <function name="gio.Drive.can_eject" link="class-giodrive.html#method-giodrive--can-eject"/>
+ <function name="gio.Drive.can_poll_for_media" link="class-giodrive.html#method-giodrive--can-poll-for-media"/>
+ <function name="gio.Drive.eject" link="class-giodrive.html#method-giodrive--eject"/>
+ <function name="gio.Drive.eject_finish" link="class-giodrive.html#method-giodrive--eject-finish"/>
+ <function name="gio.Drive.enumerate_identifiers" link="class-giodrive.html#method-giodrive--enumerate-identifiers"/>
+ <function name="gio.Drive.get_icon" link="class-giodrive.html#method-giodrive--get-icon"/>
+ <function name="gio.Drive.get_identifier" link="class-giodrive.html#method-giodrive--get-identifier"/>
+ <function name="gio.Drive.get_name" link="class-giodrive.html#method-giodrive--get-name"/>
+ <function name="gio.Drive.get_volumes" link="class-giodrive.html#method-giodrive--get-volumes"/>
+ <function name="gio.Drive.has_media" link="class-giodrive.html#method-giodrive--has-media"/>
+ <function name="gio.Drive.has_volumes" link="class-giodrive.html#method-giodrive--has-volumes"/>
+ <function name="gio.Drive.is_media_check_automatic" link="class-giodrive.html#method-giodrive--is-media-check-automatic"/>
+ <function name="gio.Drive.is_media_removable" link="class-giodrive.html#method-giodrive--is-media-removable"/>
+ <function name="gio.Drive.poll_for_media" link="class-giodrive.html#method-giodrive--poll-for-media"/>
+ <function name="gio.Drive.poll_for_media_finish" link="class-giodrive.html#method-giodrive--poll-for-media-finish"/>
+ <function name="gio.Emblem.get_icon" link="class-gioemblem.html#method-gioemblem--get-icon"/>
+ <function name="gio.Emblem.get_origin" link="class-gioemblem.html#method-gioemblem--get-origin"/>
+ <function name="gio.emblem_new_with_origin" link="class-gioemblem.html#function-gio--emblem-new-with-origin"/>
+ <function name="gio.EmblemedIcon.add_emblem" link="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem"/>
+ <function name="gio.EmblemedIcon.get_icon" link="class-gioemblemedicon.html#method-gioemblemedicon--get-icon"/>
+ <function name="gio.File.append_to" link="class-giofile.html#method-giofile--append-to"/>
+ <function name="gio.File.append_to_async" link="class-giofile.html#method-giofile--append-to-async"/>
+ <function name="gio.File.append_to_finish" link="class-giofile.html#method-giofile--append-to-finish"/>
+ <function name="gio.File.copy" link="class-giofile.html#method-giofile--copy"/>
+ <function name="gio.File.copy_async" link="class-giofile.html#method-giofile--copy-async"/>
+ <function name="gio.File.copy_attributes" link="class-giofile.html#method-giofile--copy-attributes"/>
+ <function name="gio.File.copy_finish" link="class-giofile.html#method-giofile--copy-finish"/>
+ <function name="gio.File.create" link="class-giofile.html#method-giofile--create"/>
+ <function name="gio.File.create_async" link="class-giofile.html#method-giofile--create-async"/>
+ <function name="gio.File.create_finish" link="class-giofile.html#method-giofile--create-finish"/>
+ <function name="gio.File.delete" link="class-giofile.html#method-giofile--delete"/>
+ <function name="gio.File.dup" link="class-giofile.html#method-giofile--dup"/>
+ <function name="gio.File.eject_mountable" link="class-giofile.html#method-giofile--eject-mountable"/>
+ <function name="gio.File.eject_mountable_finish" link="class-giofile.html#method-giofile--eject-mountable-finish"/>
+ <function name="gio.File.enumerate_children" link="class-giofile.html#method-giofile--enumerate-children"/>
+ <function name="gio.File.enumerate_children_async" link="class-giofile.html#method-giofile--enumerate-children-async"/>
+ <function name="gio.File.eject_mountable_finish" link="class-giofile.html#method-giofile--enumerate-children-finish"/>
+ <function name="gio.File.equal" link="class-giofile.html#method-giofile--equal"/>
+ <function name="gio.File.find_enclosing_mount" link="class-giofile.html#method-giofile--find-enclosing-mount"/>
+ <function name="gio.File.find_enclosing_mount_async" link="class-giofile.html#method-giofile--find-enclosing-mount-async"/>
+ <function name="gio.File.find_enclosing_mount_finish" link="class-giofile.html#method-giofile--find-enclosing-mount-finish"/>
+ <function name="gio.File.get_basename" link="class-giofile.html#method-giofile--get-basename"/>
+ <function name="gio.File.get_child" link="class-giofile.html#method-giofile--get-child"/>
+ <function name="gio.File.get_child_for_display_name" link="class-giofile.html#method-giofile--get-child-for-display-name"/>
+ <function name="gio.File.get_parent" link="class-giofile.html#method-giofile--get-parent"/>
+ <function name="gio.File.get_parse_name" link="class-giofile.html#method-giofile--get-parse-name"/>
+ <function name="gio.File.get_path" link="class-giofile.html#method-giofile--get-path"/>
+ <function name="gio.File.get_relative_path" link="class-giofile.html#method-giofile--get-relative-path"/>
+ <function name="gio.File.get_uri" link="class-giofile.html#method-giofile--get-uri"/>
+ <function name="gio.File.get_uri_scheme" link="class-giofile.html#method-giofile--get-uri-scheme"/>
+ <function name="gio.File.has_prefix" link="class-giofile.html#method-giofile--has-prefix"/>
+ <function name="gio.File.has_uri_scheme" link="class-giofile.html#method-giofile--has-uri-scheme"/>
+ <function name="gio.File.is_native" link="class-giofile.html#method-giofile--is-native"/>
+ <function name="gio.File.load_contents" link="class-giofile.html#method-giofile--load-contents"/>
+ <function name="gio.File.load_contents_async" link="class-giofile.html#method-giofile--load-contents-async"/>
+ <function name="gio.File.load_contents_finish" link="class-giofile.html#method-giofile--load-contents-finish"/>
+ <function name="gio.File.make_directory" link="class-giofile.html#method-giofile--make-directory"/>
+ <function name="gio.File.make_directory_with_parents" link="class-giofile.html#method-giofile--make-directory-with-parents"/>
+ <function name="gio.File.make_symbolic_link" link="class-giofile.html#method-giofile--make-symbolic-link"/>
+ <function name="gio.File.monitor" link="class-giofile.html#method-giofile--monitor"/>
+ <function name="gio.File.monitor_directory" link="class-giofile.html#method-giofile--monitor-directory"/>
+ <function name="gio.File.monitor_file" link="class-giofile.html#method-giofile--monitor-file"/>
+ <function name="gio.File.mount_enclosing_volume" link="class-giofile.html#method-giofile--mount-enclosing-volume"/>
+ <function name="gio.File.mount_enclosing_volume_finish" link="class-giofile.html#method-giofile--mount-enclosing-volume-finish"/>
+ <function name="gio.File.mount_mountable" link="class-giofile.html#method-giofile--mount-mountable"/>
+ <function name="gio.File.mount_mountable_finish" link="class-giofile.html#method-giofile--mount-mountable-finish"/>
+ <function name="gio.File.move" link="class-giofile.html#method-giofile--move"/>
+ <function name="gio.File.query_default_handler" link="class-giofile.html#method-giofile--query-default-handler"/>
+ <function name="gio.File.query_exists" link="class-giofile.html#method-giofile--query-exists"/>
+ <function name="gio.File.query_file_type" link="class-giofile.html#method-giofile--query-file-type"/>
+ <function name="gio.File.query_filesystem_info" link="class-giofile.html#method-giofile--query-filesystem-info"/>
+ <function name="gio.File.query_filesystem_info_async" link="class-giofile.html#method-giofile--query-filesystem-info-async"/>
+ <function name="gio.File.query_filesystem_info_finish" link="class-giofile.html#method-giofile--query-filesystem-info-finish"/>
+ <function name="gio.File.query_filesystem_info" link="class-giofile.html#method-giofile--query-info"/>
+ <function name="gio.File.query_info_async" link="class-giofile.html#method-giofile--query-info-async"/>
+ <function name="gio.File.query_info_finish" link="class-giofile.html#method-giofile--query-info-finish"/>
+ <function name="gio.File.query_settable_attributes" link="class-giofile.html#method-giofile--query-settable-attributes"/>
+ <function name="gio.File.query_writable_namespace" link="class-giofile.html#method-giofile--query-writable-namespace"/>
+ <function name="gio.File.read" link="class-giofile.html#method-giofile--read"/>
+ <function name="gio.File.read_async" link="class-giofile.html#method-giofile--read-async"/>
+ <function name="gio.File.read_finish" link="class-giofile.html#method-giofile--read-finish"/>
+ <function name="gio.File.replace" link="class-giofile.html#method-giofile--replace"/>
+ <function name="gio.File.replace_async" link="class-giofile.html#method-giofile--replace-async"/>
+ <function name="gio.File.replace_contents" link="class-giofile.html#method-giofile--replace-contents"/>
+ <function name="gio.File.replace_contents_async" link="class-giofile.html#method-giofile--replace-contents-async"/>
+ <function name="gio.File.replace_contents_finish" link="class-giofile.html#method-giofile--replace-contents-finish"/>
+ <function name="gio.File.replace_finish" link="class-giofile.html#method-giofile--replace-finish"/>
+ <function name="gio.File.resolve_relative_path" link="class-giofile.html#method-giofile--resolve-relative-path"/>
+ <function name="gio.File.set_attribute" link="class-giofile.html#method-giofile--set-attribute"/>
+ <function name="gio.File.set_attribute_byte_string" link="class-giofile.html#method-giofile--set-attribute-byte-string"/>
+ <function name="gio.File.set_attribute_int32" link="class-giofile.html#method-giofile--set-attribute-int32"/>
+ <function name="gio.File.set_attribute_int64" link="class-giofile.html#method-giofile--set-attribute-int64"/>
+ <function name="gio.File.set_attribute_string" link="class-giofile.html#method-giofile--set-attribute-string"/>
+ <function name="gio.File.set_attribute_uint32" link="class-giofile.html#method-giofile--set-attribute-uint32"/>
+ <function name="gio.File.set_attribute_uint64" link="class-giofile.html#method-giofile--set-attribute-uint64"/>
+ <function name="gio.File.set_attributes_async" link="class-giofile.html#method-giofile--set-attributes-async"/>
+ <function name="gio.File.set_attributes_finish" link="class-giofile.html#method-giofile--set-attributes-finish"/>
+ <function name="gio.File.set_attributes_from_info" link="class-giofile.html#method-giofile--set-attributes-from-info"/>
+ <function name="gio.File.set_display_name" link="class-giofile.html#method-giofile--set-display-name"/>
+ <function name="gio.File.set_display_name_async" link="class-giofile.html#method-giofile--set-display-name-async"/>
+ <function name="gio.File.set_display_name_finish" link="class-giofile.html#method-giofile--set-display-name-finish"/>
+ <function name="gio.File.trash" link="class-giofile.html#method-giofile--trash"/>
+ <function name="gio.File.unmount_mountable" link="class-giofile.html#method-giofile--unmount-mountable"/>
+ <function name="gio.File.unmount_mountable_finish" link="class-giofile.html#method-giofile--unmount-mountable-finish"/>
+ <function name="gio.file_parse_name" link="class-giofile.html#function-gio--file-parse-name"/>
+ <function name="gio.FileEnumerator.close" link="class-giofileenumerator.html#method-giofileenumerator--close"/>
+ <function name="gio.FileEnumerator.close_async" link="class-giofileenumerator.html#method-giofileenumerator--close-async"/>
+ <function name="gio.FileEnumerator.close_finish" link="class-giofileenumerator.html#method-giofileenumerator--close-finish"/>
+ <function name="gio.FileEnumerator.get_container" link="class-giofileenumerator.html#method-giofileenumerator--get-container"/>
+ <function name="gio.FileEnumerator.has_pending" link="class-giofileenumerator.html#method-giofileenumerator--has-pending"/>
+ <function name="gio.FileEnumerator.is_closed" link="class-giofileenumerator.html#method-giofileenumerator--is-closed"/>
+ <function name="gio.FileEnumerator.next_file" link="class-giofileenumerator.html#method-giofileenumerator--next-file"/>
+ <function name="gio.FileEnumerator.next_files_async" link="class-giofileenumerator.html#method-giofileenumerator--next-files-async"/>
+ <function name="gio.FileEnumerator.next_files_finish" link="class-giofileenumerator.html#method-giofileenumerator--next-files-finish"/>
+ <function name="gio.FileEnumerator.set_pending" link="class-giofileenumerator.html#method-giofileenumerator--set-pending"/>
+ <function name="gio.FileIcon.get_file" link="class-giofileicon.html#method-giofileicon--get-file"/>
+ <function name="gio.FileInputStream.query_info" link="class-giofileinputstream.html#method-giofileinputstream--query-info"/>
+ <function name="gio.FileInputStream.query_info_async" link="class-giofileinputstream.html#method-giofileinputstream--query-info-async"/>
+ <function name="gio.FileInputStream.query_info_finish" link="class-giofileinputstream.html#method-giofileinputstream--query-info-finish"/>
+ <function name="gio.FileOutputStream.get_etag" link="class-giofileoutputstream.html#method-giofileoutputstream--get-etag"/>
+ <function name="gio.FileOutputStream.query_info" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info"/>
+ <function name="gio.FileOutputStream.query_info_async" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async"/>
+ <function name="gio.FileOutputStream.query_info_finish" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish"/>
+ <function name="gio.FilterInputStream.get_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream"/>
+ <function name="gio.FilterInputStream.get_close_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream"/>
+ <function name="gio.FilterInputStream.set_close_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream"/>
+ <function name="gio.FilterOutputStream.get_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream"/>
+ <function name="gio.FilterOutputStream.get_close_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream"/>
+ <function name="gio.FilterOutputStream.set_close_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream"/>
+ <function name="gio.Icon.equal" link="class-gioicon.html#method-gioicon--equal"/>
+ <function name="gio.Icon.to_string" link="class-gioicon.html#method-gioicon--to-string"/>
+ <function name="gio.icon_new_from_string" link="class-gioicon.html#function-gio--icon-new-from-string"/>
+ <function name="gio.InputStream.clear_pending" link="class-gioinputstream.html#method-gioinputstream--clear-pending"/>
+ <function name="gio.InputStream.close" link="class-gioinputstream.html#method-gioinputstream--close"/>
+ <function name="gio.InputStream.close_async" link="class-gioinputstream.html#method-gioinputstream--close-async"/>
+ <function name="gio.InputStream.close_finish" link="class-gioinputstream.html#method-gioinputstream--close-finish"/>
+ <function name="gio.InputStream.has_pending" link="class-gioinputstream.html#method-gioinputstream--has-pending"/>
+ <function name="gio.InputStream.is_closed" link="class-gioinputstream.html#method-gioinputstream--is-closed"/>
+ <function name="gio.InputStream.read" link="class-gioinputstream.html#method-gioinputstream--read"/>
+ <function name="gio.InputStream.read_async" link="class-gioinputstream.html#method-gioinputstream--read-async"/>
+ <function name="gio.InputStream.read_finish" link="class-gioinputstream.html#method-gioinputstream--read-finish"/>
+ <function name="gio.InputStream.read_part" link="class-gioinputstream.html#method-gioinputstream--read-part"/>
+ <function name="gio.InputStream.set_pending" link="class-gioinputstream.html#method-gioinputstream--set-pending"/>
+ <function name="gio.InputStream.skip" link="class-gioinputstream.html#method-gioinputstream--skip"/>
+ <function name="gio.InputStream.skip_async" link="class-gioinputstream.html#method-gioinputstream--skip-async"/>
+ <function name="gio.InputStream.skip_finish" link="class-gioinputstream.html#method-gioinputstream--skip-finish"/>
+ <function name="gio.LoadableIcon.load" link="class-gioloadableicon.html#method-gioloadableicon--load"/>
+ <function name="gio.LoadableIcon.load_async" link="class-gioloadableicon.html#method-gioloadableicon--load-async"/>
+ <function name="gio.LoadableIcon.load_finish" link="class-gioloadableicon.html#method-gioloadableicon--load-finish"/>
+ <function name="gio.MemoryInputStream.add_data" link="class-giomemoryinputstream.html#method-giomemoryinputstream--add-data"/>
+ <function name="gio.memory_input_stream_new_from_data" link="class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data"/>
+ <function name="gio.MemoryOutputStream.get_contents" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents"/>
+ <function name="gio.MemoryOutputStream.get_data_size" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size"/>
+ <function name="gio.MemoryOutputStream.get_size" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size"/>
+ <function name="gio.Mount.can_eject" link="class-giomount.html#method-giomount--can-eject"/>
+ <function name="gio.Mount.can_unmount" link="class-giomount.html#method-giomount--can-unmount"/>
+ <function name="gio.Mount.eject" link="class-giomount.html#method-giomount--eject"/>
+ <function name="gio.Mount.eject_finish" link="class-giomount.html#method-giomount--eject-finish"/>
+ <function name="gio.Mount.get_drive" link="class-giomount.html#method-giomount--get-drive"/>
+ <function name="gio.Mount.get_icon" link="class-giomount.html#method-giomount--get-icon"/>
+ <function name="gio.Mount.get_name" link="class-giomount.html#method-giomount--get-name"/>
+ <function name="gio.Mount.get_root" link="class-giomount.html#method-giomount--get-root"/>
+ <function name="gio.Mount.get_uuid" link="class-giomount.html#method-giomount--get-uuid"/>
+ <function name="gio.Mount.get_volume" link="class-giomount.html#method-giomount--get-volume"/>
+ <function name="gio.Mount.guess_content_type" link="class-giomount.html#method-giomount--guess-content-type"/>
+ <function name="gio.Mount.guess_content_type_finish" link="class-giomount.html#method-giomount--guess-content-type-finish"/>
+ <function name="gio.Mount.guess_content_type_sync" link="class-giomount.html#method-giomount--guess-content-type-sync"/>
+ <function name="gio.Mount.is_shadowed" link="class-giomount.html#method-giomount--is-shadowed"/>
+ <function name="gio.Mount.remount" link="class-giomount.html#method-giomount--remount"/>
+ <function name="gio.Mount.remount_finish" link="class-giomount.html#method-giomount--remount-finish"/>
+ <function name="gio.Mount.shadow" link="class-giomount.html#method-giomount--shadow"/>
+ <function name="gio.Mount.unmount" link="class-giomount.html#method-giomount--unmount"/>
+ <function name="gio.Mount.unmount_finish" link="class-giomount.html#method-giomount--unmount-finish"/>
+ <function name="gio.Mount.unshadow" link="class-giomount.html#method-giomount--unshadow"/>
+ <function name="The &quot;aborted&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--aborted"/>
+ <function name="The &quot;changed&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--changed"/>
+ <function name="The &quot;unmounted&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--unmounted"/>
+ <function name="gio.MountOperation.get_anonymous" link="class-giomountoperation.html#method-giomountoperation--get-anonymous"/>
+ <function name="gio.MountOperation.get_choice" link="class-giomountoperation.html#method-giomountoperation--get-choice"/>
+ <function name="gio.MountOperation.get_domain" link="class-giomountoperation.html#method-giomountoperation--get-domain"/>
+ <function name="gio.MountOperation.get_password" link="class-giomountoperation.html#method-giomountoperation--get-password"/>
+ <function name="gio.MountOperation.get_password_save" link="class-giomountoperation.html#method-giomountoperation--get-password-save"/>
+ <function name="gio.MountOperation.get_username" link="class-giomountoperation.html#method-giomountoperation--get-username"/>
+ <function name="gio.MountOperation.reply" link="class-giomountoperation.html#method-giomountoperation--reply"/>
+ <function name="gio.MountOperation.set_anonymous" link="class-giomountoperation.html#method-giomountoperation--set-anonymous"/>
+ <function name="gio.MountOperation.set_choice" link="class-giomountoperation.html#method-giomountoperation--set-choice"/>
+ <function name="gio.MountOperation.set_domain" link="class-giomountoperation.html#method-giomountoperation--set-domain"/>
+ <function name="gio.MountOperation.set_password" link="class-giomountoperation.html#method-giomountoperation--set-password"/>
+ <function name="gio.MountOperation.set_password_save" link="class-giomountoperation.html#method-giomountoperation--set-password-save"/>
+ <function name="gio.MountOperation.set_username" link="class-giomountoperation.html#method-giomountoperation--set-username"/>
+ <function name="The &quot;aborted&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--aborted"/>
+ <function name="The &quot;ask-password&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--ask-password"/>
+ <function name="The &quot;ask-question&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--ask-question"/>
+ <function name="The &quot;reply&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--reply"/>
+ <function name="gio.Seekable.tell" link="class-gioseekable.html#method-gioseekable--tell"/>
+ <function name="gio.Seekable.can_seek" link="class-gioseekable.html#method-gioseekable--can_seek"/>
+ <function name="gio.Seekable.seek" link="class-gioseekable.html#method-gioseekable--seek"/>
+ <function name="gio.Seekable.can_truncate" link="class-gioseekable.html#method-gioseekable--can_truncate"/>
+ <function name="gio.Seekable.truncate" link="class-gioseekable.html#method-gioseekable--truncate"/>
+ <function name="gio.SimpleAsyncResult.complete" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete"/>
+ <function name="gio.SimpleAsyncResult.complete_in_idle" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle"/>
+ <function name="gio.SimpleAsyncResult.get_op_res_gboolean" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean"/>
+ <function name="gio.SimpleAsyncResult.get_op_res_gssize" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize"/>
+ <function name="gio.SimpleAsyncResult.propagate_error" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error"/>
+ <function name="gio.SimpleAsyncResult.set_handle_cancellation" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation"/>
+ <function name="gio.SimpleAsyncResult.set_op_res_gboolean" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean"/>
+ <function name="gio.SimpleAsyncResult.set_op_res_gssize" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize"/>
+ <function name="gio.ThemedIcon.append_name" link="class-giothemedicon.html#method-giothemedicon--append-name"/>
+ <function name="gio.ThemedIcon.get_names" link="class-giothemedicon.html#method-giothemedicon--get-names"/>
+ <function name="gio.ThemedIcon.prepend_name" link="class-giothemedicon.html#method-giothemedicon--prepend-name"/>
+ <function name="gio.Volume.can_eject" link="class-giovolume.html#method-giovolume--can-eject"/>
+ <function name="gio.Volume.can_mount" link="class-giovolume.html#method-giovolume--can-mount"/>
+ <function name="gio.Volume.eject" link="class-giovolume.html#method-giovolume--eject"/>
+ <function name="gio.Volume.eject_finish" link="class-giovolume.html#method-giovolume--eject-finish"/>
+ <function name="gio.Volume.enumerate_identifiers" link="class-giovolume.html#method-giovolume--enumerate-identifiers"/>
+ <function name="gio.Volume.get_activation_root" link="class-giovolume.html#method-giovolume--get-activation-root"/>
+ <function name="gio.Volume.get_drive" link="class-giovolume.html#method-giovolume--get-drive"/>
+ <function name="gio.Volume.get_icon" link="class-giovolume.html#method-giovolume--get-icon"/>
+ <function name="gio.Volume.get_identifier" link="class-giovolume.html#method-giovolume--get-identifier"/>
+ <function name="gio.Volume.get_mount" link="class-giovolume.html#method-giovolume--get-mount"/>
+ <function name="gio.Volume.get_name" link="class-giovolume.html#method-giovolume--get-name"/>
+ <function name="gio.Volume.get_uuid" link="class-giovolume.html#method-giovolume--get-uuid"/>
+ <function name="gio.Volume.mount" link="class-giovolume.html#method-giovolume--mount"/>
+ <function name="gio.Volume.mount_finish" link="class-giovolume.html#method-giovolume--mount-finish"/>
+ <function name="gio.Volume.should_automount" link="class-giovolume.html#method-giovolume--should-automount"/>
+ <function name="The &quot;changed&quot; gio.Volume Signal" link="class-giovolume.html#signal-giovolume--changed"/>
+ <function name="The &quot;removed&quot; gio.Volume Signal" link="class-giovolume.html#signal-giovolume--removed"/>
+ <function name="gio.VolumeMonitor.get_connected_drives" link="class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives"/>
+ <function name="gio.VolumeMonitor.get_mount_for_uuid" link="class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid"/>
+ <function name="gio.VolumeMonitor.get_mounts" link="class-giovolumemonitor.html#method-giovolumemonitor--get-mounts"/>
+ <function name="gio.VolumeMonitor.get_volume_for_uuid" link="class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid"/>
+ <function name="gio.VolumeMonitor.get_volumes" link="class-giovolumemonitor.html#method-giovolumemonitor--get-volumes"/>
+ <function name="gio.volume_monitor_adopt_orphan_mount" link="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount"/>
+ <function name="gio.volume_monitor_get" link="class-giovolumemonitor.html#function-gio--volume-monitor-get"/>
+ <function name="The &quot;drive-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed"/>
+ <function name="The &quot;drive-connected&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected"/>
+ <function name="The &quot;drive-disconnected&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected"/>
+ <function name="The &quot;drive-eject-button&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button"/>
+ <function name="The &quot;mount-added&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-added"/>
+ <function name="The &quot;mount-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed"/>
+ <function name="The &quot;mount-pre-unmount&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount"/>
+ <function name="The &quot;mount-removed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed"/>
+ <function name="The &quot;volume-added&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-added"/>
+ <function name="The &quot;volume-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed"/>
+ <function name="The &quot;volume-removed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed"/>
+ <function name="gio.content_type_can_be_executable" link="gio-functions.html#function-gio--content-type-can-be-executable"/>
+ <function name="gio.content_type_equals" link="gio-functions.html#function-gio--content-type-equals"/>
+ <function name="gio.content_type_from_mime_type" link="gio-functions.html#function-gio--content-type-from-mime-type"/>
+ <function name="gio.content_type_get_description" link="gio-functions.html#function-gio--content-type-get-description"/>
+ <function name="gio.content_type_get_icon" link="gio-functions.html#function-gio--content-type-get-icon"/>
+ <function name="gio.content_type_get_mime_type" link="gio-functions.html#function-gio--content-type-get-mime-type"/>
+ <function name="gio.content_type_guess" link="gio-functions.html#function-gio--content-type-guess"/>
+ <function name="gio.content_type_is_a" link="gio-functions.html#function-gio--content-type-is-a"/>
+ <function name="gio.content_type_is_unknown" link="gio-functions.html#function-gio--content-type-is-unknown"/>
+ <function name="gio.content_types_get_registered" link="gio-functions.html#function-gio--content-types-get-registered"/>
+ <function name="gio.io_error_from_errno" link="gio-functions.html#function-gio--io-error-from-errno"/>
+ <function name="Gio Ask Password Flags Constants" link="gio-constants.html#gio-ask-password-flags-constants"/>
+ <function name="Gio AppInfo Create Flags Constants" link="gio-constants.html#gio-app-info-constants"/>
+ <function name="Gio Data Stream Byte Order Constants" link="gio-constants.html#gio-data-stream-byte-order-constants"/>
+ <function name="Gio Data Stream Newline Type Constants" link="gio-constants.html#gio-data-stream-newline-type-constants"/>
+ <function name="Gio Emblem Origin Constants" link="gio-constants.html#gio-emblem-origin-constants"/>
+ <function name="Gio Error Constants" link="gio-constants.html#gio-error-constants"/>
+ <function name="Gio File Attribute Constants" link="gio-constants.html#gio-file-attribute-constants"/>
+ <function name="Gio File Attribute Type Constants" link="gio-constants.html#gio-file-attribute-type-constants"/>
+ <function name="Gio File Attribute Flags Constants" link="gio-constants.html#gio-file-attribute-flags-constants"/>
+ <function name="Gio File Create Flags Constants" link="gio-constants.html#gio-file-create-flags-constants"/>
+ <function name="Gio File Copy Flags Constants" link="gio-constants.html#gio-file-copy-flags-constants"/>
+ <function name="Gio File Monitor Flags Constants" link="gio-constants.html#gio-file-monitor-flags-constants"/>
+ <function name="Gio File Query Info Flags Constants" link="gio-constants.html#gio-file-query-info-flags-constants"/>
+ <function name="Gio File Type Constants" link="gio-constants.html#gio-file-type-constants"/>
+ <function name="Gio Mount Mount Flags Constants" link="gio-constants.html#gio-mount-mount-flags-constants"/>
+ <function name="Gio Mount Unmount Flags Constants" link="gio-constants.html#gio-mount-unmount-flags-constants"/>
+ <function name="Gio Mount Operation Result Constants" link="gio-constants.html#gio-mount-operation-result-constants"/>
+ <function name="Gio Password Save Constants" link="gio-constants.html#gio-password-save-constants"/>
+ <function name="gio.unix.InputStream.get_close_fd" link="class-giounixinputstream.html#method-giounixinputstream--get-close-fd"/>
+ <function name="gio.unix.InputStream.get_fd" link="class-giounixinputstream.html#method-giounixinputstream--get-fd"/>
+ <function name="gio.unix.InputStream.set_close_fd" link="class-giounixinputstream.html#method-giounixinputstream--set-close-fd"/>
+ <function name="gio.unix.OutputStream.get_close_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd"/>
+ <function name="gio.unix.OutputStream.get_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--get-fd"/>
+ <function name="gio.unix.OutputStream.set_close_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd"/>
+ </functions>
+</book>
diff --git a/docs/reference/entities.docbook.in b/docs/reference/entities.docbook.in
new file mode 100644
index 0000000..be788f8
--- /dev/null
+++ b/docs/reference/entities.docbook.in
@@ -0,0 +1 @@
+<!ENTITY version "@PACKAGE_VERSION@">
diff --git a/docs/reference/pygio-appinfo.xml b/docs/reference/pygio-appinfo.xml
new file mode 100644
index 0000000..eaeb060
--- /dev/null
+++ b/docs/reference/pygio-appinfo.xml
@@ -0,0 +1,894 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioappinfo">
+ <refnamediv>
+ <refname>gio.AppInfo</refname>
+ <refpurpose>Information about an installed application and methods to launch it (with file arguments).</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.AppInfo</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-gioappinfo">gio.AppInfo</link></methodname>
+ <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+ <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--can-delete">can_delete</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--can-remove-supports-type">can_remove_supports_type</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--delete">delete</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--dup">dup</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--equal">equal</link></methodname>
+ <methodparam><parameter role="keyword">appinfo2</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--get-commandline">get_commandline</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--get-description">get_description</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--get-executable">get_executable</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--get-id">get_id</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--get-name">get_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--launch">launch</link></methodname>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--launch-uris">launch_uris</link></methodname>
+ <methodparam><parameter role="keyword">uris</parameter></methodparam>
+ <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>
+ <methodparam><parameter role="keyword">extension</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--should-show">should_show</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--supports-files">supports_files</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioappinfo--supports-uris">supports_uris</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--app-info-get-all">gio.app_info_get_all</link></methodname>
+ <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--app-info-get-all-for-type">gio.app_info_get_all_for_type</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--app-info-get-default-for-type">gio.app_info_get_default_for_type</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--app-info-get-default-for-uri-scheme">gio.app_info_get_default_for_uri_scheme</link></methodname>
+ <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--app-info-reset-type-association">gio.app_info_reset_type_association</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-gioappinfo">gio.AppInfo</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Known Implementation</title>
+ <para>
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> is implemented by
+ <link linkend="class-giodesktopappinfo"><classname>gio.DesktopAppInfo</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ and <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+ are used for describing and launching applications installed on the system.
+ </para>
+ <para>
+ As of GLib 2.20, URIs will always be converted to POSIX paths (using
+ <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()) when using
+ <methodname><link linkend="method-gioappinfo--launch">gio.AppInfo.launch</link></methodname>()
+ even if the application requested an URI and not a POSIX path. For example for an desktop-file
+ based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
+ on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
+ compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
+ unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
+ (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application.
+ </para>
+ <para>
+ Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
+ <link linkend="class-giofile"><classname>gio.File</classname></link> constructors
+ (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
+ it needs to use
+ <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
+ or similar on
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ In other words, an application cannot assume that the URI passed to e.g.
+ <methodname><link linkend="constructor-giofile">gio.File</link></methodname>() constructor
+ is equal to the result of
+ <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>().
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-gioappinfo">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.AppInfo</methodname>
+ <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+ <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>commandline</parameter>&nbsp;:</term>
+ <listitem><simpara>the commandline to use
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>application_name</parameter>&nbsp;:</term>
+ <listitem><simpara>the application name, or <literal>None</literal> to use commandline.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags that can specify details of the created,
+ from <xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ for given command.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ from the given information.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioappinfo--add-supports-type">
+ <title>gio.AppInfo.add_supports_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>add_supports_type</methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>content_type</parameter>&nbsp;:</term>
+ <listitem><simpara>A string.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>add_supports_type</methodname>() method adds a content type
+ to the application information to indicate the application is capable of
+ opening files with the given content type.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--can-delete">
+ <title>gio.AppInfo.can_delete</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_delete</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if appinfo can be deleted.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_delete</methodname>() method obtains the information
+ whether the <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ can be deleted. See
+ <methodname><link linkend="method-gioappinfo--delete">gio.AppInfo.delete</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--can-remove-supports-type">
+ <title>gio.AppInfo.can_remove_supports_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_remove_supports_type</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if it is possible to remove
+ supported content types from a given appinfo, <literal>False</literal>
+ if not. </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_remove_supports_type</methodname>() method checks if a
+ supported content type can be removed from an application.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--delete">
+ <title>gio.AppInfo.delete</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>delete</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if appinfo has been deleted.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>delete</methodname>() method tries to delete an
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
+ </para>
+ <para>
+ On some platforms, there may be a difference between user-defined
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+ which can be deleted, and system-wide ones which cannot. See
+ <methodname><link linkend="method-gioappinfo--can-delete">gio.AppInfo.can_delete</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--dup">
+ <title>gio.AppInfo.dup</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>dup</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A duplicate of appinfo.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>dup</methodname>() method creates a duplicate of a
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--equal">
+ <title>gio.AppInfo.equal</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>equal</methodname>
+ <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>appinfo2</parameter>&nbsp;:</term>
+ <listitem><simpara>the second
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if appinfo1 is equal to appinfo2.
+ <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>equal</methodname>() method checks if two
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s are equal.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--get-commandline">
+ <title>gio.AppInfo.get_commandline</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_commandline</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the appinfo's commandline, or
+ <literal>None</literal> if this information is not available.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_commandline</methodname>() method gets the
+ commandline with which the application will be started.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--get-description">
+ <title>gio.AppInfo.get_description</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_description</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A string containing a description of the application
+ appinfo, or <literal>None</literal> if none.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_description</methodname>() method gets a human-readable
+ description of an installed application.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--get-executable">
+ <title>gio.AppInfo.get_executable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_executable</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the appinfo's application
+ binary's name.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_description</methodname>() method gets the executable's
+ name for the installed application.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--get-icon">
+ <title>gio.AppInfo.get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_icon</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the default
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link> for appinfo.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_icon</methodname>() method gets the icon for the application.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--get-id">
+ <title>gio.AppInfo.get_id</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_id</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the application's ID.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_id</methodname>() method gets the ID of an application.
+ An id is a string that identifies the application. The exact format of the
+ id is platform dependent. For instance, on Unix this is the desktop file id
+ from the xdg menu specification.
+ </para>
+ <para>
+ Note that the returned ID may be <literal>None</literal>, depending on
+ how the appinfo has been constructed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--get-name">
+ <title>gio.AppInfo.get_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the name of the application for appinfo.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_name</methodname>() method gets the installed
+ name of the application.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--launch">
+ <title>gio.AppInfo.launch</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>launch</methodname>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>files</parameter>&nbsp;:</term>
+ <listitem><simpara>a list of <link linkend="class-giofile"><classname>gio.File</classname></link> objects.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>launch_context</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+ or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on successful launch,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>launch</methodname>() method launches the application.
+ Passes files to the launched application as arguments, using the optional
+ launch_context to get information about the details of the launcher
+ (like what screen it is on). On error, error will be set accordingly.
+ </para>
+ <para>
+ To lauch the application without arguments pass a <literal>None</literal> for files list.
+ </para>
+ <para>
+ Note that even if the launch is successful the application launched can fail
+ to start if it runs into problems during startup. There is no way to detect this.
+ </para>
+ <para>
+ Some URIs can be changed when passed through a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ (for instance unsupported uris with strange formats like mailto:), so
+ if you have a textual uri you want to pass in as argument, consider using
+ <methodname><link linkend="method-gioappinfo--launch-uris">gio.File.launch_uris</link></methodname>()
+ instead.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--launch-uris">
+ <title>gio.AppInfo.launch_uris</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>launch_uris</methodname>
+ <methodparam><parameter role="keyword">uris</parameter></methodparam>
+ <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>uris</parameter>&nbsp;:</term>
+ <listitem><simpara>a list containing URIs to launch.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>launch_context</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+ or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on successful launch,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>launch_uris</methodname>() method launches the application.
+ Passes uris to the launched application as arguments, using the optional
+ launch_context to get information about the details of the launcher
+ (like what screen it is on). On error, error will be set accordingly.
+ </para>
+ <para>
+ To lauch the application without arguments pass a <literal>None</literal> for files list.
+ </para>
+ <para>
+ Note that even if the launch is successful the application launched can fail
+ to start if it runs into problems during startup. There is no way to detect this.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--remove-supports-type">
+ <title>gio.AppInfo.remove_supports_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>remove_supports_type</methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>content_type</parameter>&nbsp;:</term>
+ <listitem><simpara>A string.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>remove_supports_type</methodname>() method removes a
+ supported type from an application, if possible.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--set-as-default-for-extension">
+ <title>gio.AppInfo.set_as_default_for_extension</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_as_default_for_extension</methodname>
+ <methodparam><parameter role="keyword">extension</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>extension</parameter>&nbsp;:</term>
+ <listitem><simpara>A string containing the file extension (without the dot).
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_as_default_for_extension</methodname>() method sets the
+ application as the default handler for the given file extention.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--set-as-default-for-type">
+ <title>gio.AppInfo.set_as_default_for_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_as_default_for_type</methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>content_type</parameter>&nbsp;:</term>
+ <listitem><simpara>The content type.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_as_default_for_type</methodname>() method sets the
+ application as the default handler for a given type.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--should-show">
+ <title>gio.AppInfo.should_show</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>should_show</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the appinfo should be shown,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>should_show</methodname>() method checks if the application
+ info should be shown in menus that list available applications.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--supports-files">
+ <title>gio.AppInfo.supports_files</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>supports_files</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the appinfo supports files.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>supports_files</methodname>() method checks if the application
+ accepts files as arguments.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioappinfo--supports-uris">
+ <title>gio.AppInfo.supports_uris</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>supports_uris</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the appinfo supports uris.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>supports_uris</methodname>() method checks if the application
+ accepts uris as arguments.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--app-info-get-all">
+ <title>gio.app_info_get_all</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>app_info_get_all</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>app_info_get_all</methodname>() function gets a list of all of
+ the applications currently registered on this system.
+ </para>
+ <para>
+ For desktop files, this includes applications that have NoDisplay=true set or are
+ excluded from display by means of OnlyShowIn or NotShowIn. See
+ <methodname><link linkend="method-gioappinfo--should-show">gio.AppInfo.should_show</link></methodname>().
+ The returned list does not include applications which have the Hidden key set.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--app-info-get-all-for-type">
+ <title>gio.app_info_get_all_for_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>app_info_get_all_for_type</methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>content_type</parameter>&nbsp;:</term>
+ <listitem><simpara>the content type to find a
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ for.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+ for a given content type or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>app_info_get_all_for_type</methodname>() function gets a list of all
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+ for a given content type.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--app-info-get-default-for-type">
+ <title>gio.app_info_get_default_for_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>app_info_get_default_for_type</methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>content_type</parameter>&nbsp;:</term>
+ <listitem><simpara>the content type to find a
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ for.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>must_support_uris</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>True</literal>, the
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ is expected to support URIs </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ for given content_type or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>app_info_get_default_for_type</methodname>() function gets the
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ that correspond to a given content type.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--app-info-get-default-for-uri-scheme">
+ <title>gio.app_info_get_default_for_uri_scheme</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>app_info_get_default_for_uri_scheme</methodname>
+ <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>uri_scheme</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing a URI scheme.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ for given uri_scheme or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>app_info_get_default_for_uri_scheme</methodname>() function gets
+ the default application for launching applications using this URI scheme. A URI
+ scheme is the initial part of the URI, up to but not including the
+ ':', e.g. "http", "ftp" or "sip".
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--app-info-reset-type-association">
+ <title>gio.app_info_reset_type_association</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>app_info_reset_type_association</methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>content_type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>app_info_reset_type_association</methodname>() function
+ removes all changes to the type associations done by
+ <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>(),
+ <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>(),
+ <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>() or
+ <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-applaunchcontext.xml b/docs/reference/pygio-applaunchcontext.xml
new file mode 100644
index 0000000..66bb229
--- /dev/null
+++ b/docs/reference/pygio-applaunchcontext.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioapplaunchcontext">
+ <refnamediv>
+ <refname>gio.AppLaunchContext</refname>
+ <refpurpose>Application launch context.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.AppLaunchContext</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-gioapplaunchcontext">gio.AppLaunchContext</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioapplaunchcontext--get-display">get_display</link></methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioapplaunchcontext--launch-failed">launch_failed</link></methodname>
+ <methodparam><parameter role="keyword">startup_notify_id</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+ is used for integrating the launch with the launching application. This is used to handle for
+ instance startup notification and launching the new application on the same screen as the launching window.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-gioapplaunchcontext">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.AppLaunchContext</methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new application launch context. This is not normally used, instead
+ you instantiate a subclass of this, such as
+ <link linkend="class-gdkapplaunchcontext"><classname>gtk.gdk.AppLaunchContext</classname></link>.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioapplaunchcontext--get-display">
+ <title>gio.AppLaunchContext.get_display</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_display</methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>info</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>files</parameter>&nbsp;:</term>
+ <listitem><simpara>a list of
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ objects.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a display string for the display.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_display</methodname>() method gets the display
+ string for the display. This is used to ensure new applications
+ are started on the same display as the launching application.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioapplaunchcontext--get-startup-notify-id">
+ <title>gio.AppLaunchContext.get_startup_notify_id</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_startup_notify_id</methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">files</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>info</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>files</parameter>&nbsp;:</term>
+ <listitem><simpara>a list of
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ objects.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a startup notification ID for the application,
+ or <literal>None</literal> if not supported.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_startup_notify_id</methodname>() method initiates
+ startup notification for the application and returns the DESKTOP_STARTUP_ID
+ for the launched operation, if supported.
+ </para>
+ <para>
+ Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioapplaunchcontext--launch-failed">
+ <title>gio.AppLaunchContext.launch_failed</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>launch_failed</methodname>
+ <methodparam><parameter role="keyword">startup_notify_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>startup_notify_id</parameter>&nbsp;:</term>
+ <listitem><simpara>the startup notification id that was returned by
+ <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a startup notification ID for the application,
+ or <literal>None</literal> if not supported.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_startup_notify_id</methodname>() method is called
+ when an application has failed to launch, so that it can cancel the application
+ startup notification started in
+ <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-asyncresult.xml b/docs/reference/pygio-asyncresult.xml
new file mode 100644
index 0000000..abe56ce
--- /dev/null
+++ b/docs/reference/pygio-asyncresult.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioasyncresult">
+ <refnamediv>
+ <refname>gio.AsyncResult</refname>
+ <refpurpose>Asynchronous Function Results.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.AsyncResult</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioasyncresult--get-source-object">get_source_object</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-gioasyncresult">gio.AsyncResult</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Prerequisites</title>
+ <para>
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link> is required by
+ <link linkend="class-gobject"><classname>gobject.GObject</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Known Implementation</title>
+ <para>
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link> is implemented by
+ <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ provides a base class for implementing asynchronous function results.
+ </para>
+ <para>
+ Asynchronous operations are broken up into two separate operations which are chained
+ together by a GAsyncReadyCallback. To begin an asynchronous operation, provide a
+ GAsyncReadyCallback to the asynchronous function. This callback will be triggered when
+ the operation has completed, and will be passed a GAsyncResult instance filled with the
+ details of the operation's success or failure, the object the asynchronous function was
+ started for and any error codes returned. The asynchronous callback function is then expected
+ to call the corresponding "_finish()" function with the object the function was called for,
+ and the <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ instance, and optionally, an error to grab any error conditions that may have occurred.
+ </para>
+ <para>
+ The purpose of the "_finish()" function is to take the generic result of type GAsyncResult and
+ return the specific result that the operation in question yields (e.g. a
+ <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ for a "enumerate children" operation). If the result or error status of the operation is not needed,
+ there is no need to call the "_finish()" function, GIO will take care of cleaning up the result and error
+ information after the GAsyncReadyCallback returns. It is also allowed to take a reference to the
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ and call "_finish()" later.
+ </para>
+ <para>
+ The callback for an asynchronous operation is called only once, and is always called, even
+ in the case of a cancelled operation. On cancellation the result is a gio.ERROR_CANCELLED error.
+ </para>
+ <para>
+ Some ascynchronous operations are implemented using synchronous calls. These are run in a
+ separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event
+ Loop and processed in an idle function. So, if you truly need asynchronous operations, make
+ sure to initialize GThread.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioasyncresult--get-source-object">
+ <title>gio.AsyncResult.get_source_object</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_source_object</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the source object for the res.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_source_object</methodname>() method gets the source object
+ from a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-bufferedinputstream.xml b/docs/reference/pygio-bufferedinputstream.xml
new file mode 100644
index 0000000..677b1da
--- /dev/null
+++ b/docs/reference/pygio-bufferedinputstream.xml
@@ -0,0 +1,461 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giobufferedinputstream">
+ <refnamediv>
+ <refname>gio.BufferedInputStream</refname>
+ <refpurpose>Buffered Input Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.BufferedInputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giofilterinputstream">gio.FilterInputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giobufferedinputstream">gio.BufferedInputStream</link></methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--fill">fill</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--fill-async">fill_async</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--fill-finish">fill_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--get-available">get_available</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--get-buffer-size">get_buffer_size</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--read-byte">read_byte</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedinputstream--set-buffer-size">set_buffer_size</link></methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--buffered-input-stream-new-sized">gio.buffered_input_stream_new_sized</link></methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+ +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
+ +-- <link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giobufferedinputstream">
+ <title>gio.BufferedInputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"buffer-size"</entry>
+ <entry>Read - Write - Construct</entry>
+ <entry>The size of the backend buffer. Allowed values: >= 1. Default value: 4096.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>
+ implements <link linkend="class-giofilterinputstream"><classname>gio.FilterInputStream</classname></link>
+ and provides for buffered reads.
+ </para>
+ <para>
+ By default,
+ <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>'s
+ buffer size is set at 4 kilobytes.
+ </para>
+ <para>
+ To create a buffered input stream, use
+ <methodname><link linkend="constructor-giobufferedinputstream">gio.BufferedInputStream</link></methodname>(),
+ or <methodname><link linkend="function-gio--buffered-input-stream-new-sized">gio.buffered_input_stream_new_sized</link></methodname>()
+ to specify the buffer's size at construction.
+ </para>
+ <para>
+ To get the size of a buffer within a buffered input stream, use
+ <methodname><link linkend="method-giobufferedinputstream--get-buffer-size">get_buffer_size</link></methodname>().
+ To change the size of a buffered input stream's buffer, use
+ <methodname><link linkend="method-giobufferedinputstream--set-buffer-size">set_buffer_size</link></methodname>().
+ Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giobufferedinputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.BufferedInputStream</methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>base_stream</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ for the given base_stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ from the given base_stream, with a buffer set to the default size (4 kilobytes).
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giobufferedinputstream--fill">
+ <title>gio.BufferedInputStream.fill</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>fill</methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+ <listitem><simpara>the number of bytes that will be read from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the number of bytes read into stream's buffer,
+ up to count, or -1 on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>fill</methodname>() method tries to read count bytes
+ from the stream into the buffer. Will block during this read.
+ </para>
+ <para>
+ If count is zero, returns zero and does nothing. A value of count
+ larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </para>
+ <para>
+ On success, the number of bytes read into the buffer is returned. It
+ is not an error if this is not the same as the requested size, as it can
+ happen e.g. near the end of a file. Zero is returned on end of file
+ (or if count is zero), but never otherwise.
+ </para>
+ <para>
+ If count is -1 then the attempted read size is equal to the number
+ of bytes that are required to fill the buffer.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can
+ be cancelled by triggering the cancellable object from another thread.
+ If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+ returned. If an operation was partially finished when the operation was
+ cancelled the partial result will be returned, without an error.
+ </para>
+ <para>
+ On error -1 is returned and error is set accordingly.
+ </para>
+ <para>
+ For the asynchronous, non-blocking, version of this function, see
+ <methodname><link linkend="method-giobufferedinputstream--fill-async">gio.BufferedInputStream.fill_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedinputstream--fill-async">
+ <title>gio.BufferedInputStream.fill_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>fill_async</methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+ <listitem><simpara>the number of bytes that will be read from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>fill_async</methodname>() method reads data into stream's
+ buffer asynchronously, up to count size. io_priority can be used to
+ prioritize reads.
+ </para>
+ <para>
+ For the synchronous version of this function, see
+ <methodname><link linkend="method-giobufferedinputstream--fill">gio.BufferedInputStream.fill</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </para>
+ <para>
+ If count is -1 then the attempted read size is equal to the number of bytes
+ that are required to fill the buffer.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedinputstream--fill-finish">
+ <title>gio.BufferedInputStream.fill_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>fill_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the size of the read stream, or -1 on an error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>fill_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-giobufferedinputstream--fill-async">gio.BufferedInputStream.fill_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedinputstream--get-available">
+ <title>gio.BufferedInputStream.get_available</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_available</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>size of the available stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_available</methodname>() method gets the size of
+ the available data within the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedinputstream--get-buffer-size">
+ <title>gio.BufferedInputStream.get_buffer_size</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_buffer_size</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the current buffer size.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_buffer_size</methodname>() method gets the size
+ of the input buffer.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedinputstream--read-byte">
+ <title>gio.BufferedInputStream.read_byte</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_byte</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the byte read from the stream, or -1 on end of stream or error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_byte</methodname>() method tries to read a single
+ byte from the stream or the buffer. Will block during this read.
+ </para>
+ <para>
+ On success, the byte read from the stream is returned. On end of stream -1
+ is returned but it's not an exceptional error and error is not set.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can
+ be cancelled by triggering the cancellable object from another thread.
+ If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+ returned. If an operation was partially finished when the operation was
+ cancelled the partial result will be returned, without an error.
+ </para>
+ <para>
+ On error -1 is returned and error is set accordingly.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedinputstream--set-buffer-size">
+ <title>gio.BufferedInputStream.set_buffer_size</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_buffer_size</methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">size</parameter>&nbsp;:</term>
+ <listitem><simpara>the new buffer size.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_buffer_size</methodname>() method sets the size
+ of the internal buffer of stream to size, or to the size of the contents
+ of the buffer. The buffer can never be resized smaller than its current contents.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--buffered-input-stream-new-sized">
+ <title>gio.buffered_input_stream_new_sized</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>buffered_input_stream_new_sized</methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>size</parameter>&nbsp;:</term>
+ <listitem><simpara>the requested buffer size.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A new
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>buffered_input_stream_new_sized</methodname>() function creates
+ a new <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>
+ from the given base_stream, with a buffer set to size.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-bufferedoutputstream.xml b/docs/reference/pygio-bufferedoutputstream.xml
new file mode 100644
index 0000000..6d7900f
--- /dev/null
+++ b/docs/reference/pygio-bufferedoutputstream.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giobufferedoutputstream">
+ <refnamediv>
+ <refname>gio.BufferedOutputStream</refname>
+ <refpurpose>Buffered Output Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.BufferedOutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giobufferedoutputstream">gio.BufferedOutputStream</link></methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedoutputstream--get-auto-grow">get_auto_grow</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedoutputstream--get-buffer-size">get_buffer_size</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedoutputstream--set-auto-grow">set_auto_grow</link></methodname>
+ <methodparam><parameter role="keyword">auto_grow</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giobufferedoutputstream--set-buffer-size">set_buffer_size</link></methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--buffered-output-stream-new-sized">gio.buffered_output_stream_new_sized</link></methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+ +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
+ +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giobufferedoutputstream">
+ <title>gio.BufferedOutputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"auto-grow"</entry>
+ <entry>Read - Write</entry>
+ <entry>Whether the buffer should automatically grow. Default value: <literal>False</literal>.</entry>
+ </row>
+ <row valign="top">
+ <entry>"buffer-size"</entry>
+ <entry>Read - Write - Construct</entry>
+ <entry>The size of the backend buffer. Allowed values: >= 1. Default value: 4096.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>
+ implements <link linkend="class-giofilteroutputstream"><classname>gio.FilterOutputStream</classname></link>
+ and provides for buffered writes.
+ </para>
+ <para>
+ By default,
+ <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>'s
+ buffer size is set at 4 kilobytes.
+ </para>
+ <para>
+ To create a buffered output stream, use
+ <methodname><link linkend="constructor-giobufferedoutputstream">gio.BufferedOutputStream</link></methodname>(),
+ or <methodname><link linkend="function-gio--buffered-output-stream-new-sized">gio.buffered_output_stream_new_sized</link></methodname>()
+ to specify the buffer's size at construction.
+ </para>
+ <para>
+ To get the size of a buffer within a buffered output stream, use
+ <methodname><link linkend="method-giobufferedoutputstream--get-buffer-size">gio.BufferedOutputStream.get_buffer_size</link></methodname>().
+ To change the size of a buffered output stream's buffer, use
+ <methodname><link linkend="method-giobufferedoutputstream--set-buffer-size">gio.BufferedOutputStream.set_buffer_size</link></methodname>().
+ Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giobufferedoutputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.BufferedOutputStream</methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>base_stream</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+ for the given base_stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new buffered output stream for a base stream.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giobufferedoutputstream--get-auto-grow">
+ <title>gio.BufferedOutputStream.get_auto_grow</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_auto_grow</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the stream's
+ buffer automatically grows, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_auto_grow</methodname>() method checks if the
+ buffer automatically grows as data is added.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedoutputstream--get-buffer-size">
+ <title>gio.BufferedOutputStream.get_buffer_size</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_buffer_size</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the current buffer size.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_buffer_size</methodname>() method gets the size
+ of the buffer in the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedoutputstream--set-auto-grow">
+ <title>gio.BufferedOutputStream.set_auto_grow</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_auto_grow</methodname>
+ <methodparam><parameter role="keyword">auto_grow</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">auto_grow</parameter>&nbsp;:</term>
+ <listitem><simpara>a boolean.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_auto_grow</methodname>() method sets whether or not
+ the stream's buffer should automatically grow. If auto_grow is true,
+ then each write will just make the buffer larger, and you must manually
+ flush the buffer to actually write out the data to the underlying stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giobufferedoutputstream--set-buffer-size">
+ <title>gio.BufferedOutputStream.set_buffer_size</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_buffer_size</methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">size</parameter>&nbsp;:</term>
+ <listitem><simpara>the new buffer size.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_buffer_size</methodname>() method sets the size of
+ the internal buffer to size.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--buffered-output-stream-new-sized">
+ <title>gio.buffered_output_stream_new_sized</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>buffered_output_stream_new_sized</methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>size</parameter>&nbsp;:</term>
+ <listitem><simpara>the requested buffer size.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A new
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+ with an internal buffer set to size..
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>buffered_output_stream_new_sized</methodname>() function creates
+ a new <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>
+ from the given base_stream, with a buffer set to size.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-cancellable.xml b/docs/reference/pygio-cancellable.xml
new file mode 100644
index 0000000..c35388d
--- /dev/null
+++ b/docs/reference/pygio-cancellable.xml
@@ -0,0 +1,290 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giocancellable">
+ <refnamediv>
+ <refname>gio.Cancellable</refname>
+ <refpurpose>Thread-safe Operation Cancellation Stack.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Cancellable</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giocancellable">gio.Cancellable</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--cancel">cancel</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--get-fd">get_fd</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--is-cancelled">is_cancelled</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--pop-current">pop_current</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--push-current">push_current</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--reset">reset</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giocancellable--set-error-if-cancelled">set_error_if_cancelled</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>
+ <methodparam></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giocancellable">gio.Cancellable</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ is a thread-safe operation cancellation stack used throughout GIO to allow for
+ cancellation of synchronous and asynchronous operations.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giocancellable">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.Cancellable</methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link> object.
+ </para>
+ <para>
+ Applications that want to start one or more operations that should be cancellable should create a
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ and pass it to the operations.
+ </para>
+ <para>
+ One <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ can be used in multiple consecutive operations, but not in multiple concurrent operations.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giocancellable--cancel">
+ <title>gio.Cancellable.cancel</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>cancel</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>cancel</methodname>() method will set cancellable to cancelled,
+ and will emit the "cancelled" signal. (However, see the warning about race conditions
+ in the documentation for that signal if you are planning to connect to it.)
+ </para>
+ <para>
+ This function is thread-safe. In other words, you can safely call it from a thread
+ other than the one running the operation that was passed the cancellable.
+ </para>
+ <para>
+ The convention within gio is that cancelling an asynchronous operation causes it
+ to complete asynchronously. That is, if you cancel the operation from the same thread
+ in which it is running, then the operation's GAsyncReadyCallback will not be invoked
+ until the application returns to the main loop.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giocancellable--get-fd">
+ <title>gio.Cancellable.get_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_fd</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A valid file descriptor. -1 if the file descriptor
+ is not supported, or on errors.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_fd</methodname>() method gets the file descriptor
+ for a cancellable job. This can be used to implement cancellable operations
+ on Unix systems. The returned fd will turn readable when cancellable is cancelled.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giocancellable--is-cancelled">
+ <title>gio.Cancellable.is_cancelled</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_cancelled</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if cancellable is cancelled,
+ <literal>False</literal> if called with <literal>None</literal> or if
+ item is not cancelled. </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_fd</methodname>() method gets the file descriptor
+ for a cancellable job. This can be used to implement cancellable operations
+ on Unix systems. The returned fd will turn readable when cancellable is cancelled.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giocancellable--pop-current">
+ <title>gio.Cancellable.pop_current</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>pop_current</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>pop_current</methodname>() method pops cancellable off
+ the cancellable stack (verifying that cancellable is on the top of the stack).
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giocancellable--push-current">
+ <title>gio.Cancellable.push_current</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>push_current</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>push_current</methodname>() method pushes cancellable onto
+ the cancellable stack. The current cancllable can then be recieved using
+ <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giocancellable--reset">
+ <title>gio.Cancellable.reset</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>reset</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>reset</methodname>() method resets cancellable to its uncancelled state.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giocancellable--set-error-if-cancelled">
+ <title>gio.Cancellable.set_error_if_cancelled</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_error_if_cancelled</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if cancellable was cancelled,
+ <literal>False</literal> if it was not.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_error_if_cancelled</methodname>() method, if the cancellable
+ is cancelled, sets the error to notify that the operation was cancelled.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--cancellable-get-current">
+ <title>gio.cancellable_get_current</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>cancellable_get_current</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ from the top of the stack, or <literal>None</literal> if the stack is empty.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>cancellable_get_current</methodname>() function gets the top cancellable from the stack.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml
new file mode 100644
index 0000000..17761f8
--- /dev/null
+++ b/docs/reference/pygio-classes.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="gio-class-reference"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGio Class Reference</title>
+
+<!-- GIO CLASSES -->
+<xi:include href="pygio-appinfo.xml"/>
+<xi:include href="pygio-applaunchcontext.xml"/>
+<xi:include href="pygio-asyncresult.xml"/>
+<xi:include href="pygio-bufferedinputstream.xml"/>
+<xi:include href="pygio-bufferedoutputstream.xml"/>
+<xi:include href="pygio-cancellable.xml"/>
+<xi:include href="pygio-datainputstream.xml"/>
+<xi:include href="pygio-dataoutputstream.xml"/>
+<xi:include href="pygio-drive.xml"/>
+<xi:include href="pygio-emblem.xml"/>
+<xi:include href="pygio-emblemedicon.xml"/>
+<xi:include href="pygio-file.xml"/>
+<xi:include href="pygio-fileattributeinfo.xml"/>
+<xi:include href="pygio-fileenumerator.xml"/>
+<xi:include href="pygio-fileicon.xml"/>
+<xi:include href="pygio-fileinfo.xml"/>
+<xi:include href="pygio-fileinputstream.xml"/>
+<xi:include href="pygio-filemonitor.xml"/>
+<xi:include href="pygio-fileoutputstream.xml"/>
+<xi:include href="pygio-filterinputstream.xml"/>
+<xi:include href="pygio-filteroutputstream.xml"/>
+<xi:include href="pygio-icon.xml"/>
+<xi:include href="pygio-inputstream.xml"/>
+<xi:include href="pygio-loadableicon.xml"/>
+<xi:include href="pygio-memoryinputstream.xml"/>
+<xi:include href="pygio-memoryoutputstream.xml"/>
+<xi:include href="pygio-mount.xml"/>
+<xi:include href="pygio-mountoperation.xml"/>
+<xi:include href="pygio-outputstream.xml"/>
+<xi:include href="pygio-seekable.xml"/>
+<xi:include href="pygio-simpleasyncresult.xml"/>
+<xi:include href="pygio-themedicon.xml"/>
+<xi:include href="pygio-volume.xml"/>
+<xi:include href="pygio-volumemonitor.xml"/>
+<xi:include href="pygio-functions.xml"/>
+<xi:include href="pygio-constants.xml"/>
+
+</chapter>
diff --git a/docs/reference/pygio-constants.xml b/docs/reference/pygio-constants.xml
new file mode 100644
index 0000000..343927e
--- /dev/null
+++ b/docs/reference/pygio-constants.xml
@@ -0,0 +1,1540 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gio-constants">
+ <refnamediv>
+ <refname>gio Constants</refname>
+ <refpurpose>the built-in constants of the gio module</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<programlisting>
+<xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
+<xref linkend="gio-ask-password-flags-constants" endterm="gio-ask-password-flags-constants-title"></xref>
+<xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>
+<xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref>
+<xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
+<xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+<xref linkend="gio-file-attribute-constants" endterm="gio-file-attribute-constants-title"></xref>
+<xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+<xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>
+<xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+<xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+<xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+<xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+<xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
+<xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
+<xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
+<xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>
+<xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
+</programlisting>
+
+ </refsect1>
+
+ <refsect1 id="gio-constants-description">
+ <title>Description</title>
+
+ <refsect2 id="gio-ask-password-flags-constants">
+ <title id="gio-ask-password-flags-constants-title">Gio Ask Password Flags Constants</title>
+
+ <para>
+ Flags that are used to request specific information from the user, or to
+ notify the user of their choices in an authentication situation.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED</literal></term>
+ <listitem>
+ <simpara>operation supports anonymous users.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ASK_PASSWORD_NEED_DOMAIN</literal></term>
+ <listitem>
+ <simpara>operation requires a domain.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ASK_PASSWORD_NEED_PASSWORD</literal></term>
+ <listitem>
+ <simpara>operation requires a password.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ASK_PASSWORD_NEED_USERNAME</literal></term>
+ <listitem>
+ <simpara>operation requires a username.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ASK_PASSWORD_SAVING_SUPPORTED</literal></term>
+ <listitem>
+ <simpara>operation supports saving settings.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-app-info-constants">
+ <title id="gio-app-info-constants-title">Gio AppInfo Create Flags Constants</title>
+
+ <para>
+ Flags used when creating a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.APP_INFO_CREATE_NONE</literal></term>
+ <listitem>
+ <simpara>No flags.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.APP_INFO_CREATE_NEEDS_TERMINAL</literal></term>
+ <listitem>
+ <simpara>Application opens in a terminal window. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.APP_INFO_CREATE_SUPPORTS_URIS</literal></term>
+ <listitem>
+ <simpara>Application supports URI arguments. </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-data-stream-byte-order-constants">
+ <title id="gio-data-stream-byte-order-constants-title">Gio Data Stream Byte Order Constants</title>
+
+ <para>
+ Used to ensure proper endianness of streaming data sources across various machine architectures.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</literal></term>
+ <listitem>
+ <simpara>Selects Big Endian byte order.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_BYTE_ORDER_HOST_ENDIAN</literal></term>
+ <listitem>
+ <simpara>Selects endianness based on host machine's architecture.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN</literal></term>
+ <listitem>
+ <simpara>Selects Little Endian byte order.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-data-stream-newline-type-constants">
+ <title id="gio-data-stream-newline-type-constants-title">Gio Data Stream Newline Type Constants</title>
+
+ <para>
+ Used when checking for or setting the line endings for a given file.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_LF</literal></term>
+ <listitem>
+ <simpara>Selects "LF" line endings, common on most modern UNIX platforms.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_CR</literal></term>
+ <listitem>
+ <simpara>Selects "CR" line endings.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_CR_LF</literal></term>
+ <listitem>
+ <simpara>Selects "CR, LF" line ending, common on Microsoft Windows.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_ANY</literal></term>
+ <listitem>
+ <simpara>Automatically try to handle any line ending type.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-emblem-origin-constants">
+ <title id="gio-emblem-origin-constants-title">Gio Emblem Origin Constants</title>
+
+ <para>
+ GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.EMBLEM_ORIGIN_DEVICE</literal></term>
+ <listitem>
+ <simpara>Embleme adds device-specific information.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.EMBLEM_ORIGIN_LIVEMETADATA</literal></term>
+ <listitem>
+ <simpara>Emblem depicts live metadata, such as "readonly".</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.EMBLEM_ORIGIN_TAG</literal></term>
+ <listitem>
+ <simpara>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></term>
+ <listitem>
+ <simpara>Emblem of unknown origin.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-error-constants">
+ <title id="gio-error-constants-title">Gio Error Constants</title>
+
+ <para>
+ GIOError Error codes returned by GIO functions.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.ERROR_ALREADY_MOUNTED</literal></term>
+ <listitem>
+ <simpara>File is already mounted.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_BUSY</literal></term>
+ <listitem>
+ <simpara>File is busy.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_CANCELLED</literal></term>
+ <listitem>
+ <simpara>Operation was cancelled. See
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_CANT_CREATE_BACKUP</literal></term>
+ <listitem>
+ <simpara>Backup couldn't be created.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_CLOSED</literal></term>
+ <listitem>
+ <simpara>File was closed.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_EXISTS</literal></term>
+ <listitem>
+ <simpara>File already exists error.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_FAILED</literal></term>
+ <listitem>
+ <simpara>Generic error condition for when any operation fails.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_FAILED_HANDLED</literal></term>
+ <listitem>
+ <simpara>Operation failed and a helper program has already interacted with
+ the user. Do not display any error dialog. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_FILENAME_TOO_LONG</literal></term>
+ <listitem>
+ <simpara>Filename is too many characters.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_HOST_NOT_FOUND</literal></term>
+ <listitem>
+ <simpara>Host couldn't be found (remote operations).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_INVALID_ARGUMENT</literal></term>
+ <listitem>
+ <simpara>Invalid argument.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_INVALID_FILENAME</literal></term>
+ <listitem>
+ <simpara>Filename is invalid or contains invalid characters.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_IS_DIRECTORY</literal></term>
+ <listitem>
+ <simpara>File is a directory error.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_DIRECTORY</literal></term>
+ <listitem>
+ <simpara>File is not a directory.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_EMPTY</literal></term>
+ <listitem>
+ <simpara>File is a directory that isn't empty.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_FOUND</literal></term>
+ <listitem>
+ <simpara>File not found error.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_MOUNTABLE_FILE</literal></term>
+ <listitem>
+ <simpara>File cannot be mounted.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_MOUNTED</literal></term>
+ <listitem>
+ <simpara>File isn't mounted. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_REGULAR_FILE</literal></term>
+ <listitem>
+ <simpara>File is not a regular file.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_SUPPORTED</literal></term>
+ <listitem>
+ <simpara>Operation not supported for the current backend.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NOT_SYMBOLIC_LINK</literal></term>
+ <listitem>
+ <simpara>File is not a symbolic link.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_NO_SPACE</literal></term>
+ <listitem>
+ <simpara>No space left on drive. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_PENDING</literal></term>
+ <listitem>
+ <simpara>Operations are still pending.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_PERMISSION_DENIED</literal></term>
+ <listitem>
+ <simpara>Permission denied.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_READ_ONLY</literal></term>
+ <listitem>
+ <simpara>File is read only. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_TIMED_OUT</literal></term>
+ <listitem>
+ <simpara>Operation timed out. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_TOO_MANY_LINKS</literal></term>
+ <listitem>
+ <simpara>File contains too many symbolic links. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_TOO_MANY_OPEN_FILES</literal></term>
+ <listitem>
+ <simpara>The current process has too many files open and can't open any
+ more. Duplicate descriptors do count toward this limit. Since 2.20</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_WOULD_BLOCK</literal></term>
+ <listitem>
+ <simpara>Operation would block.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_WOULD_MERGE</literal></term>
+ <listitem>
+ <simpara>Operation would merge files.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_WOULD_RECURSE</literal></term>
+ <listitem>
+ <simpara>Operation would be recursive.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.ERROR_WRONG_ETAG</literal></term>
+ <listitem>
+ <simpara>File's Entity Tag was incorrect. </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-attribute-constants">
+ <title id="gio-file-attribute-constants-title">Gio File Attribute Constants</title>
+
+ <para>
+ The file attributes.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_TYPE</literal></term>
+ <listitem>
+ <simpara>
+ "standard::type" A key in the "standard" namespace for storing file types. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a
+ <xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</literal></term>
+ <listitem>
+ <simpara>
+ "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP</literal></term>
+ <listitem>
+ <simpara>
+ "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</literal></term>
+ <listitem>
+ <simpara>
+ "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink.
+ Typically the actual type is something else, if we followed the symlink to get the type. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</literal></term>
+ <listitem>
+ <simpara>
+ "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_NAME</literal></term>
+ <listitem>
+ <simpara>
+ "standard::name" A key in the "standard" namespace for getting the name of the file.
+ The name is the on-disk filename which may not be in any known encoding,
+ and can thus not be generally displayed as is. Use
+ gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user
+ interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</literal></term>
+ <listitem>
+ <simpara>
+ "standard::display-name" A key in the "standard" namespace for getting the display
+ name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed
+ in the UI. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME</literal></term>
+ <listitem>
+ <simpara>
+ "standard::edit-name" A key in the "standard" namespace for edit name of the file.
+ An edit name is similar to the display name, but it is meant to be used when you want
+ to rename the file in the UI. The display name might contain information you don't
+ want in the new filename (such as "(invalid unicode)" if the filename was in an
+ invalid encoding). Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME</literal></term>
+ <listitem>
+ <simpara>
+ "standard::copy-name" A key in the "standard" namespace for getting the copy
+ name of the file. The copy name is an optional version of the name. If available
+ it's always in UTF8, and corresponds directly to the original filename (only transcoded
+ to UTF8). This is useful if you want to copy the file to another filesystem that might
+ have a different encoding. If the filename is not a valid string in the encoding selected
+ for the filesystem it is in then the copy name will not be set. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_ICON</literal></term>
+ <listitem>
+ <simpara>
+ "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</literal></term>
+ <listitem>
+ <simpara>
+ "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</literal></term>
+ <listitem>
+ <simpara>
+ "standard::fast-content-type" A key in the "standard" namespace for getting the fast
+ content type. The fast content type isn't as reliable as the regular one, as it
+ only uses the filename to guess it, but it is faster to calculate than the regular
+ content type. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SIZE</literal></term>
+ <listitem>
+ <simpara>
+ "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</literal></term>
+ <listitem>
+ <simpara>
+ "standard::symlink-target" A key in the "standard" namespace for getting the target URI
+ for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER</literal></term>
+ <listitem>
+ <simpara>
+ "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this
+ key to set the order files are displayed. Files with smaller sort order should be sorted first,
+ and files without sort order as if sort order was zero.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ETAG_VALUE</literal></term>
+ <listitem>
+ <simpara>
+ "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ID_FILE</literal></term>
+ <listitem>
+ <simpara>
+ "id::file" A key in the "id" namespace for getting a file identifier. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files,
+ to avoid recursive directory scanning.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ID_FILESYSTEM</literal></term>
+ <listitem>
+ <simpara>
+ "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and
+ drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_READ</literal></term>
+ <listitem>
+ <simpara>
+ "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+ if the user is able to read the file.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE</literal></term>
+ <listitem>
+ <simpara>
+ "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+ if the user is able to write to the file.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</literal></term>
+ <listitem>
+ <simpara>
+ "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+ if the user is able to execute the file.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE</literal></term>
+ <listitem>
+ <simpara>
+ "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+ if the user is able to delete the file.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH</literal></term>
+ <listitem>
+ <simpara>
+ "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+ if the user is able to move the file to the trash.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME</literal></term>
+ <listitem>
+ <simpara>
+ "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+ if the user is able to rename the file.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</literal></term>
+ <listitem>
+ <simpara>
+ "mountable::can-mount" A key in the "mountable" namespace for checking if
+ a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</literal></term>
+ <listitem>
+ <simpara>
+ "mountable::can-unmount" A key in the "mountable" namespace for checking if a file
+ (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</literal></term>
+ <listitem>
+ <simpara>
+ "mountable::can-eject" A key in the "mountable" namespace for checking if a file
+ (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</literal></term>
+ <listitem>
+ <simpara>
+ "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</literal></term>
+ <listitem>
+ <simpara>
+ "mountable::hal-udi" A key in the "mountable" namespace for getting the
+ HAL UDI for the mountable file. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_MODIFIED</literal></term>
+ <listitem>
+ <simpara>
+ "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC</literal></term>
+ <listitem>
+ <simpara>
+ "time::modified-usec" A key in the "time" namespace for getting the miliseconds
+ of the time the file was last modified. This should be used in conjunction
+ with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_ACCESS</literal></term>
+ <listitem>
+ <simpara>
+ "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC</literal></term>
+ <listitem>
+ <simpara>
+ "time::access-usec" A key in the "time" namespace for getting the microseconds of
+ the time the file was last accessed. This should be used in conjunction
+ with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_CHANGED</literal></term>
+ <listitem>
+ <simpara>
+ "time::changed" A key in the "time" namespace for getting the time the
+ file was last changed. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed.
+ This corresponds to the traditional UNIX ctime.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC</literal></term>
+ <listitem>
+ <simpara>
+ "time::changed-usec" A key in the "time" namespace for getting the microseconds
+ of the time the file was last changed. This should be used in conjunction
+ with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_CREATED</literal></term>
+ <listitem>
+ <simpara>
+ "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created.
+ This corresponds to the NTFS ctime.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TIME_CREATED_USEC</literal></term>
+ <listitem>
+ <simpara>
+ "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the
+ file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_DEVICE</literal></term>
+ <listitem>
+ <simpara>
+ "unix::device" A key in the "unix" namespace for getting the device id of the device the file
+ is located on (see stat() documentation). This attribute is only available
+ for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_INODE</literal></term>
+ <listitem>
+ <simpara>
+ "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only
+ available for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_MODE</literal></term>
+ <listitem>
+ <simpara>
+ "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g.
+ whether the file is a regular file, symlink, etc). See lstat() documentation.
+ This attribute is only available for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_NLINK</literal></term>
+ <listitem>
+ <simpara>
+ "unix::nlink" A key in the "unix" namespace for getting the number of hard links
+ for a file. See lstat() documentation. This attribute is only available for UNIX
+ file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_UID</literal></term>
+ <listitem>
+ <simpara>
+ "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute
+ is only available for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_GID</literal></term>
+ <listitem>
+ <simpara>
+ "unix::gid" A key in the "unix" namespace for getting the group ID for the file.
+ This attribute is only available for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_RDEV</literal></term>
+ <listitem>
+ <simpara>
+ "unix::rdev" A key in the "unix" namespace for getting the device ID for the file
+ (if it is a special file). See lstat() documentation. This attribute is only available
+ for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</literal></term>
+ <listitem>
+ <simpara>
+ "unix::block-size" A key in the "unix" namespace for getting the block size for
+ the file system. This attribute is only available for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_BLOCKS</literal></term>
+ <listitem>
+ <simpara>
+ "unix::blocks" A key in the "unix" namespace for getting the number of blocks allocated
+ for the file. This attribute is only available for UNIX file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</literal></term>
+ <listitem>
+ <simpara>
+ "unix::is-mountpoint" A key in the "unix" namespace for checking if the file represents
+ a UNIX mount point. This attribute is <literal>True</literal> if the file is a UNIX mount point.
+ This attribute is only available for UNIX file systems. Corresponding
+ GFileAttributeType
+ is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_DOS_IS_ARCHIVE</literal></term>
+ <listitem>
+ <simpara>
+ "dos::is-archive" A key in the "dos" namespace for checking if the file's archive
+ flag is set. This attribute is <literal>True</literal> if the archive flag is set.
+ This attribute is only available for DOS file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_DOS_IS_SYSTEM</literal></term>
+ <listitem>
+ <simpara>
+ "dos::is-system" A key in the "dos" namespace for checking if the file's backup
+ flag is set. This attribute is <literal>True</literal> if the backup flag is set.
+ This attribute is only available for DOS file systems. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+ G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_OWNER_USER</literal></term>
+ <listitem>
+ <simpara>
+ "owner::user" A key in the "owner" namespace for getting the user name
+ of the file's owner. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_OWNER_USER_REAL</literal></term>
+ <listitem>
+ <simpara>
+ "owner::user-real" A key in the "owner" namespace for getting the real name
+ of the user that owns the file. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+ G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_OWNER_GROUP</literal></term>
+ <listitem>
+ <simpara>
+ "owner::group" A key in the "owner" namespace for getting the file owner's
+ group. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_THUMBNAIL_PATH</literal></term>
+ <listitem>
+ <simpara>
+ "thumbnail::path" A key in the "thumbnail" namespace for getting the path
+ to the thumbnail image. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_THUMBNAILING_FAILED</literal></term>
+ <listitem>
+ <simpara>
+ "thumbnail::failed" A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute
+ is <literal>True</literal> if thumbnailing failed. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+ G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_PREVIEW_ICON</literal></term>
+ <listitem>
+ <simpara>
+ "preview::icon" A key in the "preview" namespace for getting a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ that can be used to get preview of the file. For example, it
+ may be a low resolution thumbnail without metadata. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+ G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a GIcon.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE</literal></term>
+ <listitem>
+ <simpara>
+ "filesystem::size" A key in the "filesystem" namespace for getting the total
+ size (in bytes) of the file system, used in
+ <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>().
+ Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_FREE</literal></term>
+ <listitem>
+ <simpara>
+ "filesystem::free" A key in the "filesystem" namespace for getting the number of bytes of free space left
+ on the file system. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_UINT64.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE</literal></term>
+ <listitem>
+ <simpara>
+ "filesystem::type" A key in the "filesystem" namespace for getting the file system's type. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_READONLY</literal></term>
+ <listitem>
+ <simpara>
+ "filesystem::readonly" A key in the "filesystem" namespace for checking if the
+ file system is read only. Is set to <literal>True</literal> if the file system
+ is read only. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_GVFS_BACKEND</literal></term>
+ <listitem>
+ <simpara>
+ "gvfs::backend" A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_SELINUX_CONTEXT</literal></term>
+ <listitem>
+ <simpara>
+ "selinux::context" A key in the "selinux" namespace for getting the file's SELinux context. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ Note that this attribute is only available if GLib has been built with SELinux support.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TRASH_ITEM_COUNT</literal></term>
+ <listitem>
+ <simpara>
+ "trash::item-count" A key in the "trash" namespace. When requested against "trash:///" returns the number
+ of (toplevel) items in the trash folder. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_UINT32.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</literal></term>
+ <listitem>
+ <simpara>
+ "filesystem::use-preview" A key in the "filesystem" namespace for hinting a file manager
+ application whether it should preview (e.g. thumbnail) files on the file system.
+ The value for this key contain a GFilesystemPreviewType.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_STANDARD_DESCRIPTION</literal></term>
+ <listitem>
+ <simpara>
+ "standard::description" A key in the "standard" namespace for getting the description
+ of the file. The description is a utf8 string that describes the file, generally containing
+ the filename, but can also contain furter information. Example descriptions could be
+ "filename (on hostname)" for a remote file or "filename (in trash)" for a
+ file in the trash. This is useful for instance as the window title when
+ displaying a directory or for a bookmarks menu. Corresponding
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ is G_FILE_ATTRIBUTE_TYPE_STRING.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-attribute-type-constants">
+ <title id="gio-file-attribute-type-constants-title">Gio File Attribute Type Constants</title>
+
+ <para>
+ The data types for file attributes.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</literal></term>
+ <listitem>
+ <simpara>a boolean value.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</literal></term>
+ <listitem>
+ <simpara>a zero terminated string of non-zero bytes.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT32</literal></term>
+ <listitem>
+ <simpara>a signed 4-byte/32-bit integer.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT64</literal></term>
+ <listitem>
+ <simpara>a signed 8-byte/64-bit integer.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_INVALID</literal></term>
+ <listitem>
+ <simpara>indicates an invalid or uninitalized type.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_OBJECT</literal></term>
+ <listitem>
+ <simpara>a <link linkend="class-gobject">gobject.GObject</link>.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_STRING</literal></term>
+ <listitem>
+ <simpara>a null terminated UTF8 string.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT32</literal></term>
+ <listitem>
+ <simpara>an unsigned 4-byte/32-bit integer.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT64</literal></term>
+ <listitem>
+ <simpara>an unsigned 8-byte/64-bit integer.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-attribute-flags-constants">
+ <title id="gio-file-attribute-flags-constants-title">Gio File Attribute Flags Constants</title>
+
+ <para>
+ Flags specifying the behaviour of an attribute.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_INFO_NONE</literal></term>
+ <listitem>
+ <simpara>no flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</literal></term>
+ <listitem>
+ <simpara>copy the attribute values when the file is copied.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</literal></term>
+ <listitem>
+ <simpara>copy the attribute values when the file is moved.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-create-flags-constants">
+ <title id="gio-file-create-flags-constants-title">Gio File Create Flags Constants</title>
+
+ <para>
+ Flags used when an operation may create a file.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_CREATE_NONE</literal></term>
+ <listitem>
+ <simpara>No flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_CREATE_PRIVATE</literal></term>
+ <listitem>
+ <simpara>Create a file that can only be accessed by the current user.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_CREATE_REPLACE_DESTINATION</literal></term>
+ <listitem>
+ <simpara>
+ Replace the destination as if it didn't exist before. Don't try
+ to keep any old permissions, replace instead of following links. This is
+ generally useful if you're doing a "copy over" rather than a "save new version of"
+ replace operation. You can think of it as "unlink destination" before writing
+ to it, although the implementation may not be exactly like that.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-copy-flags-constants">
+ <title id="gio-file-copy-flags-constants-title">Gio File Copy Flags Constants</title>
+
+ <para>
+ Flags used when copying or moving files.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_NONE</literal></term>
+ <listitem>
+ <simpara>No flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_OVERWRITE</literal></term>
+ <listitem>
+ <simpara>Overwrite any existing files.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_BACKUP</literal></term>
+ <listitem>
+ <simpara>Make a backup of any existing files.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_NOFOLLOW_SYMLINKS</literal></term>
+ <listitem>
+ <simpara>Don't follow symlinks.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_ALL_METADATA</literal></term>
+ <listitem>
+ <simpara>Copy all file metadata instead of just default set used for copy
+ (see <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_NO_FALLBACK_FOR_MOVE</literal></term>
+ <listitem>
+ <simpara>Don't use copy and delete fallback if native move not supported.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_COPY_TARGET_DEFAULT_PERMS</literal></term>
+ <listitem>
+ <simpara>Leaves target file with default perms, instead of setting the source file perms.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-monitor-flags-constants">
+ <title id="gio-file-monitor-flags-constants-title">Gio File Monitor Flags Constants</title>
+
+ <para>
+ Flags used to set what a
+ <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+ will watch for.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_MONITOR_NONE</literal></term>
+ <listitem>
+ <simpara>No flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_MONITOR_WATCH_MOUNTS</literal></term>
+ <listitem>
+ <simpara>Watch for mount events.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-query-info-flags-constants">
+ <title id="gio-file-query-info-flags-constants-title">Gio File Query Info Flags Constants</title>
+
+ <para>
+ Flags used when querying a
+ <link linkend="class-giofile"><classname>gio.FileInfo</classname></link>.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_QUERY_INFO_NONE</literal></term>
+ <listitem>
+ <simpara>No flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</literal></term>
+ <listitem>
+ <simpara>Don't follow symlinks.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-file-type-constants">
+ <title id="gio-file-type-constants-title">Gio File Type Constants</title>
+
+ <para>
+ Indicates the file's on-disk type.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_DIRECTORY</literal></term>
+ <listitem>
+ <simpara>File handle represents a directory.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_MOUNTABLE</literal></term>
+ <listitem>
+ <simpara>File is a mountable location.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_REGULAR</literal></term>
+ <listitem>
+ <simpara>File handle represents a regular file.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_SHORTCUT</literal></term>
+ <listitem>
+ <simpara>File is a shortcut (Windows systems).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_SPECIAL</literal></term>
+ <listitem>
+ <simpara>File is a "special" file, such as a socket, fifo, block device, or character device.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_SYMBOLIC_LINK</literal></term>
+ <listitem>
+ <simpara>File handle represents a symbolic link (Unix systems).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.FILE_TYPE_UNKNOWN</literal></term>
+ <listitem>
+ <simpara>File's type is unknown.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-mount-mount-flags-constants">
+ <title id="gio-mount-mount-flags-constants-title">Gio Mount Mount Flags Constants</title>
+
+ <para>
+ Flags used when mounting a mount.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.MOUNT_MOUNT_NONE</literal></term>
+ <listitem>
+ <simpara>No flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-mount-unmount-flags-constants">
+ <title id="gio-mount-unmount-flags-constants-title">Gio Mount Unmount Flags Constants</title>
+
+ <para>
+ Flags used when unmounting a mount.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.MOUNT_UNMOUNT_NONE</literal></term>
+ <listitem>
+ <simpara>No flags set.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.MOUNT_UNMOUNT_FORCE</literal></term>
+ <listitem>
+ <simpara>Unmount even if there are outstanding file operations on the mount.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-mount-operation-result-constants">
+ <title id="gio-mount-operation-result-constants-title">Gio Mount Operation Result Constants</title>
+
+ <para>
+ returned as a result when a request for information is send by the mounting operation.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.MOUNT_OPERATION_HANDLED</literal></term>
+ <listitem>
+ <simpara>The request was fulfilled and the user specified data is now available.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.MOUNT_OPERATION_ABORTED</literal></term>
+ <listitem>
+ <simpara>The user requested the mount operation to be aborted.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.MOUNT_OPERATION_UNHANDLED</literal></term>
+ <listitem>
+ <simpara>The request was unhandled (i.e. not implemented).</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="gio-password-save-constants">
+ <title id="gio-password-save-constants-title">Gio Password Save Constants</title>
+
+ <para>
+ is used to indicate the lifespan of a saved password.
+ </para>
+ <para>
+ Gvfs stores passwords in the Gnome keyring when this flag allows it to,
+ and later retrieves it again from there.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gio.PASSWORD_SAVE_FOR_SESSION</literal></term>
+ <listitem>
+ <simpara>save a password for the session.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.PASSWORD_SAVE_NEVER</literal></term>
+ <listitem>
+ <simpara>never save a password.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gio.PASSWORD_SAVE_PERMANENTLY</literal></term>
+ <listitem>
+ <simpara>save a password permanently.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygio-datainputstream.xml b/docs/reference/pygio-datainputstream.xml
new file mode 100644
index 0000000..403bb3e
--- /dev/null
+++ b/docs/reference/pygio-datainputstream.xml
@@ -0,0 +1,799 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giodatainputstream">
+ <refnamediv>
+ <refname>gio.DataInputStream</refname>
+ <refpurpose>Data Input Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.DataInputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giodatainputstream">gio.DataInputStream</link></methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--get-byte-order">get_byte_order</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--get-newline-type">get_newline_type</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-byte">read_byte</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-int16">read_int16</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-int32">read_int32</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-int64">read_int64</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-line">read_line</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-line-async">read_line_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-line-finish">read_line_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-uint16">read_uint16</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-uint32">read_uint32</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-uint64">read_uint64</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-until">read_until</link></methodname>
+ <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-until-async">read_until_async</link></methodname>
+ <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--read-until-finish">read_until_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--set-byte-order">set_byte_order</link></methodname>
+ <methodparam><parameter role="keyword">order</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodatainputstream--set-newline-type">set_newline_type</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+ +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
+ +-- <link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link>
+ +-- <link linkend="class-giodatainputstream">gio.DataInputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giodatainputstream">
+ <title>gio.DataInputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"byte-order"</entry>
+ <entry>Read - Write</entry>
+ <entry>The byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
+ </row>
+ <row valign="top">
+ <entry>"newline-type"</entry>
+ <entry>Read - Write</entry>
+ <entry>The accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
+ implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ and includes functions for reading structured data directly from a binary input stream.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giodatainputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.DataInputStream</methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>base_stream</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
+ from the given base_stream.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giodatainputstream--get-byte-order">
+ <title>gio.DataInputStream.get_byte_order</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_byte_order</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the stream's current
+ <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_byte_order</methodname>() method gets the byte
+ order for the data input stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--get-newline-type">
+ <title>gio.DataInputStream.get_newline_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_newline_type</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref>
+ for the given stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_newline_type</methodname>() method gets the current
+ newline type for the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-byte">
+ <title>gio.DataInputStream.read_byte</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_byte</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an unsigned 8-bit/1-byte value read from the
+ stream or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_byte</methodname>() method reads an unsigned 8-bit/1-byte value from stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-int16">
+ <title>gio.DataInputStream.read_int16</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_int16</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_int16</methodname>() method reads a 16-bit/2-byte value from stream.
+ </para>
+ <para>
+ In order to get the correct byte order for this read operation, see
+ <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+ and
+ <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-int32">
+ <title>gio.DataInputStream.read_int32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_int32</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signed 32-bit/4-byte value read from the stream
+ or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_int32</methodname>() method reads a signed 32-bit/4-byte value from stream.
+ </para>
+ <para>
+ In order to get the correct byte order for this read operation, see
+ <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+ and
+ <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-int64">
+ <title>gio.DataInputStream.read_int64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_int64</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signed 64-bit/8-byte value read from the stream
+ or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_int64</methodname>() method reads a signed 64-bit/8-byte value from stream.
+ </para>
+ <para>
+ In order to get the correct byte order for this read operation, see
+ <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+ and
+ <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-line">
+ <title>gio.DataInputStream.read_line</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_line</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string with the line that was read in (without the newlines).
+ Set length to a gsize to get the length of the read line. On an error, it will return
+ <literal>None</literal> and error will be set. If there's no content to read, it
+ will still return <literal>None</literal>, but error won't be set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_line</methodname>() reads a line from the data input stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can
+ be cancelled by triggering the cancellable object from another thread.
+ If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+ returned. If an operation was partially finished when the operation was
+ cancelled the partial result will be returned, without an error.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-line-async">
+ <title>gio.DataInputStream.read_line_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_line_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_line_async</methodname>() method is the asynchronous version of
+ <methodname><link linkend="method-giodatainputstream--read-line">gio.DataInputStream.read_line</link></methodname>().
+ It is an error to have two outstanding calls to this function.
+ </para>
+ <para>
+ For the synchronous version of this function, see
+ <methodname><link linkend="method-giodatainputstream--read-line">gio.DataInputStream.read_line</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-line-finish">
+ <title>gio.DataInputStream.read_line_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_line_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string with the line that was read in (without the newlines).
+ On an error, it will return <literal>None</literal> and error will be set.
+ If there's no content to read, it will still return <literal>None</literal>,
+ but error won't be set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_line_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-giodatainputstream--read-line-async">gio.DataInputStream.read_line_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-uint16">
+ <title>gio.DataInputStream.read_uint16</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_uint16</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_uint16</methodname>() method reads a 16-bit/2-byte value from stream.
+ </para>
+ <para>
+ In order to get the correct byte order for this read operation, see
+ <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+ and
+ <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-uint32">
+ <title>gio.DataInputStream.read_uint32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_uint32</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signed 32-bit/4-byte value read from the stream
+ or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_uint32</methodname>() method reads a signed 32-bit/4-byte value from stream.
+ </para>
+ <para>
+ In order to get the correct byte order for this read operation, see
+ <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+ and
+ <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-uint64">
+ <title>gio.DataInputStream.read_uint64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_uint64</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signed 64-bit/8-byte value read from the stream
+ or 0 if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_uint64</methodname>() method reads a signed 64-bit/8-byte value from stream.
+ </para>
+ <para>
+ In order to get the correct byte order for this read operation, see
+ <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+ and
+ <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-until">
+ <title>gio.DataInputStream.read_until</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_until</methodname>
+ <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">stop_chars</parameter>&nbsp;:</term>
+ <listitem><simpara>characters to terminate the read.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string with the data that was read before encountering
+ any of the stop characters. This function will return NULL on an error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_until</methodname>() reads a string from the data input
+ stream, up to the first occurrence of any of the stop characters.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-until-async">
+ <title>gio.DataInputStream.read_until_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_until_async</methodname>
+ <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">stop_chars</parameter>&nbsp;:</term>
+ <listitem><simpara>characters to terminate the read.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_until_async</methodname>() method it's the asynchronous version of
+ <methodname><link linkend="method-giodatainputstream--read-until">gio.DataInputStream.read_until</link></methodname>().
+ It is an error to have two outstanding calls to this function.
+ </para>
+ <para>
+ For the synchronous version of this function, see
+ <methodname><link linkend="method-giodatainputstream--read-until">gio.DataInputStream.read_until</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giodatainputstream--read-until-finish">gio.DataInputStream.read_until_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--read-until-finish">
+ <title>gio.DataInputStream.read_until_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_until_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string with the data that was read before encountering
+ any of the stop characters. This function will return <literal>None</literal> on an error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_until_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-giodatainputstream--read-until-async">gio.DataInputStream.read_until_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--set-byte-order">
+ <title>gio.DataInputStream.set_byte_order</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_byte_order</methodname>
+ <methodparam><parameter role="keyword">order</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">order</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_byte_order</methodname>() method sets the byte order for
+ the given stream. All subsequent reads from the stream will be read in the given order.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodatainputstream--set-newline-type">
+ <title>gio.DataInputStream.set_newline_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_newline_type</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref> to set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_newline_type</methodname>() method sets the newline type for the stream.
+ </para>
+ <note>
+ Note that using gio.DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a
+ read chunk ends in "CR" we must read an additional byte to know if this is
+ "CR" or "CR LF", and this might block if there is no more data availible.
+ </note>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-dataoutputstream.xml b/docs/reference/pygio-dataoutputstream.xml
new file mode 100644
index 0000000..4cbc904
--- /dev/null
+++ b/docs/reference/pygio-dataoutputstream.xml
@@ -0,0 +1,504 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giodataoutputstream">
+ <refnamediv>
+ <refname>gio.DataOutputStream</refname>
+ <refpurpose>Data Output Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.DataOutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giodataoutputstream">gio.DataOutputStream</link></methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--get-byte-order">get_byte_order</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-byte">put_byte</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-int16">put_int16</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-int32">put_int32</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-int64">put_int64</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-string">put_string</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-uint16">put_uint16</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-uint32">put_uint32</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-uint64">put_uint64</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--set-byte-order">set_byte_order</link></methodname>
+ <methodparam><parameter role="keyword">order</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+ +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
+ +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
+ +-- <link linkend="class-giodataoutputstream">gio.DataOutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giodataoutputstream">
+ <title>gio.DataOutputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"byte-order"</entry>
+ <entry>Read - Write</entry>
+ <entry>Determines the byte ordering that is used when writing
+ multi-byte entities (such as integers) to the stream.
+ Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+ implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ and includes functions for writing data directly to an output stream.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giodataoutputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.DataOutputStream</methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>base_stream</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+ from the given base_stream.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giodataoutputstream--get-byte-order">
+ <title>gio.DataOutputStream.get_byte_order</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_byte_order</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the stream's current
+ <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_byte_order</methodname>() method gets the byte
+ order for the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-byte">
+ <title>gio.DataOutputStream.put_byte</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_byte</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a char.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_byte</methodname>() method puts a byte into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-int16">
+ <title>gio.DataOutputStream.put_int16</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_int16</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a gint16.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_int16</methodname>() method puts a signed 16-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-int32">
+ <title>gio.DataOutputStream.put_int32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_int32</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a gint32.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_int32</methodname>() method puts a signed 32-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-int64">
+ <title>gio.DataOutputStream.put_int64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_int64</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a gint64.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_int64</methodname>() method puts a signed 64-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-string">
+ <title>gio.DataOutputStream.put_string</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_string</methodname>
+ <methodparam><parameter role="keyword">str</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">str</parameter>&nbsp;:</term>
+ <listitem><simpara>a string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if string was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_string</methodname>() method puts a string into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-uint16">
+ <title>gio.DataOutputStream.put_uint16</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_uint16</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a guint16.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_uint16</methodname>() method puts an unsigned 16-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-uint32">
+ <title>gio.DataOutputStream.put_uint32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_uint32</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a guint32.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_uint32</methodname>() method puts an unsigned 32-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-uint64">
+ <title>gio.DataOutputStream.put_uint64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_uint64</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a guint64.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_uint64</methodname>() method puts an unsigned 64-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--set-byte-order">
+ <title>gio.DataOutputStream.set_byte_order</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_byte_order</methodname>
+ <methodparam><parameter role="keyword">order</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">order</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_byte_order</methodname>() method sets the byte order for
+ the given stream. All subsequent reads from the stream will be read in the given order.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-drive.xml b/docs/reference/pygio-drive.xml
new file mode 100644
index 0000000..73766cd
--- /dev/null
+++ b/docs/reference/pygio-drive.xml
@@ -0,0 +1,546 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giodrive">
+ <refnamediv>
+ <refname>gio.Drive</refname>
+ <refpurpose>Virtual File System drive management.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Drive</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--can-eject">can_eject</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--can-poll-for-media">can_poll_for_media</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--eject">eject</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--eject-finish">eject_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--enumerate-identifiers">enumerate_identifiers</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--get-identifier">get_identifier</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--get-name">get_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--get-volumes">get_volumes</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--has-media">has_media</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--has-volumes">has_volumes</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--is-media-check-automatic">is_media_check_automatic</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--is-media-removable">is_media_removable</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--poll-for-media">poll_for_media</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodrive--poll-for-media-finish">poll_for_media_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-giodrive">gio.Drive</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Prerequisites</title>
+ <para>
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link> requires
+ <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ - this represent a piece of hardware connected to the machine. Its generally
+ only created for removable hardware or hardware with removable media.
+ </para>
+ <para>
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ is a container class for GVolume objects that stem from the same piece of media.
+ As such, <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ abstracts a drive with (or without) removable media and provides operations for
+ querying whether media is available, determing whether media change is automatically
+ detected and ejecting the media.
+ </para>
+ <para>
+ If the <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ reports that media isn't automatically detected, one can poll for media; typically
+ one should not do this periodically as a poll for media operation is potententially
+ expensive and may spin up the drive creating noise.
+ </para>
+ <para>
+ For porting from GnomeVFS note that there is no equivalent of
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ in that API.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giodrive--can-eject">
+ <title>gio.Drive.can_eject</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_eject</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the drive can be ejected,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_eject</methodname>() method checks if a drive can be ejected.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--can-poll-for-media">
+ <title>gio.Drive.can_poll_for_media</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_poll_for_media</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the drive can be polled
+ for media changes, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_poll_for_media</methodname>() method checks if a drive
+ can be polled for media changes.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--eject">
+ <title>gio.Drive.eject</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject</methodname>
+ <methodparam>
+ <parameter role="keyword">callback</parameter>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags affecting the unmount if required for eject.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject</methodname>() method asynchronously ejects a drive.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giodrive--eject-finish">gio.Drive.eject_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--eject-finish">
+ <title>gio.Drive.eject_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the drive has been ejected
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject_finish</methodname>() method finishes ejecting a drive.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--enumerate-identifiers">
+ <title>gio.Drive.enumerate_identifiers</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>enumerate_identifiers</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of strings containing kinds of identifiers.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>enumerate_identifiers</methodname>() method gets the kinds
+ of identifiers that drive has. Use
+ <methodname><link linkend="method-giodrive--get-identifier">gio.Drive.get_identifier</link></methodname>()
+ to obtain the identifiers themselves.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--get-icon">
+ <title>gio.Drive.get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_icon</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ for the drive.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_icon</methodname>() method gets the icon for drive.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--get-identifier">
+ <title>gio.Drive.get_identifier</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_identifier</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A string containing the requested identfier, or
+ <literal>None</literal> if the
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ doesn't have this kind of identifier.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_identifier</methodname>() method gets the identifier of
+ the given kind for drive.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--get-name">
+ <title>gio.Drive.get_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A string containing drive's name.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_name</methodname>() method gets the name of drive.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--get-volumes">
+ <title>gio.Drive.get_volumes</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_volumes</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list containing any
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ objects on the given drive.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_volumes</methodname>() method get a list of mountable
+ volumes for drive.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--has-media">
+ <title>gio.Drive.has_media</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_media</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if drive has media,
+ <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>has_media</methodname>() method checks if the drive
+ has media. Note that the OS may not be polling the drive for media changes; see
+ <methodname><link linkend="method-giodrive--is-media-check-automatic">gio.Drive.is_media_check_automatic</link></methodname>()
+ for more details.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--has-volumes">
+ <title>gio.Drive.has_volumes</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_volumes</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if drive contains volumes,
+ <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>has_volumes</methodname>() method check if drive has any mountable volumes.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--is-media-check-automatic">
+ <title>gio.Drive.is_media_check_automatic</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_media_check_automatic</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if drive is capabable
+ of automatically detecting media changes,
+ <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>is_media_check_automatic</methodname>() method checks if
+ drive is capabable of automatically detecting media changes.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--is-media-removable">
+ <title>gio.Drive.is_media_removable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_media_removable</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if drive supports removable media,
+ <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>is_media_removable</methodname>() method checks if the
+ drive supports removable media.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--poll-for-media">
+ <title>gio.Drive.poll_for_media</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>poll_for_media</methodname>
+ <methodparam>
+ <parameter role="keyword">callback</parameter>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>poll_for_media</methodname>() method asynchronously polls
+ drive to see if media has been inserted or removed.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giodrive--poll-for-media-finish">gio.Drive.poll_for_media_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodrive--poll-for-media-finish">
+ <title>gio.Drive.poll_for_media_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>poll_for_media_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the drive has been poll_for_mediaed
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>poll_for_media_finish</methodname>() method finishes
+ an operation started with
+ <methodname><link linkend="method-giodrive--poll-for-media">gio.Drive.poll_for_media</link></methodname>()
+ on a drive.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-emblem.xml b/docs/reference/pygio-emblem.xml
new file mode 100644
index 0000000..032b0ff
--- /dev/null
+++ b/docs/reference/pygio-emblem.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioemblem">
+ <refnamediv>
+ <refname>gio.Emblem</refname>
+ <refpurpose>An object for emblems.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Emblem</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+ <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-gioemblem">gio.Emblem</link></methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioemblem--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioemblem--get-origin">get_origin</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--emblem-new-with-origin">gio.emblem_new_with_origin</link></methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ <methodparam><parameter role="keyword">origin</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioemblem">gio.Emblem</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+ implements
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1 id="properties-gioemblem">
+ <title>gio.Emblem Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"icon"</entry>
+ <entry>Read - Write - Construct Only</entry>
+ <entry>The actual icon of the emblem.</entry>
+ </row>
+ <row valign="top">
+ <entry>"origin"</entry>
+ <entry>Read - Write - Construct Only</entry>
+ <entry>Tells which origin the emblem is derived from.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+ class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
+ that supports having an emblem, which is an icon with additional properties.
+ It can then be added to a
+ <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
+ </para>
+ <para>
+ Currently, only metainformation about the emblem's origin is supported.
+ More may be added in the future.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-gioemblem">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.Emblem</methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>icon</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link> containing the icon.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>origin</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ <link linkend="gio-emblem-origin-constants">origin</link> of the emblem.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ Parameter <parameter>origin</parameter> is available since PyGObject 2.20.
+ </note>
+
+ <para>
+ Creates a new <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link> for icon.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioemblem--get-icon">
+ <title>gio.Emblem.get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_icon</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_icon</methodname>() method gives back the icon from emblem.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioemblem--get-origin">
+ <title>gio.Emblem.get_origin</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_origin</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the origin of the emblem.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_origin</methodname>() method gets the origin of the emblem.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--emblem-new-with-origin">
+ <title>gio.emblem_new_with_origin</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>emblem_new_with_origin</methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ <methodparam><parameter role="keyword">origin</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>origin</parameter>&nbsp;:</term>
+ <listitem><simpara>a <xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
+ defining the emblem's origin.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ While this method is not deprecated, with 2.20 and up it is recommended
+ to use the constructor instead.
+ </note>
+
+
+ <para>
+ The <methodname>emblem_new_with_origin</methodname>() function creates
+ a new emblem for icon.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-emblemedicon.xml b/docs/reference/pygio-emblemedicon.xml
new file mode 100644
index 0000000..9b5ef8a
--- /dev/null
+++ b/docs/reference/pygio-emblemedicon.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioemblemedicon">
+ <refnamediv>
+ <refname>gio.EmblemedIcon</refname>
+ <refpurpose>Icon with emblems.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.EmblemedIcon</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+ <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-gioemblemedicon">gio.EmblemedIcon</link></methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+ </constructorsynopsis>
+
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioemblemedicon--add-emblem">add_emblem</link></methodname>
+ <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioemblemedicon--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioemblemedicon">gio.EmblemedIcon</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
+ implements
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
+ class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
+ that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via
+ <methodname><link linkend="method-gioemblemedicon--add-emblem">gio.EmblemedIcon.add_emblem</link></methodname>().
+ </para>
+ <para>
+ Note that
+ <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
+ allows no control over the position of the emblems. See also
+ <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+ for more information.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-gioemblemedicon">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.EmblemedIcon</methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>icon</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>emblem</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ for icon with the emblem emblem.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioemblemedicon--add-emblem">
+ <title>gio.EmblemedIcon.add_emblem</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>add_emblem</methodname>
+ <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>emblem</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>add_emblem</methodname>() method adds emblem to the
+ list of <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>s.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioemblemedicon--get-icon">
+ <title>gio.EmblemedIcon.get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_icon</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ that is owned by emblemed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_icon</methodname>() method gets the main icon for emblemed.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-file.xml b/docs/reference/pygio-file.xml
new file mode 100644
index 0000000..ac85840
--- /dev/null
+++ b/docs/reference/pygio-file.xml
@@ -0,0 +1,4534 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofile">
+ <refnamediv>
+ <refname>gio.File</refname>
+ <refpurpose>File and Directory Handling.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.File</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giofile">gio.File</link></methodname>
+ <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+ <methodparam><parameter role="keyword">path</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">uri</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--append-to">append_to</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--append-to-async">append_to_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--append-to-finish">append_to_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--copy">copy</link></methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--copy-async">copy_async</link></methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">progress_callback</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">progress_callback_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--copy-attributes">copy_attributes</link></methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--copy-finish">copy_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--create">create</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--create-async">create_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--create-finish">create_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--delete">delete</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--dup">dup</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--eject-mountable">eject_mountable</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--eject-mountable-finish">eject_mountable_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--enumerate-children">enumerate_children</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--enumerate-children-async">enumerate_children_async</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--enumerate-children-finish">enumerate_children_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--equal">equal</link></methodname>
+ <methodparam><parameter role="keyword">file2</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--find-enclosing-mount">find_enclosing_mount</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--find-enclosing-mount-async">find_enclosing_mount_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--find-enclosing-mount-finish">find_enclosing_mount_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-basename">get_basename</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-child">get_child</link></methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-child-for-display-name">get_child_for_display_name</link></methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-parent">get_parent</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-parse-name">get_parse_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-path">get_path</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-relative-path">get_relative_path</link></methodname>
+ <methodparam><parameter role="keyword">descendant</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-uri">get_uri</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--get-uri-scheme">get_uri_scheme</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--has-prefix">has_prefix</link></methodname>
+ <methodparam><parameter role="keyword">prefix</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--has-uri-scheme">has_uri_scheme</link></methodname>
+ <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--is-native">is_native</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--load-contents">load_contents</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--load-contents-async">load_contents_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--load-contents-finish">load_contents_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--make-directory">make_directory</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--make-directory-with-parents">make_directory_with_parents</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--make-symbolic-link">make_symbolic_link</link></methodname>
+ <methodparam><parameter role="keyword">symlink_value</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--monitor">monitor</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--monitor-directory">monitor_directory</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--monitor-file">monitor_file</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--mount-enclosing-volume">mount_enclosing_volume</link></methodname>
+ <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_MOUNT_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--mount-enclosing-volume-finish">mount_enclosing_volume_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--mount-mountable">mount_mountable</link></methodname>
+ <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_MOUNT_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--mount-mountable-finish">mount_mountable_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--move">move</link></methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-default-handler">query_default_handler</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-exists">query_exists</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-file-type">query_file_type</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-filesystem-info-async">query_filesystem_info_async</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-filesystem-info-finish">query_filesystem_info_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-info">query_info</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-info-async">query_info_async</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-info-finish">query_info_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-settable-attributes">query_settable_attributes</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--query-writable-namespace">query_writable_namespace</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--read">read</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--read-async">read_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--read-finish">read_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--replace">replace</link></methodname>
+ <methodparam><parameter role="keyword">etag</parameter></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--replace-async">replace_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--replace-contents">replace_contents</link></methodname>
+ <methodparam><parameter role="keyword">contents</parameter></methodparam>
+ <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--replace-contents-async">replace_contents_async</link></methodname>
+ <methodparam><parameter role="keyword">contents</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--replace-contents-finish">replace_contents_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--replace-finish">replace_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--resolve-relative-path">resolve_relative_path</link></methodname>
+ <methodparam><parameter role="keyword">relative_path</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute">set_attribute</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ <methodparam><parameter role="keyword">value_p</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute-byte-string">set_attribute_byte_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute-int32">set_attribute_int32</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute-int64">set_attribute_int64</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute-string">set_attribute_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute-uint32">set_attribute_uint32</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attribute-uint64">set_attribute_uint64</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attributes-async">set_attributes_async</link></methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attributes-finish">set_attributes_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-attributes-from-info">set_attributes_from_info</link></methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-display-name">set_dispay_name</link></methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-display-name-async">set_display_name_async</link></methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--set-display-name-finish">set_display_name_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--trash">trash</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--unmount-mountable">unmount_mountable</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_UNMOUNT_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofile--unmount-mountable-finish">unmount_mountable_finish</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>
+ <methodparam><parameter role="keyword">parse_name</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-giofile">gio.File</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Prerequisites</title>
+ <para>
+ <link linkend="class-giofile"><classname>gio.File</classname></link> is implemented by
+ <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giofile"><classname>gio.File</classname></link> is a high
+ level abstraction for manipulating files on a virtual file system.
+ <link linkend="class-giofile"><classname>gio.File</classname></link>s are lightweight,
+ immutable objects that do no I/O upon creation. It is necessary to understand that
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ objects do not represent files, merely an identifier for a file. All file content
+ I/O is implemented as streaming operations (see
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link> and
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>).
+ </para>
+ <para>
+ To construct a <link linkend="class-giofile"><classname>gio.File</classname></link>, you can use
+ it's constructor either with a path, an uri or a commandline argument.
+ <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>()
+ from a utf8 string gotten from
+ <methodname><link linkend="method-giofile--get-parse-name">gio.File.get_parse_name</link></methodname>().
+ </para>
+ <para>
+ One way to think of a <link linkend="class-giofile"><classname>gio.File</classname></link> is as
+ an abstraction of a pathname. For normal files the system pathname is what is stored internally,
+ but as <link linkend="class-giofile"><classname>gio.File</classname></link>s are extensible it
+ could also be something else that corresponds to a pathname in a userspace implementation of a filesystem.
+ </para>
+ <para>
+ <link linkend="class-giofile"><classname>gio.File</classname></link>s make up hierarchies of
+ directories and files that correspond to the files on a filesystem. You can move through the
+ file system with GFile using
+ <methodname><link linkend="method-giofile--get-parent">gio.File.get_parent</link></methodname>()
+ to get an identifier for the parent directory,
+ <methodname><link linkend="method-giofile--get-child">gio.File.get_child</link></methodname>()
+ to get a child within a directory,
+ <methodname><link linkend="method-giofile--resolve-relative-path">gio.File.resolve_relative_path</link></methodname>()
+ to resolve a relative path between two <link linkend="class-giofile"><classname>gio.File</classname></link>s.
+ There can be multiple hierarchies, so you may not end up at the same root if you repeatedly call
+ <methodname><link linkend="method-giofile--get-parent">gio.File.get_parent</link></methodname>()
+ on two different files.
+ </para>
+ <para>
+ All <link linkend="class-giofile"><classname>gio.File</classname></link>s have a basename (get with
+ <methodname><link linkend="method-giofile--get-basename">gio.File.get_basename</link></methodname>()
+ ). These names are byte strings that are used to identify the file on the filesystem
+ (relative to its parent directory) and there is no guarantees that they have any particular charset
+ encoding or even make any sense at all. If you want to use filenames in a user interface you should
+ use the display name that you can get by requesting the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+ <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>().
+ This is guaranteed to be in utf8 and can be used in a user interface. But always store the real basename or the
+ GFile to use to actually access the file, because there is no way to go from a display name to the actual name.
+ </para>
+ <para>
+ Using <link linkend="class-giofile"><classname>gio.File</classname></link> as an identifier has the same
+ weaknesses as using a path in that there may be multiple aliases for the same file. For instance,
+ hard or soft links may cause two different <link linkend="class-giofile"><classname>gio.File</classname></link>s
+ to refer to the same file. Other possible causes for aliases are: case insensitive filesystems, short and
+ long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the same file
+ you can query for the gio.FILE_ATTRIBUTE_ID_FILE attribute. Note that
+ <link linkend="class-giofile"><classname>gio.File</classname></link> does some trivial canonicalization
+ of pathnames passed in, so that trivial differences in the path string used at creation
+ (duplicated slashes, slash at end of path, "." or ".." path segments, etc) does not create different
+ <link linkend="class-giofile"><classname>gio.File</classname></link>s.
+ </para>
+ <para>
+ Many <link linkend="class-giofile"><classname>gio.File</classname></link> operations have both synchronous
+ and asynchronous versions to suit your application. Asynchronous versions of synchronous functions simply
+ have _async() appended to their function names. The asynchronous I/O functions call a
+ GAsyncReadyCallback which is then used to finalize the operation, producing a GAsyncResult
+ which is then passed to the function's matching _finish() operation.
+ </para>
+ <para>
+ Some <link linkend="class-giofile"><classname>gio.File</classname></link> operations do not have
+ synchronous analogs, as they may take a very long time to finish, and blocking may leave an application
+ unusable. Notable cases include:
+ <methodname><link linkend="method-giofile--mount-mountable">gio.File.mount_mountable</link></methodname>()
+ to mount a mountable file.
+ <methodname><link linkend="method-giofile--unmount-mountable">gio.File.unmount_mountable</link></methodname>()
+ to unmount a mountable file.
+ <methodname><link linkend="method-giofile--eject-mountable">gio.File.eject_mountable</link></methodname>()
+ to eject a mountable file.
+ </para>
+ <para>
+ One notable feature of <link linkend="class-giofile"><classname>gio.File</classname></link>s are
+ entity tags, or "etags" for short. Entity tags are somewhat like a more abstract
+ version of the traditional mtime, and can be used to quickly determine if the file
+ has been modified from the version on the file system. See the HTTP 1.1
+ specification for HTTP Etag headers, which are a very similar concept.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giofile">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.File</methodname>
+ <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+ <methodparam><parameter role="keyword">path</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">uri</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>commandline</parameter>&nbsp;:</term>
+ <listitem><simpara>a command line string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>path</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing a relative or absolute path.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>uri</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing a URI.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giofile"><classname>gio.File</classname></link> either from a commandline,
+ a path or an uri.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofile--append-to">
+ <title>gio.File.append_to</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>append_to</methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>append_to</methodname>() method gets an output stream for
+ appending data to the file. If the file doesn't already exist it is created.
+ </para>
+ <para>
+ By default files created are generally readable by everyone, but if you pass
+ gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+ current user, to the level that is supported on the target filesystem.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If
+ the operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ Some file systems don't allow all file names, and may return an
+ gio.ERROR_INVALID_FILENAME error. If the file is a directory the
+ gio.ERROR_IS_DIRECTORY error will be returned. Other errors are possible too,
+ and depend on what kind of filesystem the file is on.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--append-to-async">
+ <title>gio.File.append_to_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>append_to_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>append_to_async</methodname>() method asynchronously opens file for appending.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--append-to">gio.File.append_to</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--append-to-finish">gio.File.append_to_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--append-to-finish">
+ <title>gio.File.append_to_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>append_to_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a valid
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>append_to_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-giofile--append-to-async">gio.File.append_to_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--copy">
+ <title>gio.File.copy</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>copy</methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>destination</parameter>&nbsp;:</term>
+ <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>progress_callback</parameter>&nbsp;:</term>
+ <listitem><simpara>function to callback with progress information.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to the progress callback function.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on success,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>copy</methodname>() method copies the file source to
+ the location specified by destination. Can not handle recursive copies of directories.
+ </para>
+ <para>
+ If the flag gio.FILE_COPY_OVERWRITE is specified an already existing
+ destination file is overwritten.
+ </para>
+ <para>
+ If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will
+ be copied as symlinks, otherwise the target of the source symlink will be copied.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If progress_callback is not <literal>None</literal>, then the operation can be
+ monitored by setting this to a GFileProgressCallback function. user_data
+ will be passed to this function. It is guaranteed that this callback will be
+ called after all data has been transferred with the total number of bytes
+ copied during the operation.
+ </para>
+ <para>
+ If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+ independent on the status of the destination.
+ </para>
+ <para>
+ If gio.FILE_COPY_OVERWRITE is not specified and the target exists,
+ then the error gio.ERROR_EXISTS is returned.
+ </para>
+ <para>
+ If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error
+ is returned. If trying to overwrite a directory with a directory the
+ gio.ERROR_WOULD_MERGE error is returned.
+ </para>
+ <para>
+ If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE
+ is specified and the target is a file, then the gio.ERROR_WOULD_RECURSE error is returned.
+ </para>
+ <para>
+ If you are interested in copying the
+ <link linkend="class-giofile"><classname>gio.File</classname></link> object
+ itself (not the on-disk file), see
+ <methodname><link linkend="method-giofile--dup">gio.File.dup</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--copy-async">
+ <title>gio.File.copy_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>append_to_async</methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">progress_callback</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">progress_callback_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>destination</parameter>&nbsp;:</term>
+ <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>progress_callback</parameter>&nbsp;:</term>
+ <listitem><simpara>function to callback with progress information.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>progress_callback_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to the progress callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>copy_async</methodname>() method copies the file source to
+ the location specified by destination asynchronously. For details of the behaviour,
+ see <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>().
+ </para>
+ <para>
+ If progress_callback is not <literal>None</literal>, then that function that will
+ be called just like in
+ <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>(),
+ however the callback will run in the main loop, not in the thread that is doing the I/O operation.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--copy-finish">gio.File.copy_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--copy-attributes">
+ <title>gio.File.copy_attributes</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>copy_attributes</methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>destination</parameter>&nbsp;:</term>
+ <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>
+ to copy attributes to.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attributes were copied successfully,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>copy_attributes</methodname>() method copies the file attributes
+ from source to destination.
+ </para>
+ <para>
+ Normally only a subset of the file attributes are copied, those that are copies
+ in a normal file copy operation (which for instance does not include e.g. owner).
+ However if gio.FILE_COPY_ALL_METADATA is specified in flags, then all the metadata
+ that is possible to copy is copied. This is useful when implementing move by copy + delete source.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--copy-finish">
+ <title>gio.File.copy_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>copy_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on success,
+ <literal>False</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>copy_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--copy-async">gio.File.copy_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--create">
+ <title>gio.File.create</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>create</methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>create</methodname>() method creates a new file and returns
+ an output stream for writing to it. The file must not already exist.
+ </para>
+ <para>
+ By default files created are generally readable by everyone, but if you pass
+ gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+ current user, to the level that is supported on the target filesystem.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If a file or directory with this name already exists the gio.ERROR_EXISTS
+ error will be returned. Some file systems don't allow all file names, and
+ may return an gio.ERROR_INVALID_FILENAME error, and if the name is to long
+ gio.ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too,
+ and depend on what kind of filesystem the file is on.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--create-async">
+ <title>gio.File.create_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>create_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>create_async</methodname>() method asynchronously creates a new
+ file and returns an output stream for writing to it. The file must not already exist.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--create">gio.File.create</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--create-finish">gio.File.create_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--create-finish">
+ <title>gio.File.create_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>create_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>create_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--create-async">gio.File.create_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--delete">
+ <title>gio.File.delete</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>delete</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the file was deleted,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>deleted</methodname>() method deletes a file. If the file is a
+ directory, it will only be deleted if it is empty.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--dup">
+ <title>gio.File.dup</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>dup</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new <link linkend="class-giofile"><classname>gio.File</classname></link>
+ that is a duplicate of the given <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>dup</methodname>() method duplicates a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ handle. This operation does not duplicate the actual file or directory represented
+ by the <link linkend="class-giofile"><classname>gio.File</classname></link>; see
+ <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>()
+ if attempting to copy a file.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--eject-mountable">
+ <title>gio.File.eject_mountable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject_mountable</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject_mountable</methodname>() method starts an asynchronous eject on a
+ mountable. When this operation has completed, callback will be called with
+ user_user data, and the operation can be finalized with
+ <methodname><link linkend="method-giofile--eject-mountable-finish">gio.File.eject_mountable_finish</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--eject-mountable-finish">
+ <title>gio.File.eject_mountable_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject_mountable_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the file was ejected successfully,
+ <literal>False</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>create_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--create-async">gio.File.create_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--enumerate-children">
+ <title>gio.File.enumerate_children</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>enumerate_children</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>an attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>enumerate_children</methodname>() method gets the requested information
+ about the files in a directory. The result is a GFileEnumerator object that will give out
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link> objects
+ for all the files in the directory.
+ </para>
+ <para>
+ The attribute value is a string that specifies the file attributes that should be gathered.
+ It is not an error if it's not possible to read a particular requested attribute from a file -
+ it just won't be set. attribute should be a comma-separated list of attribute or attribute
+ wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all
+ attributes in the standard namespace. An example attribute query be "standard::*,owner::user".
+ The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. If the file
+ is not a directory, the gio.FILE_ERROR_NOTDIR error will be returned.
+ Other errors are possible too.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--enumerate-children-async">
+ <title>gio.File.enumerate_children_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>enumerate_children_async</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>an attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>enumerate_children_async</methodname>() method asynchronously gets the
+ requested information about the files in a directory. The result is a
+ <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ object that will give out <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ objects for all the files in the directory.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--enumerate-children">enumerate_children</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--enumerate-children-finish">
+ <title>gio.File.eject_mountable_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>enumerate_children_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ or <literal>None</literal> if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>enumerate_children_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--enumerate-children-async">gio.File.enumerate_children_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--equal">
+ <title>gio.File.equal</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>equal</methodname>
+ <methodparam><parameter role="keyword">file2</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">file2</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if file1 and file2 are equal.
+ <literal>False</literal> if either is not a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>equal</methodname>() method checks equality of two given
+ <link linkend="class-giofile"><classname>gio.File</classname></link>s.
+ Note that two <link linkend="class-giofile"><classname>gio.File</classname></link>s
+ that differ can still refer to the same file on the filesystem due to various
+ forms of filename aliasing.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--find-enclosing-mount">
+ <title>gio.File.find_enclosing_mount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>enumerate_children</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>find_enclosing_mount</methodname>() method gets a
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link> for the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </para>
+ <para>
+ If the interface for file does not have a mount (e.g. possibly a remote share),
+ error will be set to gio.ERROR_NOT_FOUND and <literal>None</literal> will be returned.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--find-enclosing-mount-async">
+ <title>gio.File.find_enclosing_mount_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>find_enclosing_mount_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>find_enclosing_mount_async</methodname>() method asynchronously
+ gets the mount for the file.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--find-enclosing-mount">gio.File.find_enclosing_mount</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--find-enclosing-mount-finish">
+ <title>gio.File.find_enclosing_mount_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>find_enclosing_mount_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ or <literal>None</literal> if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>find_enclosing_mount_finish</methodname>() method finishes an asynchronous
+ find mount started with
+ <methodname><link linkend="method-giofile--find-enclosing-mount-async">gio.File.find_enclosing_mount_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-basename">
+ <title>gio.File.get_basename</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_basename</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>string containing the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>'s
+ base name, or <literal>None</literal> if given
+ <link linkend="class-giofile"><classname>gio.File</classname></link> is invalid.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_basename</methodname>() method gets the base name
+ (the last component of the path) for a given
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </para>
+ <para>
+ If called for the top level of a system (such as the filesystem root or
+ a uri like sftp://host/) it will return a single directory separator
+ (and on Windows, possibly a drive letter).
+ </para>
+ <para>
+ The base name is a byte string (*not* UTF-8). It has no defined encoding
+ or rules other than it may not contain zero bytes. If you want to use filenames
+ in a user interface you should use the display name that you can get by requesting
+ the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+ <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>().
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-child">
+ <title>gio.File.get_child</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_child</methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">name</parameter>&nbsp;:</term>
+ <listitem><simpara>string containing the child's basename.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ to a child specified by name.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_child</methodname>() method gets a child of file
+ with basename equal to name.
+ </para>
+ <para>
+ Note that the file with that specific name might not exist, but you can
+ still have a <link linkend="class-giofile"><classname>gio.File</classname></link>
+ that points to it. You can use this for instance to create that file.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-child-for-display-name">
+ <title>gio.File.get_child_for_display_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_child_for_display_name</methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">display_name</parameter>&nbsp;:</term>
+ <listitem><simpara>string to a possible child.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ to the specified child or <literal>None</literal>
+ if the display name couldn't be converted.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_child_for_display_name</methodname>() method gets the
+ child of file for a given display_name (i.e. a UTF8 version of the name).
+ If this function fails, it returns NULL and error will be set. This is very
+ useful when constructing a GFile for a new file and the user entered the filename
+ in the user interface, for instance when you select a directory and type a filename
+ in the file selector.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-parent">
+ <title>gio.File.get_parent</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_parent</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ structure to the parent of the given
+ <link linkend="class-giofile"><classname>gio.File</classname></link> or
+ <literal>None</literal> if there is no parent.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_parent</methodname>() method gets the parent directory for the file.
+ If the file represents the root directory of the file system, then <literal>None</literal>
+ will be returned.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-parse-name">
+ <title>gio.File.get_parse_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_parse_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>'s parse name.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_parse_name</methodname>() method gets the parse name
+ of the file. A parse name is a UTF-8 string that describes the file such
+ that one can get the <link linkend="class-giofile"><classname>gio.File</classname></link>
+ back using
+ <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>().
+ </para>
+ <para>
+ This is generally used to show the <link linkend="class-giofile"><classname>gio.File</classname></link>
+ as a nice full-pathname kind of string in a user interface, like in a location entry.
+ </para>
+ <para>
+ For local files with names that can safely be converted to UTF8 the pathname is used,
+ otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped).
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-path">
+ <title>gio.File.get_path</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_path</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>'s path,
+ or <literal>None</literal> if no such path exists.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_path</methodname>() method gets the local pathname for
+ <link linkend="class-giofile"><classname>gio.File</classname></link>, if one exists.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-relative-path">
+ <title>gio.File.get_relative_path</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_relative_path</methodname>
+ <methodparam><parameter role="keyword">descendant</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">descendant</parameter>&nbsp;:</term>
+ <listitem><simpara>input <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>string with the relative path from descendant to parent,
+ or <literal>None</literal> if descendant doesn't have parent as prefix.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_relative_path</methodname>() method gets the path for
+ descendant relative to parent.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-uri">
+ <title>gio.File.get_uri</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_uri</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>'s URI.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_uri</methodname>() method gets the URI for the file.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--get-uri-scheme">
+ <title>gio.File.get_uri_scheme</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_uri_scheme</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the URI scheme for the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_uri_scheme</methodname>() method gets the URI scheme for a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ RFC 3986 decodes the scheme as:
+ </para>
+<programlisting>
+URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+</programlisting>
+ <para>
+ Common schemes include "file", "http", "ftp", etc.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--has-prefix">
+ <title>gio.File.has_prefix</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_prefix</methodname>
+ <methodparam><parameter role="keyword">prefix</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">prefix</parameter>&nbsp;:</term>
+ <listitem><simpara>input <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the files's parent, grandparent,
+ etc is prefix. <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>has_prefix</methodname>() method checks whether file has the prefix
+ specified by prefix. In other word, if the names of inital elements of files pathname
+ match prefix. Only full pathname elements are matched, so a path like /foo is not
+ considered a prefix of /foobar, only of /foo/bar.
+ </para>
+ <para>
+ This call does no blocking i/o, as it works purely on names. As such it can sometimes
+ return <literal>False</literal> even if file is inside a prefix (from a filesystem point
+ of view), because the prefix of file is an alias of prefix.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--has-uri-scheme">
+ <title>gio.File.has_uri_scheme</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_uri_scheme</methodname>
+ <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">uri_scheme</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing a URI scheme.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if
+ <link linkend="class-giofile"><classname>gio.File</classname></link>'s
+ backend supports the given URI scheme, <literal>False</literal> if URI scheme
+ is <literal>None</literal>, not supported, or
+ <link linkend="class-giofile"><classname>gio.File</classname></link> is invalid.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>has_uri_scheme</methodname>() method checks to see if a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ has a given URI scheme.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--is-native">
+ <title>gio.File.is_native</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_native</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if file is native.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>is_native</methodname>() method checks to see if a file
+ is native to the platform.
+ </para>
+ <para>
+ A native file s one expressed in the platform-native filename format, e.g.
+ "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it
+ might be on a locally mounted remote filesystem.
+ </para>
+ <para>
+ On some systems non-native files may be available using the native filesystem
+ via a userspace filesystem (FUSE), in these cases this call will return
+ <literal>False</literal>, but
+ <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()
+ will still return a native path.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--load-contents">
+ <title>gio.File.load_contents</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>load_contents</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a three tuple containing the contents of the file,
+ the length of the contents of the file and the current entity tag for the file.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>load_contents</methodname>() method loads the content of the file into memory.
+ The data is always zero-terminated, but this is not included in the resultant length.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--load-contents-async">
+ <title>gio.File.load_contents_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>load_contents_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>load_contents_async</methodname>() method starts an asynchronous load of the file's contents.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--load-contents">gio.File.load_contents</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the load operation has completed, callback will be called with user data. To finish
+ the operation, call
+ <methodname><link linkend="method-giofile--load-contents-finish">gio.File.load_contents_finish</link></methodname>()
+ with the GAsyncResult returned by the callback.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--load-contents-finish">
+ <title>gio.File.load_contents_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>load_contents_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a three tuple containing the contents of the file,
+ the length of the contents of the file and the current entity tag for the file.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>load_contents_finish</methodname>() method finishes an asynchronous
+ find mount started with
+ <methodname><link linkend="method-giofile--load-contents-async">gio.File.load_contents_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--make-directory">
+ <title>gio.File.make_directory</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>make_directory</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on successful creation,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>make_directory</methodname>() method creates a directory.
+ Note that this will only create a child directory of the immediate parent directory
+ of the path or URI given by the <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ To recursively create directories, see
+ <methodname><link linkend="method-giofile--make-directory-with-parents">gio.File.make_directory_with_parents</link></methodname>().
+ This function will fail if the parent directory does not exist, setting error to
+ gio.ERROR_NOT_FOUND. If the file system doesn't support creating directories, this
+ function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
+ </para>
+ <para>
+ For a local <link linkend="class-giofile"><classname>gio.File</classname></link> the newly
+ created directory will have the default (current) ownership and permissions of the current process.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--make-directory-with-parents">
+ <title>gio.File.make_directory_with_parents</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>make_directory_with_parents</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if all directories have been successfully created,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>make_directory_with_parents</methodname>() method creates a directory
+ and any parent directories that may not exist similar to 'mkdir -p'. If the file system
+ does not support creating directories, this function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
+ </para>
+ <para>
+ For a local <link linkend="class-giofile"><classname>gio.File</classname></link> the newly
+ created directories will have the default (current) ownership and permissions of the current process.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--make-symbolic-link">
+ <title>gio.File.make_symbolic_link</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>make_symbolic_link</methodname>
+ <methodparam><parameter role="keyword">symlink_value</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>symlink_value</parameter>&nbsp;:</term>
+ <listitem><simpara>a string with the value of the new symlink.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on the creation of a new symlink,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>make_symbolic_link</methodname>() method creates a symbolic link.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--monitor">
+ <title>gio.File.monitor</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>monitor</methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+ for the given file, or <literal>None</literal> on error
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>monitor</methodname>() method obtains a file or directory
+ monitor for the given file, depending on the type of the file.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--monitor-directory">
+ <title>gio.File.monitor_directory</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>monitor_directory</methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+ for the given file, or <literal>None</literal> on error
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>monitor_directory</methodname>() method obtains a directory monitor
+ for the given file. This may fail if directory monitoring is not supported.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--monitor-file">
+ <title>gio.File.monitor_file</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>monitor_file</methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+ for the given file, or <literal>None</literal> on error
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>monitor_file</methodname>() method obtains a file monitor for the
+ given file. If no file notification mechanism exists, then regular polling
+ of the file is used.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--mount-enclosing-volume">
+ <title>gio.File.mount_enclosing_volume</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>mount_enclosing_volume</methodname>
+ <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mount_operation</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ or <literal>None</literal> to avoid user interaction.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request
+ is satisfied, or <literal>None</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to the progress callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>mount_enclosing_volume</methodname>() method starts a mount_operation,
+ mounting the volume that contains the file location.
+ </para>
+ <para>
+ When this operation has completed, callback will be called with user_user data,
+ and the operation can be finalized with
+ <methodname><link linkend="method-giofile--mount-enclosing-volume-finish">gio.File.mount_enclosing_volume_finish</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--mount-enclosing-volume-finish">
+ <title>gio.File.mount_enclosing_volume_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>mount_enclosing_volume_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if successful. If an error has occurred,
+ this function will return <literal>False</literal> and set error appropriately if present.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>mount_enclosing_volume_finish</methodname>() method finishes an asynchronous
+ find mount started with
+ <methodname><link linkend="method-giofile--mount-enclosing-volume">gio.File.mount_enclosing_volume</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--mount-mountable">
+ <title>gio.File.mount_mountable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>mount_mountable</methodname>
+ <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mount_operation</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ or <literal>None</literal> to avoid user interaction.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request
+ is satisfied, or <literal>None</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to the progress callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>mount_mountable</methodname>() method mounts a file of type
+ gio.FILE_TYPE_MOUNTABLE. Using mount_operation, you can request callbacks when,
+ for instance, passwords are needed during authentication.
+ </para>
+ <para>
+ When this operation has completed, callback will be called with user_user data,
+ and the operation can be finalized with
+ <methodname><link linkend="method-giofile--mount-mountable-finish">gio.File.mount_mountable_finish</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--mount-mountable-finish">
+ <title>gio.File.mount_mountable_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>mount_mountable_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>mount_mountable_finish</methodname>() method finishes an asynchronous
+ find mount started with
+ <methodname><link linkend="method-giofile--mount-mountable">gio.File.mount_mountable</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--move">
+ <title>gio.File.move</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>copy</methodname>
+ <methodparam><parameter role="keyword">destination</parameter></methodparam>
+ <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>destination</parameter>&nbsp;:</term>
+ <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>progress_callback</parameter>&nbsp;:</term>
+ <listitem><simpara>function to callback with progress information.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to the progress callback function.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on success,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>move</methodname>() method tries to move the file or directory
+ source to the location specified by destination. If native move operations are
+ supported then this is used, otherwise a copy + delete fallback is used. The native
+ implementation may support moving directories (for instance on moves inside the same
+ filesystem), but the fallback code does not.
+ </para>
+ <para>
+ If the flag gio.FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten.
+ </para>
+ <para>
+ If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied
+ as symlinks, otherwise the target of the source symlink will be copied.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If progress_callback is not <literal>None</literal>, then the operation can be monitored
+ by setting this to a GFileProgressCallback function. progress_callback_data will be passed
+ to this function. It is guaranteed that this callback will be called after all data has been
+ transferred with the total number of bytes copied during the operation.
+ </para>
+ <para>
+ If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+ independent on the status of the destination.
+ </para>
+ <para>
+ If gio.FILE_COPY_OVERWRITE is not specified and the target exists, then the error
+ gio.ERROR_EXISTS is returned.
+ </para>
+ <para>
+ If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error is returned.
+ If trying to overwrite a directory with a directory the gio.ERROR_WOULD_MERGE error is returned.
+ </para>
+ <para>
+ If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE is specified
+ and the target is a file, then the gio.ERROR_WOULD_RECURSE error may be returned
+ (if the native move operation isn't available).
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-default-handler">
+ <title>gio.File.query_default_handler</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_default_handler</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+ if the handle was found, <literal>None</literal> if there were errors.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_default_handler</methodname>() method returns the
+ <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> that
+ is registered as the default application to handle the file specified by file.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be
+ cancelled by triggering the cancellable object from another thread. If the
+ operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-exists">
+ <title>gio.File.query_exists</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_exists</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the file exists (and can be detected
+ without error), <literal>False</literal> otherwise (or if cancelled).
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_exists</methodname>() method is an tility function to check
+ if a particular file exists. This is implemented using
+ <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
+ and as such does blocking I/O.
+ </para>
+ <para>
+ Note that in many cases it is racy to first check for file existence and then execute
+ something based on the outcome of that, because the file might have been created or
+ removed in between the operations. The general approach to handling that is to not check,
+ but just do the operation and handle the errors as they come.
+ </para>
+ <para>
+ As an example of race-free checking, take the case of reading a file, and if it doesn't
+ exist, creating it. There are two racy versions: read it, and on error create it; and:
+ check if it exists, if not create it. These can both result in two processes creating the
+ file (with perhaps a partially written file as the result). The correct approach is to
+ always try to create the file with
+ <methodname><link linkend="method-giofile--create">gio.File.create</link></methodname>()
+ which will either atomically create the file or fail with a gio.ERROR_EXISTS error.
+ </para>
+ <para>
+ However, in many cases an existence check is useful in a user interface, for instance
+ to make a menu item sensitive/insensitive, so that you don't have to fool users that
+ something is possible and then just show and error dialog. If you do this, you should
+ make sure to also handle the errors that can happen due to races when you execute the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-file-type">
+ <title>gio.File.query_file_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_file_type</methodname>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>
+ <xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_file_type</methodname>() method it's an utility function to inspect
+ the <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ of a file. This is implemented using
+ <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
+ and as such does blocking I/O.
+ </para>
+ <para>
+ The primary use case of this method is to check if a file is a regular file, directory, or symlink.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-filesystem-info">
+ <title>gio.File.query_filesystem_info</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_filesystem_info</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>an attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ or <literal>None</literal> if there was an error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_filesystem_info</methodname>() method it's similar to
+ <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>(),
+ but obtains information about the filesystem the file is on, rather than the
+ file itself. For instance the amount of space available and the type of the filesystem.
+ </para>
+ <para>
+ The attribute value is a string that specifies the file attributes that should be gathered.
+ It is not an error if it's not possible to read a particular requested attribute from a file -
+ it just won't be set. attribute should be a comma-separated list of attribute or attribute
+ wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes
+ in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes
+ of interest are gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes),
+ gio.FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE
+ (type of the filesystem).
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. Other errors
+ are possible too, and depend on what kind of filesystem the file is on.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-filesystem-info-async">
+ <title>gio.File.query_filesystem_info_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_filesystem_info_async</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>an attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_filesystem_info_async</methodname>() method asynchronously
+ gets the requested information about the filesystem that the specified file is on.
+ The result is a GFileInfo object that contains key-value attributes
+ (such as type or size for the file).
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--query-filesystem-info-finish">gio.File.query_filesystem_info_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-filesystem-info-finish">
+ <title>gio.File.query_filesystem_info_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_filesystem_info_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ or <literal>None</literal> if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_filesystem_info_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--query-filesystem-info-async">gio.File.query_filesystem_info_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-info">
+ <title>gio.File.query_filesystem_info</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>an attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ for the given file or <literal>None</literal> if there was an error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info</methodname>() method gets the requested
+ information about specified file. The result is a
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ object that contains key-value attributes (such as the type or size of the file).
+ </para>
+ <para>
+ The attribute value is a string that specifies the file attributes that should
+ be gathered. It is not an error if it's not possible to read a particular
+ requested attribute from a file - it just won't be set. attribute should be
+ a comma-separated list of attribute or attribute wildcards. The wildcard "*"
+ means all attributes, and a wildcard like "standard::*" means all attributes
+ in the standard namespace. An example attribute query be "standard::*,owner::user".
+ The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ For symlinks, normally the information about the target of the symlink is returned,
+ rather than information about the symlink itself. However if you pass
+ gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about
+ the symlink itself will be returned. Also, for symlinks that point to non-existing
+ files the information about the symlink itself will be returned.
+ </para>
+ <para>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be
+ returned. Other errors are possible too, and depend on what kind of
+ filesystem the file is on.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-info-async">
+ <title>gio.File.query_info_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info_async</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>an attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>
+ a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info_async</methodname>() method asynchronously gets the
+ requested information about specified file. The result is a
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ object that contains key-value attributes (such as type or size for the file).
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--query-info">query_info</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--query-info-finish">gio.File.query_info_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-info-finish">
+ <title>gio.File.query_info_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ for the given file or <literal>None</literal> if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--query-info-async">gio.File.query_info_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-settable-attributes">
+ <title>gio.File.query_settable_attributes</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_settable_attributes</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of
+ <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+ describing the settable attributes.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_settable_attributes</methodname>() method obtain the
+ list of settable attributes for the file.
+ </para>
+ <para>
+ Returns the type and full attribute name of all the attributes that can be
+ set on this file. This doesn't mean setting it will always succeed though,
+ you might get an access failure, or some specific file may not support a specific attribute.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--query-writable-namespace">
+ <title>gio.File.query_writable_namespace</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_writable_namespace</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of
+ <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+ describing the writable namespaces.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_writable_namespace</methodname>() method obtain the
+ list of attribute namespaces where new attributes can be created by a user.
+ An example of this is extended attributes (in the "xattr" namespace).
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--read">
+ <title>gio.File.read</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read</methodname>() method opens a file for reading. The result
+ is a <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ that can be used to read the contents of the file.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.
+ If the file is a directory, the gio.ERROR_IS_DIRECTORY error will be returned.
+ Other errors are possible too, and depend on what kind of filesystem the file is on.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--read-async">
+ <title>gio.File.read_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_async</methodname>() method asynchronously opens file for reading.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--read">read</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--read-finish">gio.File.read_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--read-finish">
+ <title>gio.File.read_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ file or <literal>None</literal> if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--read-async">gio.File.read_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--replace">
+ <title>gio.File.replace</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>replace</methodname>
+ <methodparam><parameter role="keyword">etag</parameter></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>etag</parameter>&nbsp;:</term>
+ <listitem><simpara>an optional entity tag for the current
+ <link linkend="class-giofile"><classname>gio.File</classname></link>,
+ or <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>make_backup</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if a backup should be created.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>replace</methodname>() method returns an output stream for
+ overwriting the file, possibly creating a backup copy of the file first.
+ If the file doesn't exist, it will be created.
+ </para>
+ <para>
+ This will try to replace the file in the safest way possible so that any
+ errors during the writing will not affect an already existing copy of the file.
+ For instance, for local files it may write to a temporary file and then atomically
+ rename over the destination when the stream is closed.
+ </para>
+ <para>
+ By default files created are generally readable by everyone, but if you pass
+ gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to
+ the current user, to the level that is supported on the target filesystem.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ If you pass in a non-<literal>None</literal> etag value, then this value is compared
+ to the current entity tag of the file, and if they differ an gio.ERROR_WRONG_ETAG error
+ is returned. This generally means that the file has been changed since you last read it.
+ You can get the new etag from
+ <methodname><link linkend="method-giofileoutputstream--get-etag">gio.FileOutputStream.get_etag</link></methodname>()
+ after you've finished writing and closed the GFileOutputStream. When you load a new file you can use
+ <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>()
+ to get the etag of the file.
+ </para>
+ <para>
+ If make_backup is <literal>True</literal>, this function will attempt to make a backup
+ of the current file before overwriting it. If this fails a gio.ERROR_CANT_CREATE_BACKUP
+ error will be returned. If you want to replace anyway, try again
+ with make_backup set to <literal>False</literal>.
+ </para>
+ <para>
+ If the file is a directory the gio.ERROR_IS_DIRECTORY error will be returned, and
+ if the file is some other form of non-regular file then a gio.ERROR_NOT_REGULAR_FILE
+ error will be returned. Some file systems don't allow all file names, and may return an
+ gio.ERROR_INVALID_FILENAME error, and if the name is to long gio.ERROR_FILENAME_TOO_LONG
+ will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--replace-async">
+ <title>gio.File.replace_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>replace_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>etag</parameter>&nbsp;:</term>
+ <listitem><simpara>an optional entity tag for the current
+ <link linkend="class-giofile"><classname>gio.File</classname></link>,
+ or <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>make_backup</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if a backup should be created.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>replace_async</methodname>() method asynchronously overwrites the file,
+ replacing the contents, possibly creating a backup copy of the file first.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--replace">replace</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--replace-finish">gio.File.replace_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--replace-contents">
+ <title>gio.File.replace_contents</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>replace_contents</methodname>
+ <methodparam><parameter role="keyword">contents</parameter></methodparam>
+ <methodparam><parameter role="keyword">etag</parameter></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>contents</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the new contents for file.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>etag</parameter>&nbsp;:</term>
+ <listitem><simpara>the old entity tag for the document
+ or <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>make_backup</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if a backup should be created.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the new entity tag for the document.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>replace_contents</methodname>() method replaces the contents
+ of file with contents of length bytes. If etag is specified (not NULL) any existing
+ file must have that etag, or the error gio.ERROR_WRONG_ETAG will be returned.
+ </para>
+ <para>
+ If make_backup is <literal>True</literal>, this function will attempt to make a backup of file.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ The returned etag can be used to verify that the file hasn't changed the next time it is saved over.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--replace-contents-async">
+ <title>gio.File.replace_contents_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>replace_contents_async</methodname>
+ <methodparam><parameter role="keyword">contents</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>contents</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the new contents for file.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>etag</parameter>&nbsp;:</term>
+ <listitem><simpara>an optional entity tag for the current
+ <link linkend="class-giofile"><classname>gio.File</classname></link>,
+ or <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>make_backup</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if a backup should be created.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>replace_contents_async</methodname>() method starts an asynchronous
+ replacement of file with the given contents of length bytes. etag will
+ replace the document's current entity tag.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--replace-contents">replace_contents</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--replace-contents-finish">gio.File.replace_contents_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--replace-contents-finish">
+ <title>gio.File.replace_contents_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>replace_contents_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the new entity tag for the document.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>replace_contents_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--replace-contents-async">gio.File.replace_contents_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--replace-finish">
+ <title>gio.File.replace_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>replace_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ or <literal>None</literal> if an error occurred.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>replace_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--replace-async">gio.File.replace_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--resolve-relative-path">
+ <title>gio.File.resolve_relative_path</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>resolve_relative_path</methodname>
+ <methodparam><parameter role="keyword">relative_path</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">relative_path</parameter>&nbsp;:</term>
+ <listitem><simpara>a given relative path string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+ to the resolved path. <literal>None</literal> if relative_path is <literal>None</literal>
+ or if file is invalid.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>resolve_relative_path</methodname>() method resolves a
+ relative path for file to an absolute path.
+ </para>
+ <para>
+ This call does no blocking i/o.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute">
+ <title>gio.File.set_attribute</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ <methodparam><parameter role="keyword">value_p</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>the type of the attribute .
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value_p</parameter>&nbsp;:</term>
+ <listitem><simpara>the value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute</methodname>() method sets an attribute in
+ the file with attribute name attribute to value.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute-byte-string">
+ <title>gio.File.set_attribute_byte_string</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute_byte_string</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's new value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute_byte_string</methodname>() method Sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING to value. If attribute is of a different type,
+ this operation will fail, returning <literal>False</literal>.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute-int32">
+ <title>gio.File.set_attribute_int32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute_int32</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>an int containing the attribute's new value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute_int32</methodname>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_INT32 to value. If attribute is of a different type,
+ this operation will fail.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute-int64">
+ <title>gio.File.set_attribute_int64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute_int64</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>a long containing the attribute's new value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute_int64</methodname>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_INT64 to value. If attribute is of a different type,
+ this operation will fail.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute-string">
+ <title>gio.File.set_attribute_string</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute_string</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's new value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute_string</methodname>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type,
+ this operation will fail.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute-uint32">
+ <title>gio.File.set_attribute_uint32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute_uint32</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>an int containing the attribute's new value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute_uint32</methodname>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_UINT32 to value. If attribute is of a different type,
+ this operation will fail.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attribute-uint64">
+ <title>gio.File.set_attribute_uint64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attribute_uint64</methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">value</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>attribute</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the attribute's name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>a long containing the attribute's new value.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attribute was set,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attribute_uint64</methodname>() method sets attribute of type
+ gio.FILE_ATTRIBUTE_TYPE_UINT64 to value. If attribute is of a different type,
+ this operation will fail.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+ the cancellable object from another thread. If the operation was cancelled, the error
+ gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attributes-async">
+ <title>gio.File.set_attributes_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attributes_async</methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>info</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attributes_async</methodname>() method asynchronously
+ sets the attributes of file with info.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--set-attributes-from-info">set_attributes_from_info</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--set-attributes-finish">gio.File.set_attributes_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attributes-finish">
+ <title>gio.File.set_attributes_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attributes_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attributes were set correctly,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attributes_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--set-attributes-async">gio.File.set_attributes_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-attributes-from-info">
+ <title>gio.File.set_attributes_from_info</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_attributes_from_info</methodname>
+ <methodparam><parameter role="keyword">info</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>info</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the attributes were set correctly,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_attributes_from_info</methodname>() method tries to set
+ all attributes in the GFileInfo on the target values, not stopping on the first error.
+ </para>
+ If there is any error during this operation then error will be set to the
+ first error. Error on particular fields are flagged by setting the "status"
+ field in the attribute value to gio.FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
+ which means you can also detect further errors.
+ <para>
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-display-name">
+ <title>gio.File.set_display_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_display_name</methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>display_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string conaining the name to display.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+ specifying what file was renamed to, or <literal>None</literal> if there was an error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_display_name</methodname>() method renames file to
+ the specified display name.
+ </para>
+ <para>
+ The display name is converted from UTF8 to the correct encoding for the
+ target filesystem if possible and the file is renamed to this.
+ </para>
+ <para>
+ If you want to implement a rename operation in the user interface the
+ edit name (gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
+ initial value in the rename widget, and then the result after editing
+ should be passed to
+ <methodname><link linkend="method-giofile--set-display-name">gio.File.set_dispay_name</link></methodname>().
+ </para>
+ <para>
+ On success the resulting converted filename is returned.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-display-name-async">
+ <title>gio.File.set_display_name_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_display_name_async</methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>display_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string conaining the name to display.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_display_name_async</methodname>() method asynchronously
+ sets the display name for a given GFile.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-giofile--set-display-name">set_display_name</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--set-display-name-finish">gio.File.set_display_name_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--set-display-name-finish">
+ <title>gio.File.set_display_name_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_display_name_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_display_name_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--set-display-name-async">gio.File.set_display_name_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--trash">
+ <title>gio.File.trash</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>trash</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on successful trash, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>trash</methodname>() method sends file to the "Trashcan", if possible.
+ This is similar to deleting it, but the user can recover it before emptying the trashcan.
+ Not all file systems support trashing, so this call can return the gio.ERROR_NOT_SUPPORTED error.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--unmount-mountable">
+ <title>gio.File.unmount_mountable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>unmount_mountable</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>unmount_mountable</methodname>() method unmounts a file of type gio.FILE_TYPE_MOUNTABLE.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giofile--unmount-mountable-finish">gio.File.unmount_mountable_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofile--unmount-mountable-finish">
+ <title>gio.File.unmount_mountable_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>unmount_mountable_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the operation finished successfully,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>unmount_mountable_finish</methodname>() method finishes an asynchronous
+ copy operation started with
+ <methodname><link linkend="method-giofile--unmount-mountable">gio.File.unmount_mountable</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--file-parse-name">
+ <title>gio.file_parse_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>file_parse_name</methodname>
+ <methodparam><parameter role="keyword">parse_name</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>parse_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a file name or path to be parsed.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>parse_name</methodname>() function constructs a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ with the given parse_name (i.e. something given by g_file_get_parse_name()).
+ This operation never fails, but the returned object might not support any I/O
+ operation if the parse_name cannot be parsed.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileattributeinfo.xml b/docs/reference/pygio-fileattributeinfo.xml
new file mode 100644
index 0000000..4b72c27
--- /dev/null
+++ b/docs/reference/pygio-fileattributeinfo.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileattributeinfo">
+ <refnamediv>
+ <refname>gio.FileAttributeInfo</refname>
+ <refpurpose>Information about a specific attribute.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileAttributeInfo</classname></ooclass>
+ <ooclass><classname>__builtin__.object</classname></ooclass>
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- __builtin__.object
+ +-- <link linkend="class-giofileattributeinfo">gio.FileAttributeInfo</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+ contains information about a specific attribute.
+ </para>
+ </refsect1>
+
+ <refsect1 id="attributes-giofileattributeinfo">
+ <title>gio.FileAttributeInfo Attributes</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"name"</entry>
+ <entry>Read</entry>
+ <entry>The name of the attribute.</entry>
+ </row>
+ <row valign="top">
+ <entry>"type"</entry>
+ <entry>Read</entry>
+ <entry>the
+ <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+ type of the attribute.</entry>
+ </row>
+ <row valign="top">
+ <entry>"flags"</entry>
+ <entry>Read</entry>
+ <entry>a set of
+ <xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileenumerator.xml b/docs/reference/pygio-fileenumerator.xml
new file mode 100644
index 0000000..4b16bf6
--- /dev/null
+++ b/docs/reference/pygio-fileenumerator.xml
@@ -0,0 +1,488 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileenumerator">
+ <refnamediv>
+ <refname>gio.FileEnumerator</refname>
+ <refpurpose>Enumerated Files Routines.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileEnumerator</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--close">close</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--close-async">close_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--close-finish">close_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--get-container">get_container</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--has-pending">has_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--is-closed">is_closed</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--next-file">next_file</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--next-files-async">next_files_async</link></methodname>
+ <methodparam><parameter role="keyword">num_files</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--next-files-finish">next_files_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileenumerator--set-pending">set_pending</link></methodname>
+ <methodparam><parameter role="keyword">pending</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giofileenumerator">gio.FileEnumerator</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giofileenumerator">
+ <title>gio.FileEnumerator Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"container"</entry>
+ <entry>Write - Construct only</entry>
+ <entry>The container that is being enumerated.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ allows you to operate on a set of
+ <link linkend="class-giofile"><classname>gio.File</classname></link>s
+ returning a
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ structure for each file enumerated (e.g.
+ <methodname><link linkend="method-giofile--enumerate-children">gio.File.enumerate_children</link></methodname>()
+ will return a The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ for each of the children within a directory).
+ </para>
+ <para>
+ To get the next file's information from a
+ The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link> use
+ <methodname><link linkend="method-giofileenumerator--next-file">gio.FileEnumerator.next_file</link></methodname>()
+ or its asynchronous version,
+ <methodname><link linkend="method-giofileenumerator--next-files-async">gio.FileEnumerator.next_files_async</link></methodname>().
+ Note that the asynchronous version will return a list of
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>s,
+ whereas the synchronous will only return the next file in the enumerator.
+ </para>
+ <para>
+ To close a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ use <methodname><link linkend="method-giofileenumerator--close">close</link></methodname>,
+ or its asynchronous version,
+ <methodname><link linkend="method-giofileenumerator--close-async">close_async</link></methodname>.
+ Once a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+ is closed, no further actions may be performed on it.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofileenumerator--close">
+ <title>gio.FileEnumerator.close</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>close</methodname>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on success or
+ <literal>False</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>close</methodname>() method releases all resources used by this
+ enumerator, making the
+ <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+ return gio.ERROR_CLOSED on all calls.
+ </para>
+ <para>
+ This will be automatically called when the last reference is dropped,
+ but you might want to call this function to make sure resources are released
+ as early as possible.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--close-async">
+ <title>gio.FileEnumerator.close_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>close_async</methodname>
+ <methodparam>
+ <parameter role="keyword">callback</parameter>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>The
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref> of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>close_async</methodname>() method asynchronously closes the file enumerator.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned in
+ <methodname><link linkend="method-giofileenumerator--close-finish">gio.FileEnumerator.close_finish</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--close-finish">
+ <title>gio.FileEnumerator.close_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>close_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncResult.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the close operation
+ has finished successfully.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>close_finish</methodname>() method finishes closing a file enumerator, started from
+ <methodname><link linkend="method-giofileenumerator--close-async">gio.FileEnumerator.close_async</link></methodname>().
+ </para>
+ <para>
+ If the file enumerator was already closed when
+ <methodname><link linkend="method-giofileenumerator--close-async">gio.FileEnumerator.close_async</link></methodname>()
+ was called, then this function will report gio.ERROR_CLOSED in error, and return <literal>False</literal>.
+ If the file enumerator had pending operation when the close operation was started, then this function will report
+ gio.ERROR_PENDING, and return <literal>False</literal>. If cancellable was not <literal>None</literal>, then the operation
+ may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be set, and <literal>False</literal> will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--get-container">
+ <title>gio.FileEnumerator.get_container</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_container</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the <link linkend="class-giofile"><classname>gio.File</classname></link>
+ which is being enumerated. </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_container</methodname>() method gets the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ container which is being enumerated.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--has-pending">
+ <title>gio.FileEnumerator.has_pending</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_pending</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the enumerator has pending operations.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>has_pending</methodname>() method checks if the file enumerator has pending operations.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--is-closed">
+ <title>gio.FileEnumerator.is_closed</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_closed</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the enumerator is closed.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>is_closed</methodname>() method checks if the file enumerator has been closed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--next-file">
+ <title>gio.FileEnumerator.next_file</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>next_file</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ or <literal>None</literal> on error or end of enumerator.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>next_file</methodname>() method returns information for the next
+ file in the enumerated object. Will block until the information is available.
+ The <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ returned from this function will contain attributes that match the attribute string
+ that was passed when the GFileEnumerator was created.
+ </para>
+ <para>
+ On error, returns <literal>None</literal> and sets error to the error. If the enumerator
+ is at the end, <literal>None</literal> will be returned and error will be unset.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--next-files-async">
+ <title>gio.FileEnumerator.next_files_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>next_files_async</methodname>
+ <methodparam><parameter role="keyword">num_files</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam>
+ <parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">num_files</parameter>&nbsp;:</term>
+ <listitem><simpara>The number of file info objects to request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>The
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref> of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>next_files_async</methodname>() method requests information for a number
+ of files from the enumerator asynchronously. When all i/o for the operation is finished
+ the callback will be called with the requested information.
+ </para>
+ <para>
+ The callback can be called with less than num_files files in case of error or at the
+ end of the enumerator. In case of a partial error the callback will be called with any
+ succeeding items and no error, and on the next request the error will be reported. If a
+ request is cancelled the callback will be called with gio.ERROR_CANCELLED.
+ </para>
+ <para>
+ During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors.
+ </para>
+ <para>
+ Any outstanding i/o request with higher priority (lower numerical value) will be executed
+ before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--next-files-finish">
+ <title>gio.FileEnumerator.next_files_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>next_files_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncResult.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list of
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>s.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>next_files_finish</methodname>() method finishes the
+ asynchronous operation started with
+ <methodname><link linkend="method-giofileenumerator--next-files-async">gio.FileEnumerator.next_files_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileenumerator--set-pending">
+ <title>gio.FileEnumerator.set_pending</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_pending</methodname>
+ <methodparam><parameter role="keyword">pending</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">pending</parameter>&nbsp;:</term>
+ <listitem><simpara>A boolean value.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>push_current</methodname>() method sets the file enumerator as having pending operations.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileicon.xml b/docs/reference/pygio-fileicon.xml
new file mode 100644
index 0000000..d4a443b
--- /dev/null
+++ b/docs/reference/pygio-fileicon.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileicon">
+ <refnamediv>
+ <refname>gio.FileIcon</refname>
+ <refpurpose>Icons pointing to an image file.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileIcon</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+ <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
+ <ooclass><classname><link linkend="class-gioloadableicon">gio.LoadableIcon</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giofileicon">gio.FileIcon</link></methodname>
+ <methodparam><parameter role="keyword">file</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileicon--get-file">get_file</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giofileicon">gio.FileIcon</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
+ specifies an icon by pointing to an image file to be used as icon.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giofileicon">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.FileIcon</methodname>
+ <methodparam><parameter role="keyword">file</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>file</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
+ for the given file, or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new icon for a file.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofileicon--get-file">
+ <title>gio.FileIcon.get_file</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_file</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ or <literal>None</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_file</methodname>() method gets the
+ <link linkend="class-giofile"><classname>gio.File</classname></link>
+ associated with the given icon.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileinfo.xml b/docs/reference/pygio-fileinfo.xml
new file mode 100644
index 0000000..33eeae7
--- /dev/null
+++ b/docs/reference/pygio-fileinfo.xml
@@ -0,0 +1,346 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileinfo">
+ <refnamediv>
+ <refname>gio.FileInfo</refname>
+ <refpurpose>File Information and Attributes</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileInfo</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giofileinfo">gio.FileInfo</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--clear-status">clear_status</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--copy-into">copy_into</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--dup">dup</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-as-string">get_attribute_as_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-boolean">get_attribute_boolean</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-byte-string">get_attribute_byte_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-data">get_attribute_data</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-int32">get_attribute_int32</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-int64">get_attribute_int64</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-object">get_attribute_object</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-status">get_attribute_status</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-string">get_attribute_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-type">get_attribute_type</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-uint32">get_attribute_uint32</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-attribute-uint64">get_attribute_uint64</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-content-type">get_content_type</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-display-name">get_display_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-edit-name">get_edit_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-etag">get_etag</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-file-type">get_file_type</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-is-backup">get_is_backup</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-is-hidden">get_is_hidden</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-is-symlink">get_is_symlink</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-modification-time">get_modification_time</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-name">get_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-size">get_size</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-sort-order">get_sort_order</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--get-symlink-target">get_symlink_target</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--has-attribute">has_attribute</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--list-attributes">list_attributes</link></methodname>
+ <methodparam><parameter role="keyword">name_space</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--remove-attribute">remove_attribute</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute">set_attribute</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ <methodparam><parameter role="keyword">value_p</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-boolean">set_attribute_boolean</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-byte-string">set_attribute_byte_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-data">set_attribute_data</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-int32">set_attribute_int32</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-int64">set_attribute_int64</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-int64">set_attribute_mask</link></methodname>
+ <methodparam><parameter role="keyword">mask</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-object">set_attribute_object</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-status">set_attribute_status</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-string">set_attribute_string</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-uint32">set_attribute_uint32</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-attribute-uint64">set_attribute_uint64</link></methodname>
+ <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-content-type">set_content_type</link></methodname>
+ <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-display-name">set_display_name</link></methodname>
+ <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-edit-name">set_edit_name</link></methodname>
+ <methodparam><parameter role="keyword">edit_name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-file-type">set_file_type</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-icon">set_icon</link></methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-is-hidden">set_is_hidden</link></methodname>
+ <methodparam><parameter role="keyword">is_hidden</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-is-symlink">set_is_symlink</link></methodname>
+ <methodparam><parameter role="keyword">is_symlink</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-modification-time">set_modification_time</link></methodname>
+ <methodparam><parameter role="keyword">mtime</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-name">set_name</link></methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-size">set_size</link></methodname>
+ <methodparam><parameter role="keyword">size</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-sort-order">set_sort_order</link></methodname>
+ <methodparam><parameter role="keyword">sort_order</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--set-symlink-tarset">set_symlink_tarset</link></methodname>
+ <methodparam><parameter role="keyword">symlink_target</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinfo--unset-attribute-mask">unset_attribute_mask</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giofileinfo">gio.FileInfo</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ Functionality for manipulating basic metadata for files.
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ implements methods for getting information that all files should contain,
+ and allows for manipulation of extended attributes.
+ </para>
+ <para>
+ See <link linkend="class-giofileattribute"><classname>gio.FileAttribute</classname></link>
+ for more information on how GIO handles file attributes.
+ </para>
+ <para>
+ To obtain a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ for a <link linkend="class-giofile"><classname>gio.File</classname></link>, use
+ <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
+ (or its async variant). To obtain a
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ for a file input or output stream, use
+ <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>() or
+ <methodname><link linkend="method-giofileoutputstream--query-info">gio.FileOutputStream.query_info</link></methodname>()
+ (or their async variants).
+ </para>
+ <para>
+ To change the actual attributes of a file, you should then set the attribute in the
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link> and call
+ <methodname><link linkend="method-giofile--set-attributes-from-info">gio.File.set_attributes_from_info</link></methodname>() or
+ <methodname><link linkend="method-giofile--set-attributes-async">gio.File.set_attributes_async</link></methodname>()
+ on a <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </para>
+ <para>
+ However, not all attributes can be changed in the file. For instance, the
+ actual size of a file cannot be changed via
+ <methodname><link linkend="method-giofileinfo--set-size">gio.FileInfo.set_size</link></methodname>(). You may call
+ <methodname><link linkend="method-giofile--query-settable-attributes">gio.File.query_settable_attributes</link></methodname>() and
+ <methodname><link linkend="method-giofile--query-writable-namespace">gio.File.query_writable_namespace</link></methodname>()
+ to discover the settable attributes of a particular file at runtime.
+ </para>
+ <para>
+ <link linkend="class-giofileattributematcher"><classname>gio.FileAttributeMatcher</classname></link>
+ allows for searching through a GFileInfo for attributes.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giofileinfo">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.FileInfo</methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+ <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileinputstream.xml b/docs/reference/pygio-fileinputstream.xml
new file mode 100644
index 0000000..723dc64
--- /dev/null
+++ b/docs/reference/pygio-fileinputstream.xml
@@ -0,0 +1,214 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileinputstream">
+ <refnamediv>
+ <refname>gio.FileInputStream</refname>
+ <refpurpose>Base class for implementing streaming input</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileInputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinputstream--query-info">query_info</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinputstream--query-info-async">query_info_async</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileinputstream--query-info-finish">query_info_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+ +-- <link linkend="class-giofileinputstream">gio.FileInputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ implements
+ <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ provides input streams that take their content from a file.
+ </para>
+ <para>
+ <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ implements <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>,
+ which allows the input stream to jump to arbitrary positions in the file, provided the filesystem
+ of the file allows it. In addition to the generic g_seekable_ API,
+ <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+ has its own API for seeking and positioning. To find the position of a file input stream, use
+ <methodname><link linkend="method-gioseekable--tell">gio.Seekable.tell</link></methodname>().
+ To find out if a file input stream supports seeking, use
+ <methodname><link linkend="method-gioseekable--can_seek">gio.Seekable.can_seek</link></methodname>().
+ To position a file input stream, use
+ <methodname><link linkend="method-gioseekable--seek">gio.Seekable.seek</link></methodname>().
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofileinputstream--query-info">
+ <title>gio.FileInputStream.query_info</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>a file attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info</methodname>() method queries a file input stream
+ the given attributes. This function blocks while querying the stream.
+ For the asynchronous (non-blocking) version of this function, see
+ <methodname><link linkend="method-giofileinputstream--query-info-async">gio.FileInputStream.query_info_async</link></methodname>().
+ While the stream is blocked, the stream will set the pending flag internally,
+ and any other operations on the stream will fail with gio.ERROR_PENDING.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileinputstream--query-info-async">
+ <title>gio.FileInputStream.query_info_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info_async</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>a file attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info_async</methodname>() method queries the stream
+ information asynchronously. When the operation is finished callback will be
+ called. You can then call
+ <methodname><link linkend="method-giofileinputstream--query-info-finish">gio.FileInputStream.query_info_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ <para>
+ For the synchronous version of this function, see
+ <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileinputstream--query-info-finish">
+ <title>gio.FileInputStream.query_info_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-giofileinputstream--query-info-async">gio.FileInputStream.query_info_async</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-filemonitor.xml b/docs/reference/pygio-filemonitor.xml
new file mode 100644
index 0000000..ef9ca33
--- /dev/null
+++ b/docs/reference/pygio-filemonitor.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofilemonitor">
+ <refnamediv>
+ <refname>gio.FileMonitor</refname>
+ <refpurpose>File Monitor</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileMonitor</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilemonitor--cancel">cancel</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilemonitor--emit-event">emit_event</link></methodname>
+ <methodparam><parameter role="keyword">child</parameter></methodparam>
+ <methodparam><parameter role="keyword">other_file</parameter></methodparam>
+ <methodparam><parameter role="keyword">event_type</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilemonitor--is-cancelled">is_cancelled</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilemonitor--set-rate-limit">set_rate_limit</link></methodname>
+ <methodparam><parameter role="keyword">limit_msecs</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giofilemonitor">gio.FileMonitor</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giofilemonitor">
+ <title>gio.FileMonitor Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"cancelled"</entry>
+ <entry>Read</entry>
+ <entry>
+ Whether the monitor has been cancelled. Default value: <literal>False</literal>.
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"rate-limit"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ The limit of the monitor to watch for changes, in milliseconds.
+ Allowed values: >= 0. Default value: 800.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1 id="signal-prototypes-giofilemonitor">
+ <title>gio.FileMonitor Signal Prototypes</title>
+
+ <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-giofilemonitor--aborted">"changed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>filemonitor</parameter></methodparam>
+ <methodparam><parameter>file</parameter></methodparam>
+ <methodparam><parameter>other_file</parameter></methodparam>
+ <methodparam><parameter>event_type</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+ monitors a file or directory for changes.
+ </para>
+ <para>
+ To obtain a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+ for a file or directory, use
+ <methodname><link linkend="method-giofile--monitor">gio.FileMonitor.monitor</link></methodname>(),
+ <methodname><link linkend="method-giofile--monitor-file">gio.FileMonitor.monitor_file</link></methodname>(), or
+ <methodname><link linkend="method-giofile--monitor-directory">gio.FileMonitor.monitor_directory</link></methodname>().
+ </para>
+ <para>
+ To get informed about changes to the file or directory you are monitoring,
+ connect to the "changed" signal.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+ <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileoutputstream.xml b/docs/reference/pygio-fileoutputstream.xml
new file mode 100644
index 0000000..f4367d7
--- /dev/null
+++ b/docs/reference/pygio-fileoutputstream.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileoutputstream">
+ <refnamediv>
+ <refname>gio.FileOutputStream</refname>
+ <refpurpose>Base class for implementing streaming input</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FileOutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileoutputstream--get-etag">get_etag</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileoutputstream--query-info">query_info</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileoutputstream--query-info-async">query_info_async</link></methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofileoutputstream--query-info-finish">query_info_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+ +-- <link linkend="class-giofileoutputstream">gio.FileOutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ implements
+ <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ provides output streams that write their content to a file.
+ </para>
+ <para>
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ implements <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>,
+ which allows the output stream to jump to arbitrary positions in the file and to truncate
+ the file, provided the filesystem of the file supports these operations. In addition to the
+ generic gio.Seekable. API,
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+ has its own API for seeking and positioning. To find the position of a file output stream, use
+ <methodname><link linkend="method-gioseekable--tell">gio.Seekable.tell</link></methodname>().
+ To find out if a file output stream supports seeking, use
+ <methodname><link linkend="method-gioseekable--can_seek">gio.Seekable.can_seek</link></methodname>().
+ To position a file output stream, use
+ <methodname><link linkend="method-gioseekable--seek">gio.Seekable.seek</link></methodname>().
+ To find out if a file output stream supports truncating, use
+ <methodname><link linkend="method-gioseekable--can_truncate">gio.FileOutputStream.can_truncate</link></methodname>().
+ To truncate a file output stream, use
+ <methodname><link linkend="method-gioseekable--truncate">gio.Seekable.truncate</link></methodname>().
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofileoutputstream--get-etag">
+ <title>gio.FileOutputStream.get_etag</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_etag</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the entity tag for the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_etag</methodname>() method gets the entity tag
+ for the file when it has been written. This must be called after the
+ stream has been written and closed, as the etag can change while writing.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileoutputstream--query-info">
+ <title>gio.FileOutputStream.query_info</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>a file attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info</methodname>() method queries a file input stream
+ the given attributes. This function blocks while querying the stream.
+ For the asynchronous (non-blocking) version of this function, see
+ <methodname><link linkend="method-giofileoutputstream--query-info-async">gio.FileOutputStream.query_info_async</link></methodname>().
+ While the stream is blocked, the stream will set the pending flag internally,
+ and any other operations on the stream will fail with gio.ERROR_PENDING.
+ </para>
+ <para>
+ Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED),
+ the stream has pending operations (with error being set to gio.ERROR_PENDING), or
+ if querying info is not supported for the stream's interface (with error being set to
+ gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be set, and <literal>None</literal> will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileoutputstream--query-info-async">
+ <title>gio.FileOutputStream.query_info_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info_async</methodname>
+ <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+ <listitem><simpara>a file attribute query string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info_async</methodname>() method queries the stream
+ information asynchronously. When the operation is finished callback will be
+ called. You can then call
+ <methodname><link linkend="method-giofileoutputstream--query-info-finish">gio.FileOutputStream.query_info_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ <para>
+ For the synchronous version of this function, see
+ <methodname><link linkend="method-giofileoutputstream--query-info">gio.FileOutputStream.query_info</link></methodname>().
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was
+ cancelled, the error gio.ERROR_CANCELLED will be set
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofileoutputstream--query-info-finish">
+ <title>gio.FileOutputStream.query_info_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>query_info_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+ or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>query_info_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-giofileoutputstream--query-info-async">gio.FileOutputStream.query_info_async</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-filterinputstream.xml b/docs/reference/pygio-filterinputstream.xml
new file mode 100644
index 0000000..e6fb90b
--- /dev/null
+++ b/docs/reference/pygio-filterinputstream.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofilterinputstream">
+ <refnamediv>
+ <refname>gio.FilterInputStream</refname>
+ <refpurpose>Filter Input Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FilterInputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilterinputstream--get-base-stream">get_base_stream</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilterinputstream--get-close-base-stream">get_close_base_stream</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilterinputstream--set-close-base-stream">set_close_base_stream</link></methodname>
+ <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+ +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giofilterinputstream">
+ <title>gio.FilterInputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"base-stream"</entry>
+ <entry>Read - Write - Construct only</entry>
+ <entry>The underlying base stream on which the io ops will be done.</entry>
+ </row>
+ <row valign="top">
+ <entry>"close-base-stream"</entry>
+ <entry>Read - Write - Construct only</entry>
+ <entry>If the base stream should be closed when the filter stream is closed.
+ Default value: <literal>True</literal>.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ Filter Input Stream.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofilterinputstream--get-base-stream">
+ <title>gio.FilterInputStream.get_base_stream</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_base_stream</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_base_stream</methodname>() method gets the base
+ stream for the filter stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofilterinputstream--get-close-base-stream">
+ <title>gio.FilterInputStream.get_close_base_stream</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_close_base_stream</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the base stream
+ will be closed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_close_base_stream</methodname>() method returns
+ whether the base stream will be closed when stream is closed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofilterinputstream--set-close-base-stream">
+ <title>gio.FilterInputStream.set_close_base_stream</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_close_base_stream</methodname>
+ <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">close_base</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> to close the base stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_close_base_stream</methodname>() method sets whether
+ the base stream will be closed when stream is closed.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-filteroutputstream.xml b/docs/reference/pygio-filteroutputstream.xml
new file mode 100644
index 0000000..78feaa2
--- /dev/null
+++ b/docs/reference/pygio-filteroutputstream.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofilteroutputstream">
+ <refnamediv>
+ <refname>gio.FilterOutputStream</refname>
+ <refpurpose>Filter Output Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.FilterOutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilteroutputstream--get-base-stream">get_base_stream</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilteroutputstream--get-close-base-stream">get_close_base_stream</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giofilteroutputstream--set-close-base-stream">set_close_base_stream</link></methodname>
+ <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+ +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giofilteroutputstream">
+ <title>gio.FilterOutputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"base-stream"</entry>
+ <entry>Read - Write - Construct only</entry>
+ <entry>The underlying base stream on which the io ops will be done.</entry>
+ </row>
+ <row valign="top">
+ <entry>"close-base-stream"</entry>
+ <entry>Read - Write - Construct only</entry>
+ <entry>If the base stream should be closed when the filter stream is closed.
+ Default value: <literal>True</literal>.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ Filter Output Stream.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giofilteroutputstream--get-base-stream">
+ <title>gio.FilterOutputStream.get_base_stream</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_base_stream</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_base_stream</methodname>() method gets the base
+ stream for the filter stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofilteroutputstream--get-close-base-stream">
+ <title>gio.FilterOutputStream.get_close_base_stream</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_close_base_stream</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the base stream
+ will be closed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_close_base_stream</methodname>() method returns
+ whether the base stream will be closed when stream is closed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giofilteroutputstream--set-close-base-stream">
+ <title>gio.FilterOutputStream.set_close_base_stream</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_close_base_stream</methodname>
+ <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">close_base</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> to close the base stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_close_base_stream</methodname>() method sets whether
+ the base stream will be closed when stream is closed.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-functions.xml b/docs/reference/pygio-functions.xml
new file mode 100644
index 0000000..c690a2f
--- /dev/null
+++ b/docs/reference/pygio-functions.xml
@@ -0,0 +1,395 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gio-functions">
+ <refnamediv>
+ <refname>gio Functions</refname>
+ <refpurpose></refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<programlisting><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-can-be-executable">gio.content_type_can_be_executable</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-equals">gio.content_type_equals</link></methodname>
+ <methodparam><parameter role="keyword">type1</parameter></methodparam>
+ <methodparam><parameter role="keyword">type2</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-from-mime-type">gio.content_type_from_mime_type</link></methodname>
+ <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-get-description">gio.content_type_get_description</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-get-icon">gio.content_type_get_icon</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-get-mime-type">gio.content_type_get_mime_type</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-guess">gio.content_type_guess</link></methodname>
+ <methodparam><parameter role="keyword">filename</parameter></methodparam>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">want_uncertain</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-is-a">gio.content_type_is_a</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ <methodparam><parameter role="keyword">supertype</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-type-is-unknown">gio.content_type_is_unknown</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--content-types-get-registered">gio.content_types_get_registered</link></methodname>
+ <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--io-error-from-errno">gio.io_error_from_errno</link></methodname>
+ <methodparam><parameter role="keyword">err_no</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ These functions are part of the <literal>PyGObject</literal> gio module
+ but are not directly associated with a specific class
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--content-type-can-be-executable">
+ <title>gio.content_type_can_be_executable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_can_be_executable</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the file type corresponds
+ to a type that can be executable, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_can_be_executable</methodname>() function checks
+ if a content type can be executable. Note that for instance things like text files
+ can be executables (i.e. scripts and batch files).
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-equals">
+ <title>gio.content_type_equals</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_equals</methodname>
+ <methodparam><parameter role="keyword">type1</parameter></methodparam>
+ <methodparam><parameter role="keyword">type2</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type1</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>type2</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the two strings are
+ identical or equivalent, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_equals</methodname>() function compares
+ two content types for equality.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-from-mime-type">
+ <title>gio.content_type_from_mime_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_from_mime_type</methodname>
+ <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mime_type</parameter>&nbsp;:</term>
+ <listitem><simpara>a mime type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The content type or <literal>None</literal> when does not know.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_from_mime_type</methodname>() function tries
+ to find a content type based on the mime type name.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-get-description">
+ <title>gio.content_type_get_description</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_get_description</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a short description of the content type type.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_get_description</methodname>() function
+ gets the human readable description of the content type.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-get-icon">
+ <title>gio.content_type_get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_get_icon</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ corresponding to the content type.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_get_icon</methodname>() function
+ gets the icon for a content type.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-get-mime-type">
+ <title>gio.content_type_get_mime_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_get_mime_type</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the registered mime-type for the given type,
+ or <literal>None</literal> if unknown.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_get_mime_type</methodname>() function
+ gets the mime-type for the content type. If one is registered
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-guess">
+ <title>gio.content_type_guess</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_guess</methodname>
+ <methodparam><parameter role="keyword">filename</parameter></methodparam>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">want_uncertain</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>filename</parameter>&nbsp;:</term>
+ <listitem><simpara>a string, or <literal>None</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>data</parameter>&nbsp;:</term>
+ <listitem><simpara>a stream of data, or <literal>None</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>want_uncertain</parameter>&nbsp;:</term>
+ <listitem><simpara>a flag indicating the certainty of the result.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string indicating a guessed content type for the given data.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_guess</methodname>() function guesses
+ the content type based on example data. If the function is uncertain,
+ result_uncertain will be set to <literal>True</literal>. Either filename
+ or data may be <literal>None</literal>, in which case the guess will be
+ based solely on the other argument.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-is-a">
+ <title>gio.content_type_is_a</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_is_a</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ <methodparam><parameter role="keyword">supertype</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>supertype</parameter>&nbsp;:</term>
+ <listitem><simpara>a string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if type is a kind of
+ supertype, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_is_a</methodname>() function determines
+ if type is a subset of supertype.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-type-is-unknown">
+ <title>gio.content_type_is_unknown</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_type_is_unknown</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a content type string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the type is the unknown type.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_type_is_unknown</methodname>() function checks if
+ the content type is the generic "unknown" type. On unix this is the
+ "application/octet-stream" mimetype, while on win32 it is "*".
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--content-types-get-registered">
+ <title>gio.content_types_get_registered</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>content_types_get_registered</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of the registered content types.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>content_types_get_registered</methodname>() function
+ gets a list of strings containing all the registered content types
+ known to the system.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--io-error-from-errno">
+ <title>gio.io_error_from_errno</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>io_error_from_errno</methodname>
+ <methodparam><parameter role="keyword">err_no</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>err_no</parameter>&nbsp;:</term>
+ <listitem><simpara>Error number.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>io_error_from_errno</methodname>() function converts
+ error codes into GIO error codes.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-icon.xml b/docs/reference/pygio-icon.xml
new file mode 100644
index 0000000..5a32d28
--- /dev/null
+++ b/docs/reference/pygio-icon.xml
@@ -0,0 +1,217 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioicon">
+ <refnamediv>
+ <refname>gio.Icon</refname>
+ <refpurpose>Interface for icons.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Icon</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioicon--equal">equal</link></methodname>
+ <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioicon--to-string">to_string</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>
+ <methodparam></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-gioicon">gio.Icon</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Known Derived Interfaces</title>
+ <para>
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link> is required by
+ <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Known Implementation</title>
+ <para>
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link> is implemented by
+ <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>,
+ <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>,
+ <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>,
+ <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ is a very minimal interface for icons. It provides functions for checking
+ the equality of two icons, hashing of icons and serializing an icon to and from strings.
+ </para>
+ <para>
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ does not provide the actual pixmap for the icon as this is out of GIO's
+ scope, however implementations of
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ may contain the name of an icon (see
+ <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>),
+ or the path to an icon (see
+ <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>).
+ </para>
+ <!--
+ <para>
+ To obtain a hash of a <link linkend="class-gioicon"><classname>gio.Icon</classname></link>, see
+ <methodname><link linkend="method-gioicon- -hash">gio.Icon.hash</link></methodname>().
+ </para>
+ -->
+ <para>
+ To check if two GIcons are equal, see
+ <methodname><link linkend="method-gioicon--equal">gio.Icon.equal</link></methodname>().
+ </para>
+ <para>
+ For serializing a <link linkend="class-gioicon"><classname>gio.Icon</classname></link>,
+ use <methodname><link linkend="method-gioicon- -to-string">gio.Icon.to_string</link></methodname>() and
+ <methodname><link linkend="method-gioicon- -new-from-string">gio.Icon.new_from_string</link></methodname>().
+ </para>
+ <para>
+ If your application or library provides one or more
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ implementations you need to ensure that each GType is registered
+ with the type system prior to calling
+ <methodname><link linkend="function-gioicon--new-from-string">gio.icon_new_from_string</link></methodname>().
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioicon--equal">
+ <title>gio.Icon.equal</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>equal</methodname>
+ <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>icon2</parameter>&nbsp;:</term>
+ <listitem><simpara>the second
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>equal</methodname>() method checks if two icons are equal.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioicon--to-string">
+ <title>gio.Icon.to_string</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>to_string</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>An UTF8 string or <literal>None</literal>
+ if icon can't be serialized.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>to_string</methodname>() method generates a textual
+ representation of icon that can be used for serialization such as when
+ passing icon to a different process or saving it to persistent storage. Use
+ <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>()
+ to get icon back from the returned string.
+ </para>
+ <para>
+ The encoding of the returned string is proprietary to GIcon except in the following two cases
+ </para>
+ <para>
+ If icon is a <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>,
+ the returned string is a native path (such as /path/to/my icon.png) without escaping
+ if the <link linkend="class-giofile"><classname>gio.File</classname></link>
+ for icon is a native file. If the file is not native, the returned string is the result of
+ <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
+ (such as sftp://path/to/my%20icon.png).
+ </para>
+ <para>
+ If icon is a <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+ with exactly one name, the encoding is simply the name (such as network-server).
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--icon-new-from-string">
+ <title>gio.icon_new_from_string</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>icon_new_from_string</methodname>
+ <methodparam><parameter role="keyword">str</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>str</parameter>&nbsp;:</term>
+ <listitem><simpara>A string obtained via
+ <methodname><link linkend="method-gioicon--to-string">gio.Icon.to_string</link></methodname>().
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>An object implementing the
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ interface or <literal>None</literal> if error is set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>icon_new_from_string</methodname>() function generate a
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ instance from str. This function can fail if str is not valid - see
+ <methodname><link linkend="method-gioicon--to-string">gio.Icon.to_string</link></methodname>()
+ for discussion.
+ </para>
+ <para>
+ If your application or library provides one or more GIcon implementations you need
+ to ensure that each GType is registered with the type system prior to calling
+ <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-inputstream.xml b/docs/reference/pygio-inputstream.xml
new file mode 100644
index 0000000..1bef333
--- /dev/null
+++ b/docs/reference/pygio-inputstream.xml
@@ -0,0 +1,730 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioinputstream">
+ <refnamediv>
+ <refname>gio.InputStream</refname>
+ <refpurpose>Base class for implementing streaming input</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.InputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--clear-pending">clear_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--close">close</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--close-async">close_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--close-finish">close_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--has-pending">has_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--is-closed">is_closed</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--read">read</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--read-async">read_async</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--read-finish">read_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--read-part">read_part</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--set-pending">set_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--skip">skip</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--skip-async">skip_async</link></methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioinputstream--skip-finish">skip_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ has functions to read from a stream (
+ <methodname><link linkend="method-gioinputstream--read">gio.InputStream.read</link></methodname>()
+ ), to close a stream (
+ <methodname><link linkend="method-gioinputstream--close">gio.InputStream.close</link></methodname>()
+ ) and to skip some content (
+ <methodname><link linkend="method-gioinputstream--skip">gio.InputStream.skip</link></methodname>()
+ ).
+ </para>
+ <para>
+ To copy the content of an input stream to an output stream without manually
+ handling the reads and writes, use
+ <methodname><link linkend="method-giooutputstream--skip">gio.OutputStream.splice</link></methodname>().
+ </para>
+ <para>
+ All of these functions have async variants too.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioinputstream--clear-pending">
+ <title>gio.InputStream.clear_pending</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>clear_pending</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>clear_pending</methodname>() method clears the pending flag on stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--close">
+ <title>gio.InputStream.close</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>close</methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on success
+ <literal>False</literal> on failure.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>close</methodname>() method closes the stream, releasing
+ resources related to it.
+ </para>
+ <para>
+ Once the stream is closed, all other operations will return gio.ERROR_CLOSED.
+ Closing a stream multiple times will not return an error.
+ </para>
+ <para>
+ Streams will be automatically closed when the last reference is dropped, but
+ you might want to call this function to make sure resources are released as
+ early as possible.
+ </para>
+ <para>
+ Some streams might keep the backing store of the stream (e.g. a file descriptor)
+ open after the stream is closed. See the documentation for the individual
+ stream for details.
+ </para>
+ <para>
+ On failure the first error that happened will be reported, but the close operation
+ will finish as much as possible. A stream that failed to close will still return
+ gio.ERROR_CLOSED for all operations. Still, it is important to check and report
+ the error to the user.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--close-async">
+ <title>gio.InputStream.close_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>close_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>close_async</methodname>() method asynchronously requests an
+ asynchronous closes of the stream, releasing resources related to it.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-gioinputstream--close">gio.InputStream.close</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-gioinputstream--close-finish">gio.InputStream.close_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--close-finish">
+ <title>gio.InputStream.close_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>close_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the stream was closed successfully.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>close_finish</methodname>() method finishes an asynchronous
+ file append operation started with
+ <methodname><link linkend="method-gioinputstream--close-async">gio.InputStream.close_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--has-pending">
+ <title>gio.InputStream.has_pending</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_pending</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if stream has pending actions.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>has_pending</methodname>() method checks if an input stream has pending actions.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--is-closed">
+ <title>gio.InputStream.is_closed</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_closed</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the stream is closed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>is_closed</methodname>() method checks if an input stream is closed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--read">
+ <title>gio.InputStream.read</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read</methodname>
+ <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+ <listitem><simpara>optionally the number of bytes that will be read from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The number of bytes read, or -1 on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read</methodname>() method tries to read count bytes from
+ the stream into the buffer starting at buffer. Will block during this read.
+ </para>
+ <para>
+ This function is similar to
+ <methodname><link linkend="method-gioinputstream--read-part">gio.InputStream.read_part</link></methodname>(),
+ except it tries to read as many bytes as requested, only stopping on an error or end of stream.
+ </para>
+ <para>
+ On a successful read of count bytes, or if we reached the end of the stream,
+ <literal>True</literal> is returned, and bytes_read is set to the number of bytes read into buffer.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </para>
+ <para>
+ If there is an error during the operation <literal>False</literal> is returned and error
+ is set to indicate the error status, bytes_read is updated to contain the number of
+ bytes read into buffer before the error occurred.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--read-async">
+ <title>gio.InputStream.read_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_async</methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>count</parameter>&nbsp;:</term>
+ <listitem><simpara>the number of bytes that will be read from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_async</methodname>() method requests an asynchronous read
+ of count bytes from the stream into the buffer.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-gioinputstream--read">gio.InputStream.read</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-gioinputstream--read-finish">gio.InputStream.read_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ <para>
+ During an async request no other sync and async calls are allowed, and
+ will result in gio.ERROR_PENDING errors.
+ </para>
+ <para>
+ A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </para>
+ <para>
+ On success, the number of bytes read into the buffer will be passed to the callback.
+ It is not an error if this is not the same as the requested size, as it can happen e.g.
+ near the end of a file, but generally we try to read as many bytes as requested. Zero
+ is returned on end of file (or if count is zero), but never otherwise.
+ </para>
+ <para>
+ Any outstanding i/o request with higher priority (lower numerical value) will be
+ executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+ </para>
+ <para>
+ The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so
+ they are optional for inheriting classes. However, if you override one you must override all.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--read-finish">
+ <title>gio.InputStream.read_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The number of bytes read in, or -1 on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_finish</methodname>() method finishes an asynchronous
+ stream read operation started by
+ <methodname><link linkend="method-gioinputstream--read-async">gio.InputStream.read_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--read-part">
+ <title>gio.InputStream.read_part</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>read_part</methodname>
+ <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+ <listitem><simpara>optionally the number of bytes that will be read from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The number of bytes read, or -1 on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>read_part</methodname>() method tries to read count bytes from
+ the stream into the buffer starting at buffer. Will block during this read.
+ </para>
+ <para>
+ If count is zero returns zero and does nothing. A value of count larger than
+ G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </para>
+ <para>
+ On success, the number of bytes read into the buffer is returned. It is
+ not an error if this is not the same as the requested size, as it can
+ happen e.g. near the end of a file. Zero is returned on end of file
+ (or if count is zero), but never otherwise.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </para>
+ <para>
+ On error -1 is returned and error is set accordingly.
+ </para>
+ <note>
+ This method roughly corresponds to C GIO g_input_stream_read.
+ </note>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--set-pending">
+ <title>gio.InputStream.set_pending</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_pending</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if pending was previously
+ unset and is now set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_pending</methodname>() method sets stream to have actions pending.
+ If the pending flag is already set or stream is closed,
+ it will return <literal>False</literal> and set error.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--skip">
+ <title>gio.InputStream.skip</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>skip</methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+ <listitem><simpara>the number of bytes that will be skipped from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The number of bytes skipped, or -1 on error
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>skip</methodname>() method tries to skip count bytes
+ from the stream. Will block during the operation.
+ </para>
+ <para>
+ This is identical to
+ <methodname><link linkend="method-gioinputstream--read">read</link></methodname>(),
+ from a behaviour standpoint, but the bytes that are skipped are not
+ returned to the user. Some streams have an implementation that is more
+ efficient than reading the data.
+ </para>
+ <para>
+ This function is optional for inherited classes, as the default implementation emulates it using read.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thskip. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+ the stream closed, but some streams can use a faster close that doesn't block to e.g.
+ check errors.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--skip-async">
+ <title>gio.InputStream.skip_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>skip_async</methodname>
+ <methodparam><parameter role="keyword">count</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>count</parameter>&nbsp;:</term>
+ <listitem><simpara>the number of bytes that will be skipped from the stream.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncskipyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>io_priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the
+ <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+ of the request.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>skip_async</methodname>() method request an asynchronous
+ skip of count bytes from the stream.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-gioinputstream--skip">gio.InputStream.skip</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-gioinputstream--skip-finish">gio.InputStream.skip_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ <para>
+ During an async request no other sync and async calls are allowed, and
+ will result in gio.ERROR_PENDING errors.
+ </para>
+ <para>
+ A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+ </para>
+ <para>
+ On success, the number of bytes skipped will be passed to the callback. It is
+ not an error if this is not the same as the requested size, as it can happen
+ e.g. near the end of a file, but generally we try to skip as many bytes as requested.
+ Zero is returned on end of file (or if count is zero), but never otherwise.
+ </para>
+ <para>
+ Any outstanding i/o request with higher priority (lower numerical value) will be
+ executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+ </para>
+ <para>
+ The asyncronous methods have a default fallback that uses thskips to implement asynchronicity, so
+ they are optional for inheriting classes. However, if you override one you must override all.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioinputstream--skip-finish">
+ <title>gio.InputStream.skip_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>skip_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The number of bytes skipped in, or -1 on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>skip_finish</methodname>() method finishes an asynchronous
+ stream skip operation started by
+ <methodname><link linkend="method-gioinputstream--skip-async">gio.InputStream.skip_async</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-loadableicon.xml b/docs/reference/pygio-loadableicon.xml
new file mode 100644
index 0000000..93198c4
--- /dev/null
+++ b/docs/reference/pygio-loadableicon.xml
@@ -0,0 +1,198 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioloadableicon">
+ <refnamediv>
+ <refname>gio.LoadableIcon</refname>
+ <refpurpose>Interface for icons.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.LoadableIcon</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioloadableicon--load">load</link></methodname>
+ <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioloadableicon--load-async">load_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioloadableicon--load-finish">load_finish</link></methodname>
+ <methodparam><parameter role="keyword">res</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-gioloadableicon">gio.LoadableIcon</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Prerequisites</title>
+ <para>
+ <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> requires
+ <link linkend="class-gioicon"><classname>gio.Icon</classname></link>. and
+ <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Known Implementation</title>
+ <para>
+ <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> is implemented by
+ <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>
+ extends the <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ interface and adds the ability to load icons from streams.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioloadableicon--load">
+ <title>gio.LoadableIcon.load</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>load</methodname>
+ <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>size</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a 2 tuple containing a
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ to read the icon from and a string containing the icon type.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>load</methodname>() method loads a loadable icon.
+ For the asynchronous version of this function, see
+ <methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioloadableicon--load-async">
+ <title>gio.LoadableIcon.load_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>load_async</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>size</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>load_async</methodname>() method loads an icon asynchronously.
+ </para>
+ <para>
+ For more details, see
+ <methodname><link linkend="method-gioloadableicon--load">gio.LoadableIcon.load</link></methodname>()
+ which is the synchronous version of this call.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-gioloadableicon--load-finish">gio.LoadableIcon.load_finish</link></methodname>()
+ to get the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioloadableicon--load-finish">
+ <title>gio.LoadableIcon.load_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>load_finish</methodname>
+ <methodparam><parameter role="keyword">res</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>res</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a 2 tuple containing a
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ to read the icon from and a string containing the icon type.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>load_finish</methodname>() method finishes an asynchronous
+ icon load started in
+ <methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-memoryinputstream.xml b/docs/reference/pygio-memoryinputstream.xml
new file mode 100644
index 0000000..7d8cffb
--- /dev/null
+++ b/docs/reference/pygio-memoryinputstream.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomemoryinputstream">
+ <refnamediv>
+ <refname>gio.MemoryInputStream</refname>
+ <refpurpose>Base class for implementing streaming input</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.MemoryInputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giomemoryinputstream">gio.MemoryInputStream</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomemoryinputstream--add-data">add_data</link></methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--memory-input-stream-new-from-data">gio.memory_input_stream_new_from_data</link></methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+ +-- <link linkend="class-giomemoryinputstream">gio.MemoryInputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+ implements
+ <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+ is a class for using arbitrary memory chunks as input for GIO streaming input operations.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giomemoryinputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.MemoryInputStream</methodname>
+ <methodparam><parameter role="keyword">icon</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates an empty
+ <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giomemoryinputstream--add-data">
+ <title>gio.MemoryInputStream.add_data</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>add_data</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>input data.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>add_data</methodname>() method appends data to data
+ that can be read from the input stream
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--memory-input-stream-new-from-data">
+ <title>gio.memory_input_stream_new_from_data</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>memory_input_stream_new_from_data</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>data</parameter>&nbsp;:</term>
+ <listitem><simpara>input data.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A new
+ <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+ read from data
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>memory_input_stream_new_from_data</methodname>() function creates
+ a new <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+ with data in memory.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-memoryoutputstream.xml b/docs/reference/pygio-memoryoutputstream.xml
new file mode 100644
index 0000000..f044496
--- /dev/null
+++ b/docs/reference/pygio-memoryoutputstream.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomemoryoutputstream">
+ <refnamediv>
+ <refname>gio.MemoryOutputStream</refname>
+ <refpurpose>Streaming output operations on memory chunks</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.MemoryOutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giomemoryoutputstream">gio.MemoryOutputStream</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomemoryoutputstream--get-contents">get_contents</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomemoryoutputstream--get-data-size">get_data_size</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomemoryoutputstream--get-size">get_size</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+ +-- <link linkend="class-giomemoryoutputstream">gio.MemoryOutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
+ implements
+ <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
+ is a class for using arbitrary memory chunks as output for GIO streaming output operations.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giomemoryoutputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.MemoryOutputStream</methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new
+ <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giomemoryoutputstream--get-contents">
+ <title>gio.MemoryOutputStream.get_contents</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_contents</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the stream's data
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_contents</methodname>() method gets any loaded data
+ from the ostream.
+ </para>
+ <para>
+ Note that the returned data may become invalid on the next write or truncate
+ operation on the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomemoryoutputstream--get-data-size">
+ <title>gio.MemoryOutputStream.get_data_size</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_data_size</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the number of bytes written to the stream
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_data_size</methodname>() method returns the number
+ of bytes from the start up to including the last byte written in the
+ stream that has not been truncated away.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomemoryoutputstream--get-size">
+ <title>gio.MemoryOutputStream.get_size</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_size</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the number of bytes allocated for the data buffer
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_size</methodname>() method gets the size of the
+ currently allocated data area (availible from
+ <methodname><link linkend="method-giomemoryoutputstream--get-contents">gio.MemoryOutputStream.get_contents</link></methodname>()
+ ).
+ </para>
+ <para>
+ Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
+ </para>
+ <para>
+ If you want the number of bytes currently written to the stream, use
+ <methodname><link linkend="method-giomemoryoutputstream--get-data-size">gio.MemoryOutputStream.get_data_size</link></methodname>().
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-mount.xml b/docs/reference/pygio-mount.xml
new file mode 100644
index 0000000..aa635d4
--- /dev/null
+++ b/docs/reference/pygio-mount.xml
@@ -0,0 +1,961 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomount">
+ <refnamediv>
+ <refname>gio.Mount</refname>
+ <refpurpose>Mount management</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Mount</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--can-eject">can_eject</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--can-unmount">can_unmount</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--eject">eject</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--eject-finish">eject_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--get-drive">get_drive</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--get-name">get_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--get-root">get_root</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--get-uuid">get_uuid</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--get-volume">get_volume</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--guess-content-type">guess_content_type</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--guess-content-type-finish">guess_content_type_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--guess-content-type-sync">guess_content_type_sync</link></methodname>
+ <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--is-shadowed">is_shadowed</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--remount">remount</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">mount_operation</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--remount-finish">remount_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--shadow">shadow</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--unmount">unmount</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--unmount-finish">unmount_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomount--unshadow">unshadow</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-giomount">gio.Mount</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Prerequisites</title>
+ <para>
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link> requires
+ <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1 id="signal-prototypes-giomount">
+ <title>gio.Mount Signal Prototypes</title>
+
+ <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-giomount--aborted">"aborted"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giomount--changed">"changed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giomount--unmounted">"unmounted"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ interface represents user-visible mounts. Note, when porting from GnomeVFS,
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ is the moral equivalent of GnomeVFSVolume.
+
+ </para>
+ <para>
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ is a "mounted" filesystem that you can access. Mounted is in quotes because
+ it's not the same as a unix mount, it might be a gvfs mount, but you can still
+ access the files on it if you use GIO. Might or might not be related to a volume object.
+ </para>
+ <para>
+ Unmounting a GMount instance is an asynchronous operation. For more information
+ about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount
+ a <link linkend="class-giomount"><classname>gio.Mount</classname></link> instance,
+ first call
+ g_mount_unmount()
+ with (at least) the GMount instance and a GAsyncReadyCallback. The callback will
+ be fired when the operation has resolved (either with success or failure), and a
+ GAsyncReady structure will be passed to the callback. That callback should then call
+ g_mount_unmount_finish()
+ with the GMount and the GAsyncReady data to see if the operation was completed successfully.
+ If an error is present when g_mount_unmount_finish() is called, then it will be filled
+ with any error information.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giomount--can-eject">
+ <title>gio.Mount.can_eject</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_eject</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the mount can be ejected,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_eject</methodname>() method checks if a mount can be ejected.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--can-unmount">
+ <title>gio.Mount.can_unmount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_unmount</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the mount can be unmounted,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_eject</methodname>() method checks if a mount can be unmounted.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--eject">
+ <title>gio.Mount.eject</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags affecting the unmount if required for eject
+ <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject</methodname>() method asynchronously ejects a mount.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giomount--eject-finish">gio.Mount.eject_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--eject-finish">
+ <title>gio.Mount.eject_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the mount has been ejected
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject_finish</methodname>() method finishes ejecting a mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--get-drive">
+ <title>gio.Mount.get_drive</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_drive</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ or <literal>None</literal> if mount is not associated with a volume or a drive.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_drive</methodname>() method gets the drive for the mount.
+ </para>
+ <para>
+ This is a convenience method for getting the
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ and then using that object to get the
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--get-icon">
+ <title>gio.Mount.get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_icon</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ for the mount.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_icon</methodname>() method gets the icon for mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--get-name">
+ <title>gio.Mount.get_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the name for the given mount.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_name</methodname>() method gets the name of mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--get-root">
+ <title>gio.Mount.get_root</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_root</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_root</methodname>() method gets the root directory on mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--get-uuid">
+ <title>gio.Mount.get_uuid</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_uuid</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the UUID for mount or <literal>None</literal>
+ if no UUID can be computed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_uuid</methodname>() method gets the UUID for the mount.
+ The reference is typically based on the file system UUID for the mount in
+ question and should be considered an opaque string. Returns <literal>None</literal>
+ if there is no UUID available
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--get-volume">
+ <title>gio.Mount.get_volume</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_volume</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ or <literal>None</literal> if mount is not associated with a volume.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_volume</methodname>() method gets the volume for the mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--guess-content-type">
+ <title>gio.Mount.guess_content_type</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>guess_content_type</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">force_rescan</parameter>&nbsp;:</term>
+ <listitem><simpara>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>guess_content_type</methodname>() method asynchronously tries to guess the type of
+ content stored on mount. Returns one or more textual identifiers of well-known content
+ types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory
+ cards. See the shared-mime-info specification for more on x-content types.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giomount--guess-content-type-finish">gio.Mount.guess_content_type_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--guess-content-type-finish">
+ <title>gio.Mount.guess_content_type_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>guess_content_type_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list of types or <literal>None</literal> on error.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>guess_content_type_finish</methodname>() method finishes guessing content
+ types of mount. If any errors occured during the operation, error will be set to
+ contain the errors and FALSE will be returned. In particular, you may get an
+ gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--guess-content-type-sync">
+ <title>gio.Mount.guess_content_type_sync</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>guess_content_type_sync</methodname>
+ <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">force_rescan</parameter>&nbsp;:</term>
+ <listitem><simpara>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>guess_content_type_sync</methodname>() method tries to guess
+ the type of content stored on mount. Returns one or more textual identifiers
+ of well-known content types (typically prefixed with "x-content/"), e.g.
+ x-content/image-dcf for camera memory cards. See the shared-mime-info specification
+ for more on x-content types.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ This is an synchronous operation and as such may block doing IO; see
+ <methodname><link linkend="method-giomount--guess-content-type">gio.Mount.guess_content_type</link></methodname>()
+ for the asynchronous version.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--is-shadowed">
+ <title>gio.Mount.is_shadowed</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_shadowed</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if mount is shadowed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>is_shadowed</methodname>() method determines if mount
+ is shadowed. Applications or libraries should avoid displaying mount
+ in the user interface if it is shadowed.
+ </para>
+ <para>
+ A mount is said to be shadowed if there exists one or more user visible
+ objects (currently
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ objects) with a root that is inside the root of mount.
+ </para>
+ <para>
+ One application of shadow mounts is when exposing a single file system
+ that is used to address several logical volumes. In this situation, a
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ implementation would create two
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ objects (for example, one for the camera functionality of the device
+ and one for a SD card reader on the device) with activation URIs
+ gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/.
+ When the underlying mount (with root gphoto2://[usb:001,002]/) is
+ mounted, said
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ implementation would create two
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ objects (each with their root matching the corresponding volume
+ activation root) that would shadow the original mount.
+ </para>
+ <para>
+ The proxy monitor in GVfs 2.26 and later, automatically creates and
+ manage shadow mounts (and shadows the underlying mount) if the activation
+ root on a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ is set.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--remount">
+ <title>gio.Mount.remount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>remount</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">mount_operation</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags affecting the unmount if required for eject
+ <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">mount_operation</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ or <literal>None</literal> to avoid user interaction.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>remount</methodname>() method asynchronously remounts a mount.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giomount--remount-finish">gio.Mount.remount_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--remount-finish">
+ <title>gio.Mount.remount_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>remount_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the mount has been remounted
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>remount_finish</methodname>() method finishes remounting a mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--shadow">
+ <title>gio.Mount.shadow</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>shadow</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>shadow</methodname>() method increments the shadow
+ count on mount. Usually used by
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ implementations when creating a shadow mount for mount, see
+ <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
+ for more information. The caller will need to emit the "changed"
+ signal on mount manually.
+ </para>
+
+ </refsect2>
+
+ <refsect2 id="method-giomount--unmount">
+ <title>gio.Mount.unmount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>unmount</methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags affecting the unmount if required for eject
+ <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>unmount</methodname>() method asynchronously unmounts a mount.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled
+ by triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giomount--unmount-finish">gio.Mount.unmount_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--unmount-finish">
+ <title>gio.Mount.unmount_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>unmount_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the mount has been unmounted
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>unmount_finish</methodname>() method finishes unmounting a mount.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomount--unshadow">
+ <title>gio.Mount.unshadow</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>unshadow</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>unshadow</methodname>() method decrements the shadow
+ count on mount. Usually used by
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ implementations when destroying a shadow mount for mount, see
+ <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
+ for more information. The caller will need to emit the "changed"
+ signal on mount manually.
+ </para>
+
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Signals</title>
+
+ <refsect2 id="signal-giomount--aborted">
+ <title>The "aborted" gio.Mount Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>the mount</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted by the backend when e.g. a device becomes unavailable while a
+ mount operation is in progress.
+ </para>
+ <para>
+ Implementations of <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ should handle this signal by dismissing open password dialogs.
+ </para>
+ </refsect2>
+ <refsect2 id="signal-giomount--changed">
+ <title>The "changed" gio.Mount Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>the mount</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when the mount has been changed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giomount--unmounted">
+ <title>The "unmounted" gio.Mount Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>the mount</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ This signal is emitted when the
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ have been unmounted.
+ </para>
+ </refsect2>
+
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-mountoperation.xml b/docs/reference/pygio-mountoperation.xml
new file mode 100644
index 0000000..34dec13
--- /dev/null
+++ b/docs/reference/pygio-mountoperation.xml
@@ -0,0 +1,726 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomountoperation">
+ <refnamediv>
+ <refname>gio.MountOperation</refname>
+ <refpurpose>Authentication methods for mountable locations.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.MountOperation</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giomountoperation">gio.MountOperation</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--get-anonymous">get_anonymous</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--get-choice">get_choice</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--get-domain">get_domain</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--get-password">get_password</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--get-password-save">get_password_save</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--get-username">get_username</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--reply">replay</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--set-anonymous">set_anonymous</link></methodname>
+ <methodparam><parameter role="keyword">anonymous</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--set-choice">set_choice</link></methodname>
+ <methodparam><parameter role="keyword">choice</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--set-domain">set_domain</link></methodname>
+ <methodparam><parameter role="keyword">domain</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--set-password">set_password</link></methodname>
+ <methodparam><parameter role="keyword">password</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--set-password-save">set_password_save</link></methodname>
+ <methodparam><parameter role="keyword">save</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giomountoperation--set-username">set_username</link></methodname>
+ <methodparam><parameter role="keyword">username</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giomountoperation">gio.MountOperation</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giomountoperation">
+ <title>gio.MountOperation Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"anonymous"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ Whether to use an anonymous user when authenticating.
+ Default value: <literal>False</literal>
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"choice"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ The index of the user's choice when a question is asked during
+ the mount operation. See the "ask-question" signal.
+ Allowed values: >= 0 Default value: 0
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"domain"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ The domain to use for the mount operation. Default value: <literal>None</literal>
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"password"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ The password that is used for authentication when carrying out the
+ mount operation. Default value: <literal>None</literal>
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"password-save"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ Determines if and how the password information should be saved.
+ Default value: gio.PASSWORD_SAVE_NEVER
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"username"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ The user name that is used for authentication when carrying out the
+ mount operation. Default value: <literal>None</literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1 id="signal-prototypes-giomountoperation">
+ <title>gio.MountOperation Signal Prototypes</title>
+
+ <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-giomountoperation--aborted">"aborted"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giomountoperation--ask-password">"ask-password"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>message</parameter></methodparam>
+ <methodparam><parameter>default_user</parameter></methodparam>
+ <methodparam><parameter>default_domain</parameter></methodparam>
+ <methodparam><parameter>flags</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giomountoperation--ask-question">"ask-question"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>message</parameter></methodparam>
+ <methodparam><parameter>choices</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giomountoperation--reply">"reply"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>result</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ provides a mechanism for authenticating mountable operations, such as loop mounting files,
+ hard drive partitions or server locations.
+ </para>
+ <para>
+ Mounting operations are handed a
+ <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ that then can use if they require any privileges or authentication for their volumes to be
+ mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing
+ a remote server protocol which requires user credentials such as FTP or WebDAV.
+ </para>
+ <para>
+ Users should instantiate a subclass of this that implements all the various callbacks
+ to show the required dialogs, such as
+ <link linkend="class-gtkmountoperation"><classname>gtk.MountOperation</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giomountoperation">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.MountOperation</methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new mount operation.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giomountoperation--get-anonymous">
+ <title>gio.MountOperation.get_anonymous</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_anonymous</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if mount operation is anonymous.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_anonymous</methodname>() method check to see whether
+ the mount operation is being used for an anonymous user
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--get-choice">
+ <title>gio.MountOperation.get_choice</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_choice</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer containing an index of the user's
+ choice from the choice's list, or 0.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_anonymous</methodname>() method gets a choice
+ from the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--get-domain">
+ <title>gio.MountOperation.get_domain</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_domain</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string set to the domain.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_domain</methodname>() method gets the domain
+ of the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--get-password">
+ <title>gio.MountOperation.get_password</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_password</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the password within
+ the mountoperation.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_password</methodname>() method gets a password
+ from the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--get-password-save">
+ <title>gio.MountOperation.get_password_save</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_password_save</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
+ flag.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_password_save</methodname>() method gets the state
+ of saving passwords for the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--get-username">
+ <title>gio.MountOperation.get_username</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_username</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a string containing the user name.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_username</methodname>() method get the user
+ name from the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--reply">
+ <title>gio.MountOperation.reply</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>reply</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>result</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>reply</methodname>() method emits the "reply" signal.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--set-anonymous">
+ <title>gio.MountOperation.set_anonymous</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_anonymous</methodname>
+ <methodparam><parameter role="keyword">anonymous</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>anonymous</parameter>&nbsp;:</term>
+ <listitem><simpara>boolean value.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_anonymous</methodname>() method sets the mount operation
+ to use an anonymous user if anonymous is <literal>True</literal>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--set-choice">
+ <title>gio.MountOperation.set_choice</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_choice</methodname>
+ <methodparam><parameter role="keyword">choice</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>choice</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_choice</methodname>() method sets a default choice for the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--set-domain">
+ <title>gio.MountOperation.set_domain</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_domain</methodname>
+ <methodparam><parameter role="keyword">domain</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>domain</parameter>&nbsp;:</term>
+ <listitem><simpara>the domain to set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_domain</methodname>() method sets the mount operation's domain.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--set-password">
+ <title>gio.MountOperation.set_password</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_password</methodname>
+ <methodparam><parameter role="keyword">password</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>password</parameter>&nbsp;:</term>
+ <listitem><simpara>password to set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_password</methodname>() method sets the mount
+ operation's password to password.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--set-password-save">
+ <title>gio.MountOperation.set_password_save</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_password_save</methodname>
+ <methodparam><parameter role="keyword">save</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>save</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_password_save</methodname>() method sets the state
+ of saving passwords for the mount operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giomountoperation--set-username">
+ <title>gio.MountOperation.set_username</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_username</methodname>
+ <methodparam><parameter role="keyword">username</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>username</parameter>&nbsp;:</term>
+ <listitem><simpara>input username.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_anonymous</methodname>() method sets the user
+ name within op to username.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Signals</title>
+
+ <refsect2 id="signal-giomountoperation--aborted">
+ <title>The "aborted" gio.MountOperation Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mountoperation</parameter>&nbsp;:</term>
+ <listitem><simpara>the mountoperation</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
+ Implementations of <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ should handle this signal by dismissing open password dialogs.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giomountoperation--ask-password">
+ <title>The "ask-password" gio.MountOperation Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>message</parameter></methodparam>
+ <methodparam><parameter>default_user</parameter></methodparam>
+ <methodparam><parameter>default_domain</parameter></methodparam>
+ <methodparam><parameter>flags</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mountoperation</parameter>&nbsp;:</term>
+ <listitem><simpara>the mountoperation</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>message</parameter>&nbsp;:</term>
+ <listitem><simpara>string containing a message to display to the user.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>default_user</parameter>&nbsp;:</term>
+ <listitem><simpara>string containing the default user name.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>default_domain</parameter>&nbsp;:</term>
+ <listitem><simpara>string containing the default domain.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>a set of
+ <xref linkend="gio-ask-password-flags-constants" endterm="gio-ask-password-flags-constants-title"></xref>
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ This signal is emitted when a mount operation asks the user for a password.
+ If the message contains a line break, the first line should be presented as a heading.
+ For example, it may be used as the primary text in a
+ <link linkend="class-gtkmessagedialog"><classname>gtk.MessageDialog</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giomountoperation--ask-question">
+ <title>The "ask-question" gio.MountOperation Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>message</parameter></methodparam>
+ <methodparam><parameter>choices</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mountoperation</parameter>&nbsp;:</term>
+ <listitem><simpara>the mountoperation</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>message</parameter>&nbsp;:</term>
+ <listitem><simpara>string containing a message to display to the user.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>choices</parameter>&nbsp;:</term>
+ <listitem><simpara>a list of strings for each possible choice.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ This signal is emitted when asking the user a question and gives a list of choices
+ for the user to choose from. If the message contains a line break, the first line should be
+ presented as a heading. For example, it may be used as the primary text in a
+ <link linkend="class-gtkmessagedialog"><classname>gtk.MessageDialog</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giomountoperation--reply">
+ <title>The "reply" gio.MountOperation Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>mountoperation</parameter></methodparam>
+ <methodparam><parameter>result</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mountoperation</parameter>&nbsp;:</term>
+ <listitem><simpara>the mountoperation</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>result</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
+ indicating how the request was handled</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ This signal is emitted when the user has replied to the mount operation.
+ </para>
+ </refsect2>
+
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-outputstream.xml b/docs/reference/pygio-outputstream.xml
new file mode 100644
index 0000000..00ddf2e
--- /dev/null
+++ b/docs/reference/pygio-outputstream.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giooutputstream">
+ <refnamediv>
+ <refname>gio.OutputStream</refname>
+ <refpurpose>Base class for implementing streaming input</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.OutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--clear-pending">clear_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--close">close</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--close-async">close_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--close-finish">close_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--flush">flush</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--flush-async">flush_async</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--flush-finish">flush_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--has-pending">has_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--is-closed">is_closed</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--set-pending">set_pending</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--splice">splice</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.OUTPUT_STREAM_SPLICE_NONE</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--splice-async">splice_async</link></methodname>
+ <methodparam><parameter role="keyword">source</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>gio.OUTPUT_STREAM_SPLICE_NONE</initializer></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--splice-finish">splice_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--write">write</link></methodname>
+ <methodparam><parameter role="keyword">buffer</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--write-async">write_async</link></methodname>
+ <methodparam><parameter role="keyword">buffer</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giooutputstream--write-finish">write_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+ has functions to write from a stream (
+ <methodname><link linkend="method-giooutputstream--write">gio.OutputStream.write</link></methodname>()
+ ), to close a stream (
+ <methodname><link linkend="method-giooutputstream--close">gio.OutputStream.close</link></methodname>()
+ ) and to flush pending writes (
+ <methodname><link linkend="method-giooutputstream--flush">gio.OutputStream.flush</link></methodname>()
+ ).
+ </para>
+ <para>
+ To copy the content of an input stream to an output stream without manually
+ handling the reads and writes, use
+ <methodname><link linkend="method-giooutputstream--splice">gio.OutputStream.splice</link></methodname>().
+ </para>
+ <para>
+ All of these functions have async variants too.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+ <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-seekable.xml b/docs/reference/pygio-seekable.xml
new file mode 100644
index 0000000..1081143
--- /dev/null
+++ b/docs/reference/pygio-seekable.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioseekable">
+ <refnamediv>
+ <refname>gio.Seekable</refname>
+ <refpurpose>Stream seeking interface.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Seekable</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioseekable--tell">tell</link></methodname>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioseekable--can_seek">can_seek</link></methodname>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioseekable--seek">seek</link></methodname>
+ <methodparam><parameter role="keyword">offset</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioseekable--can_truncate">can_truncate</link></methodname>
+ </methodsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gioseekable--truncate">truncate</link></methodname>
+ <methodparam><parameter role="keyword">offset</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-gioseekable">gio.Seekable</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Known Implementation</title>
+ <para>
+ <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link> is implemented by
+ <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>,
+ <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>,
+ <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link> and
+ <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+ is implemented by streams (implementations of
+ <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link> or
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>)
+ that support seeking.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gioseekable--tell">
+ <title>gio.Seekable.tell</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>tell</methodname>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>
+ the offset from the beginning of the buffer
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Tells the current position within the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-gioseekable--can_seek">
+ <title>gio.Seekable.can_seek</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_seek</methodname>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if this
+ <classname>gio.Seekable</classname> can be seeked with
+ the <methodname>seek</methodname>() method, <literal>False</literal>
+ if not. </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_seek</methodname>() method checks if the
+ <link linkend="method-gioseekable--seek"><methodname>seek</methodname>()</link>
+ can be used on this <classname>gio.Seekable</classname>.
+ </para>
+ </refsect2>
+ <refsect2 id="method-gioseekable--seek">
+ <title>gio.Seekable.seek</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>seek</methodname>
+ <methodparam><parameter role="keyword">offset</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>offset</parameter>&nbsp;:</term>
+ <listitem><simpara>the offset that is added to the position determined by the <literal>type</literal> parameter.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>0=current position, 1=start of the file, 2=end of the file.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> on successful seek,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Seeks in the stream by the given <literal>offset</literal>, modified by <literal>type</literal>.
+ </para>
+ <para>
+ If <literal>cancellable</literal> is not <literal>None</literal>, then the
+ operation can be cancelled by triggering the cancellable object from another thread.
+ </para>
+ </refsect2>
+ <refsect2 id="method-gioseekable--can_truncate">
+ <title>gio.Seekable.can_truncate</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_truncate</methodname>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if this
+ <classname>gio.Seekable</classname> can be truncated with
+ the <methodname>truncate</methodname>() method, <literal>False</literal>
+ if not. </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_truncate</methodname>() method checks if the
+ <link linkend="method-gioseekable--truncate"><methodname>truncate</methodname>()</link>
+ can be used on this <classname>gio.Seekable</classname>.
+ </para>
+ </refsect2>
+ <refsect2 id="method-gioseekable--truncate">
+ <title>gio.Seekable.truncate</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>truncate</methodname>
+ <methodparam><parameter role="keyword">offset</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>offset</parameter>&nbsp;:</term>
+ <listitem><simpara>the offset at which the stream should be truncated
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if successful,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Truncates a stream with a given <literal>offset</literal>.
+ </para>
+ <para>
+ If <literal>cancellable</literal> is not <literal>None</literal>, then the
+ operation can be cancelled by triggering the cancellable object from another thread.
+ </para>
+ <para>
+ If an operation was partially finished when the operation was cancelled the
+ partial result will be returned, without an error.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-simpleasyncresult.xml b/docs/reference/pygio-simpleasyncresult.xml
new file mode 100644
index 0000000..f6a0787
--- /dev/null
+++ b/docs/reference/pygio-simpleasyncresult.xml
@@ -0,0 +1,317 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giosimpleasyncresult">
+ <refnamediv>
+ <refname>gio.SimpleAsyncResult</refname>
+ <refpurpose>Simple asynchronous results implementation.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.SimpleAsyncResult</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--complete">complete</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">complete_in_idle</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gboolean">get_op_res_gboolean</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gssize">get_op_res_gssize</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--propagate-error">propagate_error</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--set-handle-cancellation">set_handle_cancellation</link></methodname>
+ <methodparam><parameter role="keyword">handle_cancellation</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gboolean">set_op_res_gboolean</link></methodname>
+ <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gssize">set_op_res_gssize</link></methodname>
+ <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giosimpleasyncresult">gio.SimpleAsyncResult</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interface</title>
+ <para>
+ <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link> implements
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ Implements <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ for simple cases. Most of the time, this will be all an application needs, and will be used transparently
+ Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions.
+ </para>
+ <para>
+ <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>
+ handles GAsyncReadyCallbacks, error reporting, operation cancellation and the final state of an
+ operation, completely transparent to the application. Results can be returned as a pointer e.g.
+ for functions that return data that is collected asynchronously, a boolean value for checking the
+ success or failure of an operation, or a gssize for operations which return the number of bytes modified
+ by the operation; all of the simple return cases are covered.
+ </para>
+ <para>
+ Most of the time, an application will not need to know of the details of this API; it is handled
+ transparently, and any necessary operations are handled by GAsyncResult's interface. However, if
+ implementing a new GIO module, for writing language bindings, or for complex applications that need
+ better control of how asynchronous operations are completed, it is important to understand this functionality.
+ </para>
+ <para>
+ <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>
+ are tagged with the calling function to ensure that asynchronous functions and
+ their finishing functions are used together correctly.
+ </para>
+ <!-- NEEDS LOVE
+ <para>
+ To create a new <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>,
+ call g_simple_async_result_new(). If the result needs to be created for a GError, use g_simple_async_result_new_from_error().
+ If a GError is not available (e.g. the asynchronous operation's doesn't take a GError argument), but the result still needs
+ to be created for an error condition, use g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
+ if your application or binding requires passing a variable argument list directly), and the error can then be propegated
+ through the use of g_simple_async_result_propagate_error().
+ </para>
+ -->
+ <para>
+ An asynchronous operation can be made to ignore a cancellation event by calling
+ <methodname><link linkend="method-giosimpleasyncresult--set-handle-cancellation">gio.SimpleAsyncResult.set_handle_cancellation</link></methodname>()
+ with a
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ for the operation and <literal>False</literal>. This is useful for operations that are dangerous to cancel,
+ such as close (which would cause a leak if cancelled before being run).
+ </para>
+ <para>
+ <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+ can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available.
+ <methodname><link linkend="method-giosimpleasyncresult--complete">gio.SimpleAsyncResult.complete</link></methodname>()
+ will finish an I/O task directly within the main event loop.
+ <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">gio.SimpleAsyncResult.complete_in_idle</link></methodname>()
+ will integrate the I/O task into the main event loop as an idle function.
+ <!--
+ and g_simple_async_result_run_in_thread()
+ will run the job in a separate thread.
+ -->
+ </para>
+ <para>
+ To set the results of an asynchronous function,
+ <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gboolean">gio.SimpleAsyncResult.set_op_res_gboolean</link></methodname>(), and
+ <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gssize">gio.SimpleAsyncResult.set_op_res_gssize</link></methodname>()
+ are provided, setting the operation's result to a gboolean, or gssize, respectively.
+ </para>
+ <para>
+ Likewise, to get the result of an asynchronous function,
+ <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gboolean">gio.SimpleAsyncResult.get_op_res_gboolean</link></methodname>() and
+ <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gssize">gio.SimpleAsyncResult.get_op_res_gssize</link></methodname>()
+ are provided, getting the operation's result as a gboolean and gssize, respectively.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giosimpleasyncresult--complete">
+ <title>gio.SimpleAsyncResult.complete</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>complete</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>complete</methodname>() method completes an asynchronous I/O job.
+ Must be called in the main thread, as it invokes the callback that should be called
+ in the main thread. If you are in a different thread use
+ <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">gio.SimpleAsyncResult.complete_in_idle</link></methodname>().
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--complete-in-idle">
+ <title>gio.SimpleAsyncResult.complete_in_idle</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>complete_in_idle</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ </variablelist>
+
+ <para>
+ The <methodname>complete_in_idle</methodname>() method completes an asynchronous
+ function in the main event loop using an idle function.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--get-op-res-gboolean">
+ <title>gio.SimpleAsyncResult.get_op_res_gboolean</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_op_res_gboolean</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the operation's result was
+ <literal>True</literal>, <literal>False</literal> if the operation's result
+ was <literal>False</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_op_res_gboolean</methodname>() method gets the operation
+ result boolean from within the asynchronous result.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--get-op-res-gssize">
+ <title>gio.SimpleAsyncResult.get_op_res_gssize</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_op_res_gssize</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a gssize returned from the asynchronous function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_op_res_gssize</methodname>() method gets a gssize
+ from the asynchronous result.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--propagate-error">
+ <title>gio.SimpleAsyncResult.propagate_error</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>propagate_error</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the error was propegated
+ to dest. <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>propagate_error</methodname>() method propagates an error
+ from within the simple asynchronous result to a given destination.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--set-handle-cancellation">
+ <title>gio.SimpleAsyncResult.set_handle_cancellation</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_handle_cancellation</methodname>
+ <methodparam><parameter role="keyword">handle_cancellation</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">handle_cancellation</parameter>&nbsp;:</term>
+ <listitem><simpara>a boolean.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_handle_cancellation</methodname>() method sets whether
+ to handle cancellation within the asynchronous operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--set-op-res-gboolean">
+ <title>gio.SimpleAsyncResult.set_op_res_gboolean</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_op_res_gboolean</methodname>
+ <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">op_res</parameter>&nbsp;:</term>
+ <listitem><simpara>a boolean.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_op_res_gboolean</methodname>() method sets the operation
+ result to a boolean within the asynchronous result.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giosimpleasyncresult--set-op-res-gssize">
+ <title>gio.SimpleAsyncResult.set_op_res_gssize</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_op_res_gssize</methodname>
+ <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">op_res</parameter>&nbsp;:</term>
+ <listitem><simpara>a gssize.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_op_res_gssize</methodname>() method sets the operation
+ result within the asynchronous result to the given op_res.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-themedicon.xml b/docs/reference/pygio-themedicon.xml
new file mode 100644
index 0000000..fe0e44c
--- /dev/null
+++ b/docs/reference/pygio-themedicon.xml
@@ -0,0 +1,204 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giothemedicon">
+ <refnamediv>
+ <refname>gio.ThemedIcon</refname>
+ <refpurpose>Icon theming support.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.ThemedIcon</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giothemedicon">gio.ThemedIcon</link></methodname>
+ <methodparam></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giothemedicon--append-name">append_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giothemedicon--get-names">get_names</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giothemedicon--prepend-name">prepend_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giothemedicon">gio.ThemedIcon</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giomountoperation">
+ <title>gio.ThemedIcon Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"name"</entry>
+ <entry>Write/Contruct Only</entry>
+ <entry>
+ The icon name. Default value: <literal>None</literal>
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"names"</entry>
+ <entry>Read/Write/Contruct Only</entry>
+ <entry>
+ A list of icon names.
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"use-default-fallbacks"</entry>
+ <entry>Read/Write/Contruct Only</entry>
+ <entry>
+ Whether to use the default fallbacks found by shortening the
+ icon name at '-' characters. If the "names" array has more
+ than one element, ignores any past the first.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+ is an implementation of <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon
+ theme, so that icons can be looked up quickly.
+ </para>
+ <para>
+ <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+ does not provide actual pixmaps for icons, just the icon names. Ideally something like
+ <methodname><link linkend="method-gtkicontheme--choose-icon">gtk.IconTheme.choose_icon</link></methodname>()
+ should be used to resolve the list of names so that fallback icons work nicely
+ with themes that inherit other themes
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giothemedicon">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.ThemedIcon</methodname>
+ <methodparam><parameter>name</parameter></methodparam>
+ <methodparam><parameter>use_default_fallbacks</parameter><initializer><literal>False</literal></initializer></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing an icon name.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new themed icon from icon name, if instead of an icon name you
+ provide a list of icon names, the <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+ will be constructed using the items in the list.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giothemedicon--append-name">
+ <title>gio.ThemedIcon.append_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>append_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>name</emphasis>&nbsp;:</term>
+ <listitem><simpara>name of icon to append to list of icons from within icon.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>append_name</methodname>() method appends a name to
+ the list of icons from within icon.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giothemedicon--get-names">
+ <title>gio.ThemedIcon.get_names</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_names</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of icon names.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_names</methodname>() method gets the names
+ of icons from within icon.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giothemedicon--prepend-name">
+ <title>gio.ThemedIcon.prepend_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>prepend_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>name</emphasis>&nbsp;:</term>
+ <listitem><simpara>name of icon to prepend to list of icons from within icon.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>prepend_name</methodname>() method prepends a name to
+ the list of icons from within icon.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-unixinputstream.xml b/docs/reference/pygio-unixinputstream.xml
new file mode 100644
index 0000000..5ef4cde
--- /dev/null
+++ b/docs/reference/pygio-unixinputstream.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giounixinputstream">
+ <refnamediv>
+ <refname>gio.unix.InputStream</refname>
+ <refpurpose>Streaming input operations for UNIX file descriptors.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.unix.InputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giounixinputstream">gio.unix.InputStream</link></methodname>
+ <methodparam><parameter role="keyword">fd</parameter></methodparam>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giounixinputstream--get-close-fd">get_close_fd</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giounixinputstream--get-fd">get_fd</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giounixinputstream--set-close-fd">set_close_fd</link></methodname>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+ +-- <link linkend="class-giounixinputstream">gio.unix.InputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giounixinputstream">
+ <title>gio.unix.InputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"close-fd"</entry>
+ <entry>Read - Write</entry>
+ <entry>Whether to close the file descriptor when the stream is closed.
+ Default value: <literal>True</literal>.</entry>
+ </row>
+ <row valign="top">
+ <entry>"fd"</entry>
+ <entry>Read - Write - Construct only</entry>
+ <entry>The file descriptor that the stream reads from. Default value: -1.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+ implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ for reading from a UNIX file descriptor, including asynchronous operations.
+ The file descriptor must be selectable, so it doesn't work with opened files.
+ </para>
+ <para>
+ Note that <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+ belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+ when using it.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giounixinputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.unix.InputStream</methodname>
+ <methodparam><parameter role="keyword">fd</parameter></methodparam>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>fd</parameter>&nbsp;:</term>
+ <listitem><simpara>a UNIX file descriptor.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>close_fd</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal>
+ to close the file descriptor when done
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+ from the given fd.
+ </para>
+ <para>
+ If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giounixinputstream--get-close-fd">
+ <title>gio.unix.InputStream.get_close_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_close_fd</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_close_fd</methodname>() method returns whether the file
+ descriptor of stream will be closed when the stream is closed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giounixinputstream--get-fd">
+ <title>gio.unix.InputStream.get_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_fd</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The file descriptor of stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_fd</methodname>() method return the UNIX file descriptor
+ that the stream reads from.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giounixinputstream--set-close-fd">
+ <title>gio.unix.InputStream.set_close_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_close_fd</methodname>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">close_fd</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> to close the file descriptor when done .
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
+ of stream shall be closed when the stream is closed.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-unixoutputstream.xml b/docs/reference/pygio-unixoutputstream.xml
new file mode 100644
index 0000000..02e4be8
--- /dev/null
+++ b/docs/reference/pygio-unixoutputstream.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giounixoutputstream">
+ <refnamediv>
+ <refname>gio.unix.OutputStream</refname>
+ <refpurpose>Streaming output operations for UNIX file descriptors.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.unix.OutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giounixoutputstream">gio.unix.OutputStream</link></methodname>
+ <methodparam><parameter role="keyword">fd</parameter></methodparam>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giounixoutputstream--get-close-fd">get_close_fd</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giounixoutputstream--get-fd">get_fd</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giounixoutputstream--set-close-fd">set_close_fd</link></methodname>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+ +-- <link linkend="class-giounixoutputstream">gio.unix.OutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giounixoutputstream">
+ <title>gio.unix.OutputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"close-fd"</entry>
+ <entry>Read - Write</entry>
+ <entry>Whether to close the file descriptor when the stream is closed.
+ Default value: <literal>True</literal>.</entry>
+ </row>
+ <row valign="top">
+ <entry>"fd"</entry>
+ <entry>Read - Write - Construct only</entry>
+ <entry>The file descriptor that the stream writes to. Default value: -1.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+ implements <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+ for writing to a UNIX file descriptor, including asynchronous operations.
+ The file descriptor must be selectable, so it doesn't work with opened files.
+ </para>
+ <para>
+ Note that <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+ belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+ when using it.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giounixoutputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.unix.OutputStream</methodname>
+ <methodparam><parameter role="keyword">fd</parameter></methodparam>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>fd</parameter>&nbsp;:</term>
+ <listitem><simpara>a UNIX file descriptor.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>close_fd</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal>
+ to close the file descriptor when done
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+ from the given fd.
+ </para>
+ <para>
+ If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giounixoutputstream--get-close-fd">
+ <title>gio.unix.OutputStream.get_close_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_close_fd</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_close_fd</methodname>() method returns whether the file
+ descriptor of stream will be closed when the stream is closed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giounixoutputstream--get-fd">
+ <title>gio.unix.OutputStream.get_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_fd</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The file descriptor of stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_fd</methodname>() method return the UNIX file descriptor
+ that the stream reads from.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giounixoutputstream--set-close-fd">
+ <title>gio.unix.OutputStream.set_close_fd</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_close_fd</methodname>
+ <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">close_fd</parameter>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> to close the file descriptor when done .
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
+ of stream shall be closed when the stream is closed.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-volume.xml b/docs/reference/pygio-volume.xml
new file mode 100644
index 0000000..cf0fa50
--- /dev/null
+++ b/docs/reference/pygio-volume.xml
@@ -0,0 +1,718 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giovolume">
+ <refnamediv>
+ <refname>gio.Volume</refname>
+ <refpurpose>Volume management.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.Volume</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--can-eject">can_eject</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--can-mount">can_mount</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--eject">eject</link></methodname>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--eject-finish">eject_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--enumerate-identifiers">enumerate_identifiers</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-activation-root">get_activation_root</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-drive">get_drive</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-icon">get_icon</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-identifier">get_identifier</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-mount">get_mount</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-name">get_name</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--get-uuid">get_uuid</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--mount">mount</link></methodname>
+ <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+ <methodparam><parameter role="keyword">callback</parameter></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_MOUNT_NONE</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--mount-finish">mount_finish</link></methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolume--should-automount">should_automount</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+ +-- <link linkend="class-giovolume">gio.Volume</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Prerequisites</title>
+ <para>
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link> requires
+ <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1 id="signal-prototypes-giovolume">
+ <title>gio.Volume Signal Prototypes</title>
+
+ <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-giovolume--changed">"changed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolume--removed">"removed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ interface represents user-visible objects that can be mounted. Note, when porting
+ from GnomeVFS, <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ is the moral equivalent of GnomeVFSDrive.
+ </para>
+ <para>
+ Mounting a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ instance is an asynchronous operation. For more information about asynchronous operations.
+ To mount a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>, first call
+ <methodname><link linkend="method-giovolume--mount">gio.Volume.mount</link></methodname>()
+ with (at least) the <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ instance, optionally a
+ <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ object and a GAsyncReadyCallback.
+ </para>
+ <para>
+ Typically, one will only want to pass <literal>None</literal> for the GMountOperation
+ if automounting all volumes when a desktop session starts since it's not desirable
+ to put up a lot of dialogs asking for credentials.
+ </para>
+ <para>
+ The callback will be fired when the operation has resolved (either with success or failure),
+ and a GAsyncReady structure will be passed to the callback. That callback should then call
+ <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
+ with the GVolume instance and the GAsyncReady data to see if the operation was completed
+ successfully. If an error is present when
+ <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
+ is called, then it will be filled with any error information.
+ </para>
+ <para>
+ It is sometimes necessary to directly access the underlying operating system object behind a volume
+ (e.g. for passing a volume to an application via the commandline). For this purpose, GIO allows to obtain
+ an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs,
+ filesystem labels, traditional Unix devices (e.g. /dev/sda2), uuids. GIO uses predefind strings
+ as names for the different kinds of identifiers:
+ "hal-udi", "label", etc. Use
+ <methodname><link linkend="method-giovolume--get-identifier">gio.Volume.get_identifier</link></methodname>()
+ to obtain an identifier for a volume.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giovolume--can-eject">
+ <title>gio.Volume.can_eject</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_eject</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the volume can be ejected,
+ <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_eject</methodname>() method checks if a volume can be ejected.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--can-mount">
+ <title>gio.Volume.can_mount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>can_mount</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the volume can be mounted
+ for media changes, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>can_mount</methodname>() method checks if a volume
+ can be mounted.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--eject">
+ <title>gio.Volume.eject</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject</methodname>
+ <methodparam>
+ <parameter role="keyword">callback</parameter>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags affecting the unmount if required for eject.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject</methodname>() method asynchronously ejects a volume.
+ </para>
+ <para>
+ When the operation is finished, callback will be called. You can then call
+ <methodname><link linkend="method-giovolume--eject-finish">gio.Volume.eject_finish</link></methodname>()
+ to obtain the result of the operation.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--eject-finish">
+ <title>gio.Volume.eject_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>eject_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the volume has been ejected
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>eject_finish</methodname>() method finishes ejecting a volume.
+ If any errors occured during the operation, error will be set to contain the
+ errors and <literal>False</literal> will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--enumerate-identifiers">
+ <title>gio.Volume.enumerate_identifiers</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>enumerate_identifiers</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of strings containing kinds of identifiers.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>enumerate_identifiers</methodname>() method gets the kinds
+ of identifiers that volume has. Use
+ <methodname><link linkend="method-giovolume--get-identifier">gio.Volume.get_identifier</link></methodname>()
+ to obtain the identifiers themselves.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-activation-root">
+ <title>gio.Volume.get_activation_root</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_activation_root</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the activation root of volume or <literal>None</literal>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_activation_root</methodname>() method gets the activation
+ root for a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ if it is known ahead of mount time. Returns <literal>None</literal> otherwise.
+ If not <literal>None</literal> and if volume is mounted, then the result of
+ <methodname><link linkend="method-giomount--get-root">gio.Mount.get_root</link></methodname>()
+ on the GMount object obtained from
+ <methodname><link linkend="method-giovolume--get-mount">gio.Volume.get_mount</link></methodname>()
+ will always either be equal or a prefix of what this function returns.
+ In other words, in code:
+ </para>
+<programlisting>
+mount = volume.get_mount() # mounted, so never None
+mount_root = mount.get_root()
+volume_activation_root = volume.get_activation_root() # assume not None
+</programlisting>
+ <para>
+ then the expression
+ </para>
+<programlisting>
+volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mount_root)
+</programlisting>
+ <para>
+ will always be <literal>True</literal>.
+ </para>
+ <para>
+ Activation roots are typically used in
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ implementations to find the underlying mount to shadow, see
+ <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
+ for more details.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-drive">
+ <title>gio.Volume.get_drive</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_drive</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+ or <literal>None</literal> if volume is not associated with a drive.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_drive</methodname>() method gets the drive for the volume.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-icon">
+ <title>gio.Volume.get_icon</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_icon</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+ for the volume.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_icon</methodname>() method gets the icon for volume.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-identifier">
+ <title>gio.Volume.get_identifier</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_identifier</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A string containing the requested identfier, or
+ <literal>None</literal> if the
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ doesn't have this kind of identifier.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_identifier</methodname>() method gets the identifier of
+ the given kind for volume.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-mount">
+ <title>gio.Volume.get_mount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_mount</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ or <literal>None</literal> if volume isn't mounted.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_mount</methodname>() method gets the mount for the volume.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-name">
+ <title>gio.Volume.get_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_name</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A string containing volume's name.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_name</methodname>() method gets the name of volume.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--get-uuid">
+ <title>gio.Volume.get_uuid</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_uuid</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the UUID for volume or <literal>None</literal>
+ if no UUID can be computed.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_uuid</methodname>() method gets the UUID for the volume.
+ The reference is typically based on the file system UUID for the volume in
+ question and should be considered an opaque string.
+ Returns <literal>None</literal> if there is no UUID available.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--mount">
+ <title>gio.Volume.mount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>mount</methodname>
+ <methodparam>
+ <parameter role="keyword">mount_operation</parameter>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">callback</parameter>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_MOUNT_NONE</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ <methodparam>
+ <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+ </methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">mount_operation</parameter>&nbsp;:</term>
+ <listitem><simpara>A
+ <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+ or <literal>None</literal> to avoid user interaction.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+ <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>Flags affecting the operation
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>Optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>The data to pass to callback function.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>mount</methodname>() method mounts a volume. This is an
+ asynchronous operation, and is finished by calling
+ <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
+ with the volume and GAsyncResult returned in the callback.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--mount-finish">
+ <title>gio.Volume.mount_finish</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>mount_finish</methodname>
+ <methodparam><parameter role="keyword">result</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the volume has been mounted
+ successfully, <literal>False</literal> otherwise.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>mounted</methodname>() method finishes mounting a volume.
+ If any errors occured during the operation, error will be set to contain
+ the errors and <literal>False</literal> will be returned.
+ </para>
+ <para>
+ If the mount operation succeeded,
+ <methodname><link linkend="method-giovolume--get-mount">get_mount</link></methodname>()
+ on volume is guaranteed to return the mount right after calling this function;
+ there's no need to listen for the 'mount-added' signal on
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolume--should-automount">
+ <title>gio.Volume.should_automount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>should_automount</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if the volume should
+ be automatically mounted.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>should_automount</methodname>() method returns whether
+ the volume should be automatically mounted.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Signals</title>
+
+ <refsect2 id="signal-giovolume--changed">
+ <title>The "changed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when the volume has been changed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolume--removed">
+ <title>The "removed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ This signal is emitted when the
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ have been removed. If the recipient is holding references to the object
+ they should release them so the object can be finalized.
+ </para>
+ </refsect2>
+
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-volumemonitor.xml b/docs/reference/pygio-volumemonitor.xml
new file mode 100644
index 0000000..399d07e
--- /dev/null
+++ b/docs/reference/pygio-volumemonitor.xml
@@ -0,0 +1,844 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giovolumemonitor">
+ <refnamediv>
+ <refname>gio.VolumeMonitor</refname>
+ <refpurpose>Volume Monitor.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.VolumeMonitor</classname></ooclass>
+ <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolumemonitor--get-connected-drives">get_connected_drives</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolumemonitor--get-mount-for-uuid">get_mount_for_uuid</link></methodname>
+ <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolumemonitor--get-mounts">get_mounts</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolumemonitor--get-volume-for-uuid">get_volume_for_uuid</link></methodname>
+ <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giovolumemonitor--get-volumes">get_volumes</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
+ </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+ <methodname><link linkend="function-gio--volume-monitor-adopt-orphan-mount">gio.volume_monitor_adopt_orphan_mount</link></methodname>
+ <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-gio--volume-monitor-get">gio.volume_monitor_get</link></methodname>
+ <methodparam></methodparam>
+</methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-giovolumemonitor">gio.VolumeMonitor</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="signal-prototypes-giovolumemonitor">
+ <title>gio.VolumeMonitor Signal Prototypes</title>
+
+ <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+
+ <variablelist>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--drive-changed">"drive-changed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--drive-connected">"drive-connected"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--drive-disconnected">"drive-disconnected"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--drive-eject-button">"drive-eject-button"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--mount-added">"mount-added"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--mount-changed">"mount-changed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--mount-pre-unmount">"mount-pre-unmount"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--mount-removed">"mount-removed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--volume-added">"volume-added"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--volume-changed">"volume-changed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><link linkend="signal-giovolumemonitor--volume-removed">"volume-removed"</link></term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ The <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ is for listing the user interesting devices and volumes on the computer. In other words,
+ what a file selector or file manager would show in a sidebar.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giovolumemonitor--get-connected-drives">
+ <title>gio.VolumeMonitor.get_connected_drives</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_connected_drives</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of connected
+ <link linkend="class-giodrive"><classname>gio.Drive</classname></link> objects.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_connected_drives</methodname>() method gets a list
+ of drives connected to the system.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolumemonitor--get-mount-for-uuid">
+ <title>gio.VolumeMonitor.get_mount_for_uuid</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_mount_for_uuid</methodname>
+ <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">uuid</parameter>&nbsp;:</term>
+ <listitem><simpara>The UUID to look for.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ or <literal>None</literal> if no such mount is available.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_mount_for_uuid</methodname>() method finds a
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ object by it's UUID (see
+ <methodname><link linkend="method-giomount--get-uuid">gio.Mount.get_uuid</link></methodname>())
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolumemonitor--get-mounts">
+ <title>gio.VolumeMonitor.get_mounts</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_mounts</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list of
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ objects.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_mounts</methodname>() method gets a list of the mounts on the system.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolumemonitor--get-volume-for-uuid">
+ <title>gio.VolumeMonitor.get_volume_for_uuid</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_volume_for_uuid</methodname>
+ <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">uuid</parameter>&nbsp;:</term>
+ <listitem><simpara>The UUID to look for.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ or <literal>None</literal> if no such volume is available.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_mount_for_uuid</methodname>() method finds a
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ object by it's UUID (see
+ <methodname><link linkend="method-giomount--get-uuid">gio.Mount.get_uuid</link></methodname>())
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giovolumemonitor--get-volumes">
+ <title>gio.VolumeMonitor.get_volumes</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_volumes</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A list of
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ objects.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_volumes</methodname>() method gets a list of the volumes on the system.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gio--volume-monitor-adopt-orphan-mount">
+ <title>gio.volume_monitor_adopt_orphan_mount</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>volume_monitor_adopt_orphan_mount</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>The <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ object that is the parent for mount or <literal>None</literal> if no wants to adopt the
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <warning>
+ <para>This method will be deprecated starting from GIO 2.20</para>
+ </warning>
+
+ <para>
+ The <methodname>volume_monitor_adopt_orphan_mount</methodname>() function should
+ be called by any <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ implementation when a new <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ object is created that is not associated with a
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link> object.
+ It must be called just before emitting the mount_added signal.
+ </para>
+ <para>
+ If the return value is not <literal>None</literal>, the caller must associate the returned
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ object with the
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>.
+ This involves returning it in it's
+ <methodname><link linkend="method-giomount--get-volumes">gio.Mount.get_volumes</link></methodname>()
+ implementation. The caller must also listen for the "removed" signal on the
+ returned object and give up it's reference when handling that signal
+ </para>
+ <para>
+ Similary, if implementing
+ <methodname><link linkend="function-gio--volume-monitor-adopt-orphan-mount">gio.volume_monitor_adopt_orphan_mount</link></methodname>(),
+ the implementor must take a reference to mount and return it in it's
+ <methodname><link linkend="method-giovolume--get-mount">gio.Volume.get_mount</link></methodname>()
+ implemented. Also, the implementor must listen for the "unmounted" signal
+ on mount and give up it's reference upon handling that signal.
+ </para>
+ <para>
+ There are two main use cases for this function.
+ </para>
+ <para>
+ One is when implementing a user space file system driver that reads blocks of
+ a block device that is already represented by the native volume monitor
+ (for example a CD Audio file system driver). Such a driver will generate it's own
+ <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+ object that needs to be assoicated with the
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ object that represents the volume.
+ </para>
+ <para>
+ The other is for implementing a
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ whose sole purpose is to return
+ <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+ objects representing entries in the users "favorite servers" list or similar.
+ </para>
+ </refsect2>
+
+ <refsect2 id="function-gio--volume-monitor-get">
+ <title>gio.volume_monitor_get</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>volume_monitor_get</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>A reference to the
+ <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+ used by gio.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>volume_monitor_get</methodname>() function gets the
+ volume monitor used by gio.
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
+ <title>Signals</title>
+
+ <refsect2 id="signal-giovolumemonitor--drive-changed">
+ <title>The "drive-changed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>drive</parameter>&nbsp;:</term>
+ <listitem><simpara>the drive that changed</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a drive changes.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--drive-connected">
+ <title>The "drive-connected" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>drive</parameter>&nbsp;:</term>
+ <listitem><simpara>the drive that was connected</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a drive is connected to the system.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--drive-disconnected">
+ <title>The "drive-disconnected" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>drive</parameter>&nbsp;:</term>
+ <listitem><simpara>the drive that was disconnected</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a drive is disconnected from the system.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--drive-eject-button">
+ <title>The "drive-eject-button" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>drive</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>drive</parameter>&nbsp;:</term>
+ <listitem><simpara>the drive where the eject button was pressed</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when the eject button is pressed on drive.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--mount-added">
+ <title>The "mount-added" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>a Mount that was added.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a mount is added.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--mount-changed">
+ <title>The "mount-changed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>the Mount that changed.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a mount changes.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--mount-pre-unmount">
+ <title>The "mount-pre-unmount" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>the Mount that is being unmounted.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a mount is about to be removed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--mount-removed">
+ <title>The "mount-removed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>mount</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>mount</parameter>&nbsp;:</term>
+ <listitem><simpara>the Mount that was removed.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a mount is removed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--volume-added">
+ <title>The "volume-added" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>volume</parameter>&nbsp;:</term>
+ <listitem><simpara>a Volume that was added.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a mountable volume is added to the system.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--volume-changed">
+ <title>The "volume-changed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>volume</parameter>&nbsp;:</term>
+ <listitem><simpara>a Volume that changed.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when mountable volume is changed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="signal-giovolumemonitor--volume-removed">
+ <title>The "volume-removed" gio.Volume Signal</title>
+
+ <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>volume_monitor</parameter></methodparam>
+ <methodparam><parameter>volume</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+ <listitem><simpara>the volume monitor</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>volume</parameter>&nbsp;:</term>
+ <listitem><simpara>a Volume that was removed.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+ with the <link
+ linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+ method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Emitted when a mountable volume is removed from the system.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>
diff --git a/docs/reference/pygiounix-classes.xml b/docs/reference/pygiounix-classes.xml
new file mode 100644
index 0000000..72b0081
--- /dev/null
+++ b/docs/reference/pygiounix-classes.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="giounix-class-reference"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGio Unix Class Reference</title>
+
+<!-- GIOUNIX CLASSES -->
+<xi:include href="pygio-unixinputstream.xml"/>
+<xi:include href="pygio-unixoutputstream.xml"/>
+
+</chapter>
diff --git a/docs/reference/pyglib-classes.xml b/docs/reference/pyglib-classes.xml
new file mode 100644
index 0000000..ecc4e5b
--- /dev/null
+++ b/docs/reference/pyglib-classes.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="glib-class-reference"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGlibClass Reference</title>
+
+<!-- GLIB CLASSES -->
+<xi:include href="pyglib-maincontext.xml"/>
+<xi:include href="pyglib-mainloop.xml"/>
+<xi:include href="pyglib-functions.xml"/>
+<xi:include href="pyglib-constants.xml"/>
+
+</chapter>
diff --git a/docs/reference/pyglib-constants.xml b/docs/reference/pyglib-constants.xml
new file mode 100644
index 0000000..0f1bf8d
--- /dev/null
+++ b/docs/reference/pyglib-constants.xml
@@ -0,0 +1,282 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="glib-constants">
+ <refnamediv>
+ <refname>glib Constants</refname>
+ <refpurpose>the built-in constants of the glib module</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <programlisting>
+<xref linkend="glib-io-condition-constants" endterm="glib-io-condition-constants-title"></xref>
+<xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+<xref linkend="glib-spawn-flag-constants" endterm="glib-spawn-flag-constants-title"></xref>
+<xref linkend="glib-user-directory-constants" endterm="glib-user-directory-constants-title"></xref>
+<xref linkend="glib-version-constants" endterm="glib-version-constants-title"></xref>
+</programlisting>
+
+ </refsect1>
+
+ <refsect1 id="glib-constants-description">
+ <title>Description</title>
+
+ <refsect2 id="glib-io-condition-constants">
+ <title id="glib-io-condition-constants-title">Glib IO Condition Constants</title>
+
+ <para>The IO Condition constants are a set of bit-flags that specify a
+condition to watch for on an event source.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>glib.IO_IN</literal></term>
+ <listitem>
+ <simpara>There is data to read</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_OUT</literal></term>
+ <listitem>
+ <simpara>Data can be written (without blocking).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_PRI</literal></term>
+ <listitem>
+ <simpara>There is urgent data to read.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_ERR</literal></term>
+ <listitem>
+ <simpara>Error condition.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_HUP</literal></term>
+ <listitem>
+ <simpara>Hung up (the connection has been broken, usually for
+ pipes and sockets).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_NVAL</literal></term>
+ <listitem>
+ <simpara>Invalid request. The file descriptor is not
+ open.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="glib-priority-constants">
+ <title id="glib-priority-constants-title">Glib Priority Constants</title>
+
+ <para>The Priority constants specify </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>glib.PRIORITY_HIGH</literal></term>
+ <listitem>
+ <simpara>Use this for high priority event sources.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.PRIORITY_DEFAULT</literal></term>
+ <listitem>
+ <simpara>Use this for default priority event sources. This
+ priority is used when adding timeout functions with the <link
+ linkend="function-glib--timeout-add"><function>glib.timeout_add</function>()</link>
+ function. This priority is also used for events from the X
+ server.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.PRIORITY_HIGH_IDLE</literal></term>
+ <listitem>
+ <simpara>Use this for high priority idle functions. For example,
+ glib.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
+ and, glib.PRIORITY_HIGH_IDLE + 20, for redrawing
+ operations. (This is done to ensure that any pending resizes are
+ processed before any pending redraws, so that widgets are not
+ redrawn twice unnecessarily.)</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.PRIORITY_DEFAULT_IDLE</literal></term>
+ <listitem>
+ <simpara>Use this for default priority idle functions. This
+ priority is used when adding idle functions with the <link
+ linkend="function-glib--idle-add"><function>glib.idle_add</function>()</link>
+ function.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.PRIORITY_LOW</literal></term>
+ <listitem>
+ <simpara>Use this for very low priority background
+ tasks.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="glib-spawn-flag-constants">
+ <title id="glib-spawn-flag-constants-title">Glib Spawn Flag Constants</title>
+
+ <para>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+function.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal></term>
+ <listitem>
+ <simpara>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <function>exec</function>() in the child.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal></term>
+ <listitem>
+ <simpara>the child will not be automatically reaped; you must
+call <function>waitpid</function>() or handle <literal>SIGCHLD</literal>
+yourself, or the child will become a zombie.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.SPAWN_SEARCH_PATH</literal></term>
+ <listitem>
+ <simpara><parameter>argv</parameter>[0] need not be an absolute
+path, it will be looked for in the user's <envar>PATH</envar>.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.SPAWN_STDOUT_TO_DEV_NULL</literal></term>
+ <listitem>
+ <simpara>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.SPAWN_STDERR_TO_DEV_NULL</literal></term>
+ <listitem>
+ <simpara>the child's standard error will be discarded.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.SPAWN_CHILD_INHERITS_STDIN</literal></term>
+ <listitem>
+ <simpara>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.SPAWN_FILE_AND_ARGV_ZERO</literal></term>
+ <listitem>
+ <simpara>the first element of <parameter>argv</parameter> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+uses <parameter>argv</parameter>[0] as the file to execute, and passes all
+of <parameter>argv</parameter> to the child.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="glib-user-directory-constants">
+ <title id="glib-user-directory-constants-title">Glib User Directory Constants</title>
+
+ <para>The User Directory constants are integer values that are currently used only as arguments to
+ <link linkend="function-glib--get-user-special-dir"><function>glib.get_user_special_dir</function>()</link>
+ function. See function documentation for details.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_DESKTOP</literal></term>
+ <listitem>
+ <simpara>the user's Desktop directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_DOCUMENTS</literal></term>
+ <listitem>
+ <simpara>the user's Documents directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_DOWNLOAD</literal></term>
+ <listitem>
+ <simpara>the user's Downloads directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_MUSIC</literal></term>
+ <listitem>
+ <simpara>the user's Music directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_PICTURES</literal></term>
+ <listitem>
+ <simpara>the user's Pictures directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_PUBLIC_SHARE</literal></term>
+ <listitem>
+ <simpara>the user's shared directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_TEMPLATES</literal></term>
+ <listitem>
+ <simpara>the user's Templates directory</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.USER_DIRECTORY_VIDEOS</literal></term>
+ <listitem>
+ <simpara>the user's Movies directory</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
+
+ <refsect2 id="glib-version-constants">
+ <title id="glib-version-constants-title">Glib Version Constants</title>
+ <para>The Version constants specify the version of
+<literal>Glib</literal> used by PyGObject as a 3-tuple containing the major,
+minor and patch release numbers.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>glib.glib_version</literal></term>
+ <listitem>
+ <simpara>A 3-tuple containing (major, minor, patch) release
+ numbers of glib.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.pyglib_version</literal></term>
+ <listitem>
+ <simpara>A 3-tuple containing (major, minor, patch) release
+ numbers of the python bindings.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pyglib-functions.xml b/docs/reference/pyglib-functions.xml
new file mode 100644
index 0000000..358fa83
--- /dev/null
+++ b/docs/reference/pyglib-functions.xml
@@ -0,0 +1,1047 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="glib-functions">
+ <refnamediv>
+ <refname>glib Functions</refname>
+ <refpurpose>miscellaneous functions</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <programlisting>
+<methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--idle-add">glib.idle_add</link></methodname>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--timeout-add">glib.timeout_add</link></methodname>
+ <methodparam><parameter>interval</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--timeout-add-seconds">glib.timeout_add_seconds</link></methodname>
+ <methodparam><parameter>interval</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--io-add-watch">glib.io_add_watch</link></methodname>
+ <methodparam><parameter>fd</parameter></methodparam>
+ <methodparam><parameter>condition</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--source-remove">glib.source_remove</link></methodname>
+ <methodparam><parameter>tag</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--main-context-default">glib.main_context_default</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--markup-escape-text">glib.markup_escape_text</link></methodname>
+ <methodparam><parameter role="keyword">text</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link linkend="function-glib--child-watch-add">glib.child_watch_add</link></methodname>
+ <methodparam><parameter role="keyword">pid</parameter></methodparam>
+ <methodparam><parameter role="keyword">function</parameter></methodparam>
+ <methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--spawn-async">glib.spawn_async</link></methodname>
+ <methodparam><parameter role="keyword">argv</parameter></methodparam>
+ <methodparam><parameter role="keyword">envp</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">working_directory</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">child_setup</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">standard_input</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">standard_output</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">standard_error</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--get-current-time">glib.get_current_time</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+ linkend="function-glib--get-user-cache-dir">glib.get_user_cache_dir</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+ linkend="function-glib--get-user-config-dir">glib.get_user_config_dir</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+ linkend="function-glib--get-user-data-dir">glib.get_user_data_dir</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+ linkend="function-glib--get-user-special-dir">glib.get_user_special_dir</link></methodname>
+ <methodparam><parameter role="keyword">directory</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--main-depth">glib.main_depth</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--threads-init">glib.threads_init</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--filename-display-name">glib.filename_display_name</link></methodname>
+ <methodparam><parameter>filename</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--filename-display-basename">glib.filename_display_basename</link></methodname>
+ <methodparam><parameter>filename</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-glib--filename-from-utf8">glib.filename_from_utf8</link></methodname>
+ <methodparam><parameter>utf8string</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>These functions are part of the <literal>PyGObject</literal> glib
+module but are not directly associated with a specific class.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-glib--idle-add">
+ <title>glib.idle_add</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.idle_add</methodname>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a function to call when
+<literal>PyGTK</literal> is idle</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>optionals arguments to be passed to
+<parameter>callback</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer ID</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>glib.idle_add</function>() function adds a
+function (specified by <parameter>callback</parameter>) to be called
+whenever there are no higher priority events pending to the default main
+loop. The function is given the default idle priority,
+<literal>glib.PRIORITY_DEFAULT_IDLE</literal>. Additional arguments to
+pass to <parameter>callback</parameter> can be specified after
+<parameter>callback</parameter>. The idle priority can be specified as a
+keyword-value pair with the keyword "priority". If
+<parameter>callback</parameter> returns <literal>FALSE</literal> it is
+automatically removed from the list of event sources and will not be called
+again.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--timeout-add">
+ <title>glib.timeout_add</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.timeout_add</methodname>
+ <methodparam><parameter>interval</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>interval</parameter>&nbsp;:</term>
+ <listitem><simpara>the time between calls to the function, in
+milliseconds </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>the function to call</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>zero or more arguments that will be passed to
+<parameter>callback</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer ID of the event
+source</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>glib.timeout_add</function>() function sets a
+function (specified by <parameter>callback</parameter>) to be called at
+regular intervals (specified by <parameter>interval</parameter>, with the
+default priority, <literal>glib.PRIORITY_DEFAULT</literal>. Additional
+arguments to pass to <parameter>callback</parameter> can be specified after
+<parameter>callback</parameter>. The idle priority may be specified as a
+keyword-value pair with the keyword "priority".</para>
+
+ <para>The function is called repeatedly until it returns
+<literal>FALSE</literal>, at which point the timeout is automatically
+destroyed and the function will not be called again. The first call to the
+function will be at the end of the first interval. Note that timeout
+functions may be delayed, due to the processing of other event sources. Thus
+they should not be relied on for precise timing. After each call to the
+timeout function, the time of the next timeout is recalculated based on the
+current time and the given interval (it does not try to 'catch up' time lost
+in delays).</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--timeout-add-seconds">
+ <title>glib.timeout_add_seconds</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.timeout_add_seconds</methodname>
+ <methodparam><parameter>interval</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>interval</parameter>&nbsp;:</term>
+ <listitem><simpara>the time between calls to the function, in
+seconds </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>the function to call</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>zero or more arguments that will be passed to
+<parameter>callback</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer ID of the event
+source</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>glib.timeout_add_seconds</function>() is similar to
+ <function>glib.timeout_add</function>() except
+ that <parameter>interval</parameter> must be specified in seconds, not
+ milliseconds, and the function should cause less CPU wakeups, which is important
+ for laptops' batteries.</para>
+
+ <para>Unlike <function>glib.timeout_add</function>(), this function operates at
+ whole second granularity. The initial starting point of the timer is determined
+ by the implementation and the implementation is expected to group multiple timers
+ together so that they fire all at the same time. To allow this grouping, the
+ interval to the first timer is rounded and can deviate up to one second from the
+ specified interval. Subsequent timer iterations will generally run at the
+ specified interval.</para>
+
+ <para>Note that timeout functions may be delayed, due to the processing of other
+ event sources. Thus they should not be relied on for precise timing. After each
+ call to the timeout function, the time of the next timeout is recalculated based
+ on the current time and the given interval.</para>
+
+ <para>The grouping of timers to fire at the same time results in a more power and
+ CPU efficient behavior so if your timer is in multiples of seconds and you don't
+ require the first timer exactly one second from now, the use of
+ <function>glib.timeout_add_seconds</function>() is preferred
+ over <function>glib.timeout_add</function>().</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--io-add-watch">
+ <title>glib.io_add_watch</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.io_add_watch</methodname>
+ <methodparam><parameter>fd</parameter></methodparam>
+ <methodparam><parameter>condition</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>fd</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python file object or an integer file
+descriptor ID</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>condition</parameter>&nbsp;:</term>
+ <listitem><simpara>a condition mask</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>callback</parameter>&nbsp;:</term>
+ <listitem><simpara>a function to call</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional arguments to pass to
+<parameter>callback</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer ID of the event source</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>glib.io_add_watch</function>() function
+arranges for the file (specified by <parameter>fd</parameter>) to be
+monitored by the main loop for the specified
+<parameter>condition</parameter>. <parameter>fd</parameter> may be a Python
+file object or an integer file descriptor. The value of condition is a
+combination of:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>glib.IO_IN</literal></term>
+ <listitem>
+ <simpara>There is data to read.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_OUT</literal></term>
+ <listitem>
+ <simpara>Data can be written (without blocking). </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_PRI</literal></term>
+ <listitem>
+ <simpara>There is urgent data to read.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_ERR</literal></term>
+ <listitem>
+ <simpara>Error condition.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>glib.IO_HUP</literal></term>
+ <listitem>
+ <simpara>Hung up (the connection has been broken, usually for
+pipes and sockets).</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>Additional arguments to pass to <parameter>callback</parameter>
+can be specified after <parameter>callback</parameter>. The idle priority
+may be specified as a keyword-value pair with the keyword "priority". The
+signature of the callback function is:</para>
+
+ <programlisting>
+ def callback(source, cb_condition, ...)
+</programlisting>
+
+ <para>where <parameter>source</parameter> is
+<parameter>fd</parameter>, the file descriptor;
+<parameter>cb_condition</parameter> is the condition that triggered the
+signal; and, <parameter>...</parameter> are the zero or more arguments that
+were passed to the <function>glib.io_add_watch</function>()
+function.</para>
+
+ <para>If the callback function returns <literal>FALSE</literal> it
+will be automatically removed from the list of event sources and will not be
+called again. If it returns <literal>TRUE</literal> it will be called again
+when the condition is matched.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--source-remove">
+ <title>glib.source_remove</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.source_remove</methodname>
+ <methodparam><parameter>tag</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>tag</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer ID</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>TRUE</literal> if the event source was
+removed</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>glib.source_remove</function>() function
+removes the event source specified by tag (as returned by the <link
+linkend="function-glib--idle-add"><function>glib.idle_add</function>()</link>,
+<link
+linkend="function-glib--timeout-add"><function>glib.timeout_add</function></link>()
+and <link
+linkend="function-glib--io-add-watch"><function>glib.io_add_watch</function>()</link>
+functions)</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--main-context-default">
+ <title>glib.main_context_default</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.main_context_default</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the default glib.MainContext
+object</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>glib.main_context_default</function>() function
+returns the default glib.MainContext object.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--markup-escape-text">
+ <title>glib.markup_escape_text</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.markup_escape_text</methodname>
+ <methodparam><parameter>text</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>text</parameter>&nbsp;:</term>
+ <listitem><simpara>the UTF-8 string to be
+escaped</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the escaped text</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>glib.markup_escape_text</function>() function
+escapes the string specified by <parameter>text</parameter> so that the
+markup parser will parse it verbatim. Less than, greater than, ampersand,
+etc. are replaced with the corresponding entities. This function would
+typically be used when writing out a file to be parsed with the markup
+parser.</para>
+
+ <para>Note that this function doesn't protect whitespace and line
+endings from being processed according to the XML rules for normalization of
+line endings and attribute values.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--child-watch-add">
+ <title>glib.child_watch_add</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.child_watch_add</methodname>
+ <methodparam><parameter role="keyword">pid</parameter></methodparam>
+ <methodparam><parameter role="keyword">function</parameter></methodparam>
+ <methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><parameter role="keyword">pid</parameter>&nbsp;:</term>
+ <listitem><simpara>process id of a child process to watch</simpara></listitem>
+ </varlistentry>
+ <varlistentry><term><parameter role="keyword">function</parameter>&nbsp;:</term>
+ <listitem><simpara>the function to call</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>the optional data to pass to
+<parameter>function</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">priority</parameter>&nbsp;:</term>
+ <listitem><simpara>the priority of the idle source - one of the
+<xref linkend="glib-priority-constants"
+endterm="glib-priority-constants-title"></xref></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the id of event source.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>glib.child_watch_add</function>() function sets
+the function specified by <parameter>function</parameter> to be called with
+the user data specified by <parameter>data</parameter> when the child
+indicated by <parameter>pid</parameter> exits. The signature for the
+callback is:</para>
+
+ <programlisting>
+def callback(pid, condition, user_data)
+</programlisting>
+
+ <para>where <parameter>pid</parameter> is is the child process id,
+<parameter>condition</parameter> is the status information about the child
+process and <parameter>user_data</parameter> is <parameter>data</parameter>
+PyGTK supports only a single callback per process id.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--spawn-async">
+ <title>glib.spawn_async</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.spawn_async</methodname>
+ <methodparam><parameter role="keyword">argv</parameter></methodparam>
+ <methodparam><parameter role="keyword">envp</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">working_directory</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">flags</parameter><initializer>0</initializer></methodparam>
+ <methodparam><parameter role="keyword">child_setup</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">standard_input</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">standard_output</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">standard_error</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><parameter role="keyword">argv</parameter>&nbsp;:</term>
+ <listitem><simpara>a sequence of strings containing the arguments
+of the child process</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">envp</parameter>&nbsp;:</term>
+ <listitem><simpara>the child's environment or
+<literal>None</literal> to inherit the parent's
+environment.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">working_directory</parameter>&nbsp;:</term>
+ <listitem><simpara>the child's current working directory, or
+<literal>None</literal> to inherit parent's</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+ <listitem><simpara>flags from the <xref
+linkend="glib-spawn-flag-constants"
+endterm="glib-spawn-flag-constants-title"></xref>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">child_setup</parameter>&nbsp;:</term>
+ <listitem><simpara>a function to run in the child just before
+calling <function>exec</function>()</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+ <listitem><simpara>the user data for the
+<parameter>child_setup</parameter> function</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">standard_input</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>TRUE</literal> return the file
+descriptor for the child's stdin</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">standard_output</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>TRUE</literal> return the file
+descriptor for the child's stdout</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">standard_error</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>TRUE</literal> return the file
+descriptor for the child's stderr</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a 4-tuple containing the child's process id and
+the stdin, stdout and stderr file descriptor integers.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>glib.spawn_async</function>() function executes
+a child program asynchronously (your program will not block waiting for the
+child to exit). The child program is specified by the only argument that
+must be provided, <parameter>argv</parameter>. <parameter>argv</parameter>
+should be a sequence of strings, to be passed as the argument vector for the
+child. The first string in <parameter>argv</parameter> is of course the name
+of the program to execute. By default, the name of the program must be a
+full path; the <envar>PATH</envar> shell variable will only be searched if
+you pass the <literal>glib.SPAWN_SEARCH_PATH</literal> flag in
+<parameter>flags</parameter>. The function returns a 4-tuple containing the
+child's process id and the file descriptors for the child's stdin, stdout
+and stderr. The stdin, stdout and stderr file descriptors are returned only
+ofthe corresponding <parameter>standard_input</parameter>,
+<parameter>standard_output</parameter> or
+<parameter>standard_error</parameter> params are
+<literal>TRUE</literal>.</para>
+
+ <para>On Windows, the low-level child process creation API
+(<function>CreateProcess</function>()) doesn't use argument vectors, but a
+command line. The C runtime library's <function>spawn*</function>() family
+of functions (which <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+eventually calls) paste the argument vector elements into a command line,
+and the C runtime startup code does a corresponding reconstruction of an
+argument vector from the command line, to be passed to
+<function>main</function>(). Complications arise when you have argument
+vector elements that contain spaces of double quotes. The
+<function>spawn*</function>() functions don't do any quoting or escaping,
+but on the other hand the startup code does do unquoting and unescaping in
+order to enable receiving arguments with embedded spaces or double
+quotes. To work around this asymmetry, the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+function will do quoting and escaping on argument vector elements that need
+it before calling the C runtime <function>spawn</function>()
+function.</para>
+
+ <para><parameter>envp</parameter> is a sequence of strings, where each
+ string has the form <literal>KEY=VALUE</literal>. This will become the
+ child's environment. If <parameter>envp</parameter> is
+ <parameter>None</parameter> or not specified, the child inherits its
+ parent's environment.</para>
+
+ <para><parameter>flags</parameter> should be the bitwise
+<literal>OR</literal> of the <xref linkend="glib-spawn-flag-constants"
+endterm="glib-spawn-flag-constants-title"></xref> you want to affect the
+function's behaviour. The <literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal>
+flag means that the child will not automatically be reaped; you must use a
+GChildWatch source to be notified about the death of the child
+process. Eventually you must call g_spawn_close_pid() on the child_pid, in
+order to free resources which may be associated with the child process. (On
+Unix, using a GChildWatch source is equivalent to calling
+<function>waitpid</function>() or handling the <literal>SIGCHLD</literal>
+signal manually. On Windows, calling g_spawn_close_pid() is equivalent to
+calling <function>CloseHandle</function>() on the process handle
+returned).</para>
+
+ <para><literal>glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal> means
+that the parent's open file descriptors will be inherited by the child;
+otherwise all descriptors except stdin/stdout/stderr will be closed before
+calling <function>exec</function>() in the
+child. <literal>glib.SPAWN_SEARCH_PATH</literal> means that
+<parameter>argv</parameter>[0] need not be an absolute path, it will be
+looked for in the user's
+<envar>PATH</envar>. <literal>glib.SPAWN_STDOUT_TO_DEV_NULL</literal>
+means that the child's standard output will be discarded, instead of going
+to the same location as the parent's standard output. If you use this flag,
+<parameter>standard_output</parameter> must be
+<literal>None</literal>. <literal>glib.SPAWN_STDERR_TO_DEV_NULL</literal>
+means that the child's standard error will be discarded, instead of going to
+the same location as the parent's standard error. If you use this flag,
+<parameter>standard_error</parameter> must be
+<literal>None</literal>. <literal>glib.SPAWN_CHILD_INHERITS_STDIN</literal>
+means that the child will inherit the parent's standard input (by default,
+the child's standard input is attached to
+<filename>/dev/null</filename>). If you use this flag,
+<parameter>standard_input</parameter> must be
+<literal>None</literal>. <literal>glib.SPAWN_FILE_AND_ARGV_ZERO</literal>
+means that the first element of <parameter>argv</parameter> is the file to
+execute, while the remaining elements are the actual argument vector to pass
+to the file. Normally the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+function uses <parameter>argv</parameter>[0] as the file to execute, and
+passes all of <parameter>argv</parameter> to the child.</para>
+
+ <para><parameter>child_setup</parameter> and
+<parameter>user_data</parameter> are a function and user data. On POSIX
+platforms, the function is called in the child after GLib has performed all
+the setup it plans to perform (including creating pipes, closing file
+descriptors, etc.) but before calling <function>exec</function>(). That is,
+<parameter>child_setup</parameter> is called just before calling
+<function>exec</function>() in the child. Obviously actions taken in this
+function will only affect the child, not the parent. On Windows, there is no
+separate <function>fork</function>() and <function>exec</function>()
+functionality. Child processes are created and run right away with one API
+call,
+<function>CreateProcess</function>(). <parameter>child_setup</parameter> is
+called in the parent process just before creating the child process. You
+should carefully consider what you do in <parameter>child_setup</parameter>
+if you intend your software to be portable to Windows.</para>
+
+ <para>The returned child process id can be used to send signals to the
+child, or to wait for the child if you specified the
+<literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal> flag. On Windows, child
+pid will be returned only if you specified the
+<literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal> flag.</para>
+
+ <para>The caller of the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+must close any returned file descriptors when they are no longer in
+use.</para>
+
+ <para>If <parameter>standard_input</parameter> is
+<literal>None</literal>, the child's standard input is attached to
+<filename>/dev/null</filename> unless
+<literal>glib.SPAWN_CHILD_INHERITS_STDIN</literal> is set.</para>
+
+ <para>If <parameter>standard_error</parameter> is
+<literal>None</literal>, the child's standard error goes to the same
+location as the parent's standard error unless
+<literal>glib.SPAWN_STDERR_TO_DEV_NULL</literal> is set.</para>
+
+ <para>If <parameter>standard_output</parameter> is
+<literal>None</literal>, the child's standard output goes to the same
+location as the parent's standard output unless
+<literal>glib.SPAWN_STDOUT_TO_DEV_NULL</literal> is set.</para>
+
+ <para>If an error occurs, the glib.GError exception will be
+raised.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--get-current-time">
+ <title>glib.get_current_time</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.get_current_time</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the current time as the number of seconds and
+microseconds from the epoch.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>glib.get_current_time</function>() function
+reurns the current time of day as the number of seconds and microseconds
+from the epoch.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--get-user-cache-dir">
+ <title>glib.get_user_cache_dir</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.get_user_cache_dir</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem>
+ <simpara>
+ a strings with a path to user's cache directory.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGObject 2.18 and above.</para>
+ </note>
+
+ <para>Returns a base directory in which to store non-essential,
+ cached data specific to particular user.</para>
+
+ <para>On UNIX platforms this is determined using the mechanisms
+ described in the
+ <ulink url="http://www.freedesktop.org/Standards/basedir-spec">XDG
+ Base Directory Specification</ulink>.</para>
+ </refsect2>
+
+ <refsect2 id="function-glib--get-user-config-dir">
+ <title>glib.get_user_config_dir</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.get_user_config_dir</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem>
+ <simpara>
+ a strings with a path to user's configuration directory.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGObject 2.18 and above.</para>
+ </note>
+
+ <para>Returns a base directory in which to store user-specific
+ application configuration information such as user preferences
+ and settings. </para>
+
+ <para>On UNIX platforms this is determined using the mechanisms
+ described in the
+ <ulink url="http://www.freedesktop.org/Standards/basedir-spec">XDG
+ Base Directory Specification</ulink>.</para>
+ </refsect2>
+
+ <refsect2 id="function-glib--get-user-data-dir">
+ <title>glib.get_user_data_dir</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.get_user_data_dir</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem>
+ <simpara>
+ a strings with a path to user's data directory.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGObject 2.18 and above.</para>
+ </note>
+
+ <para>Returns a base directory in which to access application
+ data such as icons that is customized for a particular
+ user</para>
+
+ <para>On UNIX platforms this is determined using the mechanisms
+ described in the
+ <ulink url="http://www.freedesktop.org/Standards/basedir-spec">XDG
+ Base Directory Specification</ulink>.</para>
+ </refsect2>
+
+ <refsect2 id="function-glib--get-user-special-dir">
+ <title>glib.get_user_special_dir</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.get_user_special_dir</methodname>
+ <methodparam><parameter>directory</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>directory</emphasis>&nbsp;:</term>
+ <listitem>
+ <simpara>
+ the logical id of special directory,
+ see <link linkend="glib-user-directory-constants">User
+ Directory constants</link> for the list of supported
+ values
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem>
+ <simpara>
+ a strings with a path to the requested directory.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGObject 2.18 and above.</para>
+ </note>
+
+ <para>Returns the full path of a special directory using its
+ logical id.</para>
+
+ <para>On Unix this is done using the XDG special user
+ directories. For compatibility with existing practise,
+ <link linkend="glib-user-directory-constants">glib.USER_DIRECTORY_DESKTOP</link>
+ falls back to <literal>$HOME/Desktop</literal> when XDG
+ special user directories have not been set up.</para>
+
+ <para>Depending on the platform, the user might be able to
+ change the path of the special directory without requiring the
+ session to restart; GLib will not reflect any change once the
+ special directories are loaded.</para>
+ </refsect2>
+
+ <refsect2 id="function-glib--main-depth">
+ <title>glib.main_depth</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.main_depth</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the depth of the stack of calls to the main
+context.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>main_depth</function>() function returns the depth
+of the stack of calls in the main context. That is, when called from the
+toplevel, it gives 0. When called from within a callback from the <link
+linkend="method-glibmaincontext--iteration"><methodname>glib.MainContext.iteration</methodname>()</link>
+method (or the <link
+linkend="method-glibmainloop--run"><methodname>glib.MainLoop.run</methodname>()</link>
+method, etc.) it returns 1. When called from within a callback to a
+recursive call to the <link
+linkend="method-glibmaincontext--iteration"><methodname>glib.MainContext.iteration</methodname>()</link>
+method), it returns 2. And so forth.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--threads-init">
+ <title>glib.threads_init</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.threads_init</methodname>
+ <methodparam><parameter></parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.4 and above.</para>
+ </note>
+
+ <para>The <function>threads_init</function>() function initializes the
+ the use of Python threading in the glib module. This function is
+ different than the <link
+ linkend="function-gdk--threads-init"><function>gtk.gdk.threads_init</function>()</link>
+ function as that function also initializes the gdk threads.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--signal-accumulator-true-handled">
+ <title>glib.signal_accumulator_true_handled</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.signal_accumulator_true_handled</methodname>
+ </methodsynopsis></programlisting>
+
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>signal_accumulator_true_handled</function>()
+ function is only used as accumulator argument when registering
+ signals.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--filename-display-name">
+ <title>glib.filename_display_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.filename_display_name</methodname>
+ <methodparam><parameter>filename</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>filename</emphasis>&nbsp;:</term>
+ <listitem><simpara>a pathname in the file name
+ encoding</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an UTF8 rendition of
+ <parameter>filename</parameter>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.10 and above.</para>
+ </note>
+
+ <para>The <function>filename_display_name</function>() function
+ converts a filename into a valid UTF-8 string. The conversion is not
+ necessarily reversible, so you should keep the original around and use
+ the return value of this function only for display purposes. Unlike
+ g_filename_to_utf8(), the result is guaranteed to be non-None even if
+ the filename actually isn't in the file name encoding.</para>
+
+ <para>If you know the whole pathname of the file you should use the
+ <link
+ linkend="function-glib--filename-display-basename"><function>glib.filename_display_basename</function>()</link>
+ function, since that allows location-based translation of
+ filenames.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--filename-display-basename">
+ <title>glib.filename_display_basename</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.filename_display_basename</methodname>
+ <methodparam><parameter>filename</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>filename</emphasis>&nbsp;:</term>
+ <listitem><simpara>an absolute pathname in the file name
+ encoding</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an UTF8 rendition of
+ <parameter>filename</parameter>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.10 and above.</para>
+ </note>
+
+ <para>The <function>filename_display_basename</function>() function
+ returns the display basename for the particular filename, guaranteed
+ to be valid UTF-8. The display name might not be identical to the
+ filename, for instance there might be problems converting it to UTF-8,
+ and some files can be translated in the display.</para>
+
+ <para>You must pass the whole absolute pathname to this functions so
+ that translation of well known locations can be done.</para>
+
+ <para>This function is preferred over the <link
+ linkend="function-glib--filename-display-name"><function>glib.filename_display_name</function>()</link>
+ function if you know the whole path, as it allows translation.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-glib--filename-from-utf8">
+ <title>glib.filename_from_utf8</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>glib.filename_from_utf8</methodname>
+ <methodparam><parameter>utf8string</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>utf8string</emphasis>&nbsp;:</term>
+ <listitem><simpara>a UTF-8 encoded string.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a filename encoded in the GLib filename
+ encoding.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.10 and above.</para>
+ </note>
+
+ <para>The <function>filename_from_utf8</function>() function converts
+ a string from UTF-8 to the encoding GLib uses for filenames. Note that
+ on Windows GLib uses UTF-8 for filenames.</para>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pyglib-maincontext.xml b/docs/reference/pyglib-maincontext.xml
new file mode 100644
index 0000000..ccb91bb
--- /dev/null
+++ b/docs/reference/pyglib-maincontext.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-glibmaincontext">
+ <refnamediv>
+ <refname>glib.MainContext</refname>
+
+ <refpurpose>an object representing a set of event sources to be handled
+in a <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<classsynopsis language="python">
+ <ooclass><classname>glib.MainContext</classname></ooclass>
+<constructorsynopsis language="python">
+ <methodname><link linkend="constructor-glibmaincontext">glib.MainContext</link></methodname>
+ </constructorsynopsis>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-glibmaincontext--iteration">iteration</link></methodname>
+ <methodparam><parameter>may_block</parameter></methodparam>
+ </methodsynopsis>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-glibmaincontext--pending">pending</link></methodname>
+ </methodsynopsis>
+</classsynopsis>
+
+</refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-glibmaincontext">glib.MainContext</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>A <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+represents a set of event sources that can be run in a single thread. File
+descriptors (plain files, pipes or sockets) and timeouts are the standard
+event sources for <literal>GTK</literal> and <literal>PyGTK</literal> though
+others can be added. Each event source is assigned a priority. The default
+priority, <literal>glib.PRIORITY_DEFAULT</literal>, is 0. Values less
+than 0 denote higher priorities. Values greater than 0 denote lower
+priorities. Events from high priority sources are always processed before
+events from lower priority sources. Single iterations of a <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+can be run with the <link
+linkend="method-glibmaincontext--iteration"><methodname>iteration</methodname>()</link>
+method.</para>
+
+ </refsect1>
+
+ <refsect1 id="constructor-glibmaincontext">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>glib.MainContext</methodname>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new <link
+ linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+ object.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>Creates a new <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+object.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-glibmaincontext--iteration">
+ <title>glib.MainContext.iteration</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>iteration</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>may_block</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>TRUE</literal> the call may block
+ waiting for an event.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>TRUE</literal> if events were
+ dispatched.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>iteration</methodname>() method runs a single
+iteration. This involves:</para>
+
+ <itemizedlist>
+ <listitem>
+ <simpara>checking to see if any associated event sources are ready
+to be processed;</simpara>
+ </listitem>
+ <listitem>
+ <simpara>then if no events sources are ready and
+<parameter>may_block</parameter> is <literal>TRUE</literal>, waiting for a
+source to become ready;</simpara>
+ </listitem>
+ <listitem>
+ <simpara>and finally, dispatching the highest priority events
+sources that are ready</simpara>
+ </listitem>
+ </itemizedlist>
+
+ <para>Note that even when <parameter>may_block</parameter> is
+<literal>TRUE</literal>, it is still possible for
+<methodname>iteration</methodname>() to return <literal>FALSE</literal>,
+since the the wait may be interrupted for other reasons than an event source
+becoming ready.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-glibmaincontext--pending">
+ <title>glib.MainContext.pending</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>pending</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>TRUE</literal> if events are
+ pending.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>pending</methodname>() method checks if any
+associated sources have pending events.</para>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pyglib-mainloop.xml b/docs/reference/pyglib-mainloop.xml
new file mode 100644
index 0000000..bd12fca
--- /dev/null
+++ b/docs/reference/pyglib-mainloop.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-glibmainloop">
+ <refnamediv>
+ <refname>glib.MainLoop</refname>
+
+ <refpurpose>an object representing the main event loop of a PyGTK
+ application.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<classsynopsis language="python">
+ <ooclass><classname>glib.MainLoop</classname></ooclass>
+<constructorsynopsis language="python">
+ <methodname><link linkend="constructor-glibmainloop">glib.MainLoop</link></methodname>
+ <methodparam><parameter>context</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter>is_running</parameter><initializer>0</initializer></methodparam>
+ </constructorsynopsis>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-glibmainloop--get-context">get_context</link></methodname>
+ </methodsynopsis>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-glibmainloop--is-running">is_running</link></methodname>
+ </methodsynopsis>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-glibmainloop--quit">quit</link></methodname>
+ </methodsynopsis>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-glibmainloop--run">run</link></methodname>
+ </methodsynopsis>
+</classsynopsis>
+
+</refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-glibmainloop">glib.MainLoop</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+represents a main event loop. A <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+is created with the <link
+linkend="constructor-glibmainloop">glib.MainLoop</link>()
+constructor. After adding the initial event sources, the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method is called. This continuously checks for new events from each of the
+event sources and dispatches them. Finally, the processing of an event from
+one of the sources leads to a call to the <link
+linkend="method-glibmainloop--quit"><methodname>quit</methodname>()</link>
+method to exit the main loop, and the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method returns.</para>
+
+ <para>It is possible to create new instances of <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+recursively. This is often used in <literal>PyGTK</literal> applications
+when showing modal dialog boxes. Note that event sources are associated with
+a particular <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>,
+and will be checked and dispatched for all main loops associated with that
+<link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>.</para>
+
+ <para><literal>PyGTK</literal> contains wrappers of some of these
+functions, e.g. the <link
+linkend="function-gtk--main"><function>gtk.main</function>()</link>, <link
+linkend="function-gtk--main-quit"><function>gtk.main_quit</function>()</link>
+and <link
+linkend="function-gtk--events-pending"><function>gtk.events_pending</function>()</link>
+functions.</para>
+
+ </refsect1>
+
+ <refsect1 id="constructor-glibmainloop">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>glib.MainLoop</methodname>
+ <methodparam><parameter>context</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter>is_running</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>context</parameter>&nbsp;:</term>
+ <listitem><simpara>a <link
+ linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+ or <literal>None</literal> to use the default
+ context.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>is_running</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>TRUE</literal> indicates that the
+ loop is running. This is not very important since calling the <link
+ linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+ method will set this to <literal>TRUE</literal>
+ anyway.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new <link
+ linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+ object.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>Creates a new <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+object.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-glibmainloop--get-context">
+ <title>glib.MainLoop.get_context</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_context</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the <link
+ linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+ the mainloop is associated with</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>get_context</methodname>() method returns the
+<link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+that the mainloop was created with.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-glibmainloop--is-running">
+ <title>glib.MainLoop.is_running</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_running</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>TRUE</literal> if the mainloop is
+ currently being run.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>is_running</methodname>() method checks to see
+if the mainloop is currently being run via the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-glibmainloop--quit">
+ <title>glib.MainLoop.quit</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>quit</methodname>
+ </methodsynopsis></programlisting>
+
+ <para>The <methodname>quit</methodname>() method stops the mainloop
+from running. Any subsequent calls to the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method will return immediately.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-glibmainloop--run">
+ <title>glib.MainLoop.run</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>run</methodname>
+ </methodsynopsis></programlisting>
+
+ <para>The <methodname>run</methodname>() method runs a mainloop until
+the <link
+linkend="method-glibmainloop--quit"><methodname>quit</methodname>()</link>
+method is called. If this is called for the thread of the loop's <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>,
+it will process events from the loop, otherwise it will simply wait.</para>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-classes.xml b/docs/reference/pygobject-classes.xml
new file mode 100644
index 0000000..17f925c
--- /dev/null
+++ b/docs/reference/pygobject-classes.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="gobject-class-reference"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGObject Class Reference</title>
+
+<!-- GOBJECT CLASSES -->
+<xi:include href="pygobject.xml"/>
+<xi:include href="pygobject-gboxed.xml"/>
+<xi:include href="pygobject-gpointer.xml"/>
+<xi:include href="pygobject-ginterface.xml"/>
+<xi:include href="pygobject-functions.xml"/>
+<xi:include href="pygobject-constants.xml"/>
+
+</chapter>
diff --git a/docs/reference/pygobject-constants.xml b/docs/reference/pygobject-constants.xml
new file mode 100644
index 0000000..a8f9711
--- /dev/null
+++ b/docs/reference/pygobject-constants.xml
@@ -0,0 +1,390 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gobject-constants">
+ <refnamediv>
+ <refname>gobject Constants</refname>
+ <refpurpose>the built-in constants of the gobject module</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <programlisting>
+<xref linkend="gobject-param-constants" endterm="gobject-param-constants-title"></xref>
+<xref linkend="gobject-signal-constants" endterm="gobject-signal-constants-title"></xref>
+<xref linkend="gobject-type-constants" endterm="gobject-type-constants-title"></xref>
+<xref linkend="gobject-version-constants" endterm="gobject-version-constants-title"></xref>
+</programlisting>
+
+ </refsect1>
+
+ <refsect1 id="gobject-constants-description">
+ <title>Description</title>
+
+ <refsect2 id="gobject-param-constants">
+ <title id="gobject-param-constants-title">GObject Param Flag Constants</title>
+
+ <para>The Param Flag constants are a set of bit-flags that specify
+certain aspects of parameters that can be configured.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gobject.PARAM_READABLE</literal></term>
+ <listitem>
+ <simpara>The parameter is readable</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.PARAM_WRITABLE</literal></term>
+ <listitem>
+ <simpara>The parameter is writable</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.PARAM_CONSTRUCT</literal></term>
+ <listitem>
+ <simpara>The parameter will be set upon object
+ construction</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.PARAM_CONSTRUCT_ONLY</literal></term>
+ <listitem>
+ <simpara>The parameter will only be set upon object
+ construction</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.PARAM_LAX_VALIDATION</literal></term>
+ <listitem>
+ <simpara>Upon parameter conversion strict validation is not
+ required</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="gobject-signal-constants">
+ <title id="gobject-signal-constants-title">GObject Signal Flag Constants</title>
+
+ <para>The Signal Flag constants are a set of bit-flags that specify a
+signal's behavior. The overall signal description outlines how especially
+the <literal>RUN</literal> flags control the stages of a signal
+emission.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_RUN_FIRST</literal></term>
+ <listitem>
+ <simpara>Invoke the object method handler in the first emission
+ stage.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_RUN_LAST</literal></term>
+ <listitem>
+ <simpara>Invoke the object method handler in the third emission
+ stage.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_RUN_CLEANUP</literal></term>
+ <listitem>
+ <simpara>Invoke the object method handler in the last emission
+ stage.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_NO_RECURSE</literal></term>
+ <listitem>
+ <simpara>Signals being emitted for an object while currently
+ being in emission for this very object will not be emitted
+ recursively, but instead cause the first emission to be
+ restarted.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_DETAILED</literal></term>
+ <listitem>
+ <simpara>This signal supports "::detail" appendices to the
+ signal name upon handler connections and emissions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_ACTION</literal></term>
+ <listitem>
+ <simpara>Action signals are signals that may freely be emitted
+ on alive objects from user code via the <link
+ linkend="method-gobject--emit"><methodname>gobject.emit</methodname>()</link>
+ method and friends, without the need of being embedded into
+ extra code that performs pre or post emission adjustments on the
+ object. They can also be thought of as object methods which can
+ be called generically by third-party code.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_NO_HOOKS</literal></term>
+ <listitem>
+ <simpara>No emissions hooks are supported for this
+ signal.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="gobject-spawn-flag-constants">
+ <title id="gobject-spawn-flag-constants-title">GObject Spawn Flag Constants</title>
+
+ <para>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <link
+linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
+function.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal></term>
+ <listitem>
+ <simpara>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <function>exec</function>() in the child.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_DO_NOT_REAP_CHILD</literal></term>
+ <listitem>
+ <simpara>the child will not be automatically reaped; you must
+call <function>waitpid</function>() or handle <literal>SIGCHLD</literal>
+yourself, or the child will become a zombie.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_SEARCH_PATH</literal></term>
+ <listitem>
+ <simpara><parameter>argv</parameter>[0] need not be an absolute
+path, it will be looked for in the user's <envar>PATH</envar>.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_STDOUT_TO_DEV_NULL</literal></term>
+ <listitem>
+ <simpara>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_STDERR_TO_DEV_NULL</literal></term>
+ <listitem>
+ <simpara>the child's standard error will be discarded.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_CHILD_INHERITS_STDIN</literal></term>
+ <listitem>
+ <simpara>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SPAWN_FILE_AND_ARGV_ZERO</literal></term>
+ <listitem>
+ <simpara>the first element of <parameter>argv</parameter> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <link
+linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
+uses <parameter>argv</parameter>[0] as the file to execute, and passes all
+of <parameter>argv</parameter> to the child.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="gobject-type-constants">
+ <title id="gobject-type-constants-title">GObject Built-in Type Constants</title>
+
+ <para>The Built-in Type constants specify the pre-defined types used
+by gobject.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gobject.TYPE_INVALID</literal></term>
+ <listitem>
+ <simpara>An invalid type, used as error return value in some
+ functions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_NONE</literal></term>
+ <listitem>
+ <simpara>A fundamental type indicating no type.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_INTERFACE</literal></term>
+ <listitem>
+ <simpara>The fundamental type from which all interfaces are
+ derived.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_CHAR</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a
+ character. This maps to a string in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_UCHAR</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to an unsigned
+ character. This maps to a string in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_BOOLEAN</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a True or False
+ value. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_INT</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to an
+ integer. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_UINT</literal></term>
+ <listitem>
+ <simpara>he fundamental type corresponding to an unsigned
+ integer. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_LONG</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a long
+ integer. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_ULONG</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to an unsigned
+ integer. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_INT64</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to an long long
+ integer. This maps to a long integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_UINT64</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to an unsigned long
+ long integer. This maps to a long integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_ENUM</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to an enumeration
+ type. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_FLAGS</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a flag
+ type. This maps to an integer in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_FLOAT</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a floating point
+ number. This maps to a float in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_DOUBLE</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a double
+ floating point number. This maps to a float in Python.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_STRING</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a string.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_POINTER</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a pointer to an
+ anonymous type. This has no corresponding Python type.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_BOXED</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a boxed object
+ type.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_PARAM</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a GParamSpec
+ type.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_OBJECT</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a GObject
+ type.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.TYPE_PYOBJECT</literal></term>
+ <listitem>
+ <simpara>The fundamental type corresponding to a Python Object
+ type.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="gobject-version-constants">
+ <title id="gobject-version-constants-title">GObject Version Constants</title>
+
+ <para>The Version constants specify the version of
+<literal>GLIB</literal> used by PyGTK as a 3-tuple containing the major,
+minor and patch release numbers.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gobject.glib_version</literal></term>
+ <listitem>
+ <simpara>A 3-tuple containing (major, minor, patch) release
+ numbers.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-functions.xml b/docs/reference/pygobject-functions.xml
new file mode 100644
index 0000000..7ca3918
--- /dev/null
+++ b/docs/reference/pygobject-functions.xml
@@ -0,0 +1,889 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gobject-functions">
+ <refnamediv>
+ <refname>gobject Functions</refname>
+ <refpurpose>miscellaneous functions</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <programlisting>
+<methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-name">gobject.type_name</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-from-name">gobject.type_from_name</link></methodname>
+ <methodparam><parameter>type_name</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-parent">gobject.type_parent</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-is-a">gobject.type_is_a</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>parent_type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-children">gobject.type_children</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-interfaces">gobject.type_interfaces</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--type-register">gobject.type_register</link></methodname>
+ <methodparam><parameter>class</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-new">gobject.signal_new</link></methodname>
+ <methodparam><parameter>signal_name</parameter></methodparam>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>flags</parameter></methodparam>
+ <methodparam><parameter>return_type</parameter></methodparam>
+ <methodparam><parameter>param_types</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-list-names">gobject.signal_list_names</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-list-ids">gobject.signal_list_ids</link></methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-lookup">gobject.signal_lookup</link></methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-name">gobject.signal_name</link></methodname>
+ <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-query1">gobject.signal_query</link></methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-query2">gobject.signal_query</link></methodname>
+ <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--list-properties">gobject.list_properties</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--new">gobject.new</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-accumulator-true-handled">gobject.signal_accumulator_true_handled</link></methodname>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--add-emission-hook">gobject.add_emission_hook</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>name</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--remove-emission-hook">gobject.remove_emission_hook</link></methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>name</parameter></methodparam>
+ <methodparam><parameter>hook_id</parameter></methodparam>
+ </methodsynopsis><methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject---install-metaclass">gobject._install_metaclass</link></methodname>
+ <methodparam><parameter>metaclass</parameter></methodparam>
+ </methodsynopsis>
+ </programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>These functions are part of the <literal>PyGTK</literal> gobject
+module but are not directly associated with a specific class.</para>
+
+ <note>
+ <para>
+ Many functions that previously were in this namespace got moved to <link
+ linkend="glib-functions"><literal>glib</literal></link> namespace instead. They
+ are still available in <literal>gobject</literal> for backward compatibility, but
+ not documented here. If you miss documentation for some function, be sure to
+ check <link linkend="glib-functions"><literal>glib</literal></link> first.
+ </para>
+ </note>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Functions</title>
+
+ <refsect2 id="function-gobject--type-name">
+ <title>gobject.type_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_name</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_name</function>() function returns
+the unique name that is assigned to the specified
+<parameter>type</parameter>. <parameter>type</parameter> can be a GObject
+type, type ID or instance. This function raises a TypeError exception
+if <parameter>type</parameter> isn't a <literal>PyGTK</literal> type.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--type-from-name">
+ <title>gobject.type_from_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_from_name</methodname>
+ <methodparam><parameter>type_name</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the name of a
+type</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the type ID named
+<parameter>type_name</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_from_name</function>() function
+returns the type ID of the <literal>PyGTK</literal> type with the name
+specified by <parameter>type_name</parameter>. This function raises a
+RuntimeError exception if no type matches
+<parameter>type_name</parameter>.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--type-parent">
+ <title>gobject.type_parent</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_parent</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the parent type ID</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_parent</function>() function returns
+the direct parent type ID of the specified <parameter>type</parameter>.
+<parameter>type</parameter> can be a GObject type, type ID or instance. If
+<parameter>type</parameter> has no parent, i.e. is a fundamental type, the
+RuntimeError exception is raised. </para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--type-is-a">
+ <title>gobject.type_is_a</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_is_a</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>parent_type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>parent_type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>TRUE</literal> if
+<parameter>parent_type</parameter> is an ancestor of
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_is_a</function>() function returns
+<literal>TRUE</literal> if the specified <parameter>type</parameter> is a
+descendant of the type specified by <parameter>parent_type</parameter>. This
+function also returns <literal>TRUE</literal> if
+<parameter>parent_type</parameter> is an interface and
+<parameter>type</parameter> conforms to it.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--type-children">
+ <title>gobject.type_children</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_children</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of the child types of
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_children</function>() function
+returns a list containing the child types of the specified
+<parameter>type</parameter>.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--type-interfaces">
+ <title>gobject.type_interfaces</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_interfaces</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of the interface types supported by
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_interfaces</function>() function
+returns a list of the interface types supported by
+<parameter>type</parameter>. <parameter>type</parameter> can be a GObject
+type, type ID or instance. This function returns a RuntimeError exception if
+type is not a valid type or has no interfaces.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--type-register">
+ <title>gobject.type_register</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.type_register</methodname>
+ <methodparam><parameter>class</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>class</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python class that is a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.type_register</function>() function
+registers the specified Python <parameter>class</parameter> as a PyGTK type.
+class must be a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link>. The function generates a name for the new type.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-new">
+ <title>gobject.signal_new</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_new</methodname>
+ <methodparam><parameter>signal_name</parameter></methodparam>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>flags</parameter></methodparam>
+ <methodparam><parameter>return_type</parameter></methodparam>
+ <methodparam><parameter>param_types</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>signal_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the name of the
+signal</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>the object type that the signal is associated
+with</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>flags</parameter>&nbsp;:</term>
+ <listitem><simpara>the signal flags</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>return_type</parameter>&nbsp;:</term>
+ <listitem><simpara>the return type of the signal
+handler</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>param_types</parameter>&nbsp;:</term>
+ <listitem><simpara>the parameter types passed to the signal
+handler</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a unique integer signal ID</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.signal_new</function>() function registers
+a signal with the specified <parameter>signal_name</parameter> for the
+specified object <parameter>type</parameter>. The value of
+<parameter>flags</parameter> is a combination of:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_RUN_FIRST</literal></term>
+ <listitem>
+ <simpara>Invoke the object method handler in the first emission
+stage. </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_RUN_LAST</literal></term>
+ <listitem>
+ <simpara>Invoke the object method handler in the third emission
+stage.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_RUN_CLEANUP</literal></term>
+ <listitem>
+ <simpara>Invoke the object method handler in the last emission
+stage.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_NO_RECURSE</literal></term>
+ <listitem>
+ <simpara>Signals being emitted for an object while currently
+being in emission for this very object will not be emitted recursively, but
+instead cause the first emission to be restarted.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_DETAILED</literal></term>
+ <listitem>
+ <simpara>This signal supports "::detail" appendixes to the
+signal name upon handler connections and emissions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_ACTION</literal></term>
+ <listitem>
+ <simpara>Action signals are signals that may freely be emitted
+on alive objects from user code via <link
+linkend="method-gobject--emit"><methodname>gobject.emit()</methodname>()</link>
+and friends, without the need of being embedded into extra code that
+performs pre or post emission adjustments on the object. They can also be
+thought of as generically callable object methods.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>gobject.SIGNAL_NO_HOOKS</literal></term>
+ <listitem>
+ <simpara> No emissions hooks are supported for this
+signal.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para><parameter>return_type</parameter> is the type of the return
+value from a signal handler and may be a gobject type, type ID or instance.
+The <parameter>param_types</parameter> parameter is a list of additional
+types that are passed to the signal handler. Each parameter type may be
+specified as a gobject type, type ID or instance. For example, to add a
+signal to the gtk.Window type called "my-signal" that calls a handler with a
+gtk.Button widget and an integer value and a return value that is a
+boolean, use:</para>
+
+ <programlisting>
+ gobject.signal_new("my_signal", gtk.Window, gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN, (gtk.Button, gobject.TYPE_INT))
+</programlisting>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-list-names">
+ <title>gobject.signal_list_names</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_list_names</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of the signal names supported by
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.signal_list_names</function>() function
+returns a list of the names of the signals that are supported by the
+specified GObject <parameter>type</parameter></para>
+
+ <note>
+ <para>The type keyword is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-list-ids">
+ <title>gobject.signal_list_ids</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_list_ids</methodname>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of the signal ids supported by
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>gobject.signal_list_ids</function>() function
+returns a list of the integer ids of the signals that are supported by the
+GObject specified by <parameter>type</parameter></para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-lookup">
+ <title>gobject.signal_lookup</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_lookup</methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">name</parameter>&nbsp;:</term>
+ <listitem><simpara>the name of a signal for
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the integer id of a signal supported by
+<parameter>type</parameter></simpara> or 0.</listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>gobject.signal_lookup</function>() function
+returns the id of the signal with the name specified by
+<parameter>name</parameter> that is supported by the GObject specified
+specified by<parameter>type</parameter>. 0 is returned if the signal is not
+found.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-name">
+ <title>gobject.signal_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_name</methodname>
+ <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">signal_id</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer signal id</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the name of the signal or
+<literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>gobject.signal_name</function>() function returns
+the name of the signal that has the signal id specified by
+<parameter>id</parameter>.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-query1">
+ <title>gobject.signal_query</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_query</methodname>
+ <methodparam><parameter role="keyword">name</parameter></methodparam>
+ <methodparam><parameter role="keyword">type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">name</parameter>&nbsp;:</term>
+ <listitem><simpara>the name of a signal for
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a 6-tuple containing signal information or
+<literal>None</literal></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>gobject.signal_query</function>() function returns
+a 6-tuple containing information about the signal with the name specified by
+<parameter>name</parameter> that is supported by the GObject specified by
+<parameter>type</parameter>. If the signal is not found
+<literal>None</literal> is returned.</para>
+
+ <para>The signal information 6-tuple contains:</para>
+
+ <itemizedlist>
+ <listitem>
+ <simpara>the integer signal id</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the signal name</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the GType that the signal is registered for</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the signal flags (see the <xref
+linkend="gobject-signal-constants"
+endterm="gobject-signal-constants-title"></xref>)</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the GType of the return from the signal callback
+function</simpara>
+ </listitem>
+ <listitem>
+ <simpara>a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <literal>PyGTK</literal> signal callback parameters.</simpara>
+ </listitem>
+ </itemizedlist>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-query2">
+ <title>gobject.signal_query</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_query</methodname>
+ <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">signal_id</parameter>&nbsp;:</term>
+ <listitem><simpara>the integer id of a signal</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a 6-tuple containing signal information or
+<literal>None</literal></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.6 and above.</para>
+ </note>
+
+ <para>The <function>gobject.signal_query</function>() function returns
+a 6-tuple containing information about the signal with the id specified by
+<parameter>signal_id</parameter>. If the signal is not found
+<literal>None</literal> is returned.</para>
+
+ <para>The signal information 6-tuple contains:</para>
+
+ <itemizedlist>
+ <listitem>
+ <simpara>the integer signal id</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the signal name</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the GType that the signal is registered for</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the signal flags (see the <xref
+linkend="gobject-signal-constants"
+endterm="gobject-signal-constants-title"></xref>)</simpara>
+ </listitem>
+ <listitem>
+ <simpara>the GType of the return from the signal callback
+function</simpara>
+ </listitem>
+ <listitem>
+ <simpara>a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <literal>PyGTK</literal> signal callback parameters.</simpara>
+ </listitem>
+ </itemizedlist>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--list-properties">
+ <title>gobject.list_properties</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.list_properties</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a list of the properties (as GParam objects)
+supported by <parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.list_properties</function>() function
+returns a list of the properties (as GParam objects) supported by
+<parameter>type</parameter>.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--new">
+ <title>gobject.new</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.new</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>type</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>zero or more property-value
+pairs</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new object if the specified
+<parameter>type</parameter></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <function>gobject.new</function>() function returns a new
+object of the specified <parameter>type</parameter>. type must specify a
+type that is a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link>. A
+TypeError exception is raised if <parameter>type</parameter> specifies an
+abstract class or a type that is not a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link>. A set
+of property-value pairs may be specified to set the value of the object's
+properties.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--signal-accumulator-true-handled">
+ <title>gobject.signal_accumulator_true_handled</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.signal_accumulator_true_handled</methodname>
+ </methodsynopsis></programlisting>
+
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>signal_accumulator_true_handled</function>()
+ function is only used as accumulator argument when registering
+ signals.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--add-emission-hook">
+ <title>gobject.add_emission_hook</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.add_emission_hook</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>name</parameter></methodparam>
+ <methodparam><parameter>callback</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>type</emphasis>&nbsp;:</term>
+ <listitem><simpara>a Python GObject instance or
+ type</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>name</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signal name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>callback</emphasis>&nbsp;:</term>
+ <listitem><simpara>a function</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>...</emphasis>&nbsp;:</term>
+ <listitem><simpara>zero or more extra arguments that will be
+ passed to callback.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the hook id, for later use with <link
+ linkend="function-gobject--signal-remove-emission-hook"><function>gobject.signal_remove_emission_hook</function>()</link>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>add_emission_hook</function>() function adds an
+ emission hook for the signal specified by <parameter>name</parameter>,
+ which will get called for any emission of that signal, independent of
+ the instance. This is possible only for signals which don't have the
+ <literal>gobject.SIGNAL_NO_HOOKS</literal> flag set.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject--remove-emission-hook">
+ <title>gobject.remove_emission_hook</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject.remove_emission_hook</methodname>
+ <methodparam><parameter>type</parameter></methodparam>
+ <methodparam><parameter>name</parameter></methodparam>
+ <methodparam><parameter>hook_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>type</emphasis>&nbsp;:</term>
+ <listitem><simpara>a Python GObject instance or
+ type</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>name</emphasis>&nbsp;:</term>
+ <listitem><simpara>a signal name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>hook_id</emphasis>&nbsp;:</term>
+ <listitem><simpara>the id of the emission hook as returned by the
+ <link
+ linkend="function-gobject--add-emission-hook"><function>gobject.add_emission_hook</function>()</link>)
+ function.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.8 and above.</para>
+ </note>
+
+ <para>The <function>remove_emission_hook</function>() function deletes
+ an emission hook.</para>
+
+ </refsect2>
+
+ <refsect2 id="function-gobject---install-metaclass">
+ <title>gobject._install_metaclass</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>gobject._install_metaclass</methodname>
+ <methodparam><parameter>metaclass</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist role="params">
+ <varlistentry>
+ <term><emphasis>metaclass</emphasis>&nbsp;:</term>
+ <listitem><simpara></simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <note>
+ <para>This function is available in PyGTK 2.10 and above.</para>
+ </note>
+
+ <para>The <function>_install_metaclass</function>() function installs
+ the metaclass specified by <parameter>metaclass</parameter>.</para>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-gboxed.xml b/docs/reference/pygobject-gboxed.xml
new file mode 100644
index 0000000..f7f2438
--- /dev/null
+++ b/docs/reference/pygobject-gboxed.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gobjectgboxed">
+ <refnamediv>
+ <refname>gobject.GBoxed</refname>
+ <refpurpose>an object containing an opaque chunk of data</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<classsynopsis language="python">
+ <ooclass><classname>gobject.GBoxed</classname></ooclass>
+<methodsynopsis language="python">
+ <methodname><link linkend="method-gobjectgboxed--copy">copy</link></methodname>
+ </methodsynopsis>
+</classsynopsis>
+
+</refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectgboxed">gobject.GBoxed</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><link
+linkend="class-gobjectgboxed"><classname>gobject.GBoxed</classname></link>
+is an abstract base class that encapsulates an opaque chunk of data to
+provide an object-oriented interface and a type that is registered with the
+<literal>GLIB</literal> type system. A boxed type is registered with
+functions that provide for the copying and freeing of the underlying data
+structure - this allows PyGTK to encapsulate these as Python objects.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gobjectgboxed--copy">
+ <title>gobject.GBoxed.copy</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>copy</methodname>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a copy of the <link
+ linkend="class-gobjectgboxed"><classname>gobject.GBoxed</classname></link>
+ object</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>copy</methodname>() method makes and returns a copy of the boxed object.</para>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-ginterface.xml b/docs/reference/pygobject-ginterface.xml
new file mode 100644
index 0000000..1b29ddf
--- /dev/null
+++ b/docs/reference/pygobject-ginterface.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gobjectginterface">
+ <refnamediv>
+ <refname>gobject.GInterface</refname>
+
+ <refpurpose>an object representing a GInterface</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<classsynopsis language="python">
+ <ooclass><classname>gobject.GInterface</classname></ooclass>
+</classsynopsis>
+
+</refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><link
+linkend="class-gobjectginterface"><classname>gobject.GInterface</classname></link>
+is an abstract base class that encapsulates a GInterface.</para>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-gpointer.xml b/docs/reference/pygobject-gpointer.xml
new file mode 100644
index 0000000..da16954
--- /dev/null
+++ b/docs/reference/pygobject-gpointer.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gobjectgpointer">
+ <refnamediv>
+ <refname>gobject.GPointer</refname>
+
+ <refpurpose>an object containing a completely opaque chunk of
+ data</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<classsynopsis language="python">
+ <ooclass><classname>gobject.GPointer</classname></ooclass>
+</classsynopsis>
+
+</refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectgpointer">gobject.GPointer</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><link
+linkend="class-gobjectgpointer"><classname>gobject.GPointer</classname></link>
+is an abstract base class that encapsulates an opaque chunk of data and
+registers it with the <literal>GLIB</literal> type system. A pointer type
+has no methods and generic ways of copying and freeing the data. It
+shouldn't be used in PyGTK.</para>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-introduction.xml b/docs/reference/pygobject-introduction.xml
new file mode 100644
index 0000000..fb3e6f2
--- /dev/null
+++ b/docs/reference/pygobject-introduction.xml
@@ -0,0 +1,222 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+ <chapter id="pygobject-introduction">
+ <title>Introduction</title>
+
+ <para>This document describes many of the <literal>PyGObject</literal>
+ version 2.12 classes and their methods and associated
+ functions. Deprecated classes, functions and methods have been
+ specifically left out of this reference though classes that have become
+ deprecated since PyGObject 2.0 have been left in but annotated with a
+ deprecation warning. This document attempts to document as much of the
+ <literal>PyGObject</literal> <literal>API</literal> as possible but there
+ are undoubtedly errors and omissions. If you discover any of these please
+ file a bug report at <ulink
+ url="http://bugzilla.gnome.org">bugzilla.gnome.org</ulink> for the
+ <literal>pygobject</literal> project. Specific areas that have not been
+ documented include:</para>
+
+ <itemizedlist>
+ <listitem>
+ <simpara>The GParamSpec class</simpara>
+ </listitem>
+ </itemizedlist>
+
+ <para>This reference describes the API for <literal>PyGObject</literal> as
+ of version 2.11.0+ and assumes that the additional API changes for version
+ 2.12 will not be significant. There will undoubtedly be changes that are
+ not reflected in this reference. The differences in the API between
+ version 2.0 and previous versions are denoted in this reference with a
+ Note that describes the availability of the object, constructor, method or
+ function. Any of these that do not have a notation can be assumed to be
+ available in all versions of PyGObject from 2.0 and up. The source code
+ must be consulted if this reference and your version of
+ <literal>PyGObject</literal> seem to differ. You are encouraged to use the
+ latest version of <literal>PyGObject</literal> that is available. See the
+ <ulink url="http://www.pygtk.org"><literal>PyGTK</literal>
+ homepage</ulink> for more information and more resources on how to use
+ PyGObject as well as help in its development.</para>
+
+ <para> The Reference contains a chapter for each
+ <literal>PyGObject</literal> module containing the class descriptions. The
+ class descriptions are arranged alphabetically within the
+ chapters. Currently there is one module chapter:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>The&nbsp;<literal>gobject</literal>&nbsp;module</term>
+ <listitem><simpara>The classes that are included in the
+<literal>gobject</literal> module of <literal>PyGObject</literal> and are
+accessed similar to: gobject.GObject. These classes are the base object
+classes that the <literal>gtk</literal> and <literal>gtk.gdk</literal>
+module classes are built on.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+<!--
+ <sect1>
+ <title>Major Changes since Version 2.11</title>
+
+ <para>The major changes in this document since version 2.11
+ include:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para></para>
+ </listitem>
+ </itemizedlist>
+
+ </sect1>
+-->
+
+ <sect1 id="pygobject-reference-format">
+ <title>Reference Page Format</title>
+
+ <para>Each <literal>PyGObject</literal> class is described in a reference
+page that has a number of sections in a fixed format. Each reference page
+will have a subset of the following sections:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term>Name</term>
+ <listitem>
+ <simpara>The name and a one-line description of the
+class.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Synopsis</term>
+ <listitem>
+ <simpara>A synopsis of the class and its methods and
+optionally a list of associated functions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Ancestry</term>
+ <listitem>
+ <simpara>The list of the parent classes of the class. This
+section may not be present in all class descriptions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Properties</term>
+ <listitem>
+ <simpara>A list of the properties (internal state)
+supported by the class. This section may not be present in all classes. The
+property descriptions include the name, the access operations (e.g. Read,
+Write), and a brief description. Properties are accessed using the <link
+linkend="method-gobject--set-property"><methodname>gobject.set_property</methodname>()</link>
+and <link
+linkend="method-gobject--get-property"><methodname>gobject.get_property</methodname>()</link>
+methods that are available to every <literal>PyGObject</literal> object. This
+section may not be present in all class descriptions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Attributes</term>
+ <listitem>
+ <simpara>A set of internal object state data accessible as Python
+ attributes (e.g. object.attr). The attribute descriptions include
+ a name by which the attribute data is accessed, the access mode
+ (e.g. Read, Write), and a brief description of the attribute. Most
+ <literal>PyGObject</literal> classes do not support attributes so
+ this section is not present in most class descriptions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Signal&nbsp;Prototypes</term>
+ <listitem>
+ <simpara>A list of the signals supported by the class including
+ the signal name and a synopsis of the signal handler function
+ prototype. This section may not be present in all class
+ descriptions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Description</term>
+ <listitem><simpara>A description of the class and possibly some of
+ the methods supported by the class.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Constructor</term>
+ <listitem>
+ <simpara>The description of the class object constructor including
+ the synopsis with brief parameter descriptions and a description
+ of th use of the constructor. There may be more than one
+ constructor description if the constructor supports different
+ parameter lists. This section may not be present in all class
+ descriptions.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Methods</term>
+ <listitem>
+ <simpara>A list of methods supported by the class. Each method
+ description includes: a synopsis of the method and its parameters
+ as well as a brief description of each parameter and return value
+ (if any); and, a description of the use of the method.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Functions</term>
+ <listitem>
+ <simpara>A list of related functions. Each function description
+ includes a synopsis of the function and its parameters and return
+ value (if any), and a description of the use of the
+ function.</simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Signals</term>
+ <listitem>
+ <simpara>A list of signals including a synopsis of the signal
+ handler prototype function with its parameters and return value
+ (if any). The signal emission conditions are briefly
+ described. This section is not present in all class descriptions;
+ specifically, the <literal>gtk.gdk</literal> classes do not
+ usually support signals.</simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The function and method synopsis parameters are displayed in
+ <emphasis role="bold">bold</emphasis> to denote Python keyword
+ parameters. Also if the parameter is optional its default value will be
+ displayed. For example the <link
+ linkend="function-gobject--signal-lookup"><function>gobject.signal_lookup</function>()</link>
+ function synopsis is:</para>
+
+ <programlisting>
+<methodsynopsis language="python">
+ <methodname><link
+linkend="function-gobject--signal-lookup">gobject.signal_lookup</link></methodname>
+ <methodparam><parameter
+ role="keyword">name</parameter></methodparam>
+ <methodparam><parameter
+ role="keyword">type</parameter></methodparam>
+ </methodsynopsis>
+</programlisting>
+
+ <para>The parameters <parameter>name</parameter> and
+ <parameter>type</parameter> are keyword parameters that can be specified
+ in a call either by position or keyword (in which case position is not
+ important). The following calls have the same result:</para>
+
+ <programlisting>
+ id = gobject.signal_lookup("clicked", gtk.Button)
+ id = gobject.signal_lookup("clicked", type=gtk.Button)
+ id = gobject.signal_lookup(name="clicked", type=gtk.Button)
+ id = gobject.signal_lookup(type=gtk.Button, name="clicked")
+</programlisting>
+
+ <para>Parameters that are not keyword parameters are displayed in
+<emphasis>italic</emphasis> and must be specified positionally but may also
+be optional.</para>
+
+ </sect1>
+
+ </chapter>
diff --git a/docs/reference/pygobject-ref.xml b/docs/reference/pygobject-ref.xml
new file mode 100644
index 0000000..5fdd80b
--- /dev/null
+++ b/docs/reference/pygobject-ref.xml
@@ -0,0 +1,36 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "entities.docbook">
+%entities;
+<!ENTITY builddate SYSTEM "builddate.xml">
+]>
+
+<book id="pygobject-reference" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <pubdate>&builddate;</pubdate>
+ <title>PyGObject Reference Manual</title>
+ <edition>for version &version;</edition>
+ <releaseinfo>for PyGObject version &version;</releaseinfo>
+ <abstract>
+ <para>This reference describes the classes of the python gobject
+module.</para>
+ </abstract>
+ </bookinfo>
+ <toc>
+ </toc>
+
+ <xi:include href="pygobject-introduction.xml"/>
+
+ <xi:include href="pyglib-classes.xml"/>
+ <xi:include href="pygobject-classes.xml"/>
+ <xi:include href="pygio-classes.xml"/>
+ <xi:include href="pygiounix-classes.xml"/>
+
+<!--
+ <index>
+ <title>Index</title>
+ </index>
+-->
+
+</book>
diff --git a/docs/reference/pygobject.xml b/docs/reference/pygobject.xml
new file mode 100644
index 0000000..ac41e47
--- /dev/null
+++ b/docs/reference/pygobject.xml
@@ -0,0 +1,1016 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="class-gobject">
+ <refmeta>
+ <refentrytitle>gobject.GObject</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo>PyGTK Docs</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>gobject.GObject</refname>
+ <refpurpose>the base class</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+<classsynopsis language="python">
+ <ooclass><classname>gobject.GObject</classname></ooclass>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--get-property">get_property</link></methodname>
+ <methodparam><parameter>property_name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--get-properties">get_properties</link></methodname>
+ <methodparam><parameter>first_property_name</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--set-property">set_property</link></methodname>
+ <methodparam><parameter>property_name</parameter></methodparam>
+ <methodparam><parameter>value</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--set-properties">set_properties</link></methodname>
+ <methodparam><parameter>property_name</parameter>
+ <initializer>value</initializer></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--freeze-notify">freeze_notify</link></methodname>
+ <methodparam></methodparam> </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--notify">notify</link></methodname>
+ <methodparam><parameter>property_name</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--thaw-notify">thaw_notify</link></methodname>
+ <methodparam></methodparam> </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--get-data">get_data</link></methodname>
+ <methodparam><parameter>key</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--set-data">set_data</link></methodname>
+ <methodparam><parameter>key</parameter></methodparam>
+ <methodparam><parameter>data</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--connect">connect</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--connect-after">connect_after</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--connect-object">connect_object</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--connect-object-after">connect_object_after</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--disconnect">disconnect</link></methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--handler-disconnect">handler_disconnect</link></methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--handler-is-connected">handler_is_connected</link></methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--handler-block">handler_block</link></methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--handler-unblock">handler_unblock</link></methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--handler-block-by-func">handler_block_by_func</link></methodname>
+ <methodparam><parameter>callable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--handler-unblock-by-func">handler_unblock_by_func</link></methodname>
+ <methodparam><parameter>callable</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--emit">emit</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--stop-emission">stop_emission</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--emit-stop-by-name">emit_stop_by_name</link></methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link
+linkend="method-gobject--chain">chain</link></methodname>
+ <methodparam></methodparam> </methodsynopsis>
+</classsynopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Attributes</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <?dbhtml cellpadding="5"?>
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+
+ <row valign="top">
+ <entry>"props"</entry>
+ <entry>Read/Write</entry>
+ <entry>
+ <para>This attribute gives full access to GObject properties as
+ simple attributes. It can be used to iterate over all the object
+ properties, and can be used both on class or instance objects.</para>
+ <para>Examples:</para>
+ <programlisting>
+button = Button()
+button_label = button.props.label
+button.props.label = 'Click on this fancy button'
+for pspec in button.props:
+ print pspec
+ print button.get_property(pspec.name)
+label_pspec = Button.props.label
+button_label = button.get_property(label_pspec.name)
+ </programlisting>
+ </entry>
+ </row>
+ <row valign="top">
+ <entry>"__doc__"</entry>
+ <entry>Read</entry>
+ <entry>The documentation for the object type. Uses
+ "__gdoc__" if no specific documentation set.</entry>
+ </row>
+ <row valign="top">
+ <entry>"__gdoc__"</entry>
+ <entry>Read</entry>
+ <entry>The generated documentation for the underlying GObject
+ type.</entry>
+ </row>
+ <row valign="top">
+ <entry>"__gtype__"</entry>
+ <entry>Read</entry>
+ <entry>The underlying GObject type.</entry>
+ </row>
+ <row valign="top">
+ <entry>"__grefcount__"</entry>
+ <entry>Read</entry>
+ <entry>The reference count for the underlying GObject.</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1 id="signal-prototypes-gobject">
+ <title>gobject.GObject Signal Prototypes</title>
+
+
+ <variablelist>
+ <varlistentry>
+ <term>"<link linkend="signal-gobject--notify">notify</link>"</term>
+ <listitem>
+ <methodsynopsis language="python"><methodname>callback</methodname>
+ <methodparam><parameter>gobject</parameter></methodparam>
+ <methodparam><parameter>property_spec</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+ <para>The <link
+ linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ class is the base class providing the common attributes and methods for
+ the PyGTK classes. The <link
+ linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ class is not a user interface widget class.</para>
+
+ <para>The <link
+ linkend="class-gobject"><classname>gobject.GObject</classname></link>
+ class provides the signal management methods, the object property access
+ methods and the object data management methods.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-gobject--get-property">
+ <title>gobject.GObject.get_property</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_property</methodname>
+ <methodparam><parameter>property_name</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>property_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the property name for the
+GObject</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a Python object containing the value of the
+property</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>get_property</methodname>() method returns the
+value of the property specified by <parameter>property_name</parameter> or
+None if there is no value associated with the property.</para>
+ <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--get-properties">
+ <title>gobject.GObject.get_properties</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_properties</methodname>
+ <methodparam><parameter>first_property_name</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>first_property_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the first property name for the
+GObject</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional property names
+</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a tuple containing the property values
+requested</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>get_properties</methodname>() method returns a tuple containing
+the values of the properties requested, or
+None if there is no value associated with the property.</para>
+ <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--set-property">
+ <title>gobject.GObject.set_property</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_property</methodname>
+ <methodparam><parameter>property_name</parameter></methodparam>
+ <methodparam><parameter>value</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>property_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the property
+name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python object containing the property value
+to be set</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>set_property</methodname>() method sets the
+property specified by <parameter>property_name</parameter> to the specified
+<parameter>value</parameter>.</para>
+ <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--set-properties">
+ <title>gobject.GObject.set_properties</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_properties</methodname>
+ <methodparam><parameter>property_name</parameter>
+ <initializer>value</initializer></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>property_name</parameter>&nbsp;:</term>
+ <listitem><simpara>the property name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python object containing the property value
+to be set</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional property name and value
+kwargs</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>set_properties</methodname>() method sets the
+property specified by <parameter>property_name</parameter> to the specified
+<parameter>value</parameter>, followed by pairs of property name
+and value as keyword arguments.</para>
+ <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--freeze-notify">
+ <title>gobject.GObject.freeze_notify</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>freeze_notify</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <para>The <methodname>freeze_notify</methodname>() method freezes the
+object's property-changed notification queue so that "notify" signals are
+blocked until the <methodname>thaw_notify</methodname>() method is
+called.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--notify">
+ <title>gobject.GObject.notify</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>notify</methodname>
+ <methodparam><parameter>property_name</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>property_name</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing a property
+name</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>notify</methodname>() method causes the "notify"
+signal for the property specified by <parameter>property_name</parameter> to
+be emitted.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--thaw-notify">
+ <title>gobject.GObject.thaw_notify</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>thaw_notify</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <para>The <methodname>thaw_notify</methodname>() method thaws the
+object's property-changed notification queue so that "notify" signals are
+emitted.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--get-data">
+ <title>gobject.GObject.get_data</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_data</methodname>
+ <methodparam><parameter>key</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>key</parameter>&nbsp;:</term>
+ <listitem><simpara>a string used as the key</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a Python object containing the associated
+data</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>get_data</methodname>() method returns the
+Python object associated with the specified <parameter>key</parameter> or
+None if there is no data associated with the <parameter>key</parameter> or
+if there is no key associated with the object.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--set-data">
+ <title>gobject.GObject.set_data</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_data</methodname>
+ <methodparam><parameter>key</parameter></methodparam>
+ <methodparam><parameter>data</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>key</parameter>&nbsp;:</term>
+ <listitem><simpara>a string used as a key</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>data</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python object that is the value to be
+associated with the key</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>set_data</methodname>() method associates the
+specified Python object (<parameter>data</parameter>) with
+<parameter>key</parameter>.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--connect">
+ <title>gobject.GObject.connect</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>connect</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>handler</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python function or method
+object.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional optional
+parameters</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>connect</methodname>() method adds a function or
+method (<parameter>handler</parameter>)to the end of the list of signal
+handlers for the named <parameter>detailed_signal</parameter> but before the
+default class signal handler. An optional set of parameters may be specified
+after the <parameter>handler</parameter> parameter. These will all be passed
+to the signal handler when invoked.</para>
+ <para>For example if a function handler was connected to a signal
+using:</para>
+ <programlisting>
+ handler_id = object.connect("signal_name", handler, arg1, arg2, arg3)
+</programlisting>
+ <para>The handler should be defined as:</para>
+ <programlisting>
+ def handler(object, arg1, arg2, arg3):
+</programlisting>
+ <para>A method handler connected to a signal using:</para>
+ <programlisting>
+ handler_id = object.connect("signal_name", self.handler, arg1, arg2)
+</programlisting>
+ <para>requires an additional argument when defined:</para>
+ <programlisting>
+ def handler(self, object, arg1, arg2)
+</programlisting>
+ <para>A <exceptionname>TypeError</exceptionname> exception is raised
+if <parameter>detailed_signal</parameter> identifies a signal name that is
+not associated with the object.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--connect-after">
+ <title>gobject.GObject.connect_after</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>connect_after</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>handler</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python function or method
+object</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional optional
+parameters</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>connect_after</methodname>() method is similar
+to the <methodname>connect</methodname>() method except that the
+<parameter>handler</parameter> is added to the signal handler list after the
+default class signal handler. Otherwise the details of
+<parameter>handler</parameter> definition and invocation are the
+same.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--connect-object">
+ <title>gobject.GObject.connect_object</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>connect_object</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ <methodparam><parameter>gobject</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>handler</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python function or method
+object</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>gobject</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>connect_object</methodname>() method is the same
+as the <methodname>connect</methodname>() method except that the
+<parameter>handler</parameter> is invoked with the specified
+<parameter>gobject</parameter> in place of the object invoking the
+<methodname>connect_object</methodname>() method. For example, a call with a
+function handler:</para>
+ <programlisting>
+ handler_id = object("signal_name", handler, gobject)
+</programlisting>
+ <para>will cause the <parameter>handler</parameter> to be invoked
+as:</para>
+ <programlisting>
+ handler(gobject)
+</programlisting>
+ <para>Likewise a method handler will be invoked as:</para>
+ <programlisting>
+ self.handler(gobject)
+</programlisting>
+ <para>This can be helpful in invoking PyGTK widget methods that
+require no arguments except the widget itself (e.g.
+<methodname>widget.destroy</methodname>()) by using the class method as the
+handler. For example, a Button "clicked" signal can be set up to invoke the
+Window <methodname>destroy</methodname>() method as:</para>
+
+ <programlisting>
+ handler_id = button.connect_object("clicked", Window.destroy, window)
+</programlisting>
+
+ <para>When the button is clicked the handler is invoked as:</para>
+
+ <programlisting>
+ Window.destroy(window)
+</programlisting>
+
+ <para>which is the same as:</para>
+
+ <programlisting>
+ window.destroy()
+</programlisting>
+
+ <para>Additional arguments may be passed to the handler as with the
+<methodname>connect</methodname>() method handler invocations.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--connect-object-after">
+ <title>gobject.GObject.connect_object_after</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>connect_object_after</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>handler</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>handler</parameter>&nbsp;:</term>
+ <listitem><simpara>a Python function or method
+object</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>gobject</parameter>&nbsp;:</term>
+ <listitem><simpara>a GObject</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>connect_object_after</methodname>() method is
+similar to the <methodname>connect_object</methodname>() method except that
+the <parameter>handler</parameter> is added to the signal handler list after
+the default class signal handler. Otherwise the details of
+<parameter>handler</parameter> definition and invocation are the
+same.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--disconnect">
+ <title>gobject.GObject.disconnect</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>disconnect</methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>handler_id</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>disconnect</methodname>() method removes the
+signal handler with the specified <parameter>handler_id</parameter> from the
+list of signal handlers for the object.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--handler-disconnect">
+ <title>gobject.GObject.handler_disconnect</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>handler_disconnect</methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>handler_id</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>handler_disconnect</methodname>() method removes
+the signal handler with the specified <parameter>handler_id</parameter> from
+the list of signal handlers for the object.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--handler-is-connected">
+ <title>gobject.GObject.handler_is_connected</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>handler_is_connected</methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>handler_id</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>TRUE</literal> if the signal handler
+is connected to the object.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>handler_is_connected</methodname>() method
+returns <literal>TRUE</literal> if the signal handler with the specified
+<parameter>handler_id</parameter> is connected to the object.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--handler-block">
+ <title>gobject.GObject.handler_block</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>handler_block</methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>handler_id</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>handler_block</methodname>() method blocks the
+signal handler with the specified <parameter>handler_id</parameter> from
+being invoked until it is unblocked.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--handler-unblock">
+ <title>gobject.GObject.handler_unblock</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>handler_unblock</methodname>
+ <methodparam><parameter>handler_id</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>handler_id</parameter>&nbsp;:</term>
+ <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--handler-block-by-func">
+ <title>gobject.GObject.handler_block_by_func</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>handler_block_by_func</methodname>
+ <methodparam><parameter>callable</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callable</parameter>&nbsp;:</term>
+ <listitem><simpara>a callable python object</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>handler_block_by_func</methodname>() method blocks the
+all signal handler connected to a specific <parameter>callable</parameter> from
+being invoked until the callable is unblocked.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--handler-unblock-by-func">
+ <title>gobject.GObject.handler_unblock_by_func</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>handler_unblock_by_func</methodname>
+ <methodparam><parameter>callback</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>callable</parameter>&nbsp;:</term>
+ <listitem><simpara>a callable python object</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>handler_unblock_by_func</methodname>() method unblocks
+all signal handler connected to a specified <parameter>callable</parameter>
+thereby allowing it to be invoked when the associated signals are
+emitted.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--emit">
+ <title>gobject.GObject.emit</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>emit</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional parameters</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a PyObject*</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>The <methodname>emit</methodname>() method causes the object to
+emit the signal specified by <parameter>detailed_signal</parameter>. The
+additional parameters must match the number and type of the required signal
+handler parameters. In most cases no additional parameters are needed. for
+example:</para>
+ <programlisting>
+ button.emit("clicked")
+</programlisting>
+ <para>is all that is required to emit the "clicked" signal for a
+button. The most common case requiring additional parameters occurs when
+emitting an event signal; for example:</para>
+ <programlisting>
+ button.emit("button_press_event", event)
+</programlisting>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--stop-emission">
+ <title>gobject.GObject.stop_emission</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>stop_emission</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>stop_emission</methodname>() method stops the
+current emission of the signal specified by
+<parameter>detailed_signal</parameter>. Any signal handlers in the list
+still to be run will not be invoked.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--emit-stop-by-name">
+ <title>gobject.GObject.emit_stop_by_name</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>emit_stop_by_name</methodname>
+ <methodparam><parameter>detailed_signal</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+ <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The <methodname>emit_stop_by_name</methodname>() method stops
+the current emission of the signal specified by
+<parameter>detailed_signal</parameter>. Any signal handlers in the list
+still to be run will not be invoked.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gobject--chain">
+ <title>gobject.GObject.chain</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>chain</methodname>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional parameters</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a Python object</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The chain() method does something.</para>
+
+ </refsect2>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Signals</title>
+
+ <refsect2 id="signal-gobject--notify">
+ <title>The GObject "notify" Signal</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>callback</methodname>
+ <methodparam><parameter>gobject</parameter></methodparam>
+ <methodparam><parameter>property_spec</parameter></methodparam>
+ <methodparam><parameter>user_param1</parameter></methodparam>
+ <methodparam><parameter>...</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>gobject</parameter>&nbsp;:</term>
+ <listitem><simpara>the gobject that received the
+signal</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>property_spec</parameter>&nbsp;:</term>
+ <listitem><simpara>the <link linkend="class-gobjectgparamspec"><classname>gobject.GParamSpec</classname></link> of the property that was
+changed</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>user_param1</parameter>&nbsp;:</term>
+ <listitem><simpara>the first user parameter (if any) specified
+with the <link
+linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+method</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter>&nbsp;:</term>
+ <listitem><simpara>additional user parameters (if
+any)</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>The "notify" signal is emitted on a gobject when one of its
+properties has been changed. Note that getting this signal doesn't guarantee
+that the value of the property has actually changed, it may also be emitted
+when the setter for the property is called to reinstate the previous
+value. For example to be notified of the change of the title of a <link
+linkend="class-gtkwindow"><classname>gtk.Window</classname></link> you could
+connect to the "notify" signal similar to:</para>
+
+ <programlisting>
+ window.connect("notify::title", callback)
+</programlisting>
+
+ </refsect2>
+
+ </refsect1>
+
+</refentry>
diff --git a/docs/style.css b/docs/style.css
new file mode 100644
index 0000000..59abc74
--- /dev/null
+++ b/docs/style.css
@@ -0,0 +1,10 @@
+.programlisting {
+font: monospace;
+background-color: #E0E0E0;
+padding: 5;
+}
+
+pre.synopsis {
+background-color: #E0E0E0;
+padding: 5;
+}
diff --git a/docs/xsl/common.xsl b/docs/xsl/common.xsl
new file mode 100644
index 0000000..606313f
--- /dev/null
+++ b/docs/xsl/common.xsl
@@ -0,0 +1,19 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:template match="parameter">
+ <xsl:choose>
+ <xsl:when test="@role = 'keyword'">
+ <xsl:call-template name="inline.boldmonoseq"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicmonoseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/devhelp.xsl b/docs/xsl/devhelp.xsl
new file mode 100644
index 0000000..ce27739
--- /dev/null
+++ b/docs/xsl/devhelp.xsl
@@ -0,0 +1,154 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'
+ xmlns="http://www.devhelp.net/book"
+ exclude-result-prefixes="#default">
+
+ <xsl:template name="generate.devhelp">
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename">
+ <xsl:choose>
+ <xsl:when test="$gtkdoc.bookname">
+ <xsl:value-of select="$gtkdoc.bookname"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>book</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>.devhelp</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="encoding" select="'utf-8'"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="devhelp"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="devhelp">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="generate.devhelp.toc.title.mode"/>
+ </xsl:variable>
+ <xsl:variable name="link">
+ <xsl:call-template name="href.target"/>
+ </xsl:variable>
+ <xsl:variable name="author">
+ <xsl:if test="articleinfo|bookinfo">
+ <xsl:apply-templates mode="generate.devhelp.authors"
+ select="articleinfo|bookinfo"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="toc.nodes" select="part|reference|preface|chapter|
+ appendix|article|bibliography|
+ glossary|index|refentry|
+ bridgehead|sect1"/>
+
+ <book title="{$title}" link="{$link}" author="{$author}" name="{$gtkdoc.bookname}" language="python">
+ <xsl:if test="$toc.nodes">
+ <chapters>
+ <xsl:apply-templates select="$toc.nodes"
+ mode="generate.devhelp.toc.mode"/>
+ </chapters>
+ </xsl:if>
+ <functions>
+ <xsl:apply-templates select="//refsect1"
+ mode="generate.devhelp.constructor.index.mode"/>
+ <xsl:apply-templates select="//refsect2"
+ mode="generate.devhelp.index.mode"/>
+ </functions>
+ </book>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.devhelp.toc.mode">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="generate.devhelp.toc.title.mode"/>
+ </xsl:variable>
+ <xsl:variable name="target">
+ <xsl:variable name="anchor" select="title/anchor"/>
+ <xsl:choose>
+ <xsl:when test="$anchor">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$anchor"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <sub name="{$title}" link="{$target}">
+ <xsl:apply-templates select="section|sect1|
+ refentry|refsect|
+ bridgehead|part|chapter"
+ mode="generate.devhelp.toc.mode"/>
+ </sub>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.devhelp.index.mode">
+ <xsl:variable name="title" select="title"/>
+ <xsl:variable name="anchor" select="title/anchor"/>
+ <xsl:variable name="target">
+ <xsl:choose>
+ <xsl:when test="$anchor">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$anchor"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <function name="{$title}" link="{$target}"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.devhelp.constructor.index.mode">
+ <xsl:variable name="title" select="title"/>
+ <xsl:variable name="anchor" select="title/anchor"/>
+ <xsl:variable name="target">
+ <xsl:choose>
+ <xsl:when test="$anchor">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$anchor"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="$title='Constructor'">
+ <xsl:variable name ="constructor" select="programlisting//methodname"/>
+ <function name="{$constructor}" link="{$target}"/>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- get title -->
+ <xsl:template match="article" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="articleinfo/title"/>
+ </xsl:template>
+ <xsl:template match="book" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="bookinfo/title"/>
+ </xsl:template>
+ <xsl:template match="refentry" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="refnamediv/refname"/>
+ </xsl:template>
+ <xsl:template match="*" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="title"/>
+ </xsl:template>
+
+ <!-- generate list of authors ... -->
+ <xsl:template match="articleinfo|bookinfo" mode="generate.devhelp.authors">
+ <xsl:for-each select="authorgroup/author">
+ <xsl:value-of select="firstname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="surname"/>
+ <xsl:if test="not(last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/fixxref.py b/docs/xsl/fixxref.py
new file mode 100644
index 0000000..f3287b3
--- /dev/null
+++ b/docs/xsl/fixxref.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import getopt
+import os
+import re
+import sys
+
+anchors = {}
+anchor_pat = re.compile(r'''^\s*<ANCHOR\s+id\s*=\s*"([^"]*)"\s+
+ href\s*=\s*"([^"]*)"\s*>''',
+ re.MULTILINE | re.VERBOSE)
+link_pat = re.compile(r'''<PYGTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)
+ </PYGTKDOCLINK\s*>''', re.DOTALL | re.VERBOSE)
+def scan_index_dir(idir):
+ for root, dirs, files in os.walk(idir):
+ if 'index.sgml' in files:
+ scan_index_file(os.path.join(root, 'index.sgml'))
+ return
+
+def scan_index_file(ifile):
+ buf = open(ifile).read()
+ for id, href in anchor_pat.findall(buf):
+ anchors[id] = href
+
+def fix_xrefs(hdir):
+ for f in os.listdir(hdir):
+ if os.path.splitext(f)[1] == '.html':
+ fix_html_file(os.path.join(hdir, f))
+
+def link_subst(m):
+ id, text = m.groups()
+ if anchors.has_key(id):
+ return '<a\nhref="../' + anchors[id] + '"\n>' + text + '</a>'
+ return text
+
+def fix_html_file(hfile):
+ buf = open(hfile).read()
+ buf = link_pat.sub(link_subst, buf)
+ open(hfile, 'w').write(buf)
+
+def usage(e=None):
+ if e:
+ sys.stderr.write('fixxref.py: %s\n' % e)
+ sys.stderr.write('usage: fixxref.py [-i index-dir] html-dir\n')
+ sys.exit(1)
+
+if __name__ == '__main__':
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "i:h:",
+ ["index-dir=", "html-dir="])
+ except getopt.error, e:
+ usage(e)
+
+ index_dirs = []
+ for opt, arg in opts:
+ if opt in ('-i', '--index-dir'):
+ index_dirs.append(arg)
+
+ if len(args) != 1:
+ usage()
+
+ for idir in index_dirs:
+ scan_index_dir(idir)
+
+ html_dir = args[0]
+ fix_xrefs(html_dir)
diff --git a/docs/xsl/fixxref.py.in b/docs/xsl/fixxref.py.in
new file mode 100644
index 0000000..f3287b3
--- /dev/null
+++ b/docs/xsl/fixxref.py.in
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import getopt
+import os
+import re
+import sys
+
+anchors = {}
+anchor_pat = re.compile(r'''^\s*<ANCHOR\s+id\s*=\s*"([^"]*)"\s+
+ href\s*=\s*"([^"]*)"\s*>''',
+ re.MULTILINE | re.VERBOSE)
+link_pat = re.compile(r'''<PYGTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)
+ </PYGTKDOCLINK\s*>''', re.DOTALL | re.VERBOSE)
+def scan_index_dir(idir):
+ for root, dirs, files in os.walk(idir):
+ if 'index.sgml' in files:
+ scan_index_file(os.path.join(root, 'index.sgml'))
+ return
+
+def scan_index_file(ifile):
+ buf = open(ifile).read()
+ for id, href in anchor_pat.findall(buf):
+ anchors[id] = href
+
+def fix_xrefs(hdir):
+ for f in os.listdir(hdir):
+ if os.path.splitext(f)[1] == '.html':
+ fix_html_file(os.path.join(hdir, f))
+
+def link_subst(m):
+ id, text = m.groups()
+ if anchors.has_key(id):
+ return '<a\nhref="../' + anchors[id] + '"\n>' + text + '</a>'
+ return text
+
+def fix_html_file(hfile):
+ buf = open(hfile).read()
+ buf = link_pat.sub(link_subst, buf)
+ open(hfile, 'w').write(buf)
+
+def usage(e=None):
+ if e:
+ sys.stderr.write('fixxref.py: %s\n' % e)
+ sys.stderr.write('usage: fixxref.py [-i index-dir] html-dir\n')
+ sys.exit(1)
+
+if __name__ == '__main__':
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "i:h:",
+ ["index-dir=", "html-dir="])
+ except getopt.error, e:
+ usage(e)
+
+ index_dirs = []
+ for opt, arg in opts:
+ if opt in ('-i', '--index-dir'):
+ index_dirs.append(arg)
+
+ if len(args) != 1:
+ usage()
+
+ for idir in index_dirs:
+ scan_index_dir(idir)
+
+ html_dir = args[0]
+ fix_xrefs(html_dir)
diff --git a/docs/xsl/html.xsl b/docs/xsl/html.xsl
new file mode 100644
index 0000000..d8fea78
--- /dev/null
+++ b/docs/xsl/html.xsl
@@ -0,0 +1,285 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:param name="html.stylesheet">style.css</xsl:param>
+<xsl:param name="use.id.as.filename" select="1"/>
+<xsl:param name="chunk.fast" select="1"/>
+<xsl:param name="chunker.output.encoding" select="'utf-8'"/>
+
+<xsl:param name="linenumbering.extension" select="1"/>
+<xsl:param name="variablelist.as.table" select="1"/>
+
+<xsl:template match="blockquote">
+ <div class="{local-name(.)}">
+ <xsl:if test="@lang or @xml:lang">
+ <xsl:call-template name="language.attribute"/>
+ </xsl:if>
+ <xsl:call-template name="anchor"/>
+
+ <xsl:choose>
+ <xsl:when test="attribution">
+ <table border="0" width="100%"
+ cellspacing="0" cellpadding="0" class="blockquote"
+ summary="Block quote">
+ <tr>
+ <td width="10%" valign="top">&#160;</td>
+ <td width="80%" valign="top">
+ <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+ </td>
+ <td width="10%" valign="top">&#160;</td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" valign="top">
+ <xsl:text>--</xsl:text>
+ <xsl:apply-templates select="attribution"/>
+ </td>
+ <td width="10%" valign="top">&#160;</td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:when test="@role = 'properties' or @role = 'prototypes'">
+ <table width="100%" border="0" bgcolor="#E0E0E0">
+ <tr>
+ <td valign="top">
+ <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <blockquote class="{local-name(.)}">
+ <xsl:apply-templates/>
+ </blockquote>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+ <!-- support for Python language for synopsises -->
+ <xsl:template match="classsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |constructorsynopsis
+ |destructorsynopsis">
+ <xsl:param name="language">
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:value-of select="@language"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default-classsynopsis-language"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <xsl:choose>
+ <xsl:when test="$language='python'">
+ <xsl:apply-templates select="." mode="python"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="classsynopsis" mode="python">
+ <table bgcolor="#D0E0F0" width="100%">
+ <tr><td>
+ <pre class="{name(.)}">
+ <xsl:text>class </xsl:text>
+ <xsl:apply-templates select="ooclass[1]" mode="python"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="python"/> <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>:&RE;</xsl:text>
+
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="python"/>
+ </pre></td></tr></table>
+ </xsl:template>
+
+ <xsl:template match="classsynopsisinfo" mode="python">
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="ooclass|oointerface|ooexception" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="modifier" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="classname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="interfacename" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="exceptionname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="fieldsynopsis" mode="python">
+ <code class="{name(.)}">
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ </code>
+ <xsl:call-template name="synop-break"/>
+ </xsl:template>
+
+ <xsl:template match="type" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="varname" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="initializer" mode="python">
+ <span class="{name(.)}">
+ <xsl:text>=</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="void" mode="python">
+ <span class="{name(.)}">
+ <xsl:text>void&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="methodname" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="methodparam" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="destructorsynopsis|methodsynopsis">
+
+ <code class="{name(.)}">
+ <xsl:text> def </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="constructorsynopsis">
+
+ <code class="{name(.)}">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+ </xsl:template>
+
+<!-- this was the original parameter python mode styling
+ <xsl:template match="parameter" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+-->
+
+ <!-- hack -->
+ <xsl:template match="link" mode="python">
+ <xsl:apply-templates select="."/>
+ </xsl:template>
+
+ <!-- ========================================================= -->
+ <!-- template to output gtkdoclink elements for the unknown targets -->
+
+ <xsl:template match="link">
+ <xsl:choose>
+ <xsl:when test="id(@linkend)">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <PYGTKDOCLINK HREF="{@linkend}">
+ <xsl:apply-templates/>
+ </PYGTKDOCLINK>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="parameter" mode="python">
+ <span class="{name(.)}">
+ <xsl:choose>
+ <xsl:when test="@role = 'keyword'">
+ <xsl:call-template name="inline.boldmonoseq"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicmonoseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+</xsl:template>
+
+<xsl:template match="variablelist">
+ <table border="0" width="100%" bgcolor="#FFECCE">
+ <col align="left" valign="top" width="0*">
+ </col>
+ <tbody>
+ <xsl:apply-templates select="varlistentry" mode="varlist-table"/>
+ </tbody>
+ </table>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/pdf-style.xsl b/docs/xsl/pdf-style.xsl
new file mode 100644
index 0000000..d4a8e02
--- /dev/null
+++ b/docs/xsl/pdf-style.xsl
@@ -0,0 +1,11 @@
+<?xml version='1.0'?> <!--*- mode: xml -*-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="pdf.xsl"/>
+
+<xsl:param name="section.autolabel" select="1"/>
+<xsl:param name="section.label.includes.component.label" select="1"/>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/pdf.xsl b/docs/xsl/pdf.xsl
new file mode 100644
index 0000000..013bfd0
--- /dev/null
+++ b/docs/xsl/pdf.xsl
@@ -0,0 +1,259 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version='1.0'>
+
+<xsl:param name="body.margin.top">0.5in</xsl:param>
+
+<xsl:template name="is.graphic.extension">
+ <xsl:param name="ext"></xsl:param>
+ <xsl:if test="$ext = 'png'
+ or $ext = 'pdf'
+ or $ext = 'jpeg'
+ or $ext = 'gif'
+ or $ext = 'tif'
+ or $ext = 'tiff'
+ or $ext = 'bmp'">1</xsl:if>
+</xsl:template>
+
+ <!-- support for Python language for synopsises -->
+ <xsl:template match="classsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |constructorsynopsis
+ |destructorsynopsis">
+ <xsl:param name="language">
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:value-of select="@language"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default-classsynopsis-language"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <xsl:choose>
+ <xsl:when test="$language='python'">
+ <xsl:apply-templates select="." mode="python"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="classsynopsis" mode="python">
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties"
+ background-color="#E0E0E0">
+ <xsl:text>class </xsl:text>
+ <xsl:apply-templates select="ooclass[1]" mode="python"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>&nbsp;:</xsl:text>
+
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="python"/>
+
+ </fo:block>
+ <xsl:text>&RE;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="classsynopsisinfo" mode="python">
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="ooclass|oointerface|ooexception" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="modifier" mode="python">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="classname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="interfacename" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="exceptionname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="fieldsynopsis" mode="python">
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties">
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ <xsl:call-template name="synop-break"/>
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template match="type" mode="python">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="varname" mode="python">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="initializer" mode="python">
+ <xsl:text>=</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="void" mode="python">
+ <xsl:text>void&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="methodname" mode="python">
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="methodparam" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="destructorsynopsis|methodsynopsis">
+
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties">
+ <xsl:text> def </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+<!-- <xsl:call-template name="synop-break"/> -->
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="constructorsynopsis">
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </fo:block>
+ </xsl:template>
+
+ <!-- hack -->
+ <xsl:template match="link" mode="python">
+ <xsl:apply-templates select="."/>
+ </xsl:template>
+
+<!--
+<xsl:template match="variablelist" mode="vl.as.blocks">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:if test="title">
+ <xsl:apply-templates select="title" mode="list.title.mode"/>
+ </xsl:if>
+
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="list.block.spacing"
+ background-color="#FFECCE">
+ <xsl:apply-templates mode="vl.as.blocks"/>
+ </fo:block>
+</xsl:template>
+-->
+
+<!--
+<xsl:template match="variablelist">
+ <fo:table border="0"
+ width="100%"
+ background-color="#FFECCE"
+ table-layout="fixed">
+ <fo:table-column
+ align="left"
+ column-width="20%"
+ column-number="1">
+ </fo:table-column>
+ <fo:table-column
+ align="left"
+ column-width="80%"
+ column-number="2">
+ </fo:table-column>
+ <fo:table-body>
+ <xsl:apply-templates select="varlistentry"/>
+ </fo:table-body>
+ </fo:table>
+</xsl:template>
+
+<xsl:template match="varlistentry">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block
+ background-color="#FFECCE">
+ <xsl:apply-templates select="term"/>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block
+ background-color="#FFECCE">
+ <xsl:apply-templates select="listitem"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+</xsl:template>
+
+<xsl:template match="varlistentry/term">
+ <xsl:apply-templates/>
+ <xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="varlistentry/term[position()=last()]" priority="2">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="varlistentry/listitem">
+ <xsl:apply-templates/>
+</xsl:template>
+-->
+
+</xsl:stylesheet>
diff --git a/docs/xsl/ref-html-style.xsl b/docs/xsl/ref-html-style.xsl
new file mode 100644
index 0000000..a152077
--- /dev/null
+++ b/docs/xsl/ref-html-style.xsl
@@ -0,0 +1,54 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="devhelp.xsl"/>
+
+ <!-- ========================================================= -->
+ <!-- template to create the index.sgml anchor index -->
+
+ <xsl:template name="generate.index">
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename" select="'index.sgml'"/>
+ <xsl:with-param name="content">
+ <!-- check all anchor and refentry elements -->
+ <xsl:apply-templates select="//anchor|//refentry|//refsect1|//refsect2|//book"
+ mode="generate.index.mode"/>
+ </xsl:with-param>
+ <xsl:with-param name="encoding" select="'utf-8'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.index.mode">
+ <xsl:if test="not(@href)">
+ <xsl:if test="@id">
+ <xsl:text>&lt;ANCHOR id=&quot;</xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>&quot; href=&quot;</xsl:text>
+ <xsl:if test="$gtkdoc.bookname">
+ <xsl:value-of select="$gtkdoc.bookname"/>
+ <xsl:text>/</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="href.target"/>
+ <xsl:text>&quot;&gt;
+ </xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:param name="gtkdoc.version" select="''"/>
+ <xsl:param name="gtkdoc.bookname" select="''"/>
+
+ <xsl:param name="refentry.generate.name" select="0"/>
+ <xsl:param name="refentry.generate.title" select="1"/>
+ <xsl:param name="chapter.autolabel" select="0"/>
+
+ <xsl:template match="book|article">
+ <xsl:apply-imports/>
+ <xsl:call-template name="generate.devhelp"/>
+ <xsl:call-template name="generate.index"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/dsextras.py b/dsextras.py
new file mode 100644
index 0000000..10973e2
--- /dev/null
+++ b/dsextras.py
@@ -0,0 +1,457 @@
+#
+# dsextras.py - Extra classes and utilities for distutils, adding
+# pkg-config support
+
+
+from distutils.command.build_ext import build_ext
+from distutils.command.install_lib import install_lib
+from distutils.command.install_data import install_data
+from distutils.extension import Extension
+import distutils.dep_util
+import fnmatch
+import os
+import re
+import string
+import sys
+
+GLOBAL_INC = []
+GLOBAL_MACROS = []
+
+def get_m4_define(varname):
+ """Return the value of a m4_define variable as set in configure.in."""
+ pattern = re.compile("m4_define\(" + varname + "\,\s*(.+)\)")
+ if os.path.exists('configure.ac'):
+ fname = 'configure.ac'
+ elif os.path.exists('configure.in'):
+ fname = 'configure.in'
+ else:
+ raise SystemExit('could not find configure file')
+
+ for line in open(fname).readlines():
+ match_obj = pattern.match(line)
+ if match_obj:
+ return match_obj.group(1)
+
+ return None
+
+def getoutput(cmd):
+ """Return output (stdout or stderr) of executing cmd in a shell."""
+ return getstatusoutput(cmd)[1]
+
+def getstatusoutput(cmd):
+ """Return (status, output) of executing cmd in a shell."""
+ if sys.platform == 'win32':
+ pipe = os.popen(cmd, 'r')
+ text = pipe.read()
+ sts = pipe.close() or 0
+ if text[-1:] == '\n':
+ text = text[:-1]
+ return sts, text
+ else:
+ from commands import getstatusoutput
+ return getstatusoutput(cmd)
+
+def have_pkgconfig():
+ """Checks for the existence of pkg-config"""
+ if (sys.platform == 'win32' and
+ os.system('pkg-config --version > NUL') == 0):
+ return 1
+ else:
+ if getstatusoutput('pkg-config')[0] == 256:
+ return 1
+
+def list_files(dir):
+ """List all files in a dir, with filename match support:
+ for example: glade/*.glade will return all files in the glade directory
+ that matches *.glade. It also looks up the full path"""
+ if dir.find(os.sep) != -1:
+ parts = dir.split(os.sep)
+ dir = string.join(parts[:-1], os.sep)
+ pattern = parts[-1]
+ else:
+ pattern = dir
+ dir = '.'
+
+ dir = os.path.abspath(dir)
+ retval = []
+ for file in os.listdir(dir):
+ if fnmatch.fnmatch(file, pattern):
+ retval.append(os.path.join(dir, file))
+ return retval
+
+def pkgc_version_check(name, req_version):
+ """Check the existence and version number of a package:
+ returns 0 if not installed or too old, 1 otherwise."""
+ is_installed = not os.system('pkg-config --exists %s' % name)
+ if not is_installed:
+ return 0
+
+ orig_version = getoutput('pkg-config --modversion %s' % name)
+ version = map(int, orig_version.split('.'))
+ pkc_version = map(int, req_version.split('.'))
+
+ if version >= pkc_version:
+ return 1
+
+ return 0
+
+def pkgc_get_libraries(name):
+ """returns a list of libraries as returned by pkg-config --libs-only-l"""
+ output = getoutput('pkg-config --libs-only-l %s' % name)
+ return output.replace('-l', '').split()
+
+def pkgc_get_library_dirs(name):
+ """returns a list of library dirs as returned by pkg-config --libs-only-L"""
+ output = getoutput('pkg-config --libs-only-L %s' % name)
+ return output.replace('-L', '').split()
+
+def pkgc_get_include_dirs(name):
+ """returns a list of include dirs as returned by pkg-config --cflags-only-I"""
+ output = getoutput('pkg-config --cflags-only-I %s' % name)
+ return output.replace('-I', '').split()
+
+class BuildExt(build_ext):
+ def init_extra_compile_args(self):
+ self.extra_compile_args = []
+ if sys.platform == 'win32' and \
+ self.compiler.compiler_type == 'mingw32':
+ # MSVC compatible struct packing is required.
+ # Note gcc2 uses -fnative-struct while gcc3
+ # uses -mms-bitfields. Based on the version
+ # the proper flag is used below.
+ msnative_struct = { '2' : '-fnative-struct',
+ '3' : '-mms-bitfields' }
+ gcc_version = getoutput('gcc -dumpversion')
+ print 'using MinGW GCC version %s with %s option' % \
+ (gcc_version, msnative_struct[gcc_version[0]])
+ self.extra_compile_args.append(msnative_struct[gcc_version[0]])
+
+ def modify_compiler(self):
+ if sys.platform == 'win32' and \
+ self.compiler.compiler_type == 'mingw32':
+ # Remove '-static' linker option to prevent MinGW ld
+ # from trying to link with MSVC import libraries.
+ if self.compiler.linker_so.count('-static'):
+ self.compiler.linker_so.remove('-static')
+
+ def build_extensions(self):
+ # Init self.extra_compile_args
+ self.init_extra_compile_args()
+ # Modify default compiler settings
+ self.modify_compiler()
+ # Invoke base build_extensions()
+ build_ext.build_extensions(self)
+
+ def build_extension(self, ext):
+ # Add self.extra_compile_args to ext.extra_compile_args
+ ext.extra_compile_args += self.extra_compile_args
+ # Generate eventual templates before building
+ if hasattr(ext, 'generate'):
+ ext.generate()
+ # Filter out 'c' and 'm' libs when compilic w/ msvc
+ if sys.platform == 'win32' and self.compiler.compiler_type == 'msvc':
+ save_libs = ext.libraries
+ ext.libraries = [lib for lib in ext.libraries
+ if lib not in ['c', 'm']]
+ else:
+ save_libs = ext.libraries
+ # Invoke base build_extension()
+ build_ext.build_extension(self, ext)
+ if save_libs != None and save_libs != ext.libraries:
+ ext.libraries = save_libs
+
+class InstallLib(install_lib):
+
+ local_outputs = []
+ local_inputs = []
+
+ def set_install_dir(self, install_dir):
+ self.install_dir = install_dir
+
+ def get_outputs(self):
+ return install_lib.get_outputs(self) + self.local_outputs
+
+ def get_inputs(self):
+ return install_lib.get_inputs(self) + self.local_inputs
+
+class InstallData(install_data):
+
+ local_outputs = []
+ local_inputs = []
+ template_options = {}
+
+ def prepare(self):
+ if os.name == "nt":
+ self.prefix = os.sep.join(self.install_dir.split(os.sep)[:-3])
+ else:
+ # default: os.name == "posix"
+ self.prefix = os.sep.join(self.install_dir.split(os.sep)[:-4])
+
+ self.exec_prefix = '${prefix}/bin'
+ self.includedir = '${prefix}/include'
+ self.libdir = '${prefix}/lib'
+ self.datarootdir = '${prefix}/share'
+ self.datadir = '${prefix}/share'
+
+ self.add_template_option('prefix', self.prefix)
+ self.add_template_option('exec_prefix', self.exec_prefix)
+ self.add_template_option('includedir', self.includedir)
+ self.add_template_option('libdir', self.libdir)
+ self.add_template_option('datarootdir', self.datarootdir)
+ self.add_template_option('datadir', self.datadir)
+ self.add_template_option('PYTHON', sys.executable)
+ self.add_template_option('THREADING_CFLAGS', '')
+
+ def set_install_dir(self, install_dir):
+ self.install_dir = install_dir
+
+ def add_template_option(self, name, value):
+ self.template_options['@%s@' % name] = value
+
+ def install_template(self, filename, install_dir):
+ """Install template filename into target directory install_dir."""
+ output_file = os.path.split(filename)[-1][:-3]
+
+ template = open(filename).read()
+ for key, value in self.template_options.items():
+ template = template.replace(key, value)
+
+ output = os.path.join(install_dir, output_file)
+ self.mkpath(install_dir)
+ open(output, 'w').write(template)
+ self.local_inputs.append(filename)
+ self.local_outputs.append(output)
+ return output
+
+ def get_outputs(self):
+ return install_data.get_outputs(self) + self.local_outputs
+
+ def get_inputs(self):
+ return install_data.get_inputs(self) + self.local_inputs
+
+class PkgConfigExtension(Extension):
+ # Name of pygobject package extension depends on, can be None
+ pygobject_pkc = 'pygobject-2.0'
+ can_build_ok = None
+ def __init__(self, **kwargs):
+ name = kwargs['pkc_name']
+ if 'include_dirs' in kwargs:
+ kwargs['include_dirs'] += self.get_include_dirs(name) + GLOBAL_INC
+ else:
+ kwargs['include_dirs'] = self.get_include_dirs(name) + GLOBAL_INC
+ kwargs['define_macros'] = GLOBAL_MACROS
+ if 'libraries' in kwargs:
+ kwargs['libraries'] += self.get_libraries(name)
+ else:
+ kwargs['libraries'] = self.get_libraries(name)
+ if 'library_dirs' in kwargs:
+ kwargs['library_dirs'] += self.get_library_dirs(name)
+ else:
+ kwargs['library_dirs'] = self.get_library_dirs(name)
+ if 'pygobject_pkc' in kwargs:
+ self.pygobject_pkc = kwargs.pop('pygobject_pkc')
+ if self.pygobject_pkc:
+ kwargs['include_dirs'] += self.get_include_dirs(self.pygobject_pkc)
+ kwargs['libraries'] += self.get_libraries(self.pygobject_pkc)
+ kwargs['library_dirs'] += self.get_library_dirs(self.pygobject_pkc)
+ self.name = kwargs['name']
+ self.pkc_name = kwargs['pkc_name']
+ self.pkc_version = kwargs['pkc_version']
+ del kwargs['pkc_name'], kwargs['pkc_version']
+ Extension.__init__(self, **kwargs)
+
+ def get_include_dirs(self, names):
+ if type(names) != tuple:
+ names = (names,)
+ retval = []
+ for name in names:
+ output = getoutput('pkg-config --cflags-only-I %s' % name)
+ retval.extend(output.replace('-I', '').split())
+ return retval
+
+ def get_libraries(self, names):
+ if type(names) != tuple:
+ names = (names,)
+ retval = []
+ for name in names:
+ output = getoutput('pkg-config --libs-only-l %s' % name)
+ retval.extend(output.replace('-l', '').split())
+ return retval
+
+ def get_library_dirs(self, names):
+ if type(names) != tuple:
+ names = (names,)
+ retval = []
+ for name in names:
+ output = getoutput('pkg-config --libs-only-L %s' % name)
+ retval.extend(output.replace('-L', '').split())
+ return retval
+
+ def can_build(self):
+ """If the pkg-config version found is good enough"""
+ if self.can_build_ok != None:
+ return self.can_build_ok
+
+ if type(self.pkc_name) != tuple:
+ reqs = [(self.pkc_name, self.pkc_version)]
+ else:
+ reqs = zip(self.pkc_name, self.pkc_version)
+
+ for package, version in reqs:
+ retval = os.system('pkg-config --exists %s' % package)
+ if retval:
+ print ("* %s.pc could not be found, bindings for %s"
+ " will not be built." % (package, self.name))
+ self.can_build_ok = 0
+ return 0
+
+ orig_version = getoutput('pkg-config --modversion %s' %
+ package)
+ if (map(int, orig_version.split('.')) >=
+ map(int, version.split('.'))):
+ self.can_build_ok = 1
+ return 1
+ else:
+ print "Warning: Too old version of %s" % self.pkc_name
+ print " Need %s, but %s is installed" % \
+ (version, orig_version)
+ self.can_build_ok = 0
+ return 0
+
+ def generate(self):
+ pass
+
+# The Template and TemplateExtension classes require codegen which is
+# currently part of the pygtk distribution. While codegen might ultimately
+# be moved to pygobject, it was decided (bug #353849) to keep the Template
+# and TemplateExtension code in dsextras. In the meantime, we check for the
+# availability of codegen and redirect the user to the pygtk installer if
+# he/she wants to get access to Template and TemplateExtension.
+
+template_classes_enabled=True
+codegen_error_message="""
+***************************************************************************
+Codegen could not be found on your system and is required by the
+dsextras.Template and dsextras.TemplateExtension classes. codegen is part
+of PyGTK. To use either Template or TemplateExtension, you should also
+install PyGTK.
+***************************************************************************
+"""
+try:
+ from codegen.override import Overrides
+ from codegen.defsparser import DefsParser
+ from codegen.codegen import register_types, SourceWriter, \
+ FileOutput
+ import codegen.createdefs
+except ImportError, e:
+ template_classes_enabled=False
+
+class Template(object):
+ def __new__(cls,*args, **kwds):
+ if not template_classes_enabled:
+ raise NameError("'%s' is not defined\n" % cls.__name__
+ + codegen_error_message)
+ return object.__new__(cls,*args, **kwds)
+
+ def __init__(self, override, output, defs, prefix,
+ register=[], load_types=None, py_ssize_t_clean=False):
+
+ self.override = override
+ self.output = output
+ self.prefix = prefix
+ self.load_types = load_types
+ self.py_ssize_t_clean = py_ssize_t_clean
+
+ self.built_defs=[]
+ if isinstance(defs,tuple):
+ self.defs=defs[0]
+ self.built_defs.append(defs)
+ else:
+ self.defs=defs
+
+ self.register=[]
+ for r in register:
+ if isinstance(r,tuple):
+ self.register.append(r[0])
+ self.built_defs.append(r)
+ else:
+ self.register.append(r)
+
+ def check_dates(self):
+ # Return True if files are up-to-date
+ files=self.register[:]
+ files.append(self.override)
+ files.append(self.defs)
+
+ return not distutils.dep_util.newer_group(files,self.output)
+
+ def generate_defs(self):
+ for (target,sources) in self.built_defs:
+ if distutils.dep_util.newer_group(sources,target):
+ # createdefs is mostly called from the CLI !
+ args=['dummy',target]+sources
+ codegen.createdefs.main(args)
+
+
+ def generate(self):
+ # Generate defs files if necessary
+ self.generate_defs()
+ # ... then check the file timestamps
+ if self.check_dates():
+ return
+
+ for item in self.register:
+ dp = DefsParser(item,dict(GLOBAL_MACROS))
+ dp.startParsing()
+ register_types(dp)
+
+ if self.load_types:
+ globals = {}
+ execfile(self.load_types, globals)
+
+ dp = DefsParser(self.defs,dict(GLOBAL_MACROS))
+ dp.startParsing()
+ register_types(dp)
+
+ fd = open(self.output, 'w')
+ sw = SourceWriter(dp,Overrides(self.override),
+ self.prefix,FileOutput(fd,self.output))
+ sw.write(self.py_ssize_t_clean)
+ fd.close()
+
+class TemplateExtension(PkgConfigExtension):
+ def __new__(cls,*args, **kwds):
+ if not template_classes_enabled:
+ raise NameError("'%s' is not defined\n" % cls.__name__
+ + codegen_error_message)
+ return PkgConfigExtension.__new__(cls,*args, **kwds)
+
+ def __init__(self, **kwargs):
+ name = kwargs['name']
+ defs = kwargs['defs']
+ if isinstance(defs,tuple):
+ output = defs[0][:-5] + '.c'
+ else:
+ output = defs[:-5] + '.c'
+ override = kwargs['override']
+ load_types = kwargs.get('load_types')
+ py_ssize_t_clean = kwargs.pop('py_ssize_t_clean',False)
+ self.templates = []
+ self.templates.append(Template(override, output, defs, 'py' + name,
+ kwargs['register'], load_types,
+ py_ssize_t_clean))
+
+ del kwargs['register'], kwargs['override'], kwargs['defs']
+ if load_types:
+ del kwargs['load_types']
+
+ if kwargs.has_key('output'):
+ kwargs['name'] = kwargs['output']
+ del kwargs['output']
+
+ PkgConfigExtension.__init__(self, **kwargs)
+
+ def generate(self):
+ map(lambda x: x.generate(), self.templates)
+
+
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..41cefea
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = properties.py signal.py option.py
+
diff --git a/examples/Makefile.in b/examples/Makefile.in
new file mode 100644
index 0000000..4953cdd
--- /dev/null
+++ b/examples/Makefile.in
@@ -0,0 +1,386 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = properties.py signal.py option.py
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(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/examples/option.py b/examples/option.py
new file mode 100644
index 0000000..345517e
--- /dev/null
+++ b/examples/option.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# gnome-python/pygobject/examples/option.py
+
+from gobject.option import OptionGroup, OptionParser, make_option
+
+group = OptionGroup("example", "OptionGroup Example", "Shows all example options",
+ option_list = [
+ make_option("--example",
+ action="store_true",
+ dest="example",
+ help="An example option."),
+ ])
+
+parser = OptionParser("NAMES ...",
+ description="A simple gobject.option example.",
+ option_list = [
+ make_option("--file", "-f",
+ type="filename",
+ action="store",
+ dest="file",
+ help="A filename option"),
+ # ...
+ ])
+
+parser.add_option_group(group)
+
+parser.parse_args()
+
+print "group: example ", group.values.example
+print "parser: file", parser.values.file
diff --git a/examples/properties.py b/examples/properties.py
new file mode 100644
index 0000000..cc05920
--- /dev/null
+++ b/examples/properties.py
@@ -0,0 +1,31 @@
+import gobject
+
+class MyObject(gobject.GObject):
+
+ foo = gobject.property(type=str, default='bar')
+ boolprop = gobject.property(type=bool, default=False)
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+
+ @gobject.property
+ def readonly(self):
+ return 'readonly'
+
+gobject.type_register(MyObject)
+
+print "MyObject properties: ", list(MyObject.props)
+
+obj = MyObject()
+
+print "obj.foo ==", obj.foo
+
+obj.foo = 'spam'
+print "obj.foo = spam"
+
+print "obj.foo == ", obj.foo
+
+print "obj.boolprop == ", obj.boolprop
+
+print obj.readonly
+obj.readonly = 'does-not-work'
diff --git a/examples/signal.py b/examples/signal.py
new file mode 100644
index 0000000..26ddae9
--- /dev/null
+++ b/examples/signal.py
@@ -0,0 +1,28 @@
+import pygtk; pygtk.require("2.0")
+import gobject
+
+class C(gobject.GObject):
+ __gsignals__ = {
+ 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ (gobject.TYPE_INT,))
+ }
+ def __init__(self):
+ self.__gobject_init__() # default constructor using our new GType
+ def do_my_signal(self, arg):
+ print "C: class closure for `my_signal' called with argument", arg
+
+class D(C):
+ def do_my_signal(self, arg):
+ print "D: class closure for `my_signal' called. Chaining up to C"
+ C.do_my_signal(self, arg)
+
+def my_signal_handler(object, arg, *extra):
+ print "handler for `my_signal' called with argument", arg, \
+ "and extra args", extra
+
+inst = C()
+inst2 = D()
+
+inst.connect("my_signal", my_signal_handler, 1, 2, 3)
+inst.emit("my_signal", 42)
+inst2.emit("my_signal", 42)
diff --git a/gio/Makefile.am b/gio/Makefile.am
new file mode 100644
index 0000000..a34fd19
--- /dev/null
+++ b/gio/Makefile.am
@@ -0,0 +1,116 @@
+AUTOMAKE_OPTIONS = 1.7
+
+PLATFORM_VERSION = 2.0
+
+INCLUDES = \
+ -I$(top_srcdir)/glib \
+ -I$(top_srcdir)/gobject \
+ $(PYTHON_INCLUDES) \
+ $(PYGOBJECT_CFLAGS) \
+ $(GIO_CFLAGS)
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA =
+
+# python
+pyexec_LTLIBRARIES =
+
+# gio extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
+pkgpyexec_LTLIBRARIES =
+
+# gio python scripts
+pygiodir = $(pkgpyexecdir)
+pygio_PYTHON = __init__.py
+
+# linker flags
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+CLEANFILES =
+EXTRA_DIST =
+
+# gio module
+GIO_OVERRIDES = \
+ gio.override \
+ gappinfo.override \
+ gapplaunchcontext.override \
+ gbufferedinputstream.override \
+ gcancellable.override \
+ gdatainputstream.override \
+ gdrive.override \
+ gfile.override \
+ gfileattribute.override \
+ gfileenumerator.override \
+ gfileinfo.override \
+ gfileinputstream.override \
+ gfileiostream.override \
+ gfileoutputstream.override \
+ gicon.override \
+ giostream.override \
+ ginputstream.override \
+ gmemoryinputstream.override \
+ gmemoryoutputstream.override \
+ gmount.override \
+ goutputstream.override \
+ gresolver.override \
+ gsocket.override \
+ gvolume.override \
+ gvolumemonitor.override
+
+GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
+CLEANFILES += gio.c
+EXTRA_DIST += $(GIO_DEFS) $(GIO_OVERRIDES)
+gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
+_gio_la_CFLAGS = $(GIO_CFLAGS)
+_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
+_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gio_la_SOURCES = \
+ giomodule.c \
+ pygio-utils.c \
+ pygio-utils.h
+nodist__gio_la_SOURCES = gio.c
+if BUILD_GIO
+pkgpyexec_LTLIBRARIES += _gio.la
+defs_DATA += $(GIO_DEFS)
+endif
+
+# giounix module
+GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
+CLEANFILES += unix.c
+EXTRA_DIST += $(GIOUNIX_DEFS) unix.override
+unix.c: $(GIOUNIX_DEFS) unix.override
+unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
+unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
+unix_la_LIBADD = $(GIOUNIX_LIBS)
+unix_la_SOURCES = unixmodule.c
+nodist_unix_la_SOURCES = unix.c
+if BUILD_GIOUNIX
+pkgpyexec_LTLIBRARIES += unix.la
+defs_DATA += $(GIOUNIX_DEFS)
+endif
+
+
+# code generator
+.defs.c:
+ (cd $(srcdir)\
+ && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
+ --py_ssize_t-clean \
+ --register gio-types.defs \
+ --register unix-types.defs \
+ --override $*.override \
+ --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
+ && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
+ && rm -f $(*D)/gen-$(*F).c
+
+
+if BUILD_GIO
+all: $(pkgpyexec_LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
+endif
diff --git a/gio/Makefile.in b/gio/Makefile.in
new file mode 100644
index 0000000..f0cd632
--- /dev/null
+++ b/gio/Makefile.in
@@ -0,0 +1,807 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@BUILD_GIO_TRUE@am__append_2 = _gio.la
+@BUILD_GIO_TRUE@am__append_3 = $(GIO_DEFS)
+@BUILD_GIOUNIX_TRUE@am__append_4 = unix.la
+@BUILD_GIOUNIX_TRUE@am__append_5 = $(GIOUNIX_DEFS)
+subdir = gio
+DIST_COMMON = $(pygio_PYTHON) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+ "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"
+LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_gio_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+am__gio_la_OBJECTS = _gio_la-giomodule.lo _gio_la-pygio-utils.lo
+nodist__gio_la_OBJECTS = _gio_la-gio.lo
+_gio_la_OBJECTS = $(am__gio_la_OBJECTS) $(nodist__gio_la_OBJECTS)
+_gio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(_gio_la_CFLAGS) $(CFLAGS) \
+ $(_gio_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_GIO_TRUE@am__gio_la_rpath = -rpath $(pkgpyexecdir)
+unix_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_unix_la_OBJECTS = unix_la-unixmodule.lo
+nodist_unix_la_OBJECTS = unix_la-unix.lo
+unix_la_OBJECTS = $(am_unix_la_OBJECTS) $(nodist_unix_la_OBJECTS)
+unix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(unix_la_CFLAGS) $(CFLAGS) \
+ $(unix_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_GIOUNIX_TRUE@am_unix_la_rpath = -rpath $(pkgpyexecdir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(_gio_la_SOURCES) $(nodist__gio_la_SOURCES) \
+ $(unix_la_SOURCES) $(nodist_unix_la_SOURCES)
+DIST_SOURCES = $(_gio_la_SOURCES) $(unix_la_SOURCES)
+py_compile = $(top_srcdir)/py-compile
+DATA = $(defs_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+
+# gio extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+PLATFORM_VERSION = 2.0
+INCLUDES = \
+ -I$(top_srcdir)/glib \
+ -I$(top_srcdir)/gobject \
+ $(PYTHON_INCLUDES) \
+ $(PYGOBJECT_CFLAGS) \
+ $(GIO_CFLAGS)
+
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA = $(am__append_3) $(am__append_5)
+
+# python
+pyexec_LTLIBRARIES =
+pkgpyexec_LTLIBRARIES = $(am__append_2) $(am__append_4)
+
+# gio python scripts
+pygiodir = $(pkgpyexecdir)
+pygio_PYTHON = __init__.py
+
+# linker flags
+common_ldflags = -module -avoid-version $(am__append_1)
+CLEANFILES = gio.c unix.c
+EXTRA_DIST = $(GIO_DEFS) $(GIO_OVERRIDES) $(GIOUNIX_DEFS) \
+ unix.override
+
+# gio module
+GIO_OVERRIDES = \
+ gio.override \
+ gappinfo.override \
+ gapplaunchcontext.override \
+ gbufferedinputstream.override \
+ gcancellable.override \
+ gdatainputstream.override \
+ gdrive.override \
+ gfile.override \
+ gfileattribute.override \
+ gfileenumerator.override \
+ gfileinfo.override \
+ gfileinputstream.override \
+ gfileiostream.override \
+ gfileoutputstream.override \
+ gicon.override \
+ giostream.override \
+ ginputstream.override \
+ gmemoryinputstream.override \
+ gmemoryoutputstream.override \
+ gmount.override \
+ goutputstream.override \
+ gresolver.override \
+ gsocket.override \
+ gvolume.override \
+ gvolumemonitor.override
+
+GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
+_gio_la_CFLAGS = $(GIO_CFLAGS)
+_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
+_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gio_la_SOURCES = \
+ giomodule.c \
+ pygio-utils.c \
+ pygio-utils.h
+
+nodist__gio_la_SOURCES = gio.c
+
+# giounix module
+GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
+unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
+unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
+unix_la_LIBADD = $(GIOUNIX_LIBS)
+unix_la_SOURCES = unixmodule.c
+nodist_unix_la_SOURCES = unix.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .defs .la .lo .o .obj .so
+$(srcdir)/Makefile.in: $(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) --gnu gio/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu gio/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \
+ }
+
+uninstall-pkgpyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \
+ done
+
+clean-pkgpyexecLTLIBRARIES:
+ -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES)
+ @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
+ }
+
+uninstall-pyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
+ done
+
+clean-pyexecLTLIBRARIES:
+ -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
+ @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+_gio.la: $(_gio_la_OBJECTS) $(_gio_la_DEPENDENCIES)
+ $(_gio_la_LINK) $(am__gio_la_rpath) $(_gio_la_OBJECTS) $(_gio_la_LIBADD) $(LIBS)
+unix.la: $(unix_la_OBJECTS) $(unix_la_DEPENDENCIES)
+ $(unix_la_LINK) $(am_unix_la_rpath) $(unix_la_OBJECTS) $(unix_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-gio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-giomodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-pygio-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unixmodule.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+_gio_la-giomodule.lo: giomodule.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-giomodule.lo -MD -MP -MF $(DEPDIR)/_gio_la-giomodule.Tpo -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gio_la-giomodule.Tpo $(DEPDIR)/_gio_la-giomodule.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='giomodule.c' object='_gio_la-giomodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
+
+_gio_la-pygio-utils.lo: pygio-utils.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-pygio-utils.lo -MD -MP -MF $(DEPDIR)/_gio_la-pygio-utils.Tpo -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gio_la-pygio-utils.Tpo $(DEPDIR)/_gio_la-pygio-utils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygio-utils.c' object='_gio_la-pygio-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
+
+_gio_la-gio.lo: gio.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-gio.lo -MD -MP -MF $(DEPDIR)/_gio_la-gio.Tpo -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gio_la-gio.Tpo $(DEPDIR)/_gio_la-gio.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='_gio_la-gio.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
+
+unix_la-unixmodule.lo: unixmodule.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unixmodule.lo -MD -MP -MF $(DEPDIR)/unix_la-unixmodule.Tpo -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/unix_la-unixmodule.Tpo $(DEPDIR)/unix_la-unixmodule.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unixmodule.c' object='unix_la-unixmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
+
+unix_la-unix.lo: unix.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unix.lo -MD -MP -MF $(DEPDIR)/unix_la-unix.Tpo -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/unix_la-unix.Tpo $(DEPDIR)/unix_la-unix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unix.c' object='unix_la-unix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-pygioPYTHON: $(pygio_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(pygiodir)" || $(MKDIR_P) "$(DESTDIR)$(pygiodir)"
+ @list='$(pygio_PYTHON)'; dlist=; list2=; test -n "$(pygiodir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygiodir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pygiodir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygiodir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygiodir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-pygioPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pygio_PYTHON)'; test -n "$(pygiodir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pygiodir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(pygiodir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(pygiodir)" && rm -f $$fileso
+install-defsDATA: $(defs_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(defsdir)" || $(MKDIR_P) "$(DESTDIR)$(defsdir)"
+ @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(defsdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(defsdir)" || exit $$?; \
+ done
+
+uninstall-defsDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(defsdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(defsdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+@BUILD_GIO_FALSE@clean-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-pkgpyexecLTLIBRARIES clean-pyexecLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-defsDATA install-pygioPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkgpyexecLTLIBRARIES \
+ install-pyexecLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
+ uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-local clean-pkgpyexecLTLIBRARIES \
+ clean-pyexecLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-defsDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgpyexecLTLIBRARIES \
+ install-ps install-ps-am install-pyexecLTLIBRARIES \
+ install-pygioPYTHON install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
+ uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
+
+gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
+unix.c: $(GIOUNIX_DEFS) unix.override
+
+# code generator
+.defs.c:
+ (cd $(srcdir)\
+ && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
+ --py_ssize_t-clean \
+ --register gio-types.defs \
+ --register unix-types.defs \
+ --override $*.override \
+ --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
+ && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
+ && rm -f $(*D)/gen-$(*F).c
+
+@BUILD_GIO_TRUE@all: $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@clean-local:
+@BUILD_GIO_TRUE@ rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@.la.so:
+@BUILD_GIO_TRUE@ $(LN_S) .libs/$@ $@ || true
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gio/__init__.py b/gio/__init__.py
new file mode 100644
index 0000000..c4b02bb
--- /dev/null
+++ b/gio/__init__.py
@@ -0,0 +1,40 @@
+# -*- Mode: Python -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2008 Johan Dahlin
+#
+# gio/__init__.py: initialisation file for gio module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+from gobject import GObjectMeta
+from _gio import *
+from _gio import \
+ _app_info_init, _install_app_info_meta, \
+ _file_init, _install_file_meta
+try:
+ import unix
+ unix # pyflakes
+except ImportError:
+ unix = None
+del _gio
+
+class GFileMeta(GObjectMeta):
+ __call__ = _file_init
+_install_file_meta(GFileMeta)
+
+class GAppInfoMeta(GObjectMeta):
+ __call__ = _app_info_init
+_install_app_info_meta(GAppInfoMeta)
diff --git a/gio/gappinfo.override b/gio/gappinfo.override
new file mode 100644
index 0000000..414769b
--- /dev/null
+++ b/gio/gappinfo.override
@@ -0,0 +1,208 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * gappinfo.override: module overrides for GInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+define _install_app_info_meta
+static PyObject *
+_wrap__install_app_info_meta(PyObject *self, PyObject *args)
+{
+ PyObject *metaclass;
+
+ if (!PyArg_ParseTuple(args, "O", &metaclass))
+ return NULL;
+
+ Py_INCREF(metaclass);
+ PyGAppInfo_Type.ob_type = (PyTypeObject*)metaclass;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+define _app_info_init kwargs
+static PyObject *
+_wrap__app_info_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "commandline", "application_name",
+ "flags", NULL };
+ char *commandline, *application_name = NULL;
+ PyObject *py_flags = NULL;
+ GAppInfo *ret;
+ GError *error = NULL;
+ GAppInfoCreateFlags flags = G_APP_INFO_CREATE_NONE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s|zO:gio.AppInfo",
+ kwlist,
+ &commandline, &application_name,
+ &py_flags))
+ return NULL;
+ if (py_flags && pyg_flags_get_value(G_TYPE_APP_INFO_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ return NULL;
+
+ ret = g_app_info_create_from_commandline(commandline,
+ application_name, flags, &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ /* pygobject_new handles NULL checking */
+ return pygobject_new((GObject *)ret);
+}
+%%
+override g_app_info_launch_uris kwargs
+static PyObject *
+_wrap_g_app_info_launch_uris(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "files", "launch_context", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *pycontext = NULL;
+ GAppLaunchContext *ctx;
+ PyObject *pyfile_list = Py_None;
+ int ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|OO:gio.AppInfo.launch_uris",
+ kwlist,
+ &pyfile_list, &pycontext))
+ return NULL;
+
+ if (!pygio_check_launch_context(pycontext, &ctx))
+ return NULL;
+
+ if (pyfile_list == Py_None)
+ file_list = NULL;
+
+ else if (PySequence_Check (pyfile_list))
+ file_list = pygio_pylist_to_uri_glist(pyfile_list);
+
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "file_list should be a list of strings or None");
+ return NULL;
+ }
+
+ ret = g_app_info_launch_uris(G_APP_INFO(self->obj),
+ file_list, ctx, &error);
+
+ g_list_free(file_list);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyBool_FromLong(ret);
+}
+%%
+override g_app_info_launch kwargs
+static PyObject *
+_wrap_g_app_info_launch(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "files", "launch_context", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *pycontext = NULL;
+ GAppLaunchContext *ctx;
+ PyObject *pyfile_list = Py_None;
+ int ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|OO:gio.AppInfo.launch",
+ kwlist,
+ &pyfile_list, &pycontext))
+ return NULL;
+
+ if (!pygio_check_launch_context(pycontext, &ctx))
+ return NULL;
+
+ if (pyfile_list == Py_None)
+ file_list = NULL;
+
+ else if (PySequence_Check (pyfile_list))
+ file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "file_list should be a list of strings or None");
+ return NULL;
+ }
+
+ ret = g_app_info_launch(G_APP_INFO(self->obj),
+ file_list, ctx, &error);
+
+ g_list_free(file_list);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyBool_FromLong(ret);
+}
+%%
+override-slot GAppInfo.tp_richcompare
+static PyObject *
+_wrap_g_app_info_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+ PyObject *result;
+
+ if (PyObject_TypeCheck(self, &PyGAppInfo_Type)
+ && PyObject_TypeCheck(other, &PyGAppInfo_Type)) {
+ GAppInfo *info1 = G_APP_INFO(self->obj);
+ GAppInfo *info2 = G_APP_INFO(other->obj);
+
+ switch (op) {
+ case Py_EQ:
+ result = (g_app_info_equal(info1, info2)
+ ? Py_True : Py_False);
+ break;
+ case Py_NE:
+ result = (!g_app_info_equal(info1, info2)
+ ? Py_True : Py_False);
+ break;
+ default:
+ result = Py_NotImplemented;
+ }
+ }
+ else
+ result = Py_NotImplemented;
+
+ Py_INCREF(result);
+ return result;
+}
+%%
+override-slot GAppInfo.tp_repr
+static PyObject *
+_wrap_g_app_info_tp_repr(PyGObject *self)
+{
+ const char *name = g_app_info_get_name(G_APP_INFO(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ representation = g_strdup_printf("<%s at %p: %s>",
+ self->ob_type->tp_name, self,
+ name ? name : "UNKNOWN NAME");
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
diff --git a/gio/gapplaunchcontext.override b/gio/gapplaunchcontext.override
new file mode 100644
index 0000000..a10f959
--- /dev/null
+++ b/gio/gapplaunchcontext.override
@@ -0,0 +1,99 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * gapplaunchcontext.override: module overrides for GAppLaunchContext
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_app_launch_context_get_display kwargs
+static PyObject *
+_wrap_g_app_launch_context_get_display(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "files", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *py_info;
+ PyObject *pyfile_list;
+ gchar *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O:gio.AppLaunchContext.get_display",
+ kwlist,
+ &PyGAppInfo_Type, &py_info, &pyfile_list))
+ return NULL;
+
+ if (!PySequence_Check (pyfile_list)) {
+ PyErr_Format (PyExc_TypeError,
+ "argument must be a list or tuple of GFile objects");
+ return NULL;
+ }
+
+ file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+ ret = g_app_launch_context_get_display(G_APP_LAUNCH_CONTEXT(self->obj),
+ G_APP_INFO(py_info->obj), file_list);
+ g_list_free(file_list);
+
+ if (ret)
+ return PyString_FromString(ret);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+override g_app_launch_context_get_startup_notify_id kwargs
+static PyObject *
+_wrap_g_app_launch_context_get_startup_notify_id(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "files", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *py_info;
+ PyObject *pyfile_list;
+ gchar *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O:gio.AppLaunchContext.get_startup_notify_id",
+ kwlist,
+ &PyGAppInfo_Type, &py_info, &pyfile_list))
+ return NULL;
+
+ if (!PySequence_Check (pyfile_list)) {
+ PyErr_Format (PyExc_TypeError,
+ "argument must be a list or tuple of GFile objects");
+ return NULL;
+ }
+
+ file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+ ret = g_app_launch_context_get_startup_notify_id(
+ G_APP_LAUNCH_CONTEXT(self->obj),
+ G_APP_INFO(py_info->obj), file_list);
+ g_list_free(file_list);
+
+ if (ret)
+ return PyString_FromString(ret);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
diff --git a/gio/gbufferedinputstream.override b/gio/gbufferedinputstream.override
new file mode 100644
index 0000000..047a663
--- /dev/null
+++ b/gio/gbufferedinputstream.override
@@ -0,0 +1,70 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gbufferedinputstream.override: module overrides for GBufferedInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_buffered_input_stream_fill_async kwargs
+static PyObject *
+_wrap_g_buffered_input_stream_fill_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "lO|iOO:gio.BufferedInputStream.fill_async",
+ kwlist,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_buffered_input_stream_fill_async(G_BUFFERED_INPUT_STREAM(self->obj),
+ count,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gcancellable.override b/gio/gcancellable.override
new file mode 100644
index 0000000..1eefb3b
--- /dev/null
+++ b/gio/gcancellable.override
@@ -0,0 +1,38 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gcancellable.override: module overrides for GCancellable
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+%%
+override g_cancellable_make_pollfd noargs
+static PyObject *
+_wrap_g_cancellable_make_pollfd (PyGObject *self)
+{
+ GPollFD pollfd;
+ gboolean ret;
+ PyGPollFD *pypollfd;
+
+ ret = g_cancellable_make_pollfd(G_CANCELLABLE(self->obj), &pollfd);
+
+ pypollfd = PyObject_NEW(PyGPollFD, &PyGPollFD_Type);
+ pypollfd->fd_obj = NULL;
+ pypollfd->pollfd = pollfd;
+ return (PyObject *) pypollfd;
+}
diff --git a/gio/gdatainputstream.override b/gio/gdatainputstream.override
new file mode 100644
index 0000000..92b0f99
--- /dev/null
+++ b/gio/gdatainputstream.override
@@ -0,0 +1,250 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2009 Paul Pogonyshev
+ *
+ * gdatainputstream.override: module overrides for GDataInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_data_input_stream_read_line kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ char *line;
+ gsize length;
+ PyObject *py_line;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:gio.DataInputStream.read_line",
+ kwlist, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ line = g_data_input_stream_read_line(G_DATA_INPUT_STREAM(self->obj),
+ &length, cancellable, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
+
+%%
+override g_data_input_stream_read_line_async kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:gio.DataInputStream.read_line_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_data_input_stream_read_line_async(G_DATA_INPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_data_input_stream_read_line_finish kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ gchar *line;
+ gsize length;
+ PyObject *py_line;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.DataInputStream.read_line_finish",
+ kwlist, &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ line = g_data_input_stream_read_line_finish(G_DATA_INPUT_STREAM(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &length,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
+
+%%
+override g_data_input_stream_read_until kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "stop_chars", "cancellable", NULL };
+ const char *stop_chars;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ char *line;
+ gsize length;
+ PyObject *py_line;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s|O:gio.DataInputStream.read_line",
+ kwlist, &stop_chars, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ line = g_data_input_stream_read_until(G_DATA_INPUT_STREAM(self->obj),
+ stop_chars, &length, cancellable, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
+
+%%
+override g_data_input_stream_read_until_async kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "stop_chars", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ const char *stop_chars;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.DataInputStream.read_until_async",
+ kwlist,
+ &stop_chars,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_data_input_stream_read_until_async(G_DATA_INPUT_STREAM(self->obj),
+ stop_chars,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_data_input_stream_read_until_finish kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ gchar *line;
+ gsize length;
+ PyObject *py_line;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.DataInputStream.read_until_finish",
+ kwlist, &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ line = g_data_input_stream_read_until_finish(G_DATA_INPUT_STREAM(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &length,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
diff --git a/gio/gdrive.override b/gio/gdrive.override
new file mode 100644
index 0000000..7961856
--- /dev/null
+++ b/gio/gdrive.override
@@ -0,0 +1,347 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gdrive.override: module overrides for GDrive and related types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+%%
+override g_drive_get_volumes noargs
+static PyObject *
+_wrap_g_drive_get_volumes (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = g_drive_get_volumes (G_DRIVE (self->obj));
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GVolume *volume = l->data;
+ PyObject *item = pygobject_new((GObject *)volume);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(volume);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_drive_eject kwargs
+static PyObject *
+_wrap_g_drive_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:gio.Drive.eject",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gio.Drive.ejectis deprecated, \
+ use gtk.Drive.eject_with_operation instead") < 0)
+ return NULL;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_eject(G_DRIVE(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_drive_poll_for_media kwargs
+static PyObject *
+_wrap_g_drive_poll_for_media(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.Drive.eject",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_drive_poll_for_media(G_DRIVE(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GDrive.tp_repr
+static PyObject *
+_wrap_g_drive_tp_repr(PyGObject *self)
+{
+ char *name = g_drive_get_name(G_DRIVE(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (name) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
+ g_free(name);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_drive_enumerate_identifiers noargs
+static PyObject *
+_wrap_g_drive_enumerate_identifiers (PyGObject *self)
+{
+ char **ids;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ ids = g_drive_enumerate_identifiers(G_DRIVE (self->obj));
+
+ pyg_end_allow_threads;
+
+ if (ids && ids[0] != NULL) {
+ ret = strv_to_pylist(ids);
+ g_strfreev (ids);
+ } else {
+ ret = Py_None;
+ Py_INCREF(ret);
+ }
+ return ret;
+}
+%%
+override g_drive_eject_with_operation kwargs
+static PyObject *
+_wrap_g_drive_eject_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Drive.eject_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_eject_with_operation(G_DRIVE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_drive_start kwargs
+static PyObject *
+_wrap_g_drive_start(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GDriveStartFlags flags = G_DRIVE_START_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Drive.start",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_start(G_DRIVE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_drive_stop kwargs
+static PyObject *
+_wrap_g_drive_stop(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Drive.stop",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_stop(G_DRIVE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfile.override b/gio/gfile.override
new file mode 100644
index 0000000..71e2d98
--- /dev/null
+++ b/gio/gfile.override
@@ -0,0 +1,2216 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gfile.override: module overrides for GInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+
+static void
+file_progress_callback_marshal(goffset current_num_bytes,
+ goffset total_num_bytes,
+ PyGIONotify *notify)
+{
+ PyObject *ret;
+ PyGILState_STATE state;
+
+ state = pyg_gil_state_ensure();
+
+ if (notify->data)
+ ret = PyObject_CallFunction(notify->callback, "(KKO)",
+ current_num_bytes,
+ total_num_bytes,
+ notify->data);
+ else
+ ret = PyObject_CallFunction(notify->callback, "(KK)",
+ current_num_bytes,
+ total_num_bytes);
+
+ if (ret == NULL)
+ {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+
+ Py_XDECREF(ret);
+ pyg_gil_state_release(state);
+}
+%%
+define _install_file_meta
+static PyObject *
+_wrap__install_file_meta(PyObject *self, PyObject *args)
+{
+ PyObject *metaclass;
+
+ if (!PyArg_ParseTuple(args, "O", &metaclass))
+ return NULL;
+
+ Py_INCREF(metaclass);
+ PyGFile_Type.ob_type = (PyTypeObject*)metaclass;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+define _file_init kwargs
+static PyObject*
+_wrap__file_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ GFile *file;
+ Py_ssize_t n_args, n_kwargs;
+ char *arg;
+ PyObject *py_ret;
+
+ n_args = PyTuple_Size(args);
+ n_kwargs = kwargs != NULL ? PyDict_Size(kwargs) : 0;
+
+ if (n_args == 1 && n_kwargs == 0) {
+ if (!PyArg_ParseTuple(args, "s:gio.File.__init__", &arg))
+ return NULL;
+ file = g_file_new_for_commandline_arg(arg);
+ } else if (n_args == 0 && n_kwargs == 1) {
+ if (PyDict_GetItemString(kwargs, "path")) {
+ char *kwlist[] = { "path", NULL };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:gio.File.__init__", kwlist, &arg))
+ return NULL;
+ file = g_file_new_for_path(arg);
+ } else if (PyDict_GetItemString(kwargs, "uri")) {
+ char *kwlist[] = { "uri", NULL };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:gio.File.__init__", kwlist, &arg))
+ return NULL;
+ file = g_file_new_for_uri(arg);
+ } else {
+ PyErr_Format(PyExc_TypeError,
+ "gio.File() got an unexpected keyword argument '%s'",
+ "unknown");
+ return NULL;
+ }
+ } else {
+ PyErr_Format(PyExc_TypeError,
+ "gio.File() takes exactly 1 argument (%zd given)",
+ n_args + n_kwargs);
+ return NULL;
+ }
+
+ if (!file) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not create GFile object");
+ return NULL;
+ }
+
+ py_ret = pygobject_new((GObject *)file);
+ g_object_unref(file);
+
+ return py_ret;
+}
+%%
+override g_file_read_async kwargs
+static PyObject *
+_wrap_g_file_read_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:File.read_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_read_async(G_FILE(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_load_contents kwargs
+static PyObject *
+_wrap_g_file_load_contents(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ gchar *contents, *etag_out;
+ gsize length;
+ GError *error = NULL;
+ gboolean ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:File.load_contents",
+ kwlist,
+ &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_load_contents(G_FILE(self->obj), cancellable,
+ &contents, &length, &etag_out, &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ PyObject *pyret;
+
+ pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
+ g_free(contents);
+ g_free(etag_out);
+ return pyret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_load_contents_async kwargs
+static PyObject *
+_wrap_g_file_load_contents_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:File.load_contents_async",
+ kwlist,
+ &notify->callback,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_load_contents_async(G_FILE(self->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_load_contents_finish kwargs
+static PyObject *
+_wrap_g_file_load_contents_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "res", NULL };
+ PyGObject *res;
+ gchar *contents, *etag_out;
+ gsize length;
+ GError *error = NULL;
+ gboolean ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.load_contents_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_load_contents_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &contents,
+ &length, &etag_out, &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ PyObject *pyret;
+
+ pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
+ g_free(contents);
+ g_free(etag_out);
+ return pyret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_enumerate_children_async kwargs
+static PyObject *
+_wrap_g_file_enumerate_children_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *attributes;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|OiOO:gio.File.enumerate_children_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &py_flags,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_enumerate_children_async(G_FILE(self->obj),
+ attributes,
+ flags,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_mount_mountable kwargs
+static PyObject *
+_wrap_g_file_mount_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "mount_operation", "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OOO:File.mount_mountable",
+ kwlist,
+ &PyGMountOperation_Type,
+ &mount_operation,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_mount_mountable(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_unmount_mountable kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:File.unmount_mountable",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_unmount_mountable(G_FILE(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_unmount_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.unmount_mountable_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_unmount_mountable_with_operation(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_mount_enclosing_volume kwargs
+static PyObject *
+_wrap_g_file_mount_enclosing_volume(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "mount_operation", "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OOO:File.mount_enclosing_volume",
+ kwlist,
+ &PyGMountOperation_Type,
+ &mount_operation,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_mount_enclosing_volume(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_copy kwargs
+static PyObject *
+_wrap_g_file_copy(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "destination", "progress_callback",
+ "flags", "cancellable",
+ "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *destination = NULL;
+ PyGObject *py_cancellable = NULL;
+ GFileCopyFlags flags = G_FILE_COPY_NONE;
+ GCancellable *cancellable;
+ int ret;
+ GError *error = NULL;
+ GFileProgressCallback callback = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!|OOOO:File.copy",
+ kwlist,
+ &PyGFile_Type,
+ &destination,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (pygio_notify_using_optional_callback(notify)) {
+ callback = (GFileProgressCallback)file_progress_callback_marshal;
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ /* No need to reference callback here, because it will be used
+ * only while this function is in progress. */
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_copy(G_FILE(self->obj),
+ G_FILE(destination->obj),
+ flags,
+ cancellable,
+ callback,
+ notify,
+ &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ goto error;
+
+ pygio_notify_free(notify);
+ return PyBool_FromLong(ret);
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_copy_async kwargs
+static PyObject *
+_wrap_g_file_copy_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "destination", "callback", "progress_callback",
+ "flags", "io_priority", "cancellable",
+ "user_data", "progress_callback_data", NULL };
+ PyGIONotify *notify, *progress_notify;
+ PyObject *py_flags = NULL;
+ PyGObject *destination = NULL;
+ PyGObject *py_cancellable = NULL;
+ GFileCopyFlags flags = G_FILE_COPY_NONE;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GFileProgressCallback progress_callback = NULL;
+
+ /* After the creation, referencing/freeing will automatically be
+ * done on the master and the slave. */
+ notify = pygio_notify_new();
+ progress_notify = pygio_notify_new_slave(notify);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OOiOOO:File.copy_async",
+ kwlist,
+ &PyGFile_Type,
+ &destination,
+ &notify->callback,
+ &progress_notify->callback,
+ &py_flags,
+ &io_priority,
+ &pycancellable,
+ &notify->data,
+ &progress_notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ if (pygio_notify_using_optional_callback(progress_notify)) {
+ progress_callback = (GFileProgressCallback) file_progress_callback_marshal;
+ if (!pygio_notify_callback_is_valid_full(progress_notify, "progress_callback"))
+ goto error;
+ }
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_copy_async(G_FILE(self->obj),
+ G_FILE(destination->obj),
+ flags,
+ io_priority,
+ cancellable,
+ progress_callback,
+ progress_notify,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_move kwargs
+static PyObject *
+_wrap_g_file_move(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "destination", "progress_callback",
+ "flags", "cancellable",
+ "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *destination = NULL;
+ PyGObject *py_cancellable = NULL;
+ GFileCopyFlags flags = G_FILE_COPY_NONE;
+ GCancellable *cancellable;
+ int ret;
+ GError *error = NULL;
+ GFileProgressCallback callback = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!|OOOO:File.move",
+ kwlist,
+ &PyGFile_Type,
+ &destination,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (pygio_notify_using_optional_callback(notify)) {
+ callback = (GFileProgressCallback)file_progress_callback_marshal;
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ /* No need to reference callback here, because it will be used
+ * only while this function is in progress. */
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_move(G_FILE(self->obj),
+ G_FILE(destination->obj),
+ flags,
+ cancellable,
+ callback,
+ notify,
+ &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ goto error;
+
+ pygio_notify_free(notify);
+ return PyBool_FromLong(ret);
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_set_attribute kwargs
+static char**
+pyg_strv_from_pyobject(PyObject *value, const char *exc_msg)
+{
+ gchar** strv;
+ Py_ssize_t len, i;
+ PyObject* fast_seq;
+
+ fast_seq = PySequence_Fast(value, exc_msg);
+ if (fast_seq == NULL)
+ return NULL;
+
+ len = PySequence_Length(fast_seq);
+ if (len == -1)
+ return NULL;
+
+ strv = g_malloc(sizeof(char*) * (len + 1));
+ if (strv == NULL) {
+ PyErr_NoMemory();
+ goto failure;
+ }
+
+ for (i = 0; i < len + 1; i++)
+ strv[i] = NULL;
+
+ for (i = 0; i < len; i++) {
+ PyObject* item = PySequence_Fast_GET_ITEM(fast_seq, i);
+ const char *s;
+
+ if (!PyString_Check(item)) {
+ PyErr_SetString(PyExc_TypeError, exc_msg);
+ goto failure;
+ }
+
+ s = PyString_AsString(item);
+ if (s == NULL)
+ goto failure;
+
+ strv[i] = g_strdup(s);
+ if (strv[i] == NULL) {
+ PyErr_NoMemory();
+ goto failure;
+ }
+ }
+
+ return strv;
+
+ failure:
+ g_strfreev(strv);
+ Py_XDECREF(fast_seq);
+ return NULL;
+}
+
+static PyObject *
+_wrap_g_file_set_attribute(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attribute", "type", "value_p",
+ "flags", "cancellable", NULL };
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ int ret;
+ GCancellable *cancellable = NULL;
+ GError *error = NULL;
+ char *attribute;
+ PyObject *py_type = NULL, *py_flags = NULL, *value;
+ PyGObject *pycancellable = NULL;
+ GFileAttributeType type;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"sOO|OO:gio.File.set_attribute",
+ kwlist, &attribute, &py_type, &value,
+ &py_flags, &pycancellable))
+ return NULL;
+
+ if (pyg_enum_get_value(G_TYPE_FILE_ATTRIBUTE_TYPE, py_type,
+ (gpointer)&type))
+ return NULL;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS, py_flags,
+ (gpointer)&flags))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ switch (type) {
+ case G_FILE_ATTRIBUTE_TYPE_STRING:
+ {
+ char* s;
+ if (!PyString_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a str when type is FILE_ATTRIBUTE_TYPE_STRING");
+ return NULL;
+ }
+
+ s = PyString_AsString(value);
+ if (s == NULL)
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ s, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
+ {
+ char* s;
+ if (!PyString_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a bytes instance when type is FILE_ATTRIBUTE_TYPE_BYTE_STRING");
+ return NULL;
+ }
+
+ s = PyString_AsString(value);
+ if (s == NULL)
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ s, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+
+ case G_FILE_ATTRIBUTE_TYPE_STRINGV:
+ {
+ gchar** strv;
+
+ strv = pyg_strv_from_pyobject(value, "set_attribute value must be a list of strings when type is FILE_ATTRIBUTE_TYPE_STRINGV");
+ if (strv == NULL)
+ break;
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ strv, flags, (GCancellable *) cancellable,
+ &error);
+ g_strfreev(strv);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_OBJECT:
+ {
+ GObject* obj;
+
+ if (!pygobject_check(value, &PyGObject_Type)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a GObject instance when type is FILE_ATTRIBUTE_TYPE_OBJECT");
+ return NULL;
+ }
+
+ obj = pygobject_get(value);
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ obj, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_BOOLEAN:
+ {
+ gboolean boolval;
+
+ boolval = PyObject_IsTrue(value);
+ if (boolval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &boolval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_UINT32:
+ {
+ guint32 intval;
+
+ if (!PyInt_Check(value) && !PyLong_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_UINT32");
+ return NULL;
+ }
+
+ intval = PyLong_AsUnsignedLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_INT32:
+ {
+ gint32 intval;
+
+ if (!PyInt_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_INT32");
+ return NULL;
+ }
+
+ intval = PyInt_AsLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_UINT64:
+ {
+ guint64 intval;
+
+ if (!PyInt_Check(value) && !PyLong_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_UINT64");
+ return NULL;
+ }
+
+ intval = PyLong_AsLongLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_INT64:
+ {
+ gint64 intval;
+
+ if (!PyInt_Check(value) && !PyLong_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_INT64");
+ return NULL;
+ }
+
+ intval = PyLong_AsUnsignedLongLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_INVALID:
+
+ default:
+ PyErr_SetString(PyExc_TypeError,
+ "Unknown type specified in set_attribute\n");
+ return NULL;
+ }
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyBool_FromLong(ret);
+}
+%%
+override g_file_query_settable_attributes kwargs
+static PyObject *
+_wrap_g_file_query_settable_attributes(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable = NULL;
+ GFileAttributeInfoList *ret;
+ GError *error = NULL;
+ gint i, n_infos;
+ GFileAttributeInfo *infos;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:gio.File.query_settable_attributes",
+ kwlist, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ ret = g_file_query_settable_attributes(G_FILE(self->obj),
+ (GCancellable *) cancellable,
+ &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ n_infos = ret->n_infos;
+ infos = ret->infos;
+
+ if (n_infos > 0) {
+ py_ret = PyList_New(n_infos);
+ for (i = 0; i < n_infos; i++) {
+ PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
+ }
+ g_file_attribute_info_list_unref(ret);
+ return py_ret;
+
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_query_writable_namespaces kwargs
+static PyObject *
+_wrap_g_file_query_writable_namespaces(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable = NULL;
+ GFileAttributeInfoList *ret;
+ GError *error = NULL;
+ gint i, n_infos;
+ GFileAttributeInfo *infos;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:gio.File.query_writable_namespaces",
+ kwlist, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ ret = g_file_query_writable_namespaces(G_FILE(self->obj),
+ (GCancellable *) cancellable,
+ &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ n_infos = ret->n_infos;
+ infos = ret->infos;
+
+ if (n_infos > 0) {
+ py_ret = PyList_New(n_infos);
+ for (i = 0; i < n_infos; i++) {
+ PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
+ }
+ g_file_attribute_info_list_unref(ret);
+ return py_ret;
+
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_append_to_async kwargs
+static PyObject *
+_wrap_g_file_append_to_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OiOO:File.append_to_async",
+ kwlist,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_append_to_async(G_FILE(self->obj), flags, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_create_async kwargs
+static PyObject *
+_wrap_g_file_create_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OiOO:File.create_async",
+ kwlist,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_create_async(G_FILE(self->obj), flags, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_create_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_create_readwrite_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OiOO:File.create_readwrite_async",
+ kwlist,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_create_readwrite_async(G_FILE(self->obj), flags, io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_open_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_open_readwrite_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:File.open_readwrite_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_open_readwrite_async(G_FILE(self->obj), io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_replace_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_replace_readwrite_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *etag = NULL;
+ gboolean make_backup = TRUE;
+ PyObject *py_backup = Py_True;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|zOOiOO:File.replace_readwrite_async",
+ kwlist,
+ &notify->callback,
+ &etag, &py_backup,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_replace_readwrite_async(G_FILE(self->obj), etag, make_backup, flags,
+ io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_replace_async kwargs
+static PyObject *
+_wrap_g_file_replace_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *etag = NULL;
+ gboolean make_backup = TRUE;
+ PyObject *py_backup = Py_True;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|zOOiOO:File.replace_async",
+ kwlist,
+ &notify->callback,
+ &etag, &py_backup,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_replace_async(G_FILE(self->obj), etag, make_backup, flags,
+ io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_query_info_async kwargs
+static PyObject *
+_wrap_g_file_query_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|OiOO:File.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data)) {
+ /* To preserve compatibility with 2.16 we also allow swapped
+ * 'attributes' and 'callback'. FIXME: Remove for 3.0. */
+ static char *old_kwlist[] = { "callback", "attributes", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyObject *exc_type, *exc_value, *exc_traceback;
+
+ PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Os|OiOO:File.query_info_async",
+ old_kwlist,
+ &notify->callback,
+ &attributes,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data)
+ || !pygio_notify_callback_is_valid(notify)) {
+ /* Report the error with new parameters. */
+ PyErr_Restore(exc_type, exc_value, exc_traceback);
+ goto error;
+ }
+
+ Py_XDECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_traceback);
+ }
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_query_info_async(G_FILE(self->obj), attributes, flags,
+ io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_replace_contents kwargs
+static PyObject *
+_wrap_g_file_replace_contents(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "contents", "etag", "make_backup",
+ "flags", "cancellable", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ gsize length;
+ gboolean make_backup = FALSE;
+ char *contents;
+ char *etag = NULL;
+ char *new_etag = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#|zbOO:File.replace_contents",
+ kwlist,
+ &contents,
+ &length,
+ &etag,
+ &make_backup,
+ &flags,
+ &cancellable))
+ {
+ return NULL;
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_replace_contents(G_FILE(self->obj), contents, length, etag,
+ make_backup, flags, &new_etag, cancellable,
+ &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = PyString_FromString(new_etag);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ g_free(new_etag);
+ return py_ret;
+}
+%%
+override g_file_replace_contents_finish kwargs
+static PyObject *
+_wrap_g_file_replace_contents_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *res;
+ gchar *etag_out = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.replace_contents_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_replace_contents_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &etag_out,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = PyString_FromString(etag_out);
+ return py_ret;
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ g_free(etag_out);
+ return py_ret;
+}
+%%
+override g_file_replace_contents_async kwargs
+static PyObject *
+_wrap_g_file_replace_contents_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "contents", "callback", "etag", "make_backup",
+ "flags", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ gsize length;
+ gboolean make_backup = FALSE;
+ char *contents;
+ char *etag = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#O|zbOOO:File.replace_contents_async",
+ kwlist,
+ &contents,
+ &length,
+ &notify->callback,
+ &etag,
+ &make_backup,
+ &py_flags,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+ pygio_notify_copy_buffer(notify, contents, length);
+
+ g_file_replace_contents_async(G_FILE(self->obj),
+ notify->buffer,
+ notify->buffer_size,
+ etag,
+ make_backup,
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GFile.tp_richcompare
+static PyObject *
+_wrap_g_file_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+ PyObject *result;
+
+ if (PyObject_TypeCheck(self, &PyGFile_Type)
+ && PyObject_TypeCheck(other, &PyGFile_Type)) {
+ GFile *file1 = G_FILE(self->obj);
+ GFile *file2 = G_FILE(other->obj);
+
+ switch (op) {
+ case Py_EQ:
+ result = (g_file_equal(file1, file2)
+ ? Py_True : Py_False);
+ break;
+ case Py_NE:
+ result = (!g_file_equal(file1, file2)
+ ? Py_True : Py_False);
+ break;
+ default:
+ result = Py_NotImplemented;
+ }
+ }
+ else
+ result = Py_NotImplemented;
+
+ Py_INCREF(result);
+ return result;
+}
+%%
+override-slot GFile.tp_hash
+static long
+_wrap_g_file_tp_hash(PyGObject *self)
+{
+ return g_file_hash(G_FILE(self->obj));
+}
+%%
+override-slot GFile.tp_repr
+static PyObject *
+_wrap_g_file_tp_repr(PyGObject *self)
+{
+ char *uri = g_file_get_uri(G_FILE(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (uri) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+ g_free(uri);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_file_eject_mountable kwargs
+static PyObject *
+_wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:File.eject_mountable",
+ kwlist,
+ &notify->callback,
+ &flags,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_eject_mountable(G_FILE(self->obj), flags, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_eject_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_eject_mountable_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.eject_mountable_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_eject_mountable_with_operation(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_find_enclosing_mount_async kwargs
+static PyObject *
+_wrap_g_file_find_enclosing_mount_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:File.enclosing_mount_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_find_enclosing_mount_async(G_FILE(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_query_filesystem_info_async kwargs
+static PyObject *
+_wrap_g_file_query_filesystem_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *attributes;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.File.query_filesystem_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_query_filesystem_info_async(G_FILE(self->obj),
+ attributes,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_set_attributes_async kwargs
+static PyObject *
+_wrap_g_file_set_attributes_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGObject *info;
+ PyGIONotify *notify;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OiOO:gio.File.set_attributes_async",
+ kwlist,
+ &PyGFileInfo_Type,
+ &info,
+ &notify->callback,
+ &flags,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_set_attributes_async(G_FILE(self->obj),
+ G_FILE_INFO(info->obj),
+ flags,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_file_set_attributes_finish kwargs
+static PyObject *
+_wrap_g_file_set_attributes_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *res;
+ GFileInfo *info = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.set_attributes_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_set_attributes_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &info,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = pygobject_new((GObject *)info);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ return py_ret;
+}
+%%
+override g_file_set_display_name_async kwargs
+static PyObject *
+_wrap_g_file_set_display_name_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "display_name", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *display_name;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.File.set_display_name_async",
+ kwlist,
+ &display_name,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_set_display_name_async(G_FILE(self->obj),
+ display_name,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_poll_mountable kwargs
+static PyObject *
+_wrap_g_file_poll_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:File.poll_mountable",
+ kwlist,
+ &notify->callback,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_poll_mountable(G_FILE(self->obj), cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_start_mountable kwargs
+static PyObject *
+_wrap_g_file_start_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "start_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GDriveStartFlags flags = G_DRIVE_START_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.start_mountable",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_start_mountable(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_stop_mountable kwargs
+static PyObject *
+_wrap_g_file_stop_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.File.stop_mountable",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_stop_mountable(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
+/* GFile.load_partial_contents_finish: No ArgType for char** */
diff --git a/gio/gfileattribute.override b/gio/gfileattribute.override
new file mode 100644
index 0000000..e51ec63
--- /dev/null
+++ b/gio/gfileattribute.override
@@ -0,0 +1,153 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * gfileattribute.override: module overrides for GFileAttribute*
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+
+extern PyTypeObject PyGFileAttributeInfo_Type;
+
+typedef struct {
+ PyObject_HEAD
+ const GFileAttributeInfo *info;
+} PyGFileAttributeInfo;
+
+static PyObject *
+pygio_file_attribute_info_tp_new(PyTypeObject *type)
+{
+ PyGFileAttributeInfo *self;
+ GFileAttributeInfo *info = NULL;
+
+ self = (PyGFileAttributeInfo *) PyObject_NEW(PyGFileAttributeInfo,
+ &PyGFileAttributeInfo_Type);
+ self->info = info;
+ return (PyObject *) self;
+}
+
+static PyMethodDef pyg_file_attribute_info_methods[] = {
+ { NULL, 0, 0 }
+};
+
+static PyObject *
+pyg_file_attribute_info__get_name(PyObject *self, void *closure)
+{
+ const gchar *ret;
+
+ ret = ((PyGFileAttributeInfo*)self)->info->name;
+ if (ret)
+ return PyString_FromString(ret);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_file_attribute_info__get_type(PyObject *self, void *closure)
+{
+ gint ret;
+
+ ret = ((PyGFileAttributeInfo*)self)->info->type;
+ return pyg_enum_from_gtype(G_TYPE_FILE_ATTRIBUTE_TYPE, ret);
+}
+
+static PyObject *
+pyg_file_attribute_info__get_flags(PyObject *self, void *closure)
+{
+ guint ret;
+
+ ret = ((PyGFileAttributeInfo*)self)->info->flags;
+ return pyg_flags_from_gtype(G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS, ret);
+}
+
+static const PyGetSetDef pyg_file_attribute_info_getsets[] = {
+ { "name", (getter)pyg_file_attribute_info__get_name, (setter)0 },
+ { "type", (getter)pyg_file_attribute_info__get_type, (setter)0 },
+ { "flags", (getter)pyg_file_attribute_info__get_flags, (setter)0 },
+ { NULL, (getter)0, (setter)0 },
+};
+
+PyTypeObject PyGFileAttributeInfo_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "gio.FileAttributeInfo", /* tp_name */
+ sizeof(PyGFileAttributeInfo), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)0, /* tp_dealloc */
+ (printfunc)0, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+ (cmpfunc)0, /* tp_compare */
+ (reprfunc)0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)0, /* tp_str */
+ (getattrofunc)0, /* tp_getattro */
+ (setattrofunc)0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ "Holds information about an attribute", /* Documentation string */
+ (traverseproc)0, /* tp_traverse */
+ (inquiry)0, /* tp_clear */
+ (richcmpfunc)0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)0, /* tp_iter */
+ (iternextfunc)0, /* tp_iternext */
+ (struct PyMethodDef*)pyg_file_attribute_info_methods, /* tp_methods */
+ 0, /* tp_members */
+ (struct PyGetSetDef*)pyg_file_attribute_info_getsets, /* tp_getset */
+ (PyTypeObject *)0, /* tp_base */
+ (PyObject *)0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)0, /* tp_init */
+ 0, /* tp_alloc */
+ (newfunc)pygio_file_attribute_info_tp_new, /* tp_new */
+ 0, /* tp_free */
+ (inquiry)0, /* tp_is_gc */
+ (PyObject *)0, /* tp_bases */
+};
+
+PyObject*
+pyg_file_attribute_info_new(const GFileAttributeInfo *info)
+{
+ PyGFileAttributeInfo *self;
+
+ self = (PyGFileAttributeInfo *)PyObject_NEW(PyGFileAttributeInfo,
+ &PyGFileAttributeInfo_Type);
+ if (G_UNLIKELY(self == NULL))
+ return NULL;
+ if (info)
+ self->info = info;
+ return (PyObject *)self;
+}
+
+%%
+init
+if (PyType_Ready(&PyGFileAttributeInfo_Type) < 0) {
+ g_return_if_reached();
+}
+if (PyDict_SetItemString(d, "FileAttributeInfo",
+ (PyObject *)&PyGFileAttributeInfo_Type) < 0) {
+ g_return_if_reached();
+}
diff --git a/gio/gfileenumerator.override b/gio/gfileenumerator.override
new file mode 100644
index 0000000..db29550
--- /dev/null
+++ b/gio/gfileenumerator.override
@@ -0,0 +1,184 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gfileenumerator.override: module overrides for GFileEnumerator
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override-slot GFileEnumerator.tp_iter
+static PyObject*
+_wrap_g_file_enumerator_tp_iter(PyGObject *self)
+{
+ Py_INCREF (self);
+ return (PyObject *) self;
+}
+%%
+override-slot GFileEnumerator.tp_iternext
+static PyObject*
+_wrap_g_file_enumerator_tp_iternext(PyGObject *iter)
+{
+ GFileInfo *file_info;
+ GError *error = NULL;
+
+ if (!iter->obj) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+
+ file_info = g_file_enumerator_next_file(G_FILE_ENUMERATOR(iter->obj),
+ NULL,
+ &error);
+ if (pyg_error_check(&error)) {
+ return NULL;
+ }
+
+ if (!file_info) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+
+ return pygobject_new((GObject*)file_info);
+}
+%%
+override g_file_enumerator_next_files_async kwargs
+static PyObject *
+_wrap_g_file_enumerator_next_files_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "num_files", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ int num_files;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "iO|iOO:gio.FileEnumerator.enumerate_next_files_async",
+ kwlist,
+ &num_files,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_enumerator_next_files_async(G_FILE_ENUMERATOR(self->obj),
+ num_files,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_enumerator_next_files_finish kwargs
+static PyObject *
+_wrap_g_file_enumerator_next_files_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GList *next_files, *l;
+ GError *error = NULL;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.FileEnumerator.next_files_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ next_files = g_file_enumerator_next_files_finish(G_FILE_ENUMERATOR(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ ret = PyList_New(0);
+ for (l = next_files; l; l = l->next) {
+ GFileInfo *file_info = l->data;
+ PyObject *item = pygobject_new((GObject *)file_info);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(file_info);
+ }
+ g_list_free(next_files);
+
+ return ret;
+}
+%%
+override g_file_enumerator_close_async kwargs
+static PyObject *
+_wrap_g_file_enumerator_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:gio.FileEnumerator.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_enumerator_close_async(G_FILE_ENUMERATOR(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfileinfo.override b/gio/gfileinfo.override
new file mode 100644
index 0000000..730e91b
--- /dev/null
+++ b/gio/gfileinfo.override
@@ -0,0 +1,121 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * 2009 Gian Mario Tagliaretti
+ *
+ * gfileinfo.override: module overrides for GFileInfo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+headers
+
+#ifndef G_TYPE_FILE_ATTRIBUTE_MATCHER
+#define G_TYPE_FILE_ATTRIBUTE_MATCHER (_g_file_attribute_matcher_get_type ())
+
+static GType _g_file_attribute_matcher_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_boxed_type_register_static ("GFileAttributeMatcher",
+ (GBoxedCopyFunc)g_file_attribute_matcher_ref,
+ (GBoxedFreeFunc)g_file_attribute_matcher_unref);
+
+ return our_type;
+}
+#endif
+
+%%
+override g_file_info_list_attributes kwargs
+static PyObject *
+_wrap_g_file_info_list_attributes(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ char *kwlist[] = { "name_space", NULL};
+ gchar *name_space = NULL;
+ gchar **names;
+ gchar **n;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|z:gio.FileInfo.list_attributes",
+ kwlist, &name_space))
+ return NULL;
+
+ names = g_file_info_list_attributes(G_FILE_INFO(self->obj),
+ name_space);
+
+ ret = PyList_New(0);
+ n = names;
+ while (n && *n) {
+ PyObject *item = PyString_FromString(n[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ n++;
+ }
+
+ g_strfreev(names);
+ return ret;
+}
+%%
+override g_file_info_get_modification_time noargs
+static PyObject *
+_wrap_g_file_info_get_modification_time(PyGObject *self, PyObject *unused)
+{
+ GTimeVal timeval;
+
+ g_file_info_get_modification_time(G_FILE_INFO(self->obj), &timeval);
+ return pyglib_float_from_timeval(timeval);
+}
+%%
+override g_file_info_set_modification_time kwargs
+static PyObject *
+_wrap_g_file_info_set_modification_time(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ char *kwlist[] = { "mtime", NULL};
+ double py_mtime = 0.0;
+ GTimeVal ttime, *mtime;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "d:gio.FileInfo.set_modification_time",
+ kwlist, &py_mtime))
+ return NULL;
+
+ if (py_mtime > 0.0) {
+ ttime.tv_sec = (glong) py_mtime;
+ ttime.tv_usec = (glong)((py_mtime - ttime.tv_sec) * G_USEC_PER_SEC);
+ mtime = &ttime;
+ } else if (py_mtime == 0.0) {
+ mtime = NULL;
+ } else {
+ PyErr_SetString(PyExc_ValueError, "mtime must be >= 0.0");
+ return NULL;
+ }
+
+ g_file_info_set_modification_time(G_FILE_INFO(self->obj), mtime);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+/* GFileInfo.get_attribute_data: No ArgType for GFileAttributeType* */
+/* GFileInfo.set_attribute: No ArgType for gpointer */
diff --git a/gio/gfileinputstream.override b/gio/gfileinputstream.override
new file mode 100644
index 0000000..5190a13
--- /dev/null
+++ b/gio/gfileinputstream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gfileinputstream.override: module overrides for GFileInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_input_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_input_stream_query_info_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.FileInputStream.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_input_stream_query_info_async(G_FILE_INPUT_STREAM(self->obj),
+ attributes, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfileiostream.override b/gio/gfileiostream.override
new file mode 100644
index 0000000..7be6124
--- /dev/null
+++ b/gio/gfileiostream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gfileiostream.override: module overrides for GFileIOStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_io_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_io_stream_query_info_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.FileIOStream.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_io_stream_query_info_async(G_FILE_IO_STREAM(self->obj),
+ attributes, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfileoutputstream.override b/gio/gfileoutputstream.override
new file mode 100644
index 0000000..c5c184d
--- /dev/null
+++ b/gio/gfileoutputstream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gfileoutputstream.override: module overrides for GFileOuputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_output_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_output_stream_query_info_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.FileOutputStream.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_output_stream_query_info_async(G_FILE_OUTPUT_STREAM(self->obj),
+ attributes, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gicon.override b/gio/gicon.override
new file mode 100644
index 0000000..c429556
--- /dev/null
+++ b/gio/gicon.override
@@ -0,0 +1,310 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gicon.override: module overrides for GIcon and related types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+ignore-glob
+ g_icon_hash
+ g_themed_icon_new_from_names
+ g_themed_icon_new_with_default_fallbacks
+%%
+override-slot GIcon.tp_richcompare
+static PyObject *
+_wrap_g_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+ PyObject *result;
+
+ if (PyObject_TypeCheck(self, &PyGIcon_Type)
+ && PyObject_TypeCheck(other, &PyGIcon_Type)) {
+ GIcon *icon1 = G_ICON(self->obj);
+ GIcon *icon2 = G_ICON(other->obj);
+
+ switch (op) {
+ case Py_EQ:
+ result = (g_icon_equal(icon1, icon2)
+ ? Py_True : Py_False);
+ break;
+ case Py_NE:
+ result = (!g_icon_equal(icon1, icon2)
+ ? Py_True : Py_False);
+ break;
+ default:
+ result = Py_NotImplemented;
+ }
+ }
+ else
+ result = Py_NotImplemented;
+
+ Py_INCREF(result);
+ return result;
+}
+%%
+override-slot GIcon.tp_hash
+static long
+_wrap_g_icon_tp_hash(PyGObject *self)
+{
+ return g_icon_hash(G_ICON(self->obj));
+}
+%%
+override g_loadable_icon_load kwargs
+static PyObject *
+_wrap_g_loadable_icon_load(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "size", "cancellable", NULL };
+ int size = 0;
+ char *type = NULL;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ GInputStream *stream;
+ PyObject *result;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|iO:gio.LoadableIcon.load",
+ kwlist,
+ &size, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ stream = g_loadable_icon_load(G_LOADABLE_ICON(self->obj), size, &type,
+ cancellable, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
+ g_free(type);
+ return result;
+}
+%%
+override g_loadable_icon_load_async kwargs
+static PyObject *
+_wrap_g_loadable_icon_load_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "size", "cancellable", "user_data", NULL };
+ int size = 0;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:gio.LoadableIcon.load_async",
+ kwlist,
+ &notify->callback, &size, &pycancellable, &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_loadable_icon_load_async(G_LOADABLE_ICON(self->obj),
+ size,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_loadable_icon_load_finish kwargs
+static PyObject *
+_wrap_g_loadable_icon_load_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "res", NULL };
+ PyGObject *res;
+ char *type = NULL;
+ GError *error = NULL;
+ GInputStream *stream;
+ PyObject *result;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.LoadableIcon.load_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &res))
+ return NULL;
+
+ stream = g_loadable_icon_load_finish(G_LOADABLE_ICON(self->obj),
+ G_ASYNC_RESULT(res->obj), &type, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
+ g_free(type);
+ return result;
+}
+%%
+override-slot GFileIcon.tp_repr
+static PyObject *
+_wrap_g_file_icon_tp_repr(PyGObject *self)
+{
+ GFile *file = g_file_icon_get_file(G_FILE_ICON(self->obj));
+ char *uri = (file ? g_file_get_uri(file) : NULL);
+ gchar *representation;
+ PyObject *result;
+
+ if (uri) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+ g_free(uri);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+new-constructor G_TYPE_THEMED_ICON
+%%
+override g_themed_icon_new kwargs
+static int
+_wrap_g_themed_icon_new(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "name", "use_default_fallbacks", NULL };
+ PyObject *name;
+ gboolean use_default_fallbacks = FALSE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:gio.ThemedIcon.__init__",
+ kwlist, &name, &use_default_fallbacks))
+ return -1;
+
+ if (PyString_Check(name)) {
+ pygobject_construct(self,
+ "name", PyString_AsString(name),
+ "use-default-fallbacks", use_default_fallbacks, NULL);
+ return 0;
+ }
+ else if (PySequence_Check(name)) {
+ PyObject *tuple = PySequence_Tuple(name);
+
+ if (tuple) {
+ int k;
+ int length = PyTuple_Size(tuple);
+ char **names = g_new(char *, length + 1);
+
+ for (k = 0; k < length; k++) {
+ PyObject *str = PyTuple_GetItem(tuple, k);
+ if (str && PyString_Check(str))
+ names[k] = PyString_AsString(str);
+ else {
+ Py_DECREF(tuple);
+ g_free(names);
+ goto error;
+ }
+ }
+
+ names[length] = NULL;
+ pygobject_construct(self,
+ "names", names,
+ "use-default-fallbacks", use_default_fallbacks, NULL);
+ Py_DECREF(tuple);
+ g_free(names);
+ return 0;
+ }
+ }
+
+ error:
+ if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "argument 1 of gio.ThemedIcon.__init__ "
+ "must be either a string or a sequence of strings");
+ }
+ return -1;
+}
+%%
+override g_themed_icon_get_names noargs
+static PyObject *
+_wrap_g_themed_icon_get_names(PyGObject *self)
+{
+ const char * const *names;
+ PyObject *ret;
+
+ names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
+
+ ret = PyList_New(0);
+ while (names && *names) {
+ PyObject *item = PyString_FromString(names[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ names++;
+ }
+
+ return ret;
+}
+%%
+override-slot GThemedIcon.tp_repr
+static PyObject *
+_wrap_g_themed_icon_tp_repr(PyGObject *self)
+{
+ const char * const *names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
+ GString *representation = g_string_new(NULL);
+ PyObject *result;
+
+ g_string_append_printf(representation, "<%s at %p: ", self->ob_type->tp_name, self);
+
+ if (names) {
+ gboolean first_name = TRUE;
+ while (*names) {
+ if (!first_name)
+ g_string_append(representation, ", ");
+ else
+ first_name = FALSE;
+
+ g_string_append(representation, *names++);
+ }
+ }
+
+ g_string_append(representation, ">");
+ result = PyString_FromString(representation->str);
+ g_string_free(representation, TRUE);
+ return result;
+}
+%%
+override g_emblemed_icon_get_emblems noargs
+static PyObject *
+_wrap_g_emblemed_icon_get_emblems(PyGObject *self)
+{
+ GList *list;
+ PyObject *ret;
+
+ list = g_emblemed_icon_get_emblems(G_EMBLEMED_ICON(self->obj));
+
+ PYLIST_FROMGLIST(ret, list, pygobject_new(list_item), NULL, NULL);
+
+ return ret;
+}
diff --git a/gio/ginputstream.override b/gio/ginputstream.override
new file mode 100644
index 0000000..260b2fc
--- /dev/null
+++ b/gio/ginputstream.override
@@ -0,0 +1,344 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * ginputstream.override: module overrides for GInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+#define BUFSIZE 8192
+
+%%
+override g_input_stream_read kwargs
+static PyObject *
+_wrap_g_input_stream_read(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ PyObject *v;
+ GCancellable *cancellable;
+ long count = -1;
+ GError *error = NULL;
+ size_t bytesread, buffersize, chunksize;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|lO:InputStream.read",
+ kwlist, &count,
+ &pycancellable))
+ return NULL;
+
+ buffersize = (count < 0 ? BUFSIZE : count);
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ v = PyString_FromStringAndSize((char *)NULL, buffersize);
+ if (v == NULL)
+ return NULL;
+
+ bytesread = 0;
+ for (;;)
+ {
+ pyg_begin_allow_threads;
+ errno = 0;
+ chunksize = g_input_stream_read(G_INPUT_STREAM(self->obj),
+ PyString_AS_STRING((PyStringObject *)v) + bytesread,
+ buffersize - bytesread, cancellable,
+ &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error)) {
+ Py_DECREF(v);
+ return NULL;
+ }
+ if (chunksize == 0) {
+ /* End of file. */
+ break;
+ }
+
+ bytesread += chunksize;
+ if (bytesread < buffersize) {
+ /* g_input_stream_read() decided to not read full buffer. We
+ * then return early too, even if 'count' is less than 0.
+ */
+ break;
+ }
+
+ if (count < 0) {
+ buffersize += BUFSIZE;
+ if (_PyString_Resize(&v, buffersize) < 0)
+ return NULL;
+ }
+ else {
+ /* Got what was requested. */
+ break;
+ }
+ }
+
+ if (bytesread != buffersize)
+ _PyString_Resize(&v, bytesread);
+
+ return v;
+}
+%%
+override g_input_stream_read_all kwargs
+static PyObject *
+_wrap_g_input_stream_read_all(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ PyObject *v;
+ GCancellable *cancellable;
+ long count = -1;
+ GError *error = NULL;
+ size_t bytesread, buffersize, chunksize;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|lO:InputStream.read",
+ kwlist, &count,
+ &pycancellable))
+ return NULL;
+
+ buffersize = (count < 0 ? BUFSIZE : count);
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ v = PyString_FromStringAndSize((char *)NULL, buffersize);
+ if (v == NULL)
+ return NULL;
+
+ bytesread = 0;
+ for (;;)
+ {
+ pyg_begin_allow_threads;
+ errno = 0;
+ g_input_stream_read_all(G_INPUT_STREAM(self->obj),
+ PyString_AS_STRING((PyStringObject *)v) + bytesread,
+ buffersize - bytesread,
+ &chunksize,
+ cancellable, &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error)) {
+ Py_DECREF(v);
+ return NULL;
+ }
+
+ bytesread += chunksize;
+ if (bytesread < buffersize || chunksize == 0) {
+ /* End of file. */
+ break;
+ }
+
+ if (count < 0) {
+ buffersize += BUFSIZE;
+ if (_PyString_Resize(&v, buffersize) < 0)
+ return NULL;
+ }
+ else {
+ /* Got what was requested. */
+ break;
+ }
+ }
+
+ if (bytesread != buffersize)
+ _PyString_Resize(&v, bytesread);
+
+ return v;
+}
+%%
+override g_input_stream_read_async kwargs
+static PyObject *
+_wrap_g_input_stream_read_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "lO|iOO:InputStream.read_async",
+ kwlist,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ if (!pygio_notify_allocate_buffer(notify, count))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+ pygio_notify_attach_to_result(notify);
+
+ g_input_stream_read_async(G_INPUT_STREAM(self->obj),
+ notify->buffer,
+ notify->buffer_size,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_input_stream_read_finish kwargs
+static PyObject *
+_wrap_g_input_stream_read_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ Py_ssize_t bytesread;
+ PyGIONotify *notify;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.InputStream.read_finish",
+ kwlist, &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ bytesread = g_input_stream_read_finish(G_INPUT_STREAM(self->obj),
+ G_ASYNC_RESULT(result->obj), &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (bytesread == 0)
+ return PyString_FromString("");
+
+ notify = pygio_notify_get_attached(result);
+ return PyString_FromStringAndSize(notify->buffer, bytesread);
+}
+%%
+override g_input_stream_close_async kwargs
+static PyObject *
+_wrap_g_input_stream_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:InputStream.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_input_stream_close_async(G_INPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_input_stream_skip_async kwargs
+static PyObject *
+_wrap_g_input_stream_skip_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "lO|iOO:InputStream.skip_async",
+ kwlist,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+
+ g_input_stream_skip_async(G_INPUT_STREAM(self->obj),
+ count,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gio-types.defs b/gio/gio-types.defs
new file mode 100644
index 0000000..331e0bc
--- /dev/null
+++ b/gio/gio-types.defs
@@ -0,0 +1,807 @@
+;; -*- scheme -*-
+
+; interface definitions ...
+
+(define-interface AppInfo
+ (in-module "gio")
+ (c-name "GAppInfo")
+ (gtype-id "G_TYPE_APP_INFO")
+)
+
+(define-interface AsyncInitable
+ (in-module "gio")
+ (c-name "GAsyncInitable")
+ (gtype-id "G_TYPE_ASYNC_INITABLE")
+)
+
+(define-interface AsyncResult
+ (in-module "gio")
+ (c-name "GAsyncResult")
+ (gtype-id "G_TYPE_ASYNC_RESULT")
+)
+
+(define-interface Drive
+ (in-module "gio")
+ (c-name "GDrive")
+ (gtype-id "G_TYPE_DRIVE")
+)
+
+(define-interface File
+ (docstring
+"File(arg, path=None, uri=None) -> gio.File subclass\n"
+"\n"
+"If arg is specified; creates a GFile with the given argument from the\n"
+"command line. The value of arg can be either a URI, an absolute path\n"
+"or a relative path resolved relative to the current working directory.\n"
+"If path is specified, create a file from an absolute or relative path.\n"
+"If uri is specified, create a file from a URI.\n\n"
+"This operation never fails, but the returned object might not \n"
+"support any I/O operation if arg points to a malformed path.")
+ (in-module "gio")
+ (c-name "GFile")
+ (gtype-id "G_TYPE_FILE")
+)
+
+(define-interface Icon
+ (in-module "gio")
+ (c-name "GIcon")
+ (gtype-id "G_TYPE_ICON")
+)
+
+(define-interface Initable
+ (in-module "gio")
+ (c-name "GInitable")
+ (gtype-id "G_TYPE_INITABLE")
+)
+
+(define-interface LoadableIcon
+ (in-module "gio")
+ (c-name "GLoadableIcon")
+ (gtype-id "G_TYPE_LOADABLE_ICON")
+)
+
+(define-interface Mount
+ (in-module "gio")
+ (c-name "GMount")
+ (gtype-id "G_TYPE_MOUNT")
+)
+
+(define-interface Seekable
+ (in-module "gio")
+ (c-name "GSeekable")
+ (gtype-id "G_TYPE_SEEKABLE")
+)
+
+(define-interface SocketConnectable
+ (in-module "gio")
+ (c-name "GSocketConnectable")
+ (gtype-id "G_TYPE_SOCKET_CONNECTABLE")
+)
+
+(define-interface Volume
+ (in-module "gio")
+ (c-name "GVolume")
+ (gtype-id "G_TYPE_VOLUME")
+)
+
+; boxed definitions ...
+
+(define-boxed FileAttributeMatcher
+ (in-module "gio")
+ (c-name "GFileAttributeMatcher")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_MATCHER")
+)
+
+(define-boxed SrvTarget
+ (in-module "gio")
+ (c-name "GSrvTarget")
+ (gtype-id "G_TYPE_SRV_TARGET")
+)
+
+; object definitions ...
+
+(define-object AppLaunchContext
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GAppLaunchContext")
+ (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT")
+)
+
+(define-object Cancellable
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GCancellable")
+ (gtype-id "G_TYPE_CANCELLABLE")
+)
+
+(define-object Emblem
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GEmblem")
+ (gtype-id "G_TYPE_EMBLEM")
+)
+
+(define-object EmblemedIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GEmblemedIcon")
+ (gtype-id "G_TYPE_EMBLEMED_ICON")
+)
+
+(define-object FileEnumerator
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileEnumerator")
+ (gtype-id "G_TYPE_FILE_ENUMERATOR")
+)
+
+(define-object FileInfo
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileInfo")
+ (gtype-id "G_TYPE_FILE_INFO")
+)
+
+(define-object FileMonitor
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileMonitor")
+ (gtype-id "G_TYPE_FILE_MONITOR")
+)
+
+(define-object InputStream
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GInputStream")
+ (gtype-id "G_TYPE_INPUT_STREAM")
+)
+
+(define-object FileInputStream
+ (in-module "gio")
+ (parent "GInputStream")
+ (c-name "GFileInputStream")
+ (gtype-id "G_TYPE_FILE_INPUT_STREAM")
+)
+
+(define-object FileIOStream
+ (in-module "gio")
+ (parent "GIOStream")
+ (c-name "GFileIOStream")
+ (gtype-id "G_TYPE_FILE_IO_STREAM")
+)
+
+(define-object FilterInputStream
+ (in-module "gio")
+ (parent "GInputStream")
+ (c-name "GFilterInputStream")
+ (gtype-id "G_TYPE_FILTER_INPUT_STREAM")
+)
+
+(define-object BufferedInputStream
+ (in-module "gio")
+ (parent "GFilterInputStream")
+ (c-name "GBufferedInputStream")
+ (gtype-id "G_TYPE_BUFFERED_INPUT_STREAM")
+)
+
+(define-object DataInputStream
+ (in-module "gio")
+ (parent "GFilterInputStream")
+ (c-name "GDataInputStream")
+ (gtype-id "G_TYPE_DATA_INPUT_STREAM")
+)
+
+(define-object MemoryInputStream
+ (in-module "gio")
+ (parent "GInputStream")
+ (c-name "GMemoryInputStream")
+ (gtype-id "G_TYPE_MEMORY_INPUT_STREAM")
+)
+
+(define-object MountOperation
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GMountOperation")
+ (gtype-id "G_TYPE_MOUNT_OPERATION")
+)
+
+(define-object InetAddress
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GInetAddress")
+ (gtype-id "G_TYPE_INET_ADDRESS")
+)
+
+(define-object InetSocketAddress
+ (in-module "gio")
+ (parent "GSocketAddress")
+ (c-name "GInetSocketAddress")
+ (gtype-id "G_TYPE_INET_SOCKET_ADDRESS")
+)
+
+(define-object NetworkAddress
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GNetworkAddress")
+ (gtype-id "G_TYPE_NETWORK_ADDRESS")
+)
+
+(define-object NetworkService
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GNetworkService")
+ (gtype-id "G_TYPE_NETWORK_SERVICE")
+)
+
+(define-object Resolver
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GResolver")
+ (gtype-id "G_TYPE_RESOLVER")
+)
+
+(define-object Socket
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocket")
+ (gtype-id "G_TYPE_SOCKET")
+)
+
+(define-object SocketAddress
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketAddress")
+ (gtype-id "G_TYPE_SOCKET_ADDRESS")
+)
+
+(define-object SocketAddressEnumerator
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketAddressEnumerator")
+ (gtype-id "G_TYPE_SOCKET_ADDRESS_ENUMERATOR")
+)
+
+(define-object SocketClient
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketClient")
+ (gtype-id "G_TYPE_SOCKET_CLIENT")
+)
+
+(define-object SocketConnection
+ (in-module "gio")
+ (parent "GIOStream")
+ (c-name "GSocketConnection")
+ (gtype-id "G_TYPE_SOCKET_CONNECTION")
+)
+
+(define-object SocketControlMessage
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketControlMessage")
+ (gtype-id "G_TYPE_SOCKET_CONTROL_MESSAGE")
+)
+
+(define-object SocketListener
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketListener")
+ (gtype-id "G_TYPE_SOCKET_LISTENER")
+)
+
+(define-object SocketService
+ (in-module "gio")
+ (parent "GSocketListener")
+ (c-name "GSocketService")
+ (gtype-id "G_TYPE_SOCKET_SERVICE")
+)
+
+(define-object TcpConnection
+ (in-module "gio")
+ (parent "GSocketConnection")
+ (c-name "GTcpConnection")
+ (gtype-id "G_TYPE_TCP_CONNECTION")
+)
+
+(define-object ThreadedSocketService
+ (in-module "gio")
+ (parent "GSocketService")
+ (c-name "GThreadedSocketService")
+ (gtype-id "G_TYPE_THREADED_SOCKET_SERVICE")
+)
+
+(define-object IOStream
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GIOStream")
+ (gtype-id "G_TYPE_IO_STREAM")
+)
+
+(define-object OutputStream
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GOutputStream")
+ (gtype-id "G_TYPE_OUTPUT_STREAM")
+)
+
+(define-object MemoryOutputStream
+ (in-module "gio")
+ (parent "GOutputStream")
+ (c-name "GMemoryOutputStream")
+ (gtype-id "G_TYPE_MEMORY_OUTPUT_STREAM")
+)
+
+(define-object FilterOutputStream
+ (in-module "gio")
+ (parent "GOutputStream")
+ (c-name "GFilterOutputStream")
+ (gtype-id "G_TYPE_FILTER_OUTPUT_STREAM")
+)
+
+(define-object BufferedOutputStream
+ (in-module "gio")
+ (parent "GFilterOutputStream")
+ (c-name "GBufferedOutputStream")
+ (gtype-id "G_TYPE_BUFFERED_OUTPUT_STREAM")
+)
+
+(define-object DataOutputStream
+ (in-module "gio")
+ (parent "GFilterOutputStream")
+ (c-name "GDataOutputStream")
+ (gtype-id "G_TYPE_DATA_OUTPUT_STREAM")
+)
+
+(define-object FileOutputStream
+ (in-module "gio")
+ (parent "GOutputStream")
+ (c-name "GFileOutputStream")
+ (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
+)
+
+(define-object SimpleAsyncResult
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSimpleAsyncResult")
+ (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
+)
+
+(define-object Vfs
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GVfs")
+ (gtype-id "G_TYPE_VFS")
+)
+
+(define-object VolumeMonitor
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GVolumeMonitor")
+ (gtype-id "G_TYPE_VOLUME_MONITOR")
+)
+
+(define-object NativeVolumeMonitor
+ (in-module "gio")
+ (parent "GVolumeMonitor")
+ (c-name "GNativeVolumeMonitor")
+ (gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR")
+)
+
+(define-object FileIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileIcon")
+ (gtype-id "G_TYPE_FILE_ICON")
+ (implements "GIcon")
+ (implements "GLoadableIcon")
+)
+
+(define-object ThemedIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GThemedIcon")
+ (gtype-id "G_TYPE_THEMED_ICON")
+ (implements "GIcon")
+)
+
+
+
+;; Enumerations and flags ...
+
+(define-flags AppInfoCreateFlags
+ (in-module "gio")
+ (c-name "GAppInfoCreateFlags")
+ (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS")
+ (values
+ '("none" "G_APP_INFO_CREATE_NONE")
+ '("needs-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL")
+ '("supports-uris" "G_APP_INFO_CREATE_SUPPORTS_URIS")
+ )
+)
+
+(define-flags ConverterFlags
+ (in-module "gio")
+ (c-name "GConverterFlags")
+ (gtype-id "G_TYPE_CONVERTER_FLAGS")
+ (values
+ '("no-flags" "G_CONVERTER_NO_FLAGS")
+ '("input-at-end" "G_CONVERTER_INPUT_AT_END")
+ '("flush" "G_CONVERTER_FLUSH")
+ )
+)
+
+(define-enum ConverterResult
+ (in-module "gio")
+ (c-name "GConverterResult")
+ (gtype-id "G_TYPE_CONVERTER_RESULT")
+ (values
+ '("error" "G_CONVERTER_ERROR")
+ '("converted" "G_CONVERTER_CONVERTED")
+ '("finished" "G_CONVERTER_FINISHED")
+ '("flushed" "G_CONVERTER_FLUSHED")
+ )
+)
+
+(define-enum DataStreamByteOrder
+ (in-module "gio")
+ (c-name "GDataStreamByteOrder")
+ (gtype-id "G_TYPE_DATA_STREAM_BYTE_ORDER")
+ (values
+ '("big-endian" "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
+ '("little-endian" "G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN")
+ '("host-endian" "G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN")
+ )
+)
+
+(define-enum DataStreamNewlineType
+ (in-module "gio")
+ (c-name "GDataStreamNewlineType")
+ (gtype-id "G_TYPE_DATA_STREAM_NEWLINE_TYPE")
+ (values
+ '("lf" "G_DATA_STREAM_NEWLINE_TYPE_LF")
+ '("cr" "G_DATA_STREAM_NEWLINE_TYPE_CR")
+ '("cr-lf" "G_DATA_STREAM_NEWLINE_TYPE_CR_LF")
+ '("any" "G_DATA_STREAM_NEWLINE_TYPE_ANY")
+ )
+)
+
+(define-enum FileAttributeType
+ (in-module "gio")
+ (c-name "GFileAttributeType")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_TYPE")
+ (values
+ '("invalid" "G_FILE_ATTRIBUTE_TYPE_INVALID")
+ '("string" "G_FILE_ATTRIBUTE_TYPE_STRING")
+ '("byte-string" "G_FILE_ATTRIBUTE_TYPE_BYTE_STRING")
+ '("boolean" "G_FILE_ATTRIBUTE_TYPE_BOOLEAN")
+ '("uint32" "G_FILE_ATTRIBUTE_TYPE_UINT32")
+ '("int32" "G_FILE_ATTRIBUTE_TYPE_INT32")
+ '("uint64" "G_FILE_ATTRIBUTE_TYPE_UINT64")
+ '("int64" "G_FILE_ATTRIBUTE_TYPE_INT64")
+ '("object" "G_FILE_ATTRIBUTE_TYPE_OBJECT")
+ '("stringv" "G_FILE_ATTRIBUTE_TYPE_STRINGV")
+ )
+)
+
+(define-flags FileAttributeInfoFlags
+ (in-module "gio")
+ (c-name "GFileAttributeInfoFlags")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS")
+ (values
+ '("none" "G_FILE_ATTRIBUTE_INFO_NONE")
+ '("copy-with-file" "G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE")
+ '("copy-when-moved" "G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED")
+ )
+)
+
+(define-enum FileAttributeStatus
+ (in-module "gio")
+ (c-name "GFileAttributeStatus")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_STATUS")
+ (values
+ '("unset" "G_FILE_ATTRIBUTE_STATUS_UNSET")
+ '("set" "G_FILE_ATTRIBUTE_STATUS_SET")
+ '("error-setting" "G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING")
+ )
+)
+
+(define-flags FileQueryInfoFlags
+ (in-module "gio")
+ (c-name "GFileQueryInfoFlags")
+ (gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS")
+ (values
+ '("none" "G_FILE_QUERY_INFO_NONE")
+ '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
+ )
+)
+
+(define-flags FileCreateFlags
+ (in-module "gio")
+ (c-name "GFileCreateFlags")
+ (gtype-id "G_TYPE_FILE_CREATE_FLAGS")
+ (values
+ '("none" "G_FILE_CREATE_NONE")
+ '("private" "G_FILE_CREATE_PRIVATE")
+ '("replace-destination" "G_FILE_CREATE_REPLACE_DESTINATION")
+ )
+)
+
+(define-enum MountMountFlags
+ (in-module "gio")
+ (c-name "GMountMountFlags")
+ (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
+ (values
+ '("none" "G_MOUNT_MOUNT_NONE")
+ )
+)
+
+(define-flags MountUnmountFlags
+ (in-module "gio")
+ (c-name "GMountUnmountFlags")
+ (gtype-id "G_TYPE_MOUNT_UNMOUNT_FLAGS")
+ (values
+ '("none" "G_MOUNT_UNMOUNT_NONE")
+ '("force" "G_MOUNT_UNMOUNT_FORCE")
+ )
+)
+
+(define-enum DriveStartFlags
+ (in-module "gio")
+ (c-name "GDriveStartFlags")
+ (gtype-id "G_TYPE_DRIVE_START_FLAGS")
+ (values
+ '("none" "G_DRIVE_START_NONE")
+ )
+)
+
+(define-enum DriveStartStopType
+ (in-module "gio")
+ (c-name "GDriveStartStopType")
+ (gtype-id "G_TYPE_DRIVE_START_STOP_TYPE")
+ (values
+ '("unknown" "G_DRIVE_START_STOP_TYPE_UNKNOWN")
+ '("shutdown" "G_DRIVE_START_STOP_TYPE_SHUTDOWN")
+ '("network" "G_DRIVE_START_STOP_TYPE_NETWORK")
+ '("multidisk" "G_DRIVE_START_STOP_TYPE_MULTIDISK")
+ '("password" "G_DRIVE_START_STOP_TYPE_PASSWORD")
+ )
+)
+
+(define-flags FileCopyFlags
+ (in-module "gio")
+ (c-name "GFileCopyFlags")
+ (gtype-id "G_TYPE_FILE_COPY_FLAGS")
+ (values
+ '("none" "G_FILE_COPY_NONE")
+ '("overwrite" "G_FILE_COPY_OVERWRITE")
+ '("backup" "G_FILE_COPY_BACKUP")
+ '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS")
+ '("all-metadata" "G_FILE_COPY_ALL_METADATA")
+ '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE")
+ '("target-default-perms" "G_FILE_COPY_TARGET_DEFAULT_PERMS")
+ )
+)
+
+(define-flags FileMonitorFlags
+ (in-module "gio")
+ (c-name "GFileMonitorFlags")
+ (gtype-id "G_TYPE_FILE_MONITOR_FLAGS")
+ (values
+ '("none" "G_FILE_MONITOR_NONE")
+ '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS")
+ )
+)
+
+(define-enum FileType
+ (in-module "gio")
+ (c-name "GFileType")
+ (gtype-id "G_TYPE_FILE_TYPE")
+ (values
+ '("unknown" "G_FILE_TYPE_UNKNOWN")
+ '("regular" "G_FILE_TYPE_REGULAR")
+ '("directory" "G_FILE_TYPE_DIRECTORY")
+ '("symbolic-link" "G_FILE_TYPE_SYMBOLIC_LINK")
+ '("special" "G_FILE_TYPE_SPECIAL")
+ '("shortcut" "G_FILE_TYPE_SHORTCUT")
+ '("mountable" "G_FILE_TYPE_MOUNTABLE")
+ )
+)
+
+(define-enum FilesystemPreviewType
+ (in-module "gio")
+ (c-name "GFilesystemPreviewType")
+ (gtype-id "G_TYPE_FILESYSTEM_PREVIEW_TYPE")
+ (values
+ '("if-always" "G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS")
+ '("if-local" "G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL")
+ '("never" "G_FILESYSTEM_PREVIEW_TYPE_NEVER")
+ )
+)
+
+(define-enum FileMonitorEvent
+ (in-module "gio")
+ (c-name "GFileMonitorEvent")
+ (gtype-id "G_TYPE_FILE_MONITOR_EVENT")
+ (values
+ '("changed" "G_FILE_MONITOR_EVENT_CHANGED")
+ '("changes-done-hint" "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT")
+ '("deleted" "G_FILE_MONITOR_EVENT_DELETED")
+ '("created" "G_FILE_MONITOR_EVENT_CREATED")
+ '("attribute-changed" "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED")
+ '("pre-unmount" "G_FILE_MONITOR_EVENT_PRE_UNMOUNT")
+ '("unmounted" "G_FILE_MONITOR_EVENT_UNMOUNTED")
+ )
+)
+
+(define-enum ErrorEnum
+ (in-module "gio")
+ (c-name "GIOErrorEnum")
+ (gtype-id "G_TYPE_IO_ERROR_ENUM")
+ (values
+ '("failed" "G_IO_ERROR_FAILED")
+ '("not-found" "G_IO_ERROR_NOT_FOUND")
+ '("exists" "G_IO_ERROR_EXISTS")
+ '("is-directory" "G_IO_ERROR_IS_DIRECTORY")
+ '("not-directory" "G_IO_ERROR_NOT_DIRECTORY")
+ '("not-empty" "G_IO_ERROR_NOT_EMPTY")
+ '("not-regular-file" "G_IO_ERROR_NOT_REGULAR_FILE")
+ '("not-symbolic-link" "G_IO_ERROR_NOT_SYMBOLIC_LINK")
+ '("not-mountable-file" "G_IO_ERROR_NOT_MOUNTABLE_FILE")
+ '("filename-too-long" "G_IO_ERROR_FILENAME_TOO_LONG")
+ '("invalid-filename" "G_IO_ERROR_INVALID_FILENAME")
+ '("too-many-links" "G_IO_ERROR_TOO_MANY_LINKS")
+ '("no-space" "G_IO_ERROR_NO_SPACE")
+ '("invalid-argument" "G_IO_ERROR_INVALID_ARGUMENT")
+ '("permission-denied" "G_IO_ERROR_PERMISSION_DENIED")
+ '("not-supported" "G_IO_ERROR_NOT_SUPPORTED")
+ '("not-mounted" "G_IO_ERROR_NOT_MOUNTED")
+ '("already-mounted" "G_IO_ERROR_ALREADY_MOUNTED")
+ '("closed" "G_IO_ERROR_CLOSED")
+ '("cancelled" "G_IO_ERROR_CANCELLED")
+ '("pending" "G_IO_ERROR_PENDING")
+ '("read-only" "G_IO_ERROR_READ_ONLY")
+ '("cant-create-backup" "G_IO_ERROR_CANT_CREATE_BACKUP")
+ '("wrong-etag" "G_IO_ERROR_WRONG_ETAG")
+ '("timed-out" "G_IO_ERROR_TIMED_OUT")
+ '("would-recurse" "G_IO_ERROR_WOULD_RECURSE")
+ '("busy" "G_IO_ERROR_BUSY")
+ '("would-block" "G_IO_ERROR_WOULD_BLOCK")
+ '("host-not-found" "G_IO_ERROR_HOST_NOT_FOUND")
+ '("would-merge" "G_IO_ERROR_WOULD_MERGE")
+ '("failed-handled" "G_IO_ERROR_FAILED_HANDLED")
+ '("too-many-open-files" "G_IO_ERROR_TOO_MANY_OPEN_FILES")
+ '("not-initialized" "G_IO_ERROR_NOT_INITIALIZED")
+ '("address-in-use" "G_IO_ERROR_ADDRESS_IN_USE")
+ '("partial-input" "G_IO_ERROR_PARTIAL_INPUT")
+ '("invalid-data" "G_IO_ERROR_INVALID_DATA")
+ )
+)
+
+(define-flags AskPasswordFlags
+ (in-module "gio")
+ (c-name "GAskPasswordFlags")
+ (gtype-id "G_TYPE_ASK_PASSWORD_FLAGS")
+ (values
+ '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD")
+ '("need-username" "G_ASK_PASSWORD_NEED_USERNAME")
+ '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN")
+ '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED")
+ '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED")
+ )
+)
+
+(define-enum PasswordSave
+ (in-module "gio")
+ (c-name "GPasswordSave")
+ (gtype-id "G_TYPE_PASSWORD_SAVE")
+ (values
+ '("never" "G_PASSWORD_SAVE_NEVER")
+ '("for-session" "G_PASSWORD_SAVE_FOR_SESSION")
+ '("permanently" "G_PASSWORD_SAVE_PERMANENTLY")
+ )
+)
+
+(define-enum MountOperationResult
+ (in-module "gio")
+ (c-name "GMountOperationResult")
+ (gtype-id "G_TYPE_MOUNT_OPERATION_RESULT")
+ (values
+ '("handled" "G_MOUNT_OPERATION_HANDLED")
+ '("aborted" "G_MOUNT_OPERATION_ABORTED")
+ '("unhandled" "G_MOUNT_OPERATION_UNHANDLED")
+ )
+)
+
+(define-flags OutputStreamSpliceFlags
+ (in-module "gio")
+ (c-name "GOutputStreamSpliceFlags")
+ (gtype-id "G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS")
+ (values
+ '("none" "G_OUTPUT_STREAM_SPLICE_NONE")
+ '("close-source" "G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE")
+ '("close-target" "G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET")
+ )
+)
+
+(define-enum EmblemOrigin
+ (in-module "gio")
+ (c-name "GEmblemOrigin")
+ (gtype-id "G_TYPE_EMBLEM_ORIGIN")
+ (values
+ '("unknown" "G_EMBLEM_ORIGIN_UNKNOWN")
+ '("device" "G_EMBLEM_ORIGIN_DEVICE")
+ '("livemetadata" "G_EMBLEM_ORIGIN_LIVEMETADATA")
+ '("tag" "G_EMBLEM_ORIGIN_TAG")
+ )
+)
+
+(define-enum ResolverError
+ (in-module "gio")
+ (c-name "GResolverError")
+ (gtype-id "G_TYPE_RESOLVER_ERROR")
+ (values
+ '("not-found" "G_RESOLVER_ERROR_NOT_FOUND")
+ '("temporary-failure" "G_RESOLVER_ERROR_TEMPORARY_FAILURE")
+ '("internal" "G_RESOLVER_ERROR_INTERNAL")
+ )
+)
+
+(define-enum SocketFamily
+ (in-module "gio")
+ (c-name "GSocketFamily")
+ (gtype-id "G_TYPE_SOCKET_FAMILY")
+ (values
+ '("invalid" "G_SOCKET_FAMILY_INVALID")
+ '("unix" "G_SOCKET_FAMILY_UNIX")
+ '("ipv4" "G_SOCKET_FAMILY_IPV4")
+ '("ipv6" "G_SOCKET_FAMILY_IPV6")
+ )
+)
+
+(define-enum SocketType
+ (in-module "gio")
+ (c-name "GSocketType")
+ (gtype-id "G_TYPE_SOCKET_TYPE")
+ (values
+ '("invalid" "G_SOCKET_TYPE_INVALID")
+ '("stream" "G_SOCKET_TYPE_STREAM")
+ '("datagram" "G_SOCKET_TYPE_DATAGRAM")
+ '("seqpacket" "G_SOCKET_TYPE_SEQPACKET")
+ )
+)
+
+(define-enum SocketMsgFlags
+ (in-module "gio")
+ (c-name "GSocketMsgFlags")
+ (gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
+ (values
+ '("none" "G_SOCKET_MSG_NONE")
+ '("oob" "G_SOCKET_MSG_OOB")
+ '("peek" "G_SOCKET_MSG_PEEK")
+ '("dontroute" "G_SOCKET_MSG_DONTROUTE")
+ )
+)
+
+(define-enum SocketProtocol
+ (in-module "gio")
+ (c-name "GSocketProtocol")
+ (gtype-id "G_TYPE_SOCKET_PROTOCOL")
+ (values
+ '("unknown" "G_SOCKET_PROTOCOL_UNKNOWN")
+ '("default" "G_SOCKET_PROTOCOL_DEFAULT")
+ '("tcp" "G_SOCKET_PROTOCOL_TCP")
+ '("udp" "G_SOCKET_PROTOCOL_UDP")
+ '("sctp" "G_SOCKET_PROTOCOL_SCTP")
+ )
+)
+
+(define-enum ZlibCompressorFormat
+ (in-module "gio")
+ (c-name "GZlibCompressorFormat")
+ (gtype-id "G_TYPE_ZLIB_COMPRESSOR_FORMAT")
+ (values
+ '("zlib" "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")
+ '("gzip" "G_ZLIB_COMPRESSOR_FORMAT_GZIP")
+ '("raw" "G_ZLIB_COMPRESSOR_FORMAT_RAW")
+ )
+)
diff --git a/gio/gio.defs b/gio/gio.defs
new file mode 100644
index 0000000..f5a28b6
--- /dev/null
+++ b/gio/gio.defs
@@ -0,0 +1,7465 @@
+;; -*- scheme -*-
+
+(include "gio-types.defs")
+
+;; From gappinfo.h
+
+(define-function app_info_get_type
+ (c-name "g_app_info_get_type")
+ (return-type "GType")
+)
+
+(define-function app_launch_context_get_type
+ (c-name "g_app_launch_context_get_type")
+ (return-type "GType")
+)
+
+(define-function app_info_create_from_commandline
+ (c-name "g_app_info_create_from_commandline")
+ (is-constructor-of "GAppInfo")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "commandline")
+ '("const-char*" "application_name" (null-ok) (default "NULL"))
+ '("GAppInfoCreateFlags" "flags" (default "G_APP_INFO_CREATE_NONE"))
+ '("GError**" "error")
+ )
+)
+
+(define-method dup
+ (of-object "GAppInfo")
+ (c-name "g_app_info_dup")
+ (return-type "GAppInfo*")
+ (caller-owns-return #t)
+)
+
+(define-method equal
+ (of-object "GAppInfo")
+ (c-name "g_app_info_equal")
+ (return-type "gboolean")
+ (parameters
+ '("GAppInfo*" "appinfo2")
+ )
+)
+
+(define-method get_id
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_id")
+ (return-type "const-char*")
+)
+
+(define-method get_name
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_name")
+ (return-type "const-char*")
+)
+
+(define-method get_description
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_description")
+ (return-type "const-char*")
+)
+
+(define-method get_executable
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_executable")
+ (return-type "const-char*")
+)
+
+(define-method get_icon
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_icon")
+ (return-type "GIcon*")
+)
+
+;;
+;; wrapped in gappinfo.override
+;;
+(define-method launch
+ (docstring
+ "launch (files=None, launch_context=None) -> gboolean\n"
+ "\n"
+ "Launches the application. Passes files to the launched application\n"
+ "as arguments, using the optional launch_context to get information\n"
+ "about the details of the launcher (like what screen it is on).\n"
+ "On error, error will be set accordingly.\n\n"
+ "Note that even if the launch is successful the application launched\n"
+ "can fail to start if it runs into problems during startup.\n"
+ "There is no way to detect this.\n\n"
+ "Some URIs can be changed when passed through a gio.File\n"
+ "(for instance unsupported uris with strange formats like mailto:),\n"
+ "so if you have a textual uri you want to pass in as argument,\n"
+ "consider using gio.AppInfo.launch_uris() instead."
+ )
+ (of-object "GAppInfo")
+ (c-name "g_app_info_launch")
+ (return-type "gboolean")
+ (parameters
+ '("GList*" "files")
+ '("GAppLaunchContext*" "launch_context")
+ '("GError**" "error")
+ )
+)
+
+(define-method supports_uris
+ (of-object "GAppInfo")
+ (c-name "g_app_info_supports_uris")
+ (return-type "gboolean")
+)
+
+(define-method supports_files
+ (of-object "GAppInfo")
+ (c-name "g_app_info_supports_files")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gappinfo.override
+;;
+(define-method launch_uris
+ (docstring
+ "launch_uris (files=None, launch_context=None) -> gboolean\n"
+ "\n"
+ "Launches the application. Passes files to the launched application\n"
+ "as arguments, using the optional launch_context to get information\n"
+ "about the details of the launcher (like what screen it is on).\n"
+ "On error, error will be set accordingly.\n\n"
+ "Note that even if the launch is successful the application launched\n"
+ "can fail to start if it runs into problems during startup.\n"
+ "There is no way to detect this.\n\n"
+ )
+ (of-object "GAppInfo")
+ (c-name "g_app_info_launch_uris")
+ (return-type "gboolean")
+ (parameters
+ '("GList*" "uris")
+ '("GAppLaunchContext*" "launch_context")
+ '("GError**" "error")
+ )
+)
+
+(define-method should_show
+ (of-object "GAppInfo")
+ (c-name "g_app_info_should_show")
+ (return-type "gboolean")
+)
+
+(define-method set_as_default_for_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_set_as_default_for_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "content_type")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_as_default_for_extension
+ (of-object "GAppInfo")
+ (c-name "g_app_info_set_as_default_for_extension")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "extension")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_supports_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_add_supports_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "content_type")
+ '("GError**" "error")
+ )
+)
+
+(define-method can_remove_supports_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_can_remove_supports_type")
+ (return-type "gboolean")
+)
+
+(define-method remove_supports_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_remove_supports_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "content_type")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function app_info_get_all
+ (c-name "g_app_info_get_all")
+ (return-type "GList*")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function app_info_get_all_for_type
+ (c-name "g_app_info_get_all_for_type")
+ (return-type "GList*")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-function app_info_get_default_for_type
+ (c-name "g_app_info_get_default_for_type")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "content_type")
+ '("gboolean" "must_support_uris")
+ )
+)
+
+(define-function app_info_get_default_for_uri_scheme
+ (c-name "g_app_info_get_default_for_uri_scheme")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "uri_scheme")
+ )
+)
+
+(define-function app_launch_context_new
+ (c-name "g_app_launch_context_new")
+ (is-constructor-of "GAppLaunchContext")
+ (return-type "GAppLaunchContext*")
+)
+
+;;
+;; wrapped in gapplaunchcontext.override
+;;
+(define-method get_display
+ (of-object "GAppLaunchContext")
+ (c-name "g_app_launch_context_get_display")
+ (return-type "char*")
+ (parameters
+ '("GAppInfo*" "info")
+ '("GList*" "files")
+ )
+)
+
+;;
+;; wrapped in gapplaunchcontext.override
+;;
+(define-method get_startup_notify_id
+ (of-object "GAppLaunchContext")
+ (c-name "g_app_launch_context_get_startup_notify_id")
+ (return-type "char*")
+ (parameters
+ '("GAppInfo*" "info")
+ '("GList*" "files")
+ )
+)
+
+(define-method launch_failed
+ (of-object "GAppLaunchContext")
+ (c-name "g_app_launch_context_launch_failed")
+ (return-type "none")
+ (parameters
+ '("const-char*" "startup_notify_id")
+ )
+)
+
+(define-function app_info_reset_type_associations
+ (c-name "g_app_info_reset_type_associations")
+ (return-type "none")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-method can_delete
+ (of-object "GAppInfo")
+ (c-name "g_app_info_can_delete")
+ (return-type "gboolean")
+)
+
+(define-method delete
+ (of-object "GAppInfo")
+ (c-name "g_app_info_delete")
+ (return-type "gboolean")
+)
+
+(define-method get_commandline
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_commandline")
+ (return-type "const-char*")
+)
+
+
+
+;; From gasyncinitable.h
+
+(define-function async_initable_get_type
+ (c-name "g_async_initable_get_type")
+ (return-type "GType")
+)
+
+(define-method init_async
+ (of-object "GAsyncInitable")
+ (c-name "g_async_initable_init_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method init_finish
+ (of-object "GAsyncInitable")
+ (c-name "g_async_initable_init_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-function async_initable_new_async
+ (c-name "g_async_initable_new_async")
+ (return-type "none")
+ (parameters
+ '("GType" "object_type")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("const-gchar*" "first_property_name")
+ )
+ (varargs #t)
+)
+
+(define-function async_initable_newv_async
+ (c-name "g_async_initable_newv_async")
+ (return-type "none")
+ (parameters
+ '("GType" "object_type")
+ '("guint" "n_parameters")
+ '("GParameter*" "parameters")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-function async_initable_new_valist_async
+ (c-name "g_async_initable_new_valist_async")
+ (return-type "none")
+ (parameters
+ '("GType" "object_type")
+ '("const-gchar*" "first_property_name")
+ '("va_list" "var_args")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method new_finish
+ (of-object "GAsyncInitable")
+ (c-name "g_async_initable_new_finish")
+ (return-type "GObject*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gasyncresult.h
+
+(define-function async_result_get_type
+ (c-name "g_async_result_get_type")
+ (return-type "GType")
+)
+
+(define-method get_user_data
+ (of-object "GAsyncResult")
+ (c-name "g_async_result_get_user_data")
+ (return-type "gpointer")
+)
+
+(define-method get_source_object
+ (of-object "GAsyncResult")
+ (c-name "g_async_result_get_source_object")
+ (return-type "GObject*")
+)
+
+
+
+;; From gbufferedinputstream.h
+
+(define-function buffered_input_stream_get_type
+ (c-name "g_buffered_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function buffered_input_stream_new
+ (c-name "g_buffered_input_stream_new")
+ (is-constructor-of "GBufferedInputStream")
+ (return-type "GInputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-function buffered_input_stream_new_sized
+ (c-name "g_buffered_input_stream_new_sized")
+ (return-type "GInputStream*")
+ (parameters
+ '("GInputStream*" "base_stream")
+ '("gsize" "size")
+ )
+)
+
+(define-method get_buffer_size
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_get_buffer_size")
+ (return-type "gsize")
+)
+
+(define-method set_buffer_size
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_set_buffer_size")
+ (return-type "none")
+ (parameters
+ '("gsize" "size")
+ )
+)
+
+(define-method get_available
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_get_available")
+ (return-type "gsize")
+)
+
+(define-method peek
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_peek")
+ (return-type "gsize")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "offset")
+ '("gsize" "count")
+ )
+)
+
+(define-method peek_buffer
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_peek_buffer")
+ (return-type "const-void*")
+ (parameters
+ '("gsize*" "count")
+ )
+)
+
+(define-method fill
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_fill")
+ (return-type "gssize")
+ (unblock-threads #t)
+ (parameters
+ '("gssize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method fill_async
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_fill_async")
+ (return-type "none")
+ (parameters
+ '("gssize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method fill_finish
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_fill_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_byte
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_read_byte")
+ (return-type "int")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gbufferedoutputstream.h
+
+(define-function buffered_output_stream_get_type
+ (c-name "g_buffered_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function buffered_output_stream_new
+ (c-name "g_buffered_output_stream_new")
+ (is-constructor-of "GBufferedOutputStream")
+ (return-type "GOutputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-function buffered_output_stream_new_sized
+ (c-name "g_buffered_output_stream_new_sized")
+ (return-type "GOutputStream*")
+ (parameters
+ '("GOutputStream*" "base_stream")
+ '("guint" "size")
+ )
+)
+
+(define-method get_buffer_size
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_get_buffer_size")
+ (return-type "gsize")
+)
+
+(define-method set_buffer_size
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_set_buffer_size")
+ (return-type "none")
+ (parameters
+ '("gsize" "size")
+ )
+)
+
+(define-method get_auto_grow
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_get_auto_grow")
+ (return-type "gboolean")
+)
+
+(define-method set_auto_grow
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_set_auto_grow")
+ (return-type "none")
+ (parameters
+ '("gboolean" "auto_grow")
+ )
+)
+
+
+
+;; From gcancellable.h
+
+(define-function cancellable_get_type
+ (c-name "g_cancellable_get_type")
+ (return-type "GType")
+)
+
+(define-function cancellable_new
+ (c-name "g_cancellable_new")
+ (is-constructor-of "GCancellable")
+ (return-type "GCancellable*")
+)
+
+(define-method is_cancelled
+ (of-object "GCancellable")
+ (c-name "g_cancellable_is_cancelled")
+ (return-type "gboolean")
+)
+
+(define-method set_error_if_cancelled
+ (of-object "GCancellable")
+ (c-name "g_cancellable_set_error_if_cancelled")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method get_fd
+ (of-object "GCancellable")
+ (c-name "g_cancellable_get_fd")
+ (return-type "int")
+)
+
+(define-method make_pollfd
+ (of-object "GCancellable")
+ (c-name "g_cancellable_make_pollfd")
+ (return-type "none")
+ (parameters
+ '("GPollFD*" "pollfd")
+ )
+)
+
+(define-function cancellable_get_current
+ (c-name "g_cancellable_get_current")
+ (return-type "GCancellable*")
+)
+
+(define-method push_current
+ (of-object "GCancellable")
+ (c-name "g_cancellable_push_current")
+ (return-type "none")
+)
+
+(define-method pop_current
+ (of-object "GCancellable")
+ (c-name "g_cancellable_pop_current")
+ (return-type "none")
+)
+
+(define-method reset
+ (of-object "GCancellable")
+ (c-name "g_cancellable_reset")
+ (return-type "none")
+)
+
+(define-method cancel
+ (of-object "GCancellable")
+ (c-name "g_cancellable_cancel")
+ (return-type "none")
+)
+
+(define-method connect
+ (of-object "GCancellable")
+ (c-name "g_cancellable_connect")
+ (return-type "gulong")
+ (parameters
+ '("GCallback" "callback")
+ '("gpointer" "data")
+ '("GDestroyNotify" "data_destroy_func")
+ )
+)
+
+(define-method disconnect
+ (of-object "GCancellable")
+ (c-name "g_cancellable_disconnect")
+ (return-type "none")
+ (parameters
+ '("gulong" "handler_id")
+ )
+)
+
+(define-method release_fd
+ (of-object "GCancellable")
+ (c-name "g_cancellable_release_fd")
+ (return-type "none")
+)
+
+
+
+;; From gcontenttype.h
+
+(define-function content_type_equals
+ (c-name "g_content_type_equals")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type1")
+ '("const-char*" "type2")
+ )
+)
+
+(define-function content_type_is_a
+ (c-name "g_content_type_is_a")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type")
+ '("const-char*" "supertype")
+ )
+)
+
+(define-function content_type_is_unknown
+ (c-name "g_content_type_is_unknown")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_get_description
+ (c-name "g_content_type_get_description")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_get_mime_type
+ (c-name "g_content_type_get_mime_type")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_get_icon
+ (c-name "g_content_type_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_can_be_executable
+ (c-name "g_content_type_can_be_executable")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_from_mime_type
+ (c-name "g_content_type_from_mime_type")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "mime_type")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function content_type_guess
+ (docstring
+"content_type_guess([filename, data, want_uncertain]) -> mime type\n"
+"\n"
+"Guesses the content type based on the parameters passed.\n"
+"Either filename or data must be specified\n"
+"Returns a string containing the mime type.\n"
+"If want_uncertain is set to True, return a tuple with the mime type and \n"
+"True/False if the type guess was uncertain or not.")
+ (c-name "g_content_type_guess")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "filename")
+ '("const-guchar*" "data")
+ '("gsize" "data_size")
+ '("gboolean*" "result_uncertain")
+ )
+)
+
+(define-function content_type_guess_for_tree
+ (c-name "g_content_type_guess_for_tree")
+ (return-type "char**")
+ (parameters
+ '("GFile*" "root")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function content_types_get_registered
+ (c-name "g_content_types_get_registered")
+ (return-type "GList*")
+)
+
+
+
+;; From gdatainputstream.h
+
+(define-function data_input_stream_get_type
+ (c-name "g_data_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function data_input_stream_new
+ (c-name "g_data_input_stream_new")
+ (is-constructor-of "GDataInputStream")
+ (return-type "GDataInputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-method set_byte_order
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_set_byte_order")
+ (return-type "none")
+ (parameters
+ '("GDataStreamByteOrder" "order")
+ )
+)
+
+(define-method get_byte_order
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_get_byte_order")
+ (return-type "GDataStreamByteOrder")
+)
+
+(define-method set_newline_type
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_set_newline_type")
+ (return-type "none")
+ (parameters
+ '("GDataStreamNewlineType" "type")
+ )
+)
+
+(define-method get_newline_type
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_get_newline_type")
+ (return-type "GDataStreamNewlineType")
+)
+
+(define-method read_byte
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_byte")
+ (return-type "guchar")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_int16
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_int16")
+ (return-type "gint16")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_uint16
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_uint16")
+ (return-type "guint16")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_int32
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_int32")
+ (return-type "gint32")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_uint32
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_uint32")
+ (return-type "guint32")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_int64
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_int64")
+ (return-type "gint64")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_uint64
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_uint64")
+ (return-type "guint64")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gdatainputstream.override
+;;
+(define-method read_line
+ (of-object "GDataInputStream")
+ (docstring
+ "S.read_line([cancellable]) -> str\n"
+ "Read a line from the stream. Return value includes ending newline\n"
+ "character.")
+ (c-name "g_data_input_stream_read_line")
+ (return-type "char*")
+ (parameters
+ '("gsize*" "length")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gdatainputstream.override
+;;
+(define-method read_until
+ (of-object "GDataInputStream")
+ (docstring
+ "S.read_until(stop_chars, [cancellable]) -> str\n"
+ "Read characters from the string, stopping at the end or upon reading\n"
+ "any character in stop_chars. Return value does not include the stopping\n"
+ "character.")
+ (c-name "g_data_input_stream_read_until")
+ (return-type "char*")
+ (parameters
+ '("const-gchar*" "stop_chars")
+ '("gsize*" "length")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_until_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "stop_chars")
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_until_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_line_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_async")
+ (return-type "none")
+ (parameters
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_line_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gdataoutputstream.h
+
+(define-function data_output_stream_get_type
+ (c-name "g_data_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function data_output_stream_new
+ (c-name "g_data_output_stream_new")
+ (is-constructor-of "GDataOutputStream")
+ (return-type "GDataOutputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-method set_byte_order
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_set_byte_order")
+ (return-type "none")
+ (parameters
+ '("GDataStreamByteOrder" "order")
+ )
+)
+
+(define-method get_byte_order
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_get_byte_order")
+ (return-type "GDataStreamByteOrder")
+)
+
+(define-method put_byte
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_byte")
+ (return-type "gboolean")
+ (parameters
+ '("guchar" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_int16
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_int16")
+ (return-type "gboolean")
+ (parameters
+ '("gint16" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_uint16
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_uint16")
+ (return-type "gboolean")
+ (parameters
+ '("guint16" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_int32
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_int32")
+ (return-type "gboolean")
+ (parameters
+ '("gint32" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_uint32
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_uint32")
+ (return-type "gboolean")
+ (parameters
+ '("guint32" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_int64
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_int64")
+ (return-type "gboolean")
+ (parameters
+ '("gint64" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_uint64
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_uint64")
+ (return-type "gboolean")
+ (parameters
+ '("guint64" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_string
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "str")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+
+
+
+;; From gdrive.h
+
+(define-function drive_get_type
+ (c-name "g_drive_get_type")
+ (return-type "GType")
+)
+
+(define-method get_name
+ (of-object "GDrive")
+ (c-name "g_drive_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GDrive")
+ (c-name "g_drive_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+)
+
+(define-method has_volumes
+ (of-object "GDrive")
+ (c-name "g_drive_has_volumes")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method get_volumes
+ (of-object "GDrive")
+ (c-name "g_drive_get_volumes")
+ (return-type "GList*")
+)
+
+(define-method is_media_removable
+ (of-object "GDrive")
+ (c-name "g_drive_is_media_removable")
+ (return-type "gboolean")
+)
+
+(define-method has_media
+ (of-object "GDrive")
+ (c-name "g_drive_has_media")
+ (return-type "gboolean")
+)
+
+(define-method is_media_check_automatic
+ (of-object "GDrive")
+ (c-name "g_drive_is_media_check_automatic")
+ (return-type "gboolean")
+)
+
+(define-method can_poll_for_media
+ (of-object "GDrive")
+ (c-name "g_drive_can_poll_for_media")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GDrive")
+ (c-name "g_drive_can_eject")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method eject
+ (of-object "GDrive")
+ (c-name "g_drive_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GDrive")
+ (c-name "g_drive_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method poll_for_media
+ (of-object "GDrive")
+ (c-name "g_drive_poll_for_media")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method poll_for_media_finish
+ (of-object "GDrive")
+ (c-name "g_drive_poll_for_media_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_identifier
+ (of-object "GDrive")
+ (c-name "g_drive_get_identifier")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "kind")
+ )
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method enumerate_identifiers
+ (of-object "GDrive")
+ (c-name "g_drive_enumerate_identifiers")
+ (return-type "char**")
+)
+
+(define-method can_start
+ (of-object "GDrive")
+ (c-name "g_drive_can_start")
+ (return-type "gboolean")
+)
+
+(define-method can_start_degraded
+ (of-object "GDrive")
+ (c-name "g_drive_can_start_degraded")
+ (return-type "gboolean")
+)
+
+(define-method can_stop
+ (of-object "GDrive")
+ (c-name "g_drive_can_stop")
+ (return-type "gboolean")
+)
+
+(define-method eject_with_operation
+ (of-object "GDrive")
+ (c-name "g_drive_eject_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_with_operation_finish
+ (of-object "GDrive")
+ (c-name "g_drive_eject_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_start_stop_type
+ (of-object "GDrive")
+ (c-name "g_drive_get_start_stop_type")
+ (return-type "GDriveStartStopType")
+)
+
+(define-method start
+ (of-object "GDrive")
+ (c-name "g_drive_start")
+ (return-type "none")
+ (parameters
+ '("GDriveStartFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method start_finish
+ (of-object "GDrive")
+ (c-name "g_drive_start_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method stop
+ (of-object "GDrive")
+ (c-name "g_drive_stop")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method stop_finish
+ (of-object "GDrive")
+ (c-name "g_drive_stop_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gemblemedicon.h
+
+(define-function emblemed_icon_get_type
+ (c-name "g_emblemed_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function emblemed_icon_new
+ (c-name "g_emblemed_icon_new")
+ (is-constructor-of "GEmblemedIcon")
+ (return-type "GIcon*")
+ (parameters
+ '("GIcon*" "icon")
+ '("GEmblem*" "emblem")
+ )
+)
+
+(define-method get_icon
+ (of-object "GEmblemedIcon")
+ (c-name "g_emblemed_icon_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_emblems
+ (of-object "GEmblemedIcon")
+ (c-name "g_emblemed_icon_get_emblems")
+ (return-type "GList*")
+)
+
+(define-method add_emblem
+ (of-object "GEmblemedIcon")
+ (c-name "g_emblemed_icon_add_emblem")
+ (return-type "none")
+ (parameters
+ '("GEmblem*" "emblem")
+ )
+)
+
+
+
+;; From gemblem.h
+
+(define-function emblem_get_type
+ (c-name "g_emblem_get_type")
+ (return-type "GType")
+)
+
+(define-function emblem_new
+ (c-name "g_emblem_new")
+ (is-constructor-of "GEmblem")
+ (return-type "GEmblem*")
+ (properties
+ '("icon")
+ '("origin" (optional))
+ )
+)
+
+(define-function emblem_new_with_origin
+ (c-name "g_emblem_new_with_origin")
+ (return-type "GEmblem*")
+ (parameters
+ '("GIcon*" "icon")
+ '("GEmblemOrigin" "origin")
+ )
+)
+
+(define-method get_icon
+ (of-object "GEmblem")
+ (c-name "g_emblem_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_origin
+ (of-object "GEmblem")
+ (c-name "g_emblem_get_origin")
+ (return-type "GEmblemOrigin")
+)
+
+
+
+;; From gfileattribute.h
+
+(define-function file_attribute_info_list_new
+ (c-name "g_file_attribute_info_list_new")
+ (is-constructor-of "GFileAttributeInfoList")
+ (return-type "GFileAttributeInfoList*")
+)
+
+(define-method ref
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_ref")
+ (return-type "GFileAttributeInfoList*")
+)
+
+(define-method unref
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_unref")
+ (return-type "none")
+)
+
+(define-method dup
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_dup")
+ (return-type "GFileAttributeInfoList*")
+)
+
+(define-method lookup
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_lookup")
+ (return-type "const-GFileAttributeInfo*")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method add
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_add")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ '("GFileAttributeType" "type")
+ '("GFileAttributeInfoFlags" "flags" (default "G_FILE_ATTRIBUTE_INFO_NONE"))
+ )
+)
+
+
+
+;; From gfileenumerator.h
+
+(define-function file_enumerator_get_type
+ (c-name "g_file_enumerator_get_type")
+ (return-type "GType")
+)
+
+(define-method next_file
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_next_file")
+ (return-type "GFileInfo*")
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method next_files_async
+ (docstring
+"FE.next_files_async(num_files, callback, [io_priority, cancellable,\n"
+" user_data])\n"
+"Request information for a number of files from the enumerator\n"
+"asynchronously. When all i/o for the operation is finished the callback\n"
+"will be called with the requested information.\n"
+"\n"
+"The callback can be called with less than num_files files in case of error\n"
+"or at the end of the enumerator. In case of a partial error the callback\n"
+"will be called with any succeeding items and no error, and on the next\n"
+"request the error will be reported. If a request is cancelled the callback\n"
+"will be called with gio.ERROR_CANCELLED.\n"
+"\n"
+"During an async request no other sync and async calls are allowed, and will\n"
+"result in gio.ERROR_PENDING errors.\n"
+"\n"
+"Any outstanding i/o request with higher priority (lower numerical value)\n"
+"will be executed before an outstanding request with lower priority.\n"
+"Default priority is gobject.PRIORITY_DEFAULT.")
+
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_next_files_async")
+ (return-type "none")
+ (parameters
+ '("int" "num_files")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method next_files_finish
+ (docstring
+"FE.next_files_finish(result) -> a list of gio.FileInfos\n"
+"Finishes the asynchronous operation started with\n"
+"gio.FileEnumerator.next_files_async().")
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_next_files_finish")
+ (return-type "GList*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method close_async
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_set_pending")
+ (return-type "none")
+ (parameters
+ '("gboolean" "pending")
+ )
+)
+
+(define-method get_container
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_get_container")
+ (return-type "GFile*")
+)
+
+
+
+;; From gfile.h
+
+(define-function file_get_type
+ (c-name "g_file_get_type")
+ (return-type "GType")
+)
+
+(define-function file_new_for_path
+ (c-name "g_file_new_for_path")
+ (is-constructor-of "GFile")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "path")
+ )
+)
+
+(define-function file_new_for_uri
+ (c-name "g_file_new_for_uri")
+ (is-constructor-of "GFile")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "uri")
+ )
+)
+
+(define-function file_new_for_commandline_arg
+ (is-constructor-of "GFile")
+ (c-name "g_file_new_for_commandline_arg")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "arg")
+ )
+)
+
+(define-function file_parse_name
+ (c-name "g_file_parse_name")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "parse_name")
+ )
+)
+
+(define-method dup
+ (of-object "GFile")
+ (c-name "g_file_dup")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+)
+
+(define-function file_hash
+ (c-name "g_file_hash")
+ (return-type "guint")
+ (parameters
+ '("gconstpointer" "file")
+ )
+)
+
+(define-method equal
+ (of-object "GFile")
+ (c-name "g_file_equal")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "file2")
+ )
+)
+
+(define-method get_basename
+ (of-object "GFile")
+ (c-name "g_file_get_basename")
+ (return-type "char*")
+)
+
+(define-method get_path
+ (of-object "GFile")
+ (c-name "g_file_get_path")
+ (return-type "char*")
+)
+
+(define-method get_uri
+ (of-object "GFile")
+ (c-name "g_file_get_uri")
+ (return-type "char*")
+)
+
+(define-method get_parse_name
+ (of-object "GFile")
+ (c-name "g_file_get_parse_name")
+ (return-type "char*")
+)
+
+(define-method get_parent
+ (of-object "GFile")
+ (c-name "g_file_get_parent")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+)
+
+(define-method get_child
+ (of-object "GFile")
+ (c-name "g_file_get_child")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method get_child_for_display_name
+ (of-object "GFile")
+ (c-name "g_file_get_child_for_display_name")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "display_name")
+ '("GError**" "error")
+ )
+)
+
+(define-method has_prefix
+ (of-object "GFile")
+ (c-name "g_file_has_prefix")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "descendant")
+ )
+)
+
+(define-method get_relative_path
+ (of-object "GFile")
+ (c-name "g_file_get_relative_path")
+ (return-type "char*")
+ (parameters
+ '("GFile*" "descendant")
+ )
+)
+
+(define-method resolve_relative_path
+ (of-object "GFile")
+ (c-name "g_file_resolve_relative_path")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "relative_path")
+ )
+)
+
+(define-method is_native
+ (of-object "GFile")
+ (c-name "g_file_is_native")
+ (return-type "gboolean")
+)
+
+(define-method has_uri_scheme
+ (of-object "GFile")
+ (c-name "g_file_has_uri_scheme")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "uri_scheme")
+ )
+)
+
+(define-method get_uri_scheme
+ (of-object "GFile")
+ (c-name "g_file_get_uri_scheme")
+ (return-type "char*")
+)
+
+(define-method read
+ (of-object "GFile")
+ (docstring
+ "F.read([cancellable]) -> input stream\n"
+ "Opens a file for reading. The result is a GFileInputStream that\n"
+ "can be used to read the contents of the file.\n"
+ "\n"
+ "If cancellable is specified, then the operation can be cancelled\n"
+ "by triggering the cancellable object from another thread. If the\n"
+ "operation was cancelled, the error gio.IO_ERROR_CANCELLED will\n"
+ "be returned. If the file does not exist, the gio.IO_ERROR_NOT_FOUND\n"
+ "error will be returned. If the file is a directory, the\n"
+ "gio.IO_ERROR_IS_DIRECTORY error will be returned. Other errors\n"
+ "are possible too, and depend on what kind of filesystem the file is on."
+ )
+ (c-name "g_file_read")
+ (return-type "GFileInputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method read_async
+ (of-object "GFile")
+ (docstring
+ "F.read_async(callback [,io_priority [,cancellable [,user_data]]])\n"
+ "-> start read\n"
+ "\n"
+ "For more details, see gio.File.read() which is the synchronous\n"
+ "version of this call. Asynchronously opens file for reading.\n"
+ "When the operation is finished, callback will be called.\n"
+ "You can then call g_file_read_finish() to get the result of the\n"
+ "operation.\n"
+ )
+ (c-name "g_file_read_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_finish
+ (of-object "GFile")
+ (c-name "g_file_read_finish")
+ (return-type "GFileInputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method append_to
+ (of-object "GFile")
+ (c-name "g_file_append_to")
+ (return-type "GFileOutputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method create
+ (of-object "GFile")
+ (c-name "g_file_create")
+ (return-type "GFileOutputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method replace
+ (of-object "GFile")
+ (c-name "g_file_replace")
+ (return-type "GFileOutputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method append_to_async
+ (docstring
+ "F.append_to_async(callback [flags, [,io_priority [,cancellable\n"
+ " [,user_data]]]]) -> open for append\n"
+ "\n"
+ "Asynchronously opens file for appending.\n"
+ "For more details, see gio.File.append_to() which is the synchronous\n"
+ "version of this call. When the operation is finished, callback will\n"
+ "be called. You can then call F.append_to_finish() to get the result\n"
+ "of the operation."
+ )
+ (of-object "GFile")
+ (c-name "g_file_append_to_async")
+ (return-type "none")
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method append_to_finish
+ (of-object "GFile")
+ (c-name "g_file_append_to_finish")
+ (return-type "GFileOutputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method create_async
+ (docstring
+ "F.create_async(callback [flags, [,io_priority [,cancellable\n"
+ " [,user_data]]]]) -> file created\n"
+ "\n"
+ "Asynchronously creates a new file and returns an output stream for\n"
+ "writing to it. The file must not already exist.\n"
+ "For more details, see F.create() which is the synchronous\n"
+ "version of this call.\n"
+ "When the operation is finished, callback will be called. You can\n"
+ "then call F.create_finish() to get the result of the operation."
+ )
+ (of-object "GFile")
+ (c-name "g_file_create_async")
+ (return-type "none")
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method create_finish
+ (of-object "GFile")
+ (c-name "g_file_create_finish")
+ (return-type "GFileOutputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_async
+ (docstring
+ "F.replace_async(callback [etag, [make_backup, [flags, [io_priority,\n"
+ " [cancellable, [user_data]]]]]]) -> file replace\n"
+ "\n"
+ "Asynchronously overwrites the file, replacing the contents, possibly\n"
+ "creating a backup copy of the file first.\n"
+ "For more details, see F.replace() which is the synchronous\n"
+ "version of this call.\n"
+ "When the operation is finished, callback will be called. You can\n"
+ "then call F.replace_finish() to get the result of the operation."
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method replace_finish
+ (of-object "GFile")
+ (c-name "g_file_replace_finish")
+ (return-type "GFileOutputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method query_exists
+ (of-object "GFile")
+ (c-name "g_file_query_exists")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method query_file_type
+ (of-object "GFile")
+ (c-name "g_file_query_file_type")
+ (return-type "GFileType")
+ (parameters
+ '("GFileQueryInfoFlags" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method query_info
+ (of-object "GFile")
+ (c-name "g_file_query_info")
+ (return-type "GFileInfo*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_info_async
+ (docstring
+ "F.query_info_async(attributes, callback, [flags, [io_priority,\n"
+ " [cancellable, [user_data]]]]) -> query attributes\n"
+ "\n"
+ "Asynchronously gets the requested information about specified file.\n"
+ "The result is a GFileInfo object that contains key-value attributes\n"
+ "(such as type or size for the file).\n"
+ "For more details, see F.query_info() which is the synchronous\n"
+ "version of this call. \n"
+ "When the operation is finished, callback will be called. You can\n"
+ "then call F.query_info_finish() to get the result of the operation.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_query_info_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFile")
+ (c-name "g_file_query_info_finish")
+ (return-type "GFileInfo*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method query_filesystem_info
+ (of-object "GFile")
+ (c-name "g_file_query_filesystem_info")
+ (return-type "GFileInfo*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_filesystem_info_async
+ (of-object "GFile")
+ (c-name "g_file_query_filesystem_info_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_filesystem_info_finish
+ (of-object "GFile")
+ (c-name "g_file_query_filesystem_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method find_enclosing_mount
+ (of-object "GFile")
+ (c-name "g_file_find_enclosing_mount")
+ (return-type "GMount*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method find_enclosing_mount_async
+ (of-object "GFile")
+ (c-name "g_file_find_enclosing_mount_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method find_enclosing_mount_finish
+ (of-object "GFile")
+ (c-name "g_file_find_enclosing_mount_finish")
+ (return-type "GMount*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method enumerate_children
+ (docstring
+"F.enumerate_children(attributes, [flags, cancellable]) -> enumerator\n"
+"Gets the requested information about the files in a directory.\n"
+"The result is a gio.FileEnumerator object that will give out gio.FileInfo\n"
+"objects for all the files in the directory.\n"
+"The attribute value is a string that specifies the file attributes that\n"
+"should be gathered. It is not an error if it's not possible to read a \n"
+"particular requested attribute from a file - it just won't be set.\n"
+"attribute should be a comma-separated list of attribute or attribute\n"
+"wildcards. The wildcard \"*\" means all attributes, and a wildcard like\n"
+"\"standard::*\" means all attributes in the standard namespace.\n"
+"An example attribute query be \"standard::*,owner::user\". The standard\n"
+"attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the operation was\n"
+"cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.\n"
+"If the file is not a directory, the gio.FILE_ERROR_NOTDIR error will\n"
+"be returned. Other errors are possible too.")
+ (of-object "GFile")
+ (c-name "g_file_enumerate_children")
+ (return-type "GFileEnumerator*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method enumerate_children_async
+ (docstring
+"F.enumerate_children_async(attributes, callback,\n"
+" [flags, io_priority, cancellable, user_data])\n"
+"Asynchronously gets the requested information about the files in a\n"
+"directory. The result is a GFileEnumerator object that will give out\n"
+"GFileInfo objects for all the files in the directory.\n"
+"\n"
+"For more details, see gio.File.enumerate_children() which is the synchronous\n"
+"version of this call.\n"
+"\n"
+"When the operation is finished, callback will be called. You can then call\n"
+"gio.File.enumerate_children_finish() to get the result of the operation.")
+ (of-object "GFile")
+ (c-name "g_file_enumerate_children_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method enumerate_children_finish
+ (of-object "GFile")
+ (c-name "g_file_enumerate_children_finish")
+ (return-type "GFileEnumerator*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_display_name
+ (of-object "GFile")
+ (c-name "g_file_set_display_name")
+ (return-type "GFile*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "display_name")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_display_name_async
+ (of-object "GFile")
+ (c-name "g_file_set_display_name_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "display_name")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method set_display_name_finish
+ (of-object "GFile")
+ (c-name "g_file_set_display_name_finish")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method delete
+ (of-object "GFile")
+ (c-name "g_file_delete")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method trash
+ (of-object "GFile")
+ (c-name "g_file_trash")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method copy
+ (docstring
+"F.copy(destination, [callback, flags, cancellable, user_data])\n"
+"Copies the file source to the location specified by destination.\n"
+"Can not handle recursive copies of directories.\n"
+"\n"
+"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
+"destination file is overwritten.\n"
+"\n"
+"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
+"will be copied as symlinks, otherwise the target of the source symlink\n"
+"will be copied.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled b\n"
+"triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.\n"
+"\n"
+"If progress_callback is not None, then the operation can be monitored\n"
+"by setting this to a callable. if specified progress_callback_data will\n"
+"be passed to this function. It is guaranteed that this callback\n"
+"will be called after all data has been transferred with the total number\n"
+"of bytes copied during the operation.\n"
+"\n"
+"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
+"error is returned, independent on the status of the destination.\n"
+"\n"
+"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
+"then the error gio.ERROR_EXISTS is returned.\n"
+"\n"
+"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
+"error is returned. If trying to overwrite a directory with a directory\n"
+"the gio.ERROR_WOULD_MERGE error is returned.\n"
+"\n"
+"If the source is a directory and the target does not exist\n"
+"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
+"then the gio.ERROR_WOULD_RECURSE error is returned.\n"
+"\n"
+"If you are interested in copying the GFile object itself\n"
+"(not the on-disk file), see gio.File.dup().")
+ (of-object "GFile")
+ (c-name "g_file_copy")
+ (unblock-threads #t)
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_callback_data")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method copy_async
+ (of-object "GFile")
+ (docstring
+ "F.copy_async(destination, callback, [flags, io_priority, user_data, cancellable, progress_callback])\n"
+ "-> start copy\n"
+ "\n"
+ "For more details, see gio.File.copy() which is the synchronous\n"
+ "version of this call. Asynchronously copies file.\n"
+ "When the operation is finished, callback will be called.\n"
+ "You can then call g_file_copy_finish() to get the result of the\n"
+ "operation.\n"
+ )
+ (c-name "g_file_copy_async")
+ (return-type "none")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_callback_data")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method copy_finish
+ (of-object "GFile")
+ (c-name "g_file_copy_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method move
+ (docstring
+"F.move(destination, [callback, flags, cancellable, user_data])\n"
+"Tries to move the file or directory source to the location\n"
+"specified by destination. If native move operations are\n"
+"supported then this is used, otherwise a copy + delete fallback\n"
+"is used. The native implementation may support moving directories\n"
+"(for instance on moves inside the same filesystem), but the \n"
+"fallback code does not.\n"
+"\n"
+"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
+"destination file is overwritten.\n"
+"\n"
+"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
+"will be copied as symlinks, otherwise the target of the source symlink\n"
+"will be copied.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled b\n"
+"triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.\n"
+"\n"
+"If progress_callback is not None, then the operation can be monitored\n"
+"by setting this to a callable. if specified progress_callback_data will\n"
+"be passed to this function. It is guaranteed that this callback\n"
+"will be called after all data has been transferred with the total number\n"
+"of bytes copied during the operation.\n"
+"\n"
+"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
+"error is returned, independent on the status of the destination.\n"
+"\n"
+"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
+"then the error gio.ERROR_EXISTS is returned.\n"
+"\n"
+"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
+"error is returned. If trying to overwrite a directory with a directory\n"
+"the gio.ERROR_WOULD_MERGE error is returned.\n"
+"\n"
+"If the source is a directory and the target does not exist\n"
+"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
+"then the gio.ERROR_WOULD_RECURSE error is returned.")
+ (of-object "GFile")
+ (c-name "g_file_move")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_callback_data")
+ '("GError**" "error")
+ )
+)
+
+(define-method make_directory
+ (of-object "GFile")
+ (c-name "g_file_make_directory")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method make_directory_with_parents
+ (of-object "GFile")
+ (c-name "g_file_make_directory_with_parents")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method make_symbolic_link
+ (of-object "GFile")
+ (c-name "g_file_make_symbolic_link")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("const-char*" "symlink_value")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_settable_attributes
+ (docstring
+ "F.query_settable_attributes([cancellable]) -> list\n\n"
+ "Obtain the list of settable attributes for the file.\n"
+ "Returns the type and full attribute name of all the attributes that\n"
+ "can be set on this file. This doesn't mean setting it will always\n"
+ "succeed though, you might get an access failure, or some specific\n"
+ "file may not support a specific attribute.\n\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
+ )
+ (of-object "GFile")
+ (c-name "g_file_query_settable_attributes")
+ (return-type "GFileAttributeInfoList*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_writable_namespaces
+ (docstring
+ "F.query_writable_namespaces([cancellable]) -> list\n\n"
+ "Obtain the list of attribute namespaces where new attributes can\n"
+ "be created by a user. An example of this is extended attributes\n"
+ "(in the "xattr" namespace).\n"
+ "If cancellable is not None, then the operation can be cancelled\n"
+ "by triggering the cancellable object from another thread. If the\n"
+ "operation was cancelled, the error gio.IO_ERROR_CANCELLED\n"
+ "will be returned."
+ )
+ (of-object "GFile")
+ (c-name "g_file_query_writable_namespaces")
+ (return-type "GFileAttributeInfoList*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method set_attribute
+ (docstring
+ "F.set_attribute(attribute, type, value_p [,flags [,cancellable ]])->bool\n"
+ "\n"
+ "Sets an attribute in the file with attribute name attribute to value_p.\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
+ )
+ (of-object "GFile")
+ (c-name "g_file_set_attribute")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeType" "type")
+ '("gpointer" "value_p")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attributes_from_info
+ (of-object "GFile")
+ (c-name "g_file_set_attributes_from_info")
+ (return-type "gboolean")
+ (parameters
+ '("GFileInfo*" "info")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attributes_async
+ (of-object "GFile")
+ (c-name "g_file_set_attributes_async")
+ (return-type "none")
+ (parameters
+ '("GFileInfo*" "info")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method set_attributes_finish
+ (of-object "GFile")
+ (c-name "g_file_set_attributes_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GFileInfo**" "info")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_string
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_byte_string
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_byte_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_uint32
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_uint32")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint32" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_int32
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_int32")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint32" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_uint64
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_uint64")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint64" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_int64
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_int64")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint64" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method mount_enclosing_volume
+ (docstring
+"F.mount_enclosing_volume(mount_operation, callback, [cancellable,\n"
+" user_data])\n"
+"Starts a mount_operation, mounting the volume that contains\n"
+"the file location.\n"
+"\n"
+"When this operation has completed, callback will be called with\n"
+"user_user data, and the operation can be finalized with\n"
+"gio.File.mount_enclosing_volume_finish().\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled\n"
+"by triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.")
+ (of-object "GFile")
+ (c-name "g_file_mount_enclosing_volume")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_enclosing_volume_finish
+ (of-object "GFile")
+ (c-name "g_file_mount_enclosing_volume_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method mount_mountable
+ (docstring
+"F.mount_mountable(mount_operation, callback, [flags, cancellable,\n"
+" user_data])\n"
+"Mounts a file of type gio.FILE_TYPE_MOUNTABLE. Using mount_operation,\n"
+"you can request callbacks when, for instance, passwords are needed\n"
+"during authentication.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+" triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can then\n"
+"call g_file_mount_mountable_finish() to get the result of the operation.\n")
+ (of-object "GFile")
+ (c-name "g_file_mount_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_mount_mountable_finish")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method unmount_mountable
+ (docstring
+"F.unmount_mountable(callback, [flags, cancellable, user_data])\n"
+"Unmounts a file of type gio.FILE_TYPE_MOUNTABLE.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can\n"
+"then call gio.File.unmount_mountable_finish() to get the\n"
+"result of the operation.\n")
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject_mountable
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+(define-method copy_attributes
+ (of-object "GFile")
+ (c-name "g_file_copy_attributes")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method monitor_directory
+ (of-object "GFile")
+ (c-name "g_file_monitor_directory")
+ (return-type "GFileMonitor*")
+ (caller-owns-return #t)
+ (parameters
+ '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method monitor_file
+ (of-object "GFile")
+ (c-name "g_file_monitor_file")
+ (return-type "GFileMonitor*")
+ (caller-owns-return #t)
+ (parameters
+ '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method monitor
+ (of-object "GFile")
+ (c-name "g_file_monitor")
+ (return-type "GFileMonitor*")
+ (parameters
+ '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_default_handler
+ (of-object "GFile")
+ (c-name "g_file_query_default_handler")
+ (return-type "GAppInfo*")
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents
+ (docstring
+ "F.load_contents([cancellable]) -> contents, length, etag_out\n\n"
+ "Loads the content of the file into memory, returning the size of the\n"
+ "data. The data is always zero terminated, but this is not included\n"
+ "in the resultant length.\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_load_contents")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("char**" "contents")
+ '("gsize*" "length")
+ '("char**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents_async
+ (docstring
+ "F.load_contents_async(callback, [cancellable, [user_data]])->start loading\n\n"
+ "Starts an asynchronous load of the file's contents.\n\n"
+ "For more details, see F.load_contents() which is the synchronous\n"
+ "version of this call.\n\n"
+ "When the load operation has completed, callback will be called with\n"
+ "user data. To finish the operation, call F.load_contents_finish() with\n"
+ "the parameter 'res' returned by the callback.\n\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_load_contents_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents_finish
+ (docstring
+ "F.load_contents_finish(res) -> contents, length, etag_out\n\n"
+ "Finishes an asynchronous load of the file's contents. The contents are\n"
+ "placed in contents, and length is set to the size of the contents\n"
+ "string. If etag_out is present, it will be set to the new entity\n"
+ "tag for the file.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_load_contents_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "contents")
+ '("gsize*" "length")
+ '("char**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+(define-method load_partial_contents_async
+ (of-object "GFile")
+ (c-name "g_file_load_partial_contents_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileReadMoreCallback" "read_more_callback")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method load_partial_contents_finish
+ (of-object "GFile")
+ (c-name "g_file_load_partial_contents_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "contents")
+ '("gsize*" "length")
+ '("char**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents
+ (docstring
+ "F.replace_contents(contents, [etag, [make_backup, [flags, [cancellable]]]])\n"
+ "-> etag_out\n"
+ "\n"
+ "Replaces the content of the file, returning the new etag value for the\n"
+ "file. If an etag is specified, any existing file must have that etag, or\n"
+ "the error gio.IO_ERROR_WRONG_ETAG will be returned.\n"
+ "If make_backup is True, this method will attempt to make a backup of the\n"
+ "file. If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_contents")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "contents")
+ '("gsize" "length")
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("char**" "new_etag")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents_async
+ (docstring
+ "F.replace_contents_async(contents, callback, [etag, [make_backup, [flags,\n"
+ " [cancellable]]]]) -> etag_out\n"
+ "\n"
+ "Starts an asynchronous replacement of the file with the given contents.\n"
+ "For more details, see F.replace_contents() which is the synchronous\n"
+ "version of this call.\n\n"
+ "When the load operation has completed, callback will be called with\n"
+ "user data. To finish the operation, call F.replace_contents_finish() with\n"
+ "the parameter 'res' returned by the callback.\n\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_contents_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "contents")
+ '("gsize" "length")
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents_finish
+ (docstring
+ "F.replace_contents_finish(res) -> etag_out\n\n"
+ "Finishes an asynchronous replacement of the file's contents.\n"
+ "The new entity tag for the file is returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_contents_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "new_etag")
+ '("GError**" "error")
+ )
+)
+
+(define-method create_readwrite
+ (of-object "GFile")
+ (c-name "g_file_create_readwrite")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GFileCreateFlags" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method create_readwrite_async
+ (of-object "GFile")
+ (c-name "g_file_create_readwrite_async")
+ (return-type "none")
+ (parameters
+ '("GFileCreateFlags" "flags")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method create_readwrite_finish
+ (of-object "GFile")
+ (c-name "g_file_create_readwrite_finish")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject_mountable_with_operation
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_mountable_with_operation_finish
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method open_readwrite
+ (of-object "GFile")
+ (c-name "g_file_open_readwrite")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method open_readwrite_async
+ (of-object "GFile")
+ (c-name "g_file_open_readwrite_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method open_readwrite_finish
+ (of-object "GFile")
+ (c-name "g_file_open_readwrite_finish")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method poll_mountable
+ (of-object "GFile")
+ (c-name "g_file_poll_mountable")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method poll_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_poll_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method replace_readwrite
+ (of-object "GFile")
+ (c-name "g_file_replace_readwrite")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method replace_readwrite_async
+ (of-object "GFile")
+ (c-name "g_file_replace_readwrite_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method replace_readwrite_finish
+ (of-object "GFile")
+ (c-name "g_file_replace_readwrite_finish")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method start_mountable
+ (of-object "GFile")
+ (c-name "g_file_start_mountable")
+ (return-type "none")
+ (parameters
+ '("GDriveStartFlags" "flags")
+ '("GMountOperation*" "start_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method start_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_start_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method stop_mountable
+ (of-object "GFile")
+ (c-name "g_file_stop_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method stop_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_stop_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method supports_thread_contexts
+ (of-object "GFile")
+ (c-name "g_file_supports_thread_contexts")
+ (return-type "gboolean")
+)
+
+(define-method unmount_mountable_with_operation
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_mountable_with_operation_finish
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gfileicon.h
+
+(define-function file_icon_get_type
+ (c-name "g_file_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function file_icon_new
+ (c-name "g_file_icon_new")
+ (is-constructor-of "GFileIcon")
+ (return-type "GIcon*")
+ ;; Note: starting with GLib 2.18 we could use (properties ...)
+ ;; instead, but I don't know if it is possible to branch on version
+ ;; in codegen.
+ (parameters
+ '("GFile*" "file")
+ )
+)
+
+(define-method get_file
+ (of-object "GFileIcon")
+ (c-name "g_file_icon_get_file")
+ (return-type "GFile*")
+)
+
+
+
+;; From gfileinfo.h
+
+(define-function file_info_get_type
+ (c-name "g_file_info_get_type")
+ (return-type "GType")
+)
+
+(define-function file_info_new
+ (c-name "g_file_info_new")
+ (is-constructor-of "GFileInfo")
+ (return-type "GFileInfo*")
+)
+
+(define-method dup
+ (of-object "GFileInfo")
+ (c-name "g_file_info_dup")
+ (return-type "GFileInfo*")
+ (caller-owns-return #t)
+)
+
+(define-method copy_into
+ (of-object "GFileInfo")
+ (c-name "g_file_info_copy_into")
+ (return-type "none")
+ (parameters
+ '("GFileInfo*" "dest_info")
+ )
+)
+
+(define-method has_attribute
+ (of-object "GFileInfo")
+ (c-name "g_file_info_has_attribute")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method has_namespace
+ (of-object "GFileInfo")
+ (c-name "g_file_info_has_namespace")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "name_space")
+ )
+)
+
+;;
+;; wrapped in gfileinfo.override
+(define-method list_attributes
+ (docstring
+ "INFO.list_attributes(name_space) -> Attribute list\n\n"
+ "Lists the file info structure's attributes."
+ )
+ (of-object "GFileInfo")
+ (c-name "g_file_info_list_attributes")
+ (return-type "char**")
+ (parameters
+ '("const-char*" "name_space")
+ )
+)
+
+(define-method get_attribute_data
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_data")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeType*" "type")
+ '("gpointer*" "value_pp")
+ '("GFileAttributeStatus*" "status")
+ )
+)
+
+(define-method get_attribute_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_type")
+ (return-type "GFileAttributeType")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method remove_attribute
+ (of-object "GFileInfo")
+ (c-name "g_file_info_remove_attribute")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_status
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_status")
+ (return-type "GFileAttributeStatus")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method set_attribute_status
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_status")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeStatus" "status")
+ )
+)
+
+(define-method get_attribute_as_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_as_string")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_string")
+ (return-type "const-char*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_byte_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_byte_string")
+ (return-type "const-char*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_boolean
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_boolean")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_uint32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_uint32")
+ (return-type "guint32")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_int32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_int32")
+ (return-type "gint32")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_uint64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_uint64")
+ (return-type "guint64")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_int64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_int64")
+ (return-type "gint64")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_object
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_object")
+ (return-type "GObject*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_stringv
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_stringv")
+ (return-type "char**")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method set_attribute
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeType" "type")
+ '("gpointer" "value_p")
+ )
+)
+
+(define-method set_attribute_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_string")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "attr_value")
+ )
+)
+
+(define-method set_attribute_byte_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_byte_string")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "attr_value")
+ )
+)
+
+(define-method set_attribute_boolean
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_boolean")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("gboolean" "attr_value")
+ )
+)
+
+(define-method set_attribute_uint32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_uint32")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint32" "attr_value")
+ )
+)
+
+(define-method set_attribute_int32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_int32")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint32" "attr_value")
+ )
+)
+
+(define-method set_attribute_uint64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_uint64")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint64" "attr_value")
+ )
+)
+
+(define-method set_attribute_int64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_int64")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint64" "attr_value")
+ )
+)
+
+(define-method set_attribute_object
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_object")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("GObject*" "attr_value")
+ )
+)
+
+(define-method clear_status
+ (of-object "GFileInfo")
+ (c-name "g_file_info_clear_status")
+ (return-type "none")
+)
+
+(define-method get_file_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_file_type")
+ (return-type "GFileType")
+)
+
+(define-method get_is_hidden
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_is_hidden")
+ (return-type "gboolean")
+)
+
+(define-method get_is_backup
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_is_backup")
+ (return-type "gboolean")
+)
+
+(define-method get_is_symlink
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_is_symlink")
+ (return-type "gboolean")
+)
+
+(define-method get_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_name")
+ (return-type "const-char*")
+)
+
+(define-method get_display_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_display_name")
+ (return-type "const-char*")
+)
+
+(define-method get_edit_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_edit_name")
+ (return-type "const-char*")
+)
+
+(define-method get_icon
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_content_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_content_type")
+ (return-type "const-char*")
+)
+
+(define-method get_size
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_size")
+ (return-type "goffset")
+)
+
+;;
+;; wrapped in gfileinfo.override
+;;
+(define-method get_modification_time
+ (docstring
+"INFO.get_modification_time() -> modification time\n"
+"Returns the modification time, in UNIX time format\n")
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_modification_time")
+ (return-type "none")
+ (parameters
+ '("GTimeVal*" "result")
+ )
+)
+
+(define-method get_symlink_target
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_symlink_target")
+ (return-type "const-char*")
+)
+
+(define-method get_etag
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_etag")
+ (return-type "const-char*")
+)
+
+(define-method get_sort_order
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_sort_order")
+ (return-type "gint32")
+)
+
+(define-method set_attribute_mask
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_mask")
+ (return-type "none")
+ (parameters
+ '("GFileAttributeMatcher*" "mask")
+ )
+)
+
+(define-method unset_attribute_mask
+ (of-object "GFileInfo")
+ (c-name "g_file_info_unset_attribute_mask")
+ (return-type "none")
+)
+
+(define-method set_file_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_file_type")
+ (return-type "none")
+ (parameters
+ '("GFileType" "type")
+ )
+)
+
+(define-method set_is_hidden
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_is_hidden")
+ (return-type "none")
+ (parameters
+ '("gboolean" "is_hidden")
+ )
+)
+
+(define-method set_is_symlink
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_is_symlink")
+ (return-type "none")
+ (parameters
+ '("gboolean" "is_symlink")
+ )
+)
+
+(define-method set_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method set_display_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_display_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "display_name")
+ )
+)
+
+(define-method set_edit_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_edit_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "edit_name")
+ )
+)
+
+(define-method set_icon
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_icon")
+ (return-type "none")
+ (parameters
+ '("GIcon*" "icon")
+ )
+)
+
+(define-method set_content_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_content_type")
+ (return-type "none")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-method set_size
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_size")
+ (return-type "none")
+ (parameters
+ '("goffset" "size")
+ )
+)
+
+(define-method set_modification_time
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_modification_time")
+ (return-type "none")
+ (parameters
+ '("GTimeVal*" "mtime")
+ )
+)
+
+(define-method set_symlink_target
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_symlink_target")
+ (return-type "none")
+ (parameters
+ '("const-char*" "symlink_target")
+ )
+)
+
+(define-method set_sort_order
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_sort_order")
+ (return-type "none")
+ (parameters
+ '("gint32" "sort_order")
+ )
+)
+
+(define-function file_attribute_matcher_new
+ (c-name "g_file_attribute_matcher_new")
+ (is-constructor-of "GFileAttributeMatcher")
+ (return-type "GFileAttributeMatcher*")
+ (parameters
+ '("const-char*" "attributes")
+ )
+)
+
+(define-method ref
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_ref")
+ (return-type "GFileAttributeMatcher*")
+)
+
+(define-method unref
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_unref")
+ (return-type "none")
+)
+
+(define-method matches
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_matches")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method matches_only
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_matches_only")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method enumerate_namespace
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_enumerate_namespace")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "ns")
+ )
+)
+
+(define-method enumerate_next
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_enumerate_next")
+ (return-type "const-char*")
+)
+
+
+
+;; From gfileinputstream.h
+
+(define-function file_input_stream_get_type
+ (c-name "g_file_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method query_info
+ (of-object "GFileInputStream")
+ (c-name "g_file_input_stream_query_info")
+ (return-type "GFileInfo*")
+ (parameters
+ '("char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_info_async
+ (of-object "GFileInputStream")
+ (c-name "g_file_input_stream_query_info_async")
+ (return-type "none")
+ (parameters
+ '("char*" "attributes")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFileInputStream")
+ (c-name "g_file_input_stream_query_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gfileiostream.h
+
+(define-function file_io_stream_get_type
+ (c-name "g_file_io_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method query_info
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_query_info")
+ (return-type "GFileInfo*")
+ (parameters
+ '("const-char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_info_async
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_query_info_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_query_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_etag
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_get_etag")
+ (return-type "char*")
+)
+
+
+
+
+;; From gfilemonitor.h
+
+(define-function file_monitor_get_type
+ (c-name "g_file_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-method cancel
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_cancel")
+ (return-type "gboolean")
+)
+
+(define-method is_cancelled
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_is_cancelled")
+ (return-type "gboolean")
+)
+
+(define-method set_rate_limit
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_set_rate_limit")
+ (return-type "none")
+ (parameters
+ '("int" "limit_msecs")
+ )
+)
+
+(define-method emit_event
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_emit_event")
+ (return-type "none")
+ (parameters
+ '("GFile*" "file")
+ '("GFile*" "other_file")
+ '("GFileMonitorEvent" "event_type")
+ )
+)
+
+
+
+;; From gfilenamecompleter.h
+
+(define-function filename_completer_get_type
+ (c-name "g_filename_completer_get_type")
+ (return-type "GType")
+)
+
+(define-function filename_completer_new
+ (c-name "g_filename_completer_new")
+ (is-constructor-of "GFilenameCompleter")
+ (return-type "GFilenameCompleter*")
+)
+
+(define-method get_completion_suffix
+ (of-object "GFilenameCompleter")
+ (c-name "g_filename_completer_get_completion_suffix")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "initial_text")
+ )
+)
+
+(define-method get_completions
+ (of-object "GFilenameCompleter")
+ (c-name "g_filename_completer_get_completions")
+ (return-type "char**")
+ (parameters
+ '("const-char*" "initial_text")
+ )
+)
+
+(define-method set_dirs_only
+ (of-object "GFilenameCompleter")
+ (c-name "g_filename_completer_set_dirs_only")
+ (return-type "none")
+ (parameters
+ '("gboolean" "dirs_only")
+ )
+)
+
+
+
+;; From gfileoutputstream.h
+
+(define-function file_output_stream_get_type
+ (c-name "g_file_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method query_info
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_query_info")
+ (return-type "GFileInfo*")
+ (parameters
+ '("char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_info_async
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_query_info_async")
+ (return-type "none")
+ (parameters
+ '("char*" "attributes")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_query_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_etag
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_get_etag")
+ (return-type "char*")
+)
+
+
+;; From gfilterinputstream.h
+
+(define-function filter_input_stream_get_type
+ (c-name "g_filter_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method get_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_get_base_stream")
+ (return-type "GInputStream*")
+)
+
+(define-method get_close_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_get_close_base_stream")
+ (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_set_close_base_stream")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_base")
+ )
+)
+
+
+
+;; From gfilteroutputstream.h
+
+(define-function filter_output_stream_get_type
+ (c-name "g_filter_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method get_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_get_base_stream")
+ (return-type "GOutputStream*")
+)
+
+(define-method get_close_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_get_close_base_stream")
+ (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_set_close_base_stream")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_base")
+ )
+)
+
+
+
+;; From gicon.h
+
+(define-function icon_get_type
+ (c-name "g_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function icon_hash
+ (c-name "g_icon_hash")
+ (return-type "guint")
+ (parameters
+ '("gconstpointer" "icon")
+ )
+)
+
+(define-method equal
+ (of-object "GIcon")
+ (c-name "g_icon_equal")
+ (return-type "gboolean")
+ (parameters
+ '("GIcon*" "icon2")
+ )
+)
+
+(define-method to_string
+ (of-object "GIcon")
+ (c-name "g_icon_to_string")
+ (return-type "gchar*")
+)
+
+(define-function icon_new_for_string
+ (c-name "g_icon_new_for_string")
+ (return-type "GIcon*")
+ (parameters
+ '("const-gchar*" "str")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From ginetsocketaddress.h
+
+(define-function inet_socket_address_get_type
+ (c-name "g_inet_socket_address_get_type")
+ (return-type "GType")
+)
+
+(define-function inet_socket_address_new
+ (c-name "g_inet_socket_address_new")
+ (is-constructor-of "GInetSocketAddress")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GInetAddress*" "address")
+ '("guint16" "port")
+ )
+)
+
+(define-method get_address
+ (of-object "GInetSocketAddress")
+ (c-name "g_inet_socket_address_get_address")
+ (return-type "GInetAddress*")
+)
+
+(define-method get_port
+ (of-object "GInetSocketAddress")
+ (c-name "g_inet_socket_address_get_port")
+ (return-type "guint16")
+)
+
+
+
+;; From ginputstream.h
+
+(define-function input_stream_get_type
+ (c-name "g_input_stream_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+;; Note: the following two methods are renamed for consistency with
+;; Python file objects' read(). I.e. g_input_stream_read_all() is
+;; more like Python file.read(), so it is renamed read(). Since now
+;; there is a name clash, g_input_stream_read() is renamed
+;; read_part().
+(define-method read_part
+ (of-object "GInputStream")
+ (docstring
+ "STREAM.read_part([count, [cancellable]]) -> string\n"
+ "\n"
+ "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
+ "omitted, read until the end of the stream. This method is allowed to\n"
+ "stop at any time after reading at least 1 byte from the stream. E.g.\n"
+ "when reading over a (relatively slow) HTTP connection, it will often\n"
+ "stop after receiving one packet. Therefore, to reliably read requested\n"
+ "number of bytes, you need to use a loop. See also gio.InputStream.read\n"
+ "for easier to use (though less efficient) method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_input_stream_read."
+ )
+ (c-name "g_input_stream_read")
+ (return-type "gssize")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+;; See comments before the previous method definition.
+(define-method read
+ (of-object "GInputStream")
+ (docstring
+ "STREAM.read([count, [cancellable]]) -> string\n"
+ "\n"
+ "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
+ "omitted, read until the end of the stream. This method will stop only\n"
+ "after reading requested number of bytes, reaching end of stream or\n"
+ "triggering an I/O error. See also gio.InputStream.read_part for more\n"
+ "efficient, but more cumbersome to use method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_input_stream_read_all.\n"
+ "It was renamed for consistency with Python standard file.read."
+ )
+ (c-name "g_input_stream_read_all")
+ (return-type "gboolean")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("gsize*" "bytes_read")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method skip
+ (of-object "GInputStream")
+ (c-name "g_input_stream_skip")
+ (return-type "gssize")
+ (parameters
+ '("gsize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GInputStream")
+ (c-name "g_input_stream_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method read_async
+ (of-object "GInputStream")
+ (c-name "g_input_stream_read_async")
+ (return-type "none")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method read_finish
+ (of-object "GInputStream")
+ (c-name "g_input_stream_read_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method skip_async
+ (of-object "GInputStream")
+ (c-name "g_input_stream_skip_async")
+ (return-type "none")
+ (parameters
+ '("gsize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method skip_finish
+ (of-object "GInputStream")
+ (c-name "g_input_stream_skip_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method close_async
+ (of-object "GInputStream")
+ (c-name "g_input_stream_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GInputStream")
+ (c-name "g_input_stream_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GInputStream")
+ (c-name "g_input_stream_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GInputStream")
+ (c-name "g_input_stream_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GInputStream")
+ (c-name "g_input_stream_set_pending")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method clear_pending
+ (of-object "GInputStream")
+ (c-name "g_input_stream_clear_pending")
+ (return-type "none")
+)
+
+
+
+;; From gioalias.h
+
+
+
+;; From gioenumtypes.h
+
+(define-function app_info_create_flags_get_type
+ (c-name "g_app_info_create_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function data_stream_byte_order_get_type
+ (c-name "g_data_stream_byte_order_get_type")
+ (return-type "GType")
+)
+
+(define-function data_stream_newline_type_get_type
+ (c-name "g_data_stream_newline_type_get_type")
+ (return-type "GType")
+)
+
+(define-function file_query_info_flags_get_type
+ (c-name "g_file_query_info_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_create_flags_get_type
+ (c-name "g_file_create_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_copy_flags_get_type
+ (c-name "g_file_copy_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_monitor_flags_get_type
+ (c-name "g_file_monitor_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_attribute_type_get_type
+ (c-name "g_file_attribute_type_get_type")
+ (return-type "GType")
+)
+
+(define-function file_attribute_info_flags_get_type
+ (c-name "g_file_attribute_info_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_attribute_status_get_type
+ (c-name "g_file_attribute_status_get_type")
+ (return-type "GType")
+)
+
+(define-function file_type_get_type
+ (c-name "g_file_type_get_type")
+ (return-type "GType")
+)
+
+(define-function file_monitor_event_get_type
+ (c-name "g_file_monitor_event_get_type")
+ (return-type "GType")
+)
+
+(define-function io_error_enum_get_type
+ (c-name "g_io_error_enum_get_type")
+ (return-type "GType")
+)
+
+(define-function ask_password_flags_get_type
+ (c-name "g_ask_password_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function password_save_get_type
+ (c-name "g_password_save_get_type")
+ (return-type "GType")
+)
+
+(define-function output_stream_splice_flags_get_type
+ (c-name "g_output_stream_splice_flags_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gioerror.h
+
+(define-function io_error_quark
+ (c-name "g_io_error_quark")
+ (return-type "GQuark")
+)
+
+(define-function io_error_from_errno
+ (c-name "g_io_error_from_errno")
+ (return-type "GIOErrorEnum")
+ (parameters
+ '("gint" "err_no")
+ )
+)
+
+
+
+;; From gio.h
+
+
+
+;; From gio-marshal.h
+
+
+
+;; From giomodule.h
+
+(define-function io_module_get_type
+ (c-name "g_io_module_get_type")
+ (return-type "GType")
+)
+
+(define-function io_module_new
+ (c-name "g_io_module_new")
+ (is-constructor-of "GIoModule")
+ (return-type "GIOModule*")
+ (parameters
+ '("const-gchar*" "filename")
+ )
+)
+
+(define-function io_modules_load_all_in_directory
+ (c-name "g_io_modules_load_all_in_directory")
+ (return-type "GList*")
+ (parameters
+ '("const-char*" "dirname")
+ )
+)
+
+(define-method load
+ (of-object "GIOModule")
+ (c-name "g_io_module_load")
+ (return-type "none")
+)
+
+(define-method unload
+ (of-object "GIOModule")
+ (c-name "g_io_module_unload")
+ (return-type "none")
+)
+
+
+
+;; From gioscheduler.h
+
+(define-function io_scheduler_push_job
+ (c-name "g_io_scheduler_push_job")
+ (return-type "none")
+ (parameters
+ '("GIOSchedulerJobFunc" "job_func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "notify")
+ '("gint" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-function io_scheduler_cancel_all_jobs
+ (c-name "g_io_scheduler_cancel_all_jobs")
+ (return-type "none")
+)
+
+(define-method send_to_mainloop
+ (of-object "GIOSchedulerJob")
+ (c-name "g_io_scheduler_job_send_to_mainloop")
+ (return-type "gboolean")
+ (parameters
+ '("GSourceFunc" "func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "notify")
+ )
+)
+
+(define-method send_to_mainloop_async
+ (of-object "GIOSchedulerJob")
+ (c-name "g_io_scheduler_job_send_to_mainloop_async")
+ (return-type "none")
+ (parameters
+ '("GSourceFunc" "func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "notify")
+ )
+)
+
+
+
+;; From gloadableicon.h
+
+(define-function loadable_icon_get_type
+ (c-name "g_loadable_icon_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load
+ (of-object "GLoadableIcon")
+ (docstring
+ "ICON.load([size, [cancellable]]) -> input stream, type\n"
+ "\n"
+ "Opens a stream of icon data for reading. The result is a tuple of\n"
+ "gio.InputStream and type (either a string or None). The stream can\n"
+ "be read to retrieve icon data.\n"
+ "\n"
+ ;; Note: this is just a guess, GIO docs say nothing at the moment.
+ "Optional size is a hint at desired icon size. Not all implementations\n"
+ "support it and the hint will be just ignored in such cases.\n"
+ "If cancellable is specified, then the operation can be cancelled\n"
+ "by triggering the cancellable object from another thread. See\n"
+ "gio.File.read for details."
+ )
+ (c-name "g_loadable_icon_load")
+ (return-type "GInputStream*")
+ (parameters
+ '("int" "size")
+ '("char**" "type")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load_async
+ (of-object "GLoadableIcon")
+ (docstring
+ "ICON.load_async(callback, [size, [cancellable, [user_data]]])\n"
+ "-> start loading\n"
+ "\n"
+ "For more information, see gio.LoadableIcon.load() which is the\n"
+ "synchronous version of this call. Asynchronously opens icon data for\n"
+ "reading. When the operation is finished, callback will be called.\n"
+ "You can then call gio.LoadableIcon.load_finish() to get the result of\n"
+ "the operation.\n"
+ )
+ (c-name "g_loadable_icon_load_async")
+ (return-type "none")
+ (parameters
+ '("int" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load_finish
+ (docstring
+ "F.load_finish(res) -> start loading\n"
+ "\n"
+ "Finish asynchronous icon loading operation. Must be called from callback\n"
+ "as specified to gio.LoadableIcon.load_async. Returns a tuple of\n"
+ "gio.InputStream and type, just as gio.LoadableIcon.load."
+ )
+ (of-object "GLoadableIcon")
+ (c-name "g_loadable_icon_load_finish")
+ (return-type "GInputStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "type")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From ginetaddress.h
+
+(define-function inet_address_get_type
+ (c-name "g_inet_address_get_type")
+ (return-type "GType")
+)
+
+(define-function inet_address_new_from_string
+ (c-name "g_inet_address_new_from_string")
+ (return-type "GInetAddress*")
+ (parameters
+ '("const-gchar*" "string")
+ )
+)
+
+(define-function inet_address_new_from_bytes
+ (c-name "g_inet_address_new_from_bytes")
+ (return-type "GInetAddress*")
+ (parameters
+ '("const-guint8*" "bytes")
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-function inet_address_new_loopback
+ (c-name "g_inet_address_new_loopback")
+ (return-type "GInetAddress*")
+ (parameters
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-function inet_address_new_any
+ (c-name "g_inet_address_new_any")
+ (return-type "GInetAddress*")
+ (parameters
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-method to_string
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_to_string")
+ (return-type "gchar*")
+)
+
+
+;; FIXME codegen barfs on this one
+;;
+;;(define-method to_bytes
+;; (of-object "GInetAddress")
+;; (c-name "g_inet_address_to_bytes")
+;; (return-type "const-guint8*")
+;;)
+
+(define-method get_native_size
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_native_size")
+ (return-type "gsize")
+)
+
+(define-method get_family
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-method get_is_any
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_any")
+ (return-type "gboolean")
+)
+
+(define-method get_is_loopback
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_loopback")
+ (return-type "gboolean")
+)
+
+(define-method get_is_link_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_link_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_site_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_site_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_multicast
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_multicast")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_global
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_global")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_link_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_link_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_node_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_node_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_org_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_org_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_site_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_site_local")
+ (return-type "gboolean")
+)
+
+
+
+;; From ginitable.h
+
+(define-function initable_get_type
+ (c-name "g_initable_get_type")
+ (return-type "GType")
+)
+
+(define-method init
+ (of-object "GInitable")
+ (c-name "g_initable_init")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-function initable_new
+ (c-name "g_initable_new")
+ (return-type "gpointer")
+ (parameters
+ '("GType" "object_type")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ '("const-gchar*" "first_property_name")
+ )
+ (varargs #t)
+)
+
+(define-function initable_newv
+ (c-name "g_initable_newv")
+ (return-type "gpointer")
+ (parameters
+ '("GType" "object_type")
+ '("guint" "n_parameters")
+ '("GParameter*" "parameters")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-function initable_new_valist
+ (c-name "g_initable_new_valist")
+ (return-type "GObject*")
+ (parameters
+ '("GType" "object_type")
+ '("const-gchar*" "first_property_name")
+ '("va_list" "var_args")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From giostream.h
+
+(define-function io_stream_get_type
+ (c-name "g_io_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method get_input_stream
+ (of-object "GIOStream")
+ (c-name "g_io_stream_get_input_stream")
+ (return-type "GInputStream*")
+)
+
+(define-method get_output_stream
+ (of-object "GIOStream")
+ (c-name "g_io_stream_get_output_stream")
+ (return-type "GOutputStream*")
+)
+
+(define-method close
+ (of-object "GIOStream")
+ (c-name "g_io_stream_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close_async
+ (of-object "GIOStream")
+ (c-name "g_io_stream_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GIOStream")
+ (c-name "g_io_stream_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GIOStream")
+ (c-name "g_io_stream_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GIOStream")
+ (c-name "g_io_stream_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GIOStream")
+ (c-name "g_io_stream_set_pending")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method clear_pending
+ (of-object "GIOStream")
+ (c-name "g_io_stream_clear_pending")
+ (return-type "none")
+)
+
+
+
+;; From glocaldirectorymonitor.h
+
+(define-function local_directory_monitor_get_type
+ (c-name "g_local_directory_monitor_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From glocalfileenumerator.h
+
+
+
+;; From glocalfile.h
+
+
+
+;; From glocalfileinfo.h
+
+
+
+;; From glocalfileinputstream.h
+
+
+
+;; From glocalfilemonitor.h
+
+(define-function local_file_monitor_get_type
+ (c-name "g_local_file_monitor_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From glocalfileoutputstream.h
+
+
+
+;; From glocalvfs.h
+
+
+
+;; From gmemoryinputstream.h
+
+(define-function memory_input_stream_get_type
+ (c-name "g_memory_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function memory_input_stream_new
+ (c-name "g_memory_input_stream_new")
+ (is-constructor-of "GMemoryInputStream")
+ (return-type "GInputStream*")
+)
+
+(define-function memory_input_stream_new_from_data
+ (c-name "g_memory_input_stream_new_from_data")
+ (return-type "GInputStream*")
+ (parameters
+ '("const-void*" "data")
+ '("gssize" "len")
+ '("GDestroyNotify" "destroy")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method add_data
+ (of-object "GMemoryInputStream")
+ (c-name "g_memory_input_stream_add_data")
+ (return-type "none")
+ (parameters
+ '("const-void*" "data")
+ '("gssize" "len")
+ '("GDestroyNotify" "destroy")
+ )
+)
+
+
+
+;; From gmemoryoutputstream.h
+
+(define-function memory_output_stream_get_type
+ (c-name "g_memory_output_stream_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-function memory_output_stream_new
+ (c-name "g_memory_output_stream_new")
+ (is-constructor-of "GMemoryOutputStream")
+ (return-type "GOutputStream*")
+ (parameters
+ '("gpointer" "data")
+ '("gsize" "len")
+ '("GReallocFunc" "realloc_fn")
+ '("GDestroyNotify" "destroy")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; Note: name clash with gobject.GObject.get_data; renamed.
+(define-method get_contents
+ (of-object "GMemoryOutputStream")
+ (c-name "g_memory_output_stream_get_data")
+ (return-type "gpointer")
+)
+
+(define-method get_size
+ (of-object "GMemoryOutputStream")
+ (c-name "g_memory_output_stream_get_size")
+ (return-type "gsize")
+)
+
+(define-method get_data_size
+ (of-object "GMemoryOutputStream")
+ (c-name "g_memory_output_stream_get_data_size")
+ (return-type "gsize")
+)
+
+
+
+;; From gmount.h
+
+(define-function mount_get_type
+ (c-name "g_mount_get_type")
+ (return-type "GType")
+)
+
+(define-method get_root
+ (of-object "GMount")
+ (c-name "g_mount_get_root")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+)
+
+(define-method get_name
+ (of-object "GMount")
+ (c-name "g_mount_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GMount")
+ (c-name "g_mount_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+)
+
+(define-method get_uuid
+ (of-object "GMount")
+ (c-name "g_mount_get_uuid")
+ (return-type "char*")
+)
+
+(define-method get_volume
+ (of-object "GMount")
+ (c-name "g_mount_get_volume")
+ (return-type "GVolume*")
+ (caller-owns-return #t)
+)
+
+(define-method get_drive
+ (of-object "GMount")
+ (c-name "g_mount_get_drive")
+ (return-type "GDrive*")
+ (caller-owns-return #t)
+)
+
+(define-method can_unmount
+ (of-object "GMount")
+ (c-name "g_mount_can_unmount")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GMount")
+ (c-name "g_mount_can_eject")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method unmount
+ (docstring
+"M.unmount(callback, [flags, cancellable, user_data])\n"
+"Unmounts a mount. This is an asynchronous operation, and is finished\n"
+"by calling gio.Mount.unmount_finish() with the mount and gio.AsyncResults\n"
+"data returned in the callback."
+)
+ (of-object "GMount")
+ (c-name "g_mount_unmount")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_finish
+ (of-object "GMount")
+ (c-name "g_mount_unmount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method eject
+ (docstring
+"F.eject(callback, [flags, cancellable, user_data])\n"
+"Ejects a volume.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can\n"
+"then call gio.Volume.eject_finish() to get the result of the operation.\n")
+ (of-object "GMount")
+ (c-name "g_mount_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GMount")
+ (c-name "g_mount_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method remount
+ (of-object "GMount")
+ (docstring
+ "M.remount(callback, [flags, [mount_operation, [cancellable, [user_data]]]])\n"
+ "Remounts a mount. This is an asynchronous operation, and is finished by\n"
+ "calling gio.Mount.remount_finish with the mount and gio.AsyncResults data\n"
+ "returned in the callback.")
+ (c-name "g_mount_remount")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method remount_finish
+ (of-object "GMount")
+ (c-name "g_mount_remount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method guess_content_type
+ (of-object "GMount")
+ (c-name "g_mount_guess_content_type")
+ (return-type "none")
+ (parameters
+ '("gboolean" "force_rescan")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method guess_content_type_finish
+ (of-object "GMount")
+ (c-name "g_mount_guess_content_type_finish")
+ (return-type "gchar**")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method guess_content_type_sync
+ (of-object "GMount")
+ (c-name "g_mount_guess_content_type_sync")
+ (return-type "gchar**")
+ (parameters
+ '("gboolean" "force_rescan")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method is_shadowed
+ (of-object "GMount")
+ (c-name "g_mount_is_shadowed")
+ (return-type "gboolean")
+)
+
+(define-method shadow
+ (of-object "GMount")
+ (c-name "g_mount_shadow")
+ (return-type "none")
+)
+
+(define-method unshadow
+ (of-object "GMount")
+ (c-name "g_mount_unshadow")
+ (return-type "none")
+)
+
+(define-method unmount_with_operation
+ (of-object "GMount")
+ (c-name "g_mount_unmount_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_with_operation_finish
+ (of-object "GMount")
+ (c-name "g_mount_unmount_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject_with_operation
+ (of-object "GMount")
+ (c-name "g_mount_eject_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_with_operation_finish
+ (of-object "GMount")
+ (c-name "g_mount_eject_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gmountoperation.h
+
+(define-function mount_operation_get_type
+ (c-name "g_mount_operation_get_type")
+ (return-type "GType")
+)
+
+(define-function mount_operation_new
+ (c-name "g_mount_operation_new")
+ (is-constructor-of "GMountOperation")
+ (return-type "GMountOperation*")
+)
+
+(define-method get_username
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_username")
+ (return-type "const-char*")
+)
+
+(define-method set_username
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_username")
+ (return-type "none")
+ (parameters
+ '("const-char*" "username")
+ )
+)
+
+(define-method get_password
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_password")
+ (return-type "const-char*")
+)
+
+(define-method set_password
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_password")
+ (return-type "none")
+ (parameters
+ '("const-char*" "password")
+ )
+)
+
+(define-method get_anonymous
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_anonymous")
+ (return-type "gboolean")
+)
+
+(define-method set_anonymous
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_anonymous")
+ (return-type "none")
+ (parameters
+ '("gboolean" "anonymous")
+ )
+)
+
+(define-method get_domain
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_domain")
+ (return-type "const-char*")
+)
+
+(define-method set_domain
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_domain")
+ (return-type "none")
+ (parameters
+ '("const-char*" "domain")
+ )
+)
+
+(define-method get_password_save
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_password_save")
+ (return-type "GPasswordSave")
+)
+
+(define-method set_password_save
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_password_save")
+ (return-type "none")
+ (parameters
+ '("GPasswordSave" "save")
+ )
+)
+
+(define-method get_choice
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_choice")
+ (return-type "int")
+)
+
+(define-method set_choice
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_choice")
+ (return-type "none")
+ (parameters
+ '("int" "choice")
+ )
+)
+
+(define-method reply
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_reply")
+ (return-type "none")
+ (parameters
+ '("GMountOperationResult" "result")
+ )
+)
+
+
+
+;; From gnativevolumemonitor.h
+
+(define-function native_volume_monitor_get_type
+ (c-name "g_native_volume_monitor_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gnetworkaddress.h
+
+(define-function network_address_get_type
+ (c-name "g_network_address_get_type")
+ (return-type "GType")
+)
+
+(define-function network_address_new
+ (c-name "g_network_address_new")
+ (is-constructor-of "GNetworkAddress")
+ (return-type "GSocketConnectable*")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("guint16" "port")
+ )
+)
+
+(define-function network_address_parse
+ (c-name "g_network_address_parse")
+ (return-type "GSocketConnectable*")
+ (parameters
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_hostname
+ (of-object "GNetworkAddress")
+ (c-name "g_network_address_get_hostname")
+ (return-type "const-gchar*")
+)
+
+(define-method get_port
+ (of-object "GNetworkAddress")
+ (c-name "g_network_address_get_port")
+ (return-type "guint16")
+)
+
+
+
+;; From gnetworkservice.h
+
+(define-function network_service_get_type
+ (c-name "g_network_service_get_type")
+ (return-type "GType")
+)
+
+(define-function network_service_new
+ (c-name "g_network_service_new")
+ (is-constructor-of "GNetworkService")
+ (return-type "GSocketConnectable*")
+ (parameters
+ '("const-gchar*" "service")
+ '("const-gchar*" "protocol")
+ '("const-gchar*" "domain")
+ )
+)
+
+(define-method get_service
+ (of-object "GNetworkService")
+ (c-name "g_network_service_get_service")
+ (return-type "const-gchar*")
+)
+
+(define-method get_protocol
+ (of-object "GNetworkService")
+ (c-name "g_network_service_get_protocol")
+ (return-type "const-gchar*")
+)
+
+(define-method get_domain
+ (of-object "GNetworkService")
+ (c-name "g_network_service_get_domain")
+ (return-type "const-gchar*")
+)
+
+
+
+;; From goutputstream.h
+
+(define-function output_stream_get_type
+ (c-name "g_output_stream_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; Note: the following two methods are renamed for consistency with
+;; Python file objects' write(). I.e. g_output_stream_write_all() is
+;; more like Python file.write(), so it is renamed write(). Since now
+;; there is a name clash, g_output_stream_write() is renamed
+;; write_part().
+(define-method write_part
+ (of-object "GOutputStream")
+ (docstring
+ "STREAM.write_part(buffer, [cancellable]) -> int\n"
+ "\n"
+ "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
+ "successfully written. This method is allowed to stop at any time after\n"
+ "writing at least 1 byte. Therefore, to reliably write the whole buffer,\n"
+ "you need to use a loop. See also gio.OutputStream.write for easier to\n"
+ "use (though less efficient) method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_output_stream_write."
+ )
+ (c-name "g_output_stream_write")
+ (return-type "gssize")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; See comments before the previous method definition.
+(define-method write
+ (of-object "GOutputStream")
+ "STREAM.write(buffer, [cancellable]) -> int\n"
+ "\n"
+ "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
+ "successfully written. This method will stop only after writing the whole\n"
+ "buffer or triggering an I/O error. See also gio.OutputStream.write_part\n"
+ "for more efficient, but more cumbersome to use method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_output_stream_write_all.\n"
+ "It was renamed for consistency with Python standard file.write."
+ (c-name "g_output_stream_write_all")
+ (return-type "gboolean")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("gsize*" "bytes_written")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method splice
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_splice")
+ (return-type "gssize")
+ (parameters
+ '("GInputStream*" "source")
+ '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method flush
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_flush")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-method write_async
+ (of-object "GOutputStream")
+ (docstring
+"S.write_async(buffer, callback [,io_priority] [,cancellable] [,user_data])\n"
+"\n"
+"Request an asynchronous write of count bytes from buffer into the stream.\n"
+"When the operation is finished callback will be called. You can then call\n"
+"gio.OutputStream.write_finish() to get the result of the operation.\n"
+"On success, the number of bytes written will be passed to the callback.\n"
+"It is not an error if this is not the same as the requested size, as it can\n"
+"happen e.g. on a partial I/O error, but generally tries to write as many \n"
+"bytes as requested.\n"
+"For the synchronous, blocking version of this function, see\n"
+"gio.OutputStream.write().\n")
+ (c-name "g_output_stream_write_async")
+ (return-type "none")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method write_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_write_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method splice_async
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_splice_async")
+ (return-type "none")
+ (parameters
+ '("GInputStream*" "source")
+ '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method splice_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_splice_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method flush_async
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_flush_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method flush_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_flush_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-method close_async
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_set_pending")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method clear_pending
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_clear_pending")
+ (return-type "none")
+)
+
+
+
+;; From gresolver.h
+
+(define-function resolver_get_type
+ (c-name "g_resolver_get_type")
+ (return-type "GType")
+)
+
+(define-function resolver_get_default
+ (c-name "g_resolver_get_default")
+ (return-type "GResolver*")
+)
+
+(define-method set_default
+ (of-object "GResolver")
+ (c-name "g_resolver_set_default")
+ (return-type "none")
+)
+
+(define-method lookup_by_name
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_name")
+ (return-type "GList*")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_by_name_async
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_name_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method lookup_by_name_finish
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_name_finish")
+ (return-type "GList*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-function resolver_free_addresses
+ (c-name "g_resolver_free_addresses")
+ (return-type "none")
+ (parameters
+ '("GList*" "addresses")
+ )
+)
+
+(define-method lookup_by_address
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_address")
+ (return-type "gchar*")
+ (parameters
+ '("GInetAddress*" "address")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_by_address_async
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_address_async")
+ (return-type "none")
+ (parameters
+ '("GInetAddress*" "address")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method lookup_by_address_finish
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_address_finish")
+ (return-type "gchar*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_service
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_service")
+ (return-type "GList*")
+ (parameters
+ '("const-gchar*" "service")
+ '("const-gchar*" "protocol")
+ '("const-gchar*" "domain")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_service_async
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_service_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "service")
+ '("const-gchar*" "protocol")
+ '("const-gchar*" "domain")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method lookup_service_finish
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_service_finish")
+ (return-type "GList*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-function resolver_free_targets
+ (c-name "g_resolver_free_targets")
+ (return-type "none")
+ (parameters
+ '("GList*" "targets")
+ )
+)
+
+(define-function resolver_error_quark
+ (c-name "g_resolver_error_quark")
+ (return-type "GQuark")
+)
+
+
+
+;; From gseekable.h
+
+(define-function seekable_get_type
+ (c-name "g_seekable_get_type")
+ (return-type "GType")
+)
+
+(define-method tell
+ (of-object "GSeekable")
+ (c-name "g_seekable_tell")
+ (return-type "goffset")
+)
+
+(define-method can_seek
+ (of-object "GSeekable")
+ (c-name "g_seekable_can_seek")
+ (return-type "gboolean")
+)
+
+(define-method seek
+ (of-object "GSeekable")
+ (c-name "g_seekable_seek")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GSeekType" "type" (default "G_SEEK_SET"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method can_truncate
+ (of-object "GSeekable")
+ (c-name "g_seekable_can_truncate")
+ (return-type "gboolean")
+)
+
+(define-method truncate
+ (of-object "GSeekable")
+ (c-name "g_seekable_truncate")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gsimpleasyncresult.h
+
+(define-function simple_async_result_get_type
+ (c-name "g_simple_async_result_get_type")
+ (return-type "GType")
+)
+
+(define-function simple_async_result_new
+ (c-name "g_simple_async_result_new")
+ (is-constructor-of "GSimpleAsyncResult")
+ (return-type "GSimpleAsyncResult*")
+ (parameters
+ '("GObject*" "source_object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("gpointer" "source_tag")
+ )
+)
+
+(define-function simple_async_result_new_error
+ (c-name "g_simple_async_result_new_error")
+ (return-type "GSimpleAsyncResult*")
+ (parameters
+ '("GObject*" "source_object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ )
+ (varargs #t)
+)
+
+(define-function simple_async_result_new_from_error
+ (c-name "g_simple_async_result_new_from_error")
+ (return-type "GSimpleAsyncResult*")
+ (parameters
+ '("GObject*" "source_object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GError*" "error")
+ )
+)
+
+(define-method set_op_res_gpointer
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_op_res_gpointer")
+ (return-type "none")
+ (parameters
+ '("gpointer" "op_res")
+ '("GDestroyNotify" "destroy_op_res")
+ )
+)
+
+(define-method get_op_res_gpointer
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_op_res_gpointer")
+ (return-type "gpointer")
+)
+
+(define-method set_op_res_gssize
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_op_res_gssize")
+ (return-type "none")
+ (parameters
+ '("gssize" "op_res")
+ )
+)
+
+(define-method get_op_res_gssize
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_op_res_gssize")
+ (return-type "gssize")
+)
+
+(define-method set_op_res_gboolean
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_op_res_gboolean")
+ (return-type "none")
+ (parameters
+ '("gboolean" "op_res")
+ )
+)
+
+(define-method get_op_res_gboolean
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_op_res_gboolean")
+ (return-type "gboolean")
+)
+
+(define-method get_source_tag
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_source_tag")
+ (return-type "gpointer")
+)
+
+(define-method set_handle_cancellation
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_handle_cancellation")
+ (return-type "none")
+ (parameters
+ '("gboolean" "handle_cancellation")
+ )
+)
+
+(define-method complete
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_complete")
+ (return-type "none")
+)
+
+(define-method complete_in_idle
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_complete_in_idle")
+ (return-type "none")
+)
+
+(define-method run_in_thread
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_run_in_thread")
+ (return-type "none")
+ (parameters
+ '("GSimpleAsyncThreadFunc" "func")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method set_from_error
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_from_error")
+ (return-type "none")
+ (parameters
+ '("GError*" "error")
+ )
+)
+
+(define-method propagate_error
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_propagate_error")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "dest")
+ )
+)
+
+(define-method set_error
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_error")
+ (return-type "none")
+ (parameters
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ )
+ (varargs #t)
+)
+
+(define-method set_error_va
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_error_va")
+ (return-type "none")
+ (parameters
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ '("va_list" "args")
+ )
+)
+
+(define-function simple_async_report_error_in_idle
+ (c-name "g_simple_async_report_error_in_idle")
+ (return-type "none")
+ (parameters
+ '("GObject*" "object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ )
+ (varargs #t)
+)
+
+(define-function simple_async_report_gerror_in_idle
+ (c-name "g_simple_async_report_gerror_in_idle")
+ (return-type "none")
+ (parameters
+ '("GObject*" "object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GError*" "error")
+ )
+)
+
+
+
+;; From gsocketaddressenumerator.h
+
+(define-function socket_address_enumerator_get_type
+ (c-name "g_socket_address_enumerator_get_type")
+ (return-type "GType")
+)
+
+(define-method next
+ (of-object "GSocketAddressEnumerator")
+ (c-name "g_socket_address_enumerator_next")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method next_async
+ (of-object "GSocketAddressEnumerator")
+ (c-name "g_socket_address_enumerator_next_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method next_finish
+ (of-object "GSocketAddressEnumerator")
+ (c-name "g_socket_address_enumerator_next_finish")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gsocketaddress.h
+
+(define-function socket_address_get_type
+ (c-name "g_socket_address_get_type")
+ (return-type "GType")
+)
+
+(define-method get_family
+ (of-object "GSocketAddress")
+ (c-name "g_socket_address_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-function socket_address_new_from_native
+ (c-name "g_socket_address_new_from_native")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("gpointer" "native")
+ '("gsize" "len")
+ )
+)
+
+(define-method to_native
+ (of-object "GSocketAddress")
+ (c-name "g_socket_address_to_native")
+ (return-type "gboolean")
+ (parameters
+ '("gpointer" "dest")
+ '("gsize" "destlen")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_native_size
+ (of-object "GSocketAddress")
+ (c-name "g_socket_address_get_native_size")
+ (return-type "gssize")
+)
+
+
+
+;; From gsocketclient.h
+
+(define-function socket_client_get_type
+ (c-name "g_socket_client_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_client_new
+ (c-name "g_socket_client_new")
+ (is-constructor-of "GSocketClient")
+ (return-type "GSocketClient*")
+)
+
+(define-method get_family
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-method set_family
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_family")
+ (return-type "none")
+ (parameters
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-method get_socket_type
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_socket_type")
+ (return-type "GSocketType")
+)
+
+(define-method set_socket_type
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_socket_type")
+ (return-type "none")
+ (parameters
+ '("GSocketType" "type")
+ )
+)
+
+(define-method get_protocol
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_protocol")
+ (return-type "GSocketProtocol")
+)
+
+(define-method set_protocol
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_protocol")
+ (return-type "none")
+ (parameters
+ '("GSocketProtocol" "protocol")
+ )
+)
+
+(define-method get_local_address
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_local_address")
+ (return-type "GSocketAddress*")
+)
+
+(define-method set_local_address
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_local_address")
+ (return-type "none")
+ (parameters
+ '("GSocketAddress*" "address")
+ )
+)
+
+(define-method connect
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GSocketConnectable*" "connectable")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_host
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_host")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_service
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("const-gchar*" "domain")
+ '("const-gchar*" "service")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_async")
+ (return-type "none")
+ (parameters
+ '("GSocketConnectable*" "connectable")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_host_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_host_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_to_host_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_host_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_service_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "domain")
+ '("const-gchar*" "service")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_to_service_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gsocketconnectable.h
+
+(define-function socket_connectable_get_type
+ (c-name "g_socket_connectable_get_type")
+ (return-type "GType")
+)
+
+(define-method enumerate
+ (of-object "GSocketConnectable")
+ (c-name "g_socket_connectable_enumerate")
+ (return-type "GSocketAddressEnumerator*")
+)
+
+
+
+;; From gsocketconnection.h
+
+(define-function socket_connection_get_type
+ (c-name "g_socket_connection_get_type")
+ (return-type "GType")
+)
+
+(define-method get_socket
+ (of-object "GSocketConnection")
+ (c-name "g_socket_connection_get_socket")
+ (return-type "GSocket*")
+)
+
+(define-method get_local_address
+ (of-object "GSocketConnection")
+ (c-name "g_socket_connection_get_local_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method get_remote_address
+ (of-object "GSocketConnection")
+ (c-name "g_socket_connection_get_remote_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-function socket_connection_factory_register_type
+ (c-name "g_socket_connection_factory_register_type")
+ (return-type "none")
+ (parameters
+ '("GType" "g_type")
+ '("GSocketFamily" "family")
+ '("GSocketType" "type")
+ '("gint" "protocol")
+ )
+)
+
+(define-function socket_connection_factory_lookup_type
+ (c-name "g_socket_connection_factory_lookup_type")
+ (return-type "GType")
+ (parameters
+ '("GSocketFamily" "family")
+ '("GSocketType" "type")
+ '("gint" "protocol_id")
+ )
+)
+
+(define-method connection_factory_create_connection
+ (of-object "GSocket")
+ (c-name "g_socket_connection_factory_create_connection")
+ (return-type "GSocketConnection*")
+)
+
+
+
+;; From gsocketcontrolmessage.h
+
+(define-function socket_control_message_get_type
+ (c-name "g_socket_control_message_get_type")
+ (return-type "GType")
+)
+
+(define-method get_size
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_get_size")
+ (return-type "gsize")
+)
+
+(define-method get_level
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_get_level")
+ (return-type "int")
+)
+
+(define-method get_msg_type
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_get_msg_type")
+ (return-type "int")
+)
+
+(define-method serialize
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_serialize")
+ (return-type "none")
+ (parameters
+ '("gpointer" "data")
+ )
+)
+
+(define-function socket_control_message_deserialize
+ (c-name "g_socket_control_message_deserialize")
+ (return-type "GSocketControlMessage*")
+ (parameters
+ '("int" "level")
+ '("int" "type")
+ '("gsize" "size")
+ '("gpointer" "data")
+ )
+)
+
+
+
+;; From gsocket.h
+
+(define-function socket_get_type
+ (c-name "g_socket_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_new
+ (c-name "g_socket_new")
+ (is-constructor-of "GSocket")
+ (return-type "GSocket*")
+ (parameters
+ '("GSocketFamily" "family")
+ '("GSocketType" "type")
+ '("GSocketProtocol" "protocol")
+ '("GError**" "error")
+ )
+)
+
+(define-function socket_new_from_fd
+ (c-name "g_socket_new_from_fd")
+ (return-type "GSocket*")
+ (parameters
+ '("gint" "fd")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_fd
+ (of-object "GSocket")
+ (c-name "g_socket_get_fd")
+ (return-type "int")
+)
+
+(define-method get_family
+ (of-object "GSocket")
+ (c-name "g_socket_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-method get_socket_type
+ (of-object "GSocket")
+ (c-name "g_socket_get_socket_type")
+ (return-type "GSocketType")
+)
+
+(define-method get_protocol
+ (of-object "GSocket")
+ (c-name "g_socket_get_protocol")
+ (return-type "GSocketProtocol")
+)
+
+(define-method get_local_address
+ (of-object "GSocket")
+ (c-name "g_socket_get_local_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method get_remote_address
+ (of-object "GSocket")
+ (c-name "g_socket_get_remote_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method set_blocking
+ (of-object "GSocket")
+ (c-name "g_socket_set_blocking")
+ (return-type "none")
+ (parameters
+ '("gboolean" "blocking")
+ )
+)
+
+(define-method get_blocking
+ (of-object "GSocket")
+ (c-name "g_socket_get_blocking")
+ (return-type "gboolean")
+)
+
+(define-method set_keepalive
+ (of-object "GSocket")
+ (c-name "g_socket_set_keepalive")
+ (return-type "none")
+ (parameters
+ '("gboolean" "keepalive")
+ )
+)
+
+(define-method get_keepalive
+ (of-object "GSocket")
+ (c-name "g_socket_get_keepalive")
+ (return-type "gboolean")
+)
+
+(define-method get_listen_backlog
+ (of-object "GSocket")
+ (c-name "g_socket_get_listen_backlog")
+ (return-type "gint")
+)
+
+(define-method set_listen_backlog
+ (of-object "GSocket")
+ (c-name "g_socket_set_listen_backlog")
+ (return-type "none")
+ (parameters
+ '("gint" "backlog")
+ )
+)
+
+(define-method is_connected
+ (of-object "GSocket")
+ (c-name "g_socket_is_connected")
+ (return-type "gboolean")
+)
+
+(define-method bind
+ (of-object "GSocket")
+ (c-name "g_socket_bind")
+ (return-type "gboolean")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("gboolean" "allow_reuse")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect
+ (of-object "GSocket")
+ (c-name "g_socket_connect")
+ (return-type "gboolean")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method check_connect_result
+ (of-object "GSocket")
+ (c-name "g_socket_check_connect_result")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method condition_check
+ (of-object "GSocket")
+ (c-name "g_socket_condition_check")
+ (return-type "GIOCondition")
+ (parameters
+ '("GIOCondition" "condition")
+ )
+)
+
+(define-method condition_wait
+ (of-object "GSocket")
+ (c-name "g_socket_condition_wait")
+ (return-type "gboolean")
+ (parameters
+ '("GIOCondition" "condition")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method accept
+ (of-object "GSocket")
+ (c-name "g_socket_accept")
+ (return-type "GSocket*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method listen
+ (of-object "GSocket")
+ (c-name "g_socket_listen")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method receive
+ (of-object "GSocket")
+ (c-name "g_socket_receive")
+ (return-type "gssize")
+ (parameters
+ '("gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method receive_from
+ (of-object "GSocket")
+ (c-name "g_socket_receive_from")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress**" "address")
+ '("gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method send
+ (of-object "GSocket")
+ (c-name "g_socket_send")
+ (return-type "gssize")
+ (parameters
+ '("const-gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method send_to
+ (of-object "GSocket")
+ (c-name "g_socket_send_to")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("const-gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method receive_message
+ (of-object "GSocket")
+ (c-name "g_socket_receive_message")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress**" "address")
+ '("GInputVector*" "vectors")
+ '("gint" "num_vectors")
+ '("GSocketControlMessage***" "messages")
+ '("gint*" "num_messages")
+ '("gint*" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method send_message
+ (of-object "GSocket")
+ (c-name "g_socket_send_message")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("GOutputVector*" "vectors")
+ '("gint" "num_vectors")
+ '("GSocketControlMessage**" "messages")
+ '("gint" "num_messages")
+ '("gint" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GSocket")
+ (c-name "g_socket_close")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method shutdown
+ (of-object "GSocket")
+ (c-name "g_socket_shutdown")
+ (return-type "gboolean")
+ (parameters
+ '("gboolean" "shutdown_read")
+ '("gboolean" "shutdown_write")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GSocket")
+ (c-name "g_socket_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method create_source
+ (of-object "GSocket")
+ (c-name "g_socket_create_source")
+ (return-type "GSource*")
+ (parameters
+ '("GIOCondition" "condition")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method speaks_ipv4
+ (of-object "GSocket")
+ (c-name "g_socket_speaks_ipv4")
+ (return-type "gboolean")
+)
+
+
+
+;; From gsocketlistener.h
+
+(define-function socket_listener_get_type
+ (c-name "g_socket_listener_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_listener_new
+ (c-name "g_socket_listener_new")
+ (is-constructor-of "GSocketListener")
+ (return-type "GSocketListener*")
+)
+
+(define-method set_backlog
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_set_backlog")
+ (return-type "none")
+ (parameters
+ '("int" "listen_backlog")
+ )
+)
+
+(define-method add_socket
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_add_socket")
+ (return-type "gboolean")
+ (parameters
+ '("GSocket*" "socket")
+ '("GObject*" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_address
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_add_address")
+ (return-type "gboolean")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("GSocketType" "type")
+ '("GSocketProtocol" "protocol")
+ '("GObject*" "source_object")
+ '("GSocketAddress**" "effective_address")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_inet_port
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_add_inet_port")
+ (return-type "gboolean")
+ (parameters
+ '("guint16" "port")
+ '("GObject*" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method accept_socket
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_socket")
+ (return-type "GSocket*")
+ (parameters
+ '("GObject**" "source_object")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method accept_socket_async
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_socket_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method accept_socket_finish
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_socket_finish")
+ (return-type "GSocket*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GObject**" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method accept
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GObject**" "source_object")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method accept_async
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method accept_finish
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GObject**" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_close")
+ (return-type "none")
+)
+
+
+
+;; From gsocketservice.h
+
+(define-function socket_service_get_type
+ (c-name "g_socket_service_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_service_new
+ (c-name "g_socket_service_new")
+ (is-constructor-of "GSocketService")
+ (return-type "GSocketService*")
+)
+
+(define-method start
+ (of-object "GSocketService")
+ (c-name "g_socket_service_start")
+ (return-type "none")
+)
+
+(define-method stop
+ (of-object "GSocketService")
+ (c-name "g_socket_service_stop")
+ (return-type "none")
+)
+
+(define-method is_active
+ (of-object "GSocketService")
+ (c-name "g_socket_service_is_active")
+ (return-type "gboolean")
+)
+
+
+
+;; From gsrvtarget.h
+
+(define-function srv_target_get_type
+ (c-name "g_srv_target_get_type")
+ (return-type "GType")
+)
+
+(define-function srv_target_new
+ (c-name "g_srv_target_new")
+ (is-constructor-of "GSrvTarget")
+ (return-type "GSrvTarget*")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("guint16" "port")
+ '("guint16" "priority")
+ '("guint16" "weight")
+ )
+)
+
+(define-method copy
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_copy")
+ (return-type "GSrvTarget*")
+)
+
+(define-method free
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_free")
+ (return-type "none")
+)
+
+(define-method get_hostname
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_hostname")
+ (return-type "const-gchar*")
+)
+
+(define-method get_port
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_port")
+ (return-type "guint16")
+)
+
+(define-method get_priority
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_priority")
+ (return-type "guint16")
+)
+
+(define-method get_weight
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_weight")
+ (return-type "guint16")
+)
+
+(define-function srv_target_list_sort
+ (c-name "g_srv_target_list_sort")
+ (return-type "GList*")
+ (parameters
+ '("GList*" "targets")
+ )
+)
+
+
+
+;; From gthemedicon.h
+
+(define-function themed_icon_get_type
+ (c-name "g_themed_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function themed_icon_new
+ (c-name "g_themed_icon_new")
+ (is-constructor-of "GThemedIcon")
+ (return-type "GIcon*")
+ (properties
+ '("name" (argname "iconname"))
+ )
+)
+
+(define-function themed_icon_new_with_default_fallbacks
+ (c-name "g_themed_icon_new_with_default_fallbacks")
+ (return-type "GIcon*")
+ (parameters
+ '("const-char*" "iconname")
+ )
+)
+
+(define-function themed_icon_new_from_names
+ (c-name "g_themed_icon_new_from_names")
+ (return-type "GIcon*")
+ (parameters
+ '("char**" "iconnames")
+ '("int" "len")
+ )
+)
+
+(define-method prepend_name
+ (of-object "GThemedIcon")
+ (c-name "g_themed_icon_prepend_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "iconname")
+ )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method get_names
+ (c-name "g_themed_icon_get_names")
+ (of-object "GThemedIcon")
+ (return-type "const-gchar*-const*")
+)
+
+(define-method append_name
+ (c-name "g_themed_icon_append_name")
+ (of-object "GThemedIcon")
+ (return-type "none")
+ (parameters
+ '("char*" "iconname")
+ )
+)
+
+
+
+;; From gthreadedsocketservice.h
+
+(define-function threaded_socket_service_get_type
+ (c-name "g_threaded_socket_service_get_type")
+ (return-type "GType")
+)
+
+(define-function threaded_socket_service_new
+ (c-name "g_threaded_socket_service_new")
+ (is-constructor-of "GThreadedSocketService")
+ (return-type "GSocketService*")
+ (parameters
+ '("int" "max_threads")
+ )
+)
+
+
+
+;; From gunixinputstream.h
+
+(define-function unix_input_stream_get_type
+ (c-name "g_unix_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_input_stream_new
+ (c-name "g_unix_input_stream_new")
+ (is-constructor-of "GUnixInputStream")
+ (return-type "GInputStream*")
+ (parameters
+ '("int" "fd")
+ '("gboolean" "close_fd_at_close")
+ )
+)
+
+
+
+;; From gvfs.h
+
+(define-function vfs_get_type
+ (c-name "g_vfs_get_type")
+ (return-type "GType")
+)
+
+(define-method is_active
+ (of-object "GVfs")
+ (c-name "g_vfs_is_active")
+ (return-type "gboolean")
+)
+
+(define-method get_file_for_path
+ (of-object "GVfs")
+ (c-name "g_vfs_get_file_for_path")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "path")
+ )
+)
+
+(define-method get_file_for_uri
+ (of-object "GVfs")
+ (c-name "g_vfs_get_file_for_uri")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "uri")
+ )
+)
+
+(define-method parse_name
+ (of-object "GVfs")
+ (c-name "g_vfs_parse_name")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "parse_name")
+ )
+)
+
+(define-function vfs_get_default
+ (c-name "g_vfs_get_default")
+ (return-type "GVfs*")
+)
+
+(define-function vfs_get_local
+ (c-name "g_vfs_get_local")
+ (return-type "GVfs*")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method get_supported_uri_schemes
+ (docstring
+"VFS.get_supported_uri_schemes() -> [uri, ..]\n"
+"Gets a list of URI schemes supported by vfs.")
+ (of-object "GVfs")
+ (c-name "g_vfs_get_supported_uri_schemes")
+ (return-type "const-char*-const*")
+)
+
+
+
+;; From gwin32appinfo.h
+
+(define-function win32_app_info_get_type
+ (c-name "g_win32_app_info_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gvolume.h
+
+(define-function volume_get_type
+ (c-name "g_volume_get_type")
+ (return-type "GType")
+)
+
+(define-method get_name
+ (of-object "GVolume")
+ (c-name "g_volume_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GVolume")
+ (c-name "g_volume_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+)
+
+(define-method get_uuid
+ (of-object "GVolume")
+ (c-name "g_volume_get_uuid")
+ (return-type "char*")
+)
+
+(define-method get_drive
+ (of-object "GVolume")
+ (c-name "g_volume_get_drive")
+ (return-type "GDrive*")
+ (caller-owns-return #t)
+)
+
+(define-method get_mount
+ (of-object "GVolume")
+ (c-name "g_volume_get_mount")
+ (return-type "GMount*")
+ (caller-owns-return #t)
+)
+
+(define-method can_mount
+ (of-object "GVolume")
+ (c-name "g_volume_can_mount")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GVolume")
+ (c-name "g_volume_can_eject")
+ (return-type "gboolean")
+)
+
+(define-method should_automount
+ (of-object "GVolume")
+ (c-name "g_volume_should_automount")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method mount
+ (of-object "GVolume")
+ (c-name "g_volume_mount")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_finish
+ (of-object "GVolume")
+ (c-name "g_volume_mount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method eject
+ (of-object "GVolume")
+ (c-name "g_volume_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GVolume")
+ (c-name "g_volume_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+ (deprecated "use gio.Drive.eject_with_operation_finish instead.")
+)
+
+(define-method get_identifier
+ (of-object "GVolume")
+ (c-name "g_volume_get_identifier")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "kind")
+ )
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method enumerate_identifiers
+ (of-object "GVolume")
+ (c-name "g_volume_enumerate_identifiers")
+ (return-type "char**")
+)
+
+(define-method get_activation_root
+ (of-object "GVolume")
+ (c-name "g_volume_get_activation_root")
+ (return-type "GFile*")
+)
+
+(define-method eject_with_operation
+ (of-object "GVolume")
+ (c-name "g_volume_eject_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_with_operation_finish
+ (of-object "GVolume")
+ (c-name "g_volume_eject_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gvolumemonitor.h
+
+(define-function volume_monitor_get_type
+ (c-name "g_volume_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-function volume_monitor_get
+ (c-name "g_volume_monitor_get")
+ (return-type "GVolumeMonitor*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_connected_drives
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_connected_drives")
+ (return-type "GList*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_volumes
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_volumes")
+ (return-type "GList*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_mounts
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_mounts")
+ (return-type "GList*")
+)
+
+(define-method get_volume_for_uuid
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_volume_for_uuid")
+ (return-type "GVolume*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "uuid")
+ )
+)
+
+(define-method get_mount_for_uuid
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_mount_for_uuid")
+ (return-type "GMount*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "uuid")
+ )
+)
+
+(define-function volume_monitor_adopt_orphan_mount
+ (c-name "g_volume_monitor_adopt_orphan_mount")
+ (return-type "GVolume*")
+ (parameters
+ '("GMount*" "mount")
+ )
+)
+
diff --git a/gio/gio.override b/gio/gio.override
new file mode 100644
index 0000000..6d001b9
--- /dev/null
+++ b/gio/gio.override
@@ -0,0 +1,404 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gio.override: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+modulename gio
+%%
+import gobject.GObject as PyGObject_Type
+import glib.PollFD as PyGPollFD_Type
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+#include <gio/gio.h>
+#include "pygio-utils.h"
+#include "pyglib.h"
+#include "pygsource.h"
+
+#define BUFSIZE 8192
+
+typedef struct _PyGIONotify PyGIONotify;
+
+struct _PyGIONotify {
+ gboolean referenced;
+ PyObject *callback;
+ PyObject *data;
+ gboolean attach_self;
+ gpointer buffer;
+ gsize buffer_size;
+
+ /* If a structure has any 'slaves', those will reference their
+ * callbacks and be freed together with the 'master'. */
+ PyGIONotify *slaves;
+};
+
+static GQuark
+pygio_notify_get_internal_quark(void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_string("pygio::notify");
+ return quark;
+}
+
+static PyGIONotify *
+pygio_notify_new(void)
+{
+ return g_slice_new0(PyGIONotify);
+}
+
+static PyGIONotify *
+pygio_notify_new_slave(PyGIONotify* master)
+{
+ PyGIONotify *slave = pygio_notify_new();
+
+ while (master->slaves)
+ master = master->slaves;
+ master->slaves = slave;
+
+ return slave;
+}
+
+static gboolean
+pygio_notify_using_optional_callback(PyGIONotify *notify)
+{
+ if (notify->callback)
+ return TRUE;
+ else {
+ notify->data = NULL;
+ return FALSE;
+ }
+}
+
+static gboolean
+pygio_notify_callback_is_valid_full(PyGIONotify *notify, const gchar *name)
+{
+ if (!notify->callback) {
+ PyErr_SetString(PyExc_RuntimeError, "internal error: callback is not set");
+ return FALSE;
+ }
+
+ if (!PyCallable_Check(notify->callback)) {
+ gchar *error_message = g_strdup_printf("%s argument not callable", name);
+
+ PyErr_SetString(PyExc_TypeError, error_message);
+ g_free(error_message);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+pygio_notify_callback_is_valid(PyGIONotify *notify)
+{
+ return pygio_notify_callback_is_valid_full(notify, "callback");
+}
+
+static void
+pygio_notify_reference_callback(PyGIONotify *notify)
+{
+ if (!notify->referenced) {
+ notify->referenced = TRUE;
+ Py_XINCREF(notify->callback);
+ Py_XINCREF(notify->data);
+
+ if (notify->slaves)
+ pygio_notify_reference_callback(notify->slaves);
+ }
+}
+
+static void
+pygio_notify_copy_buffer(PyGIONotify *notify, gpointer buffer, gsize buffer_size)
+{
+ if (buffer_size > 0) {
+ notify->buffer = g_slice_copy(buffer_size, buffer);
+ notify->buffer_size = buffer_size;
+ }
+}
+
+static gboolean
+pygio_notify_allocate_buffer(PyGIONotify *notify, gsize buffer_size)
+{
+ if (buffer_size > 0) {
+ notify->buffer = g_slice_alloc(buffer_size);
+ if (!notify->buffer) {
+ PyErr_Format(PyExc_MemoryError, "failed to allocate %d bytes", buffer_size);
+ return FALSE;
+ }
+
+ notify->buffer_size = buffer_size;
+ }
+
+ return TRUE;
+}
+
+static void
+pygio_notify_attach_to_result(PyGIONotify *notify)
+{
+ notify->attach_self = TRUE;
+}
+
+static PyGIONotify *
+pygio_notify_get_attached(PyGObject *result)
+{
+ return g_object_get_qdata(G_OBJECT(result->obj), pygio_notify_get_internal_quark());
+}
+
+static void
+pygio_notify_free(PyGIONotify *notify)
+{
+ if (notify) {
+ if (notify->slaves)
+ pygio_notify_free(notify->slaves);
+
+ if (notify->referenced) {
+ PyGILState_STATE state;
+
+ state = pyg_gil_state_ensure();
+ Py_XDECREF(notify->callback);
+ Py_XDECREF(notify->data);
+ pyg_gil_state_release(state);
+ }
+
+ if (notify->buffer)
+ g_slice_free1(notify->buffer_size, notify->buffer);
+
+ g_slice_free(PyGIONotify, notify);
+ }
+}
+
+static void
+async_result_callback_marshal(GObject *source_object,
+ GAsyncResult *result,
+ PyGIONotify *notify)
+{
+ PyObject *ret;
+ PyGILState_STATE state;
+
+ state = pyg_gil_state_ensure();
+
+ if (!notify->referenced)
+ g_warning("pygio_notify_reference_callback() hasn't been called before using the structure");
+
+ if (notify->attach_self) {
+ g_object_set_qdata_full(G_OBJECT(result), pygio_notify_get_internal_quark(),
+ notify, (GDestroyNotify) pygio_notify_free);
+ }
+
+ if (notify->data)
+ ret = PyEval_CallFunction(notify->callback, "NNO",
+ pygobject_new(source_object),
+ pygobject_new((GObject *)result),
+ notify->data);
+ else
+ ret = PyObject_CallFunction(notify->callback, "NN",
+ pygobject_new(source_object),
+ pygobject_new((GObject *)result));
+
+ if (ret == NULL) {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+
+ Py_XDECREF(ret);
+
+ /* Otherwise the structure is attached to 'result' and will be
+ * freed when that object dies. */
+ if (!notify->attach_self)
+ pygio_notify_free(notify);
+
+ pyg_gil_state_release(state);
+}
+%%
+include
+ gappinfo.override
+ gapplaunchcontext.override
+ gbufferedinputstream.override
+ gcancellable.override
+ gdatainputstream.override
+ gdrive.override
+ gfile.override
+ gfileattribute.override
+ gfileenumerator.override
+ gfileinfo.override
+ gfileinputstream.override
+ gfileiostream.override
+ gfileoutputstream.override
+ gicon.override
+ giostream.override
+ gmemoryinputstream.override
+ gmemoryoutputstream.override
+ gmount.override
+ ginputstream.override
+ goutputstream.override
+ gresolver.override
+ gsocket.override
+ gvolume.override
+ gvolumemonitor.override
+%%
+ignore-glob
+ *_get_type
+ *free
+ *_ref
+ *_unref
+ g_async_result_get_user_data
+ g_file_new_from_commandline_arg
+ g_file_new_from_path
+ g_file_new_from_uri
+ g_file_hash
+ g_io_error_quark
+ g_simple_async_result_new_error
+ g_simple_async_report_error_in_idle
+ g_simple_async_result_set_op_res_gpointer
+ g_simple_async_result_get_op_res_gpointer
+ g_simple_async_result_get_source_tag
+ g_simple_async_result_run_in_thread
+ g_simple_async_result_set_from_error
+ g_simple_async_result_set_error
+ g_simple_async_result_set_error_va
+ g_io_module*
+ g_io_scheduler_*
+%%
+override g_app_info_get_all noargs
+static PyObject *
+_wrap_g_app_info_get_all (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_app_info_get_all ();
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GObject *obj = l->data;
+ PyObject *item = pygobject_new(obj);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_app_info_get_all_for_type args
+static PyObject *
+_wrap_g_app_info_get_all_for_type (PyGObject *self, PyObject *args)
+{
+ GList *list, *l;
+ PyObject *ret;
+ gchar *type;
+
+ if (!PyArg_ParseTuple (args, "s:app_info_get_all_for_type", &type))
+ return NULL;
+
+ list = g_app_info_get_all_for_type (type);
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GObject *obj = l->data;
+ PyObject *item = pygobject_new(obj);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_content_type_guess kwargs
+static PyObject *
+_wrap_g_content_type_guess(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ char *kwlist[] = {"filename", "data", "want_uncertain", NULL};
+ char *filename = NULL, *data = NULL, *type;
+ int data_size = 0;
+ gboolean result_uncertain, want_uncertain = FALSE;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+ "|zz#i:g_content_type_guess",
+ kwlist,
+ &filename, &data, &data_size,
+ &want_uncertain))
+ return NULL;
+
+ if (!filename && !data) {
+ PyErr_SetString(PyExc_TypeError, "need at least one argument");
+ return NULL;
+ }
+
+ type = g_content_type_guess(filename, (guchar *) data,
+ data_size, &result_uncertain);
+
+ if (want_uncertain) {
+ ret = Py_BuildValue("zN", type, PyBool_FromLong(result_uncertain));
+
+ } else {
+ ret = PyString_FromString(type);
+ }
+
+ g_free(type);
+ return ret;
+}
+%%
+override g_vfs_get_supported_uri_schemes noargs
+static PyObject *
+_wrap_g_vfs_get_supported_uri_schemes(PyGObject *self)
+{
+ const char * const *names;
+ PyObject *ret;
+
+ names = g_vfs_get_supported_uri_schemes(G_VFS(self->obj));
+
+ ret = PyList_New(0);
+ while (names && *names) {
+ PyObject *item = PyString_FromString(names[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ names++;
+ }
+
+ return ret;
+}
+%%
+override g_content_types_get_registered noargs
+static PyObject *
+_wrap_g_content_types_get_registered(PyObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_content_types_get_registered();
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ char *content_type = l->data;
+ PyObject *string = PyString_FromString(content_type);
+ PyList_Append(ret, string);
+ Py_DECREF(string);
+ g_free(content_type);
+ }
+ g_list_free(list);
+
+ return ret;
+}
diff --git a/gio/giomodule.c b/gio/giomodule.c
new file mode 100644
index 0000000..409aeef
--- /dev/null
+++ b/gio/giomodule.c
@@ -0,0 +1,205 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * giomodule.c: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <Python.h>
+#include <pyglib.h>
+#include <pygobject.h>
+
+#include <gio/gio.h>
+
+#define PYGIO_MAJOR_VERSION PYGOBJECT_MAJOR_VERSION
+#define PYGIO_MINOR_VERSION PYGOBJECT_MINOR_VERSION
+#define PYGIO_MICRO_VERSION PYGOBJECT_MICRO_VERSION
+
+/* include any extra headers needed here */
+
+void pygio_register_classes(PyObject *d);
+void pygio_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pygio_functions[];
+
+DL_EXPORT(void)
+init_gio(void)
+{
+ PyObject *m, *d;
+ PyObject *tuple;
+ PyObject *e;
+ /* perform any initialisation required by the library here */
+
+ m = Py_InitModule("gio._gio", pygio_functions);
+ d = PyModule_GetDict(m);
+
+ g_type_init();
+ pyglib_init();
+
+ init_pygobject_check(2, 15, 2);
+
+ pygio_register_classes(d);
+ pygio_add_constants(m, "G_IO_");
+
+ PyModule_AddStringConstant(m, "ERROR", g_quark_to_string(G_IO_ERROR));
+ e = pyglib_register_exception_for_domain("gio.Error", G_IO_ERROR);
+ PyDict_SetItemString(d, "Error", e);
+ Py_DECREF(e);
+
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_TYPE",
+ G_FILE_ATTRIBUTE_STANDARD_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_HIDDEN",
+ G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_BACKUP",
+ G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_SYMLINK",
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL",
+ G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_EDIT_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_COPY_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_COPY_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_DESCRIPTION",
+ G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_ICON",
+ G_FILE_ATTRIBUTE_STANDARD_ICON);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE",
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE",
+ G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SIZE",
+ G_FILE_ATTRIBUTE_STANDARD_SIZE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET",
+ G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_TARGET_URI",
+ G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SORT_ORDER",
+ G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ETAG_VALUE",
+ G_FILE_ATTRIBUTE_ETAG_VALUE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ID_FILE",
+ G_FILE_ATTRIBUTE_ID_FILE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ID_FILESYSTEM",
+ G_FILE_ATTRIBUTE_ID_FILESYSTEM);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_READ",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_WRITE",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_DELETE",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_TRASH",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_RENAME",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT",
+ G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT",
+ G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT",
+ G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE",
+ G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI",
+ G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_MODIFIED",
+ G_FILE_ATTRIBUTE_TIME_MODIFIED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_MODIFIED_USEC",
+ G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_ACCESS",
+ G_FILE_ATTRIBUTE_TIME_ACCESS);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_ACCESS_USEC",
+ G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CHANGED",
+ G_FILE_ATTRIBUTE_TIME_CHANGED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CHANGED_USEC",
+ G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CREATED",
+ G_FILE_ATTRIBUTE_TIME_CREATED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CREATED_USEC",
+ G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_DEVICE",
+ G_FILE_ATTRIBUTE_UNIX_DEVICE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_INODE",
+ G_FILE_ATTRIBUTE_UNIX_INODE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_MODE",
+ G_FILE_ATTRIBUTE_UNIX_MODE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_NLINK",
+ G_FILE_ATTRIBUTE_UNIX_NLINK);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_UID",
+ G_FILE_ATTRIBUTE_UNIX_UID);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_GID",
+ G_FILE_ATTRIBUTE_UNIX_GID);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_RDEV",
+ G_FILE_ATTRIBUTE_UNIX_RDEV);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_BLOCK_SIZE",
+ G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_BLOCKS",
+ G_FILE_ATTRIBUTE_UNIX_BLOCKS);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT",
+ G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_DOS_IS_ARCHIVE",
+ G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_DOS_IS_SYSTEM",
+ G_FILE_ATTRIBUTE_DOS_IS_SYSTEM);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_USER",
+ G_FILE_ATTRIBUTE_OWNER_USER);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_USER_REAL",
+ G_FILE_ATTRIBUTE_OWNER_USER_REAL);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_GROUP",
+ G_FILE_ATTRIBUTE_OWNER_GROUP);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_THUMBNAIL_PATH",
+ G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_THUMBNAILING_FAILED",
+ G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_SIZE",
+ G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_FREE",
+ G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_TYPE",
+ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_READONLY",
+ G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW",
+ G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_GVFS_BACKEND",
+ G_FILE_ATTRIBUTE_GVFS_BACKEND);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_SELINUX_CONTEXT",
+ G_FILE_ATTRIBUTE_SELINUX_CONTEXT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TRASH_ITEM_COUNT",
+ G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
+
+ PyModule_AddStringConstant(m, "ERROR", g_quark_to_string(G_IO_ERROR));
+
+ /* pygio version */
+ tuple = Py_BuildValue ("(iii)",
+ PYGIO_MAJOR_VERSION,
+ PYGIO_MINOR_VERSION,
+ PYGIO_MICRO_VERSION);
+ PyDict_SetItemString(d, "pygio_version", tuple);
+ Py_DECREF(tuple);
+}
+
diff --git a/gio/giostream.override b/gio/giostream.override
new file mode 100644
index 0000000..29ec801
--- /dev/null
+++ b/gio/giostream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * giostream.override: module overrides for GIOStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_io_stream_close_async kwargs
+static PyObject *
+_wrap_g_io_stream_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:IOStream.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_io_stream_close_async(G_IO_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gmemoryinputstream.override b/gio/gmemoryinputstream.override
new file mode 100644
index 0000000..0495338
--- /dev/null
+++ b/gio/gmemoryinputstream.override
@@ -0,0 +1,91 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gmemoryinputstream.override: module overrides for GMemoryInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_input_stream_add_data kwargs
+static PyObject *
+_wrap_g_memory_input_stream_add_data(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "data", NULL };
+ PyObject *data;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gio.MemoryInputStream.add_data",
+ kwlist, &data))
+ return NULL;
+
+ if (data != Py_None) {
+ char *copy;
+ int length;
+
+ if (!PyString_Check(data)) {
+ PyErr_SetString(PyExc_TypeError, "data must be a string or None");
+ return NULL;
+ }
+
+ length = PyString_Size(data);
+ copy = g_malloc(length);
+ memcpy(copy, PyString_AsString(data), length);
+
+ g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(self->obj),
+ copy, length, (GDestroyNotify) g_free);
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+override g_memory_input_stream_new_from_data kwargs
+static PyObject *
+_wrap_g_memory_input_stream_new_from_data(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "data", NULL };
+ PyObject *data;
+ GInputStream *stream = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:gio.memory_input_stream_new_from_data",
+ kwlist, &data))
+ return NULL;
+
+ if (data != Py_None) {
+ char *copy;
+ int length;
+
+ if (!PyString_Check(data)) {
+ PyErr_SetString(PyExc_TypeError, "data must be a string or None");
+ return NULL;
+ }
+
+ length = PyString_Size(data);
+ copy = g_malloc(length);
+ memcpy(copy, PyString_AsString(data), length);
+
+ stream = g_memory_input_stream_new_from_data(copy, length,
+ (GDestroyNotify) g_free);
+ }
+
+ return pygobject_new((GObject *)stream);
+}
diff --git a/gio/gmemoryoutputstream.override b/gio/gmemoryoutputstream.override
new file mode 100644
index 0000000..7614045
--- /dev/null
+++ b/gio/gmemoryoutputstream.override
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gmemoryoutputstream.override: module overrides for GMemoryOutputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_output_stream_new noargs
+static int
+_wrap_g_memory_output_stream_new(PyGObject *self)
+{
+ self->obj = (GObject *)g_memory_output_stream_new(NULL, 0, g_realloc, g_free);
+
+ if (!self->obj) {
+ PyErr_SetString(PyExc_RuntimeError, "could not create gio.MemoryOutputStream object");
+ return -1;
+ }
+
+ pygobject_register_wrapper((PyObject *)self);
+ return 0;
+}
+%%
+override g_memory_output_stream_get_data noargs
+static PyObject *
+_wrap_g_memory_output_stream_get_data(PyGObject *self)
+{
+ GMemoryOutputStream *stream = G_MEMORY_OUTPUT_STREAM(self->obj);
+ return PyString_FromStringAndSize(g_memory_output_stream_get_data(stream),
+ g_seekable_tell(G_SEEKABLE(stream)));
+}
diff --git a/gio/gmount.override b/gio/gmount.override
new file mode 100644
index 0000000..9fb0828
--- /dev/null
+++ b/gio/gmount.override
@@ -0,0 +1,454 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gmount.override: module overrides for GMount
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_mount_guess_content_type kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "force_rescan",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gboolean force_rescan;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Oi|OO:Mount.guess_content_type",
+ kwlist,
+ &notify->callback,
+ &force_rescan,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_mount_guess_content_type(G_MOUNT(self->obj),
+ force_rescan,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_guess_content_type_finish kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ char **ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:Mount.guess_content_type_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &result))
+ return NULL;
+
+ ret = g_mount_guess_content_type_finish(G_MOUNT(self->obj),
+ G_ASYNC_RESULT(result->obj), &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret && ret[0] != NULL) {
+ py_ret = strv_to_pylist(ret);
+ g_strfreev (ret);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+ return py_ret;
+}
+%%
+override g_mount_guess_content_type_sync kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type_sync(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "force_rescan", "cancellable", NULL };
+ gboolean force_rescan;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ char **ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i|O:Mount.guess_content_type_sync",
+ kwlist,
+ &force_rescan,
+ &py_cancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ ret = g_mount_guess_content_type_sync(G_MOUNT(self->obj), force_rescan,
+ cancellable, &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret && ret[0] != NULL) {
+ py_ret = strv_to_pylist(ret);
+ g_strfreev (ret);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+ return py_ret;
+}
+%%
+override g_mount_remount kwargs
+static PyObject *
+_wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyObject *py_mount_operation = Py_None;
+ GMountOperation *mount_operation = NULL;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Mount.remount",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_mount_operation != Py_None) {
+ if (!pygobject_check(py_mount_operation, &PyGMountOperation_Type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "mount_operation must be a gio.MountOperation or None");
+ goto error;
+ }
+
+ mount_operation = G_MOUNT_OPERATION(pygobject_get(py_mount_operation));
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_mount_remount(G_MOUNT(self->obj),
+ flags,
+ mount_operation,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_unmount kwargs
+static PyObject *
+_wrap_g_mount_unmount(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:gio.Mount.unmount",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_mount_unmount(G_MOUNT(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_eject kwargs
+static PyObject *
+_wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:gio.Mount.eject",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_mount_eject(G_MOUNT(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GMount.tp_repr
+static PyObject *
+_wrap_g_mount_tp_repr(PyGObject *self)
+{
+ char *name = g_mount_get_name(G_MOUNT(self->obj));
+ char *uuid = g_mount_get_uuid(G_MOUNT(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (name) {
+ if (uuid) {
+ representation = g_strdup_printf("<%s at %p: %s (%s)>",
+ self->ob_type->tp_name, self, name, uuid);
+ }
+ else {
+ representation = g_strdup_printf("<%s at %p: %s>",
+ self->ob_type->tp_name, self, name);
+ }
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+ g_free(name);
+ g_free(uuid);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_mount_unmount_with_operation kwargs
+static PyObject *
+_wrap_g_mount_unmount_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Mount.unmount_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_mount_unmount_with_operation(G_MOUNT(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_eject_with_operation kwargs
+static PyObject *
+_wrap_g_mount_eject_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Mount.eject_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_mount_eject_with_operation(G_MOUNT(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/goutputstream.override b/gio/goutputstream.override
new file mode 100644
index 0000000..337a84c
--- /dev/null
+++ b/gio/goutputstream.override
@@ -0,0 +1,292 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * goutputstream.override: module overrides for GOutputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_output_stream_write kwargs
+static PyObject *
+_wrap_g_output_stream_write(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffer", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ gchar *buffer;
+ long count = 0;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ gssize written;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#|O!:OutputStream.write",
+ kwlist, &buffer, &count,
+ &PyGCancellable_Type, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+ written = g_output_stream_write(G_OUTPUT_STREAM(self->obj),
+ buffer, count, cancellable, &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyInt_FromLong(written);
+}
+%%
+override g_output_stream_write_all kwargs
+static PyObject *
+_wrap_g_output_stream_write_all(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffer", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ gchar *buffer;
+ long count = 0;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ gsize written;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#|O!:OutputStream.write",
+ kwlist, &buffer, &count,
+ &PyGCancellable_Type, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+ g_output_stream_write_all(G_OUTPUT_STREAM(self->obj),
+ buffer, count, &written, cancellable, &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyInt_FromLong(written);
+}
+%%
+override g_output_stream_write_async kwargs
+static PyObject *
+_wrap_g_output_stream_write_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffer", "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ gchar *buffer;
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#O|iOO:OutputStream.write_async",
+ kwlist, &buffer,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+ pygio_notify_copy_buffer(notify, buffer, count);
+
+ g_output_stream_write_async(G_OUTPUT_STREAM(self->obj),
+ notify->buffer,
+ notify->buffer_size,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_output_stream_close_async kwargs
+static PyObject *
+_wrap_g_output_stream_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:OutputStream.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_output_stream_close_async(G_OUTPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_output_stream_flush_async kwargs
+static PyObject *
+_wrap_g_output_stream_flush_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:OutputStream.flush_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_output_stream_flush_async(G_OUTPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_output_stream_splice_async kwargs
+static PyObject *
+_wrap_g_output_stream_splice_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "source", "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+
+ int io_priority = G_PRIORITY_DEFAULT;
+ GOutputStreamSpliceFlags flags = G_OUTPUT_STREAM_SPLICE_NONE;
+ PyObject *py_flags = NULL;
+ PyGObject *source;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OiOO:OutputStream.splice_async",
+ kwlist,
+ &PyGInputStream_Type,
+ &source,
+ &notify->callback,
+ &py_flags,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_output_stream_splice_async(G_OUTPUT_STREAM(self->obj),
+ G_INPUT_STREAM(source->obj), flags, io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+/* GOutputStream.write_all: No ArgType for const-void* */
diff --git a/gio/gresolver.override b/gio/gresolver.override
new file mode 100644
index 0000000..ddde73b
--- /dev/null
+++ b/gio/gresolver.override
@@ -0,0 +1,312 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gresolver.override: module overrides for GResolver
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_resolver_lookup_by_name kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "hostname", "cancellable", NULL };
+ gchar *hostname;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GList *addr;
+ GError *error = NULL;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s|O:gio.Resolver.lookup_by_name",
+ kwlist,
+ &hostname,
+ &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ addr = g_resolver_lookup_by_name(G_RESOLVER(self->obj),
+ hostname, cancellable, &error);
+
+ if (addr) {
+ PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item), g_resolver_free_addresses, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_resolver_lookup_by_name_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "hostname",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ gchar *hostname;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Os|OO:gio.Resolver.lookup_by_name_async",
+ kwlist,
+ &notify->callback,
+ &hostname,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_by_name_async(G_RESOLVER(self->obj),
+ hostname,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_resolver_lookup_by_name_finish kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GList *addr;
+ PyObject *ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.Resolver.lookup_by_name_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &result))
+ return NULL;
+
+ addr = g_resolver_lookup_by_name_finish(G_RESOLVER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (addr) {
+ PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item),
+ g_resolver_free_addresses, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_resolver_lookup_by_address_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_address_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "address",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *address;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OO|OO:gio.Resolver.lookup_by_address_async",
+ kwlist,
+ &notify->callback,
+ &address,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_by_address_async(G_RESOLVER(self->obj),
+ G_INET_ADDRESS(address->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_resolver_lookup_service kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "service", "protocol",
+ "domain", "cancellable", NULL };
+ gchar *service, *protocol, *domain;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GList *targets;
+ GError *error = NULL;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sss|O:gio.Resolver.lookup_service",
+ kwlist,
+ &service,
+ &protocol,
+ &domain,
+ &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ targets = g_resolver_lookup_service(G_RESOLVER(self->obj),
+ service, protocol, domain,
+ cancellable, &error);
+
+ if (targets) {
+ PYLIST_FROMGLIST(ret, targets,
+ pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
+ g_resolver_free_targets, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_resolver_lookup_service_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "service", "protocol", "domain",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ gchar *service, *protocol, *domain;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Osss|OO:gio.Resolver.lookup_service_async",
+ kwlist,
+ &notify->callback,
+ &service,
+ &protocol,
+ &domain,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_service_async(G_RESOLVER(self->obj),
+ service, protocol, domain,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_resolver_lookup_service_finish kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GList *targets;
+ PyObject *ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.Resolver.lookup_service_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &result))
+ return NULL;
+
+ targets = g_resolver_lookup_service_finish(G_RESOLVER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (targets) {
+ PYLIST_FROMGLIST(ret, targets,
+ pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
+ g_resolver_free_targets, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
diff --git a/gio/gsocket.override b/gio/gsocket.override
new file mode 100644
index 0000000..8f66653
--- /dev/null
+++ b/gio/gsocket.override
@@ -0,0 +1,575 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gsocket.override: module overrides for GSocket and related types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+%%
+override g_socket_condition_check kwargs
+static PyObject *
+_wrap_g_socket_condition_check(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "condition", NULL };
+ gint condition, ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i:gio.Socket.condition_check",
+ kwlist, &condition))
+ return NULL;
+
+ ret = g_socket_condition_check(G_SOCKET(self->obj), condition);
+
+ return pyg_flags_from_gtype(G_TYPE_IO_CONDITION, ret);
+}
+%%
+override g_socket_condition_wait kwargs
+static PyObject *
+_wrap_g_socket_condition_wait(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "condition", "cancellable", NULL };
+ gboolean ret;
+ gint condition;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ GError *error;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i|O:gio.Socket.condition_wait",
+ kwlist, &condition, &cancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ ret = g_socket_condition_wait(G_SOCKET(self->obj), condition,
+ cancellable, &error);
+
+ return PyBool_FromLong(ret);
+}
+%%
+override g_socket_address_enumerator_next_async kwargs
+static PyObject *
+_wrap_g_socket_address_enumerator_next_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.SocketAddressEnumerator.next_async",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_address_enumerator_next_async(G_SOCKET_ADDRESS_ENUMERATOR(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_client_connect_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "connectable", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ PyGObject *py_connectable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OO|OO:gio.SocketClient.connect_async",
+ kwlist,
+ &notify->callback,
+ &py_connectable,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_client_connect_async(G_SOCKET_CLIENT(self->obj),
+ G_SOCKET_CONNECTABLE(py_connectable->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_client_connect_to_host_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_host_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "host_and_port", "default_port",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gchar *host_and_port;
+ guint16 default_port;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OsH|OO:gio.SocketClient.connect_to_host_async",
+ kwlist,
+ &notify->callback,
+ &host_and_port,
+ &default_port,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_client_connect_to_host_async(G_SOCKET_CLIENT(self->obj),
+ host_and_port, default_port,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_client_connect_to_service_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_service_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "domain", "service",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gchar *domain, *service;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Oss|OO:gio.SocketClient.connect_to_service_async",
+ kwlist,
+ &notify->callback,
+ &domain,
+ &service,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_client_connect_to_service_async(G_SOCKET_CLIENT(self->obj),
+ domain, service,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_listener_add_address kwargs
+static PyObject *
+_wrap_g_socket_listener_add_address(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "address", "type", "protocol",
+ "source_object", NULL };
+ GSocketProtocol protocol;
+ PyObject *py_type = NULL, *py_protocol = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ GSocketType type;
+ GSocketAddress *effective_address;
+ PyGObject *address, *py_source_object = NULL;
+ GObject *source_object;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!OO|O!:gio.SocketListener.add_address",
+ kwlist,
+ &PyGSocketAddress_Type, &address,
+ &py_type, &py_protocol,
+ &PyGObject_Type, &source_object,
+ &PyGSocketAddress_Type, &effective_address))
+ return NULL;
+
+ if (pyg_enum_get_value(G_TYPE_SOCKET_TYPE, py_type, (gpointer)&type))
+ return NULL;
+
+ if (pyg_enum_get_value(G_TYPE_SOCKET_PROTOCOL, py_protocol, (gpointer)&protocol))
+ return NULL;
+
+ if (py_source_object == NULL || (PyObject*)py_source_object == Py_None)
+ source_object = NULL;
+ else if (pygobject_check(py_source_object, &PyGObject_Type))
+ source_object = G_OBJECT(py_source_object->obj);
+ else {
+ PyErr_SetString(PyExc_TypeError, "source_object should be a gobject.GObject or None");
+ return NULL;
+ }
+
+ ret = g_socket_listener_add_address(G_SOCKET_LISTENER(self->obj),
+ G_SOCKET_ADDRESS(address->obj),
+ type, protocol,
+ source_object,
+ &effective_address,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret)
+ return pygobject_new((GObject *)effective_address);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_socket_listener_accept kwargs
+static PyObject *
+_wrap_g_socket_listener_accept(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ GError *error = NULL;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ PyObject *py_connection, *py_source_object;
+ GObject *source_object;
+ GSocketConnection *connection;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept",
+ kwlist,
+ &py_cancellable))
+ return NULL;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ connection = g_socket_listener_accept(G_SOCKET_LISTENER(self->obj),
+ &source_object,
+ cancellable,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (connection)
+ py_connection = pygobject_new((GObject *)connection);
+ else {
+ py_connection = Py_None;
+ Py_INCREF(py_connection);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_connection, py_source_object);
+}
+%%
+override g_socket_listener_accept_async kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.SocketListener.accept_async",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_listener_accept_async(G_SOCKET_LISTENER(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_listener_accept_finish kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ GError *error = NULL;
+ PyGObject *result;
+ PyObject *py_connection, *py_source_object;
+ GObject *source_object;
+ GSocketConnection *connection;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ connection = g_socket_listener_accept_finish(G_SOCKET_LISTENER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &source_object,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (connection)
+ py_connection = pygobject_new((GObject *)connection);
+ else {
+ py_connection = Py_None;
+ Py_INCREF(py_connection);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_connection, py_source_object);
+}
+%%
+override g_socket_listener_accept_socket kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ GError *error = NULL;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ PyObject *py_socket, *py_source_object;
+ GObject *source_object;
+ GSocket *socket;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept_socket",
+ kwlist,
+ &py_cancellable))
+ return NULL;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ socket = g_socket_listener_accept_socket(G_SOCKET_LISTENER(self->obj),
+ &source_object,
+ cancellable,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (socket)
+ py_socket = pygobject_new((GObject *)socket);
+ else {
+ py_socket = Py_None;
+ Py_INCREF(py_socket);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_socket, py_source_object);
+}
+%%
+override g_socket_listener_accept_socket_async kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.SocketListener.accept_socket_async",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_listener_accept_socket_async(G_SOCKET_LISTENER(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_listener_accept_socket_finish kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ GError *error = NULL;
+ PyGObject *result;
+ PyObject *py_socket, *py_source_object;
+ GObject *source_object;
+ GSocket *socket;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_socket_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ socket = g_socket_listener_accept_socket_finish(G_SOCKET_LISTENER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &source_object,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (socket)
+ py_socket = pygobject_new((GObject *)socket);
+ else {
+ py_socket= Py_None;
+ Py_INCREF(py_socket);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_socket, py_source_object);
+}
+
+/* Could not write method GSocketAddress.to_native: No ArgType for gpointer */
+/* Could not write method GSocket.receive_from: No ArgType for GSocketAddress** */
+/* Could not write method GSocket.receive_message: No ArgType for GSocketAddress** */
+/* Could not write method GSocket.send_message: No ArgType for GOutputVector* */
+/* Could not write method GSocket.create_source: No ArgType for GIOCondition */
+/* Could not write method GSocketControlMessage.serialize: No ArgType for gpointer */
+/* Could not write function socket_address_new_from_native: No ArgType for gpointer */
+/* Could not write function socket_control_message_deserialize: No ArgType for gpointer */
diff --git a/gio/gvolume.override b/gio/gvolume.override
new file mode 100644
index 0000000..89c27e4
--- /dev/null
+++ b/gio/gvolume.override
@@ -0,0 +1,237 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gvolume.override: module overrides for GVolume
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_volume_mount kwargs
+static PyObject *
+_wrap_g_volume_mount(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "mount_operation", "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_mount_operation = NULL;
+ GMountOperation *mount_operation = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OO|OOO:Volume.mount",
+ kwlist,
+ &py_mount_operation,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if ((PyObject *)py_mount_operation == Py_None)
+ mount_operation = NULL;
+
+ else if (py_mount_operation && pygobject_check(py_mount_operation,
+ &PyGMountOperation_Type))
+ mount_operation = G_MOUNT_OPERATION(py_mount_operation->obj);
+
+ else if (py_mount_operation) {
+ PyErr_SetString(PyExc_TypeError,
+ "mount_operation should be a GMountOperation or None");
+ return NULL;
+ }
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_volume_mount(G_VOLUME(self->obj),
+ flags,
+ mount_operation,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_volume_eject kwargs
+static PyObject *
+_wrap_g_volume_eject(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:Volume.eject",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_volume_eject(G_VOLUME(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GVolume.tp_repr
+static PyObject *
+_wrap_g_volume_tp_repr(PyGObject *self)
+{
+ char *name = g_volume_get_name(G_VOLUME(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (name) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
+ g_free(name);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_volume_enumerate_identifiers noargs
+static PyObject *
+_wrap_g_volume_enumerate_identifiers (PyGObject *self)
+{
+ char **ids;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ ids = g_volume_enumerate_identifiers(G_VOLUME (self->obj));
+
+ pyg_end_allow_threads;
+
+ if (ids && ids[0] != NULL) {
+ ret = strv_to_pylist(ids);
+ g_strfreev (ids);
+ } else {
+ ret = Py_None;
+ Py_INCREF(ret);
+ }
+ return ret;
+}
+%%
+override g_volume_eject_with_operation kwargs
+static PyObject *
+_wrap_g_volume_eject_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Volume.eject_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_volume_eject_with_operation(G_VOLUME(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gvolumemonitor.override b/gio/gvolumemonitor.override
new file mode 100644
index 0000000..4ffedf3
--- /dev/null
+++ b/gio/gvolumemonitor.override
@@ -0,0 +1,94 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gvolumemonitor.override: module overrides for GVolumeMonitor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override-slot GVolumeMonitor.tp_new
+static PyObject *
+_wrap_g_volume_monitor_tp_new(PyObject *type, PyObject *args, PyObject *kwargs)
+{
+ return pygobject_new(G_OBJECT(g_volume_monitor_get()));
+}
+%%
+override g_volume_monitor_get_connected_drives noargs
+static PyObject *
+_wrap_g_volume_monitor_get_connected_drives (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_volume_monitor_get_connected_drives (G_VOLUME_MONITOR (self->obj));
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GDrive *drive = l->data;
+ PyObject *item = pygobject_new((GObject *)drive);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(drive);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_volume_monitor_get_volumes noargs
+static PyObject *
+_wrap_g_volume_monitor_get_volumes (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_volume_monitor_get_volumes (G_VOLUME_MONITOR (self->obj));
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GVolume *volume = l->data;
+ PyObject *item = pygobject_new((GObject *)volume);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(volume);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_volume_monitor_get_mounts noargs
+static PyObject *
+_wrap_g_volume_monitor_get_mounts (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_volume_monitor_get_mounts (G_VOLUME_MONITOR (self->obj));
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GMount *mount = l->data;
+ PyObject *item = pygobject_new((GObject *)mount);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(mount);
+ }
+ g_list_free(list);
+
+ return ret;
+}
diff --git a/gio/pygio-utils.c b/gio/pygio-utils.c
new file mode 100644
index 0000000..be41453
--- /dev/null
+++ b/gio/pygio-utils.c
@@ -0,0 +1,208 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * giomodule.c: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygio-utils.h"
+
+/**
+ * pygio_check_cancellable:
+ * @pycancellable:
+ * @cancellable:
+ *
+ * Returns:
+ */
+gboolean
+pygio_check_cancellable(PyGObject *pycancellable,
+ GCancellable **cancellable)
+{
+ if (pycancellable == NULL || (PyObject*)pycancellable == Py_None)
+ *cancellable = NULL;
+ else if (pygobject_check(pycancellable, &PyGCancellable_Type))
+ *cancellable = G_CANCELLABLE(pycancellable->obj);
+ else
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "cancellable should be a gio.Cancellable");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
+ * pygio_check_launch_context:
+ * @pycontext:
+ * @context:
+ *
+ * Returns:
+ */
+gboolean
+pygio_check_launch_context(PyGObject *pycontext,
+ GAppLaunchContext **context)
+{
+ if (pycontext == NULL || (PyObject*)pycontext == Py_None)
+ *context = NULL;
+ else if (pygobject_check(pycontext, &PyGAppLaunchContext_Type))
+ *context = G_APP_LAUNCH_CONTEXT(pycontext->obj);
+ else
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "launch_context should be a GAppLaunchContext or None");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
+ * pygio_pylist_to_gfile_glist:
+ * @pyfile_list:
+ *
+ * Returns:
+ */
+GList *
+pygio_pylist_to_gfile_glist(PyObject *pyfile_list)
+{
+ GList *file_list = NULL;
+ PyObject *item;
+ int len, i;
+
+ len = PySequence_Size(pyfile_list);
+ for (i = 0; i < len; i++) {
+ item = PySequence_GetItem(pyfile_list, i);
+ if (!PyObject_TypeCheck(item, &PyGFile_Type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "files must be a list or tuple of GFile");
+ g_list_free(file_list);
+ return NULL;
+ }
+ file_list = g_list_prepend(file_list, ((PyGObject *)item)->obj);
+ }
+ file_list = g_list_reverse(file_list);
+
+ return file_list;
+}
+
+/**
+ * pygio_pylist_to_uri_glist:
+ * @pyfile_list:
+ *
+ * Returns:
+ */
+GList *
+pygio_pylist_to_uri_glist(PyObject *pyfile_list)
+{
+ GList *file_list = NULL;
+ PyObject *item;
+ int len, i;
+
+ len = PySequence_Size(pyfile_list);
+ for (i = 0; i < len; i++) {
+ item = PySequence_GetItem(pyfile_list, i);
+ if (!PyString_Check(item)) {
+ PyErr_SetString(PyExc_TypeError,
+ "files must be strings");
+ g_list_free(file_list);
+ return NULL;
+ }
+ file_list = g_list_prepend(file_list, PyString_AsString(item));
+ }
+ file_list = g_list_reverse(file_list);
+
+ return file_list;
+}
+
+/**
+ * strv_to_pylist:
+ * @strv: array of strings
+ *
+ * Returns: A python list of strings
+ */
+PyObject *
+strv_to_pylist (char **strv)
+{
+ gsize len, i;
+ PyObject *list;
+
+ len = strv ? g_strv_length (strv) : 0;
+ list = PyList_New (len);
+
+ for (i = 0; i < len; i++)
+ PyList_SetItem (list, i, PyString_FromString (strv[i]));
+
+ return list;
+}
+
+/**
+ * pylist_to_strv:
+ * @strvp: a pointer to an array where return strings.
+ *
+ * Returns: TRUE if the list of strings could be converted, FALSE otherwise.
+ */
+gboolean
+pylist_to_strv (PyObject *list,
+ char ***strvp)
+{
+ int i, len;
+ char **ret;
+
+ *strvp = NULL;
+
+ if (list == Py_None)
+ return TRUE;
+
+ if (!PySequence_Check (list))
+ {
+ PyErr_Format (PyExc_TypeError, "argument must be a list or tuple of strings");
+ return FALSE;
+ }
+
+ if ((len = PySequence_Size (list)) < 0)
+ return FALSE;
+
+ ret = g_new (char*, len + 1);
+ for (i = 0; i <= len; ++i)
+ ret[i] = NULL;
+
+ for (i = 0; i < len; ++i)
+ {
+ PyObject *item = PySequence_GetItem (list, i);
+
+ if (!item)
+ {
+ g_strfreev (ret);
+ return FALSE;
+ }
+
+ if (!PyString_Check (item))
+ {
+ Py_DECREF (item);
+ g_strfreev (ret);
+ PyErr_Format (PyExc_TypeError, "argument must be a list of strings");
+ return FALSE;
+ }
+
+ ret[i] = g_strdup (PyString_AsString (item));
+ Py_DECREF (item);
+ }
+
+ *strvp = ret;
+ return TRUE;
+}
diff --git a/gio/pygio-utils.h b/gio/pygio-utils.h
new file mode 100644
index 0000000..76bfde3
--- /dev/null
+++ b/gio/pygio-utils.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * giomodule.c: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGIO_UTILS_H__
+#define __PYGIO_UTILS_H__
+
+#define NO_IMPORT_PYGOBJECT
+#include <Python.h>
+#include <pygobject.h>
+#include <gio/gio.h>
+
+extern PyTypeObject PyGCancellable_Type;
+extern PyTypeObject PyGAppLaunchContext_Type;
+extern PyTypeObject PyGFile_Type;
+
+gboolean pygio_check_cancellable(PyGObject *pycancellable,
+ GCancellable **cancellable);
+
+gboolean pygio_check_launch_context(PyGObject *pycontext,
+ GAppLaunchContext **context);
+
+GList* pygio_pylist_to_gfile_glist(PyObject *pycontext);
+
+GList* pygio_pylist_to_uri_glist(PyObject *pycontext);
+
+PyObject* strv_to_pylist (char **strv);
+
+gboolean pylist_to_strv (PyObject *list, char ***strvp);
+
+#endif /* __PYGIO_UTILS_H__ */
diff --git a/gio/unix-types.defs b/gio/unix-types.defs
new file mode 100644
index 0000000..ed1ed9f
--- /dev/null
+++ b/gio/unix-types.defs
@@ -0,0 +1,55 @@
+;; -*- scheme -*-
+
+(define-object Connection
+ (in-module "giounix")
+ (parent "GSocketConnection")
+ (c-name "GUnixConnection")
+ (gtype-id "G_TYPE_UNIX_CONNECTION")
+)
+
+(define-object DesktopAppInfo
+ (docstring
+ "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n"
+ "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n"
+ "based on desktop files."
+ )
+ (in-module "giounix")
+ (parent "GObject")
+ (c-name "GDesktopAppInfo")
+ (gtype-id "G_TYPE_DESKTOP_APP_INFO")
+)
+
+(define-object FDMessage
+ (in-module "giounix")
+ (parent "GSocketControlMessage")
+ (c-name "GUnixFDMessage")
+ (gtype-id "G_TYPE_UNIX_FD_MESSAGE")
+)
+
+(define-object InputStream
+ (in-module "giounix")
+ (parent "GInputStream")
+ (c-name "GUnixInputStream")
+ (gtype-id "G_TYPE_UNIX_INPUT_STREAM")
+)
+
+(define-object OutputStream
+ (in-module "giounix")
+ (parent "GOutputStream")
+ (c-name "GUnixOutputStream")
+ (gtype-id "G_TYPE_UNIX_OUTPUT_STREAM")
+)
+
+(define-pointer MountEntry
+ (in-module "giounix")
+ (c-name "GUnixMountEntry")
+ (gtype-id "GIO_UNIX_MOUNT_ENTRY_TYPE")
+)
+
+(define-object SocketAddress
+ (in-module "giounix")
+ (parent "GSocketAddress")
+ (c-name "GUnixSocketAddress")
+ (gtype-id "G_TYPE_UNIX_SOCKET_ADDRESS")
+)
+
diff --git a/gio/unix.defs b/gio/unix.defs
new file mode 100644
index 0000000..ff43ed6
--- /dev/null
+++ b/gio/unix.defs
@@ -0,0 +1,475 @@
+;; -*- scheme -*-
+
+(include "unix-types.defs")
+
+;; From gunixconnection.h
+
+(define-function g_unix_connection_get_type
+ (c-name "g_unix_connection_get_type")
+ (return-type "GType")
+)
+
+(define-method send_fd
+ (of-object "GUnixConnection")
+ (c-name "g_unix_connection_send_fd")
+ (return-type "gboolean")
+ (parameters
+ '("gint" "fd")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-method receive_fd
+ (of-object "GUnixConnection")
+ (c-name "g_unix_connection_receive_fd")
+ (return-type "gint")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gdesktopappinfo.h
+
+(define-function desktop_app_info_get_type
+ (c-name "g_desktop_app_info_get_type")
+ (return-type "GType")
+)
+
+(define-function desktop_app_info_new_from_filename
+ (c-name "g_desktop_app_info_new_from_filename")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("const-char*" "filename")
+ )
+)
+
+(define-function g_desktop_app_info_new_from_keyfile
+ (c-name "g_desktop_app_info_new_from_keyfile")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("GKeyFile*" "key_file")
+ )
+)
+
+(define-function desktop_app_info_new
+ (c-name "g_desktop_app_info_new")
+ (is-constructor-of "GDesktopAppInfo")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("const-char*" "desktop_id")
+ )
+)
+
+(define-method get_is_hidden
+ (of-object "GDesktopAppInfo")
+ (c-name "g_desktop_app_info_get_is_hidden")
+ (return-type "gboolean")
+)
+
+(define-function desktop_app_info_set_desktop_env
+ (c-name "g_desktop_app_info_set_desktop_env")
+ (return-type "none")
+ (parameters
+ '("const-char*" "desktop_env")
+ )
+)
+
+
+
+;; From gunixfdmessage.h
+
+(define-function g_unix_fd_message_get_type
+ (c-name "g_unix_fd_message_get_type")
+ (return-type "GType")
+)
+
+(define-function g_unix_fd_message_new
+ (c-name "g_unix_fd_message_new")
+ (is-constructor-of "GUnixFdMessage")
+ (return-type "GSocketControlMessage*")
+)
+
+(define-method steal_fds
+ (of-object "GUnixFDMessage")
+ (c-name "g_unix_fd_message_steal_fds")
+ (return-type "gint*")
+ (parameters
+ '("gint*" "length")
+ )
+)
+
+(define-method append_fd
+ (of-object "GUnixFDMessage")
+ (c-name "g_unix_fd_message_append_fd")
+ (return-type "gboolean")
+ (parameters
+ '("gint" "fd")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gunixmounts.h
+
+(define-function unix_mount_free
+ (c-name "g_unix_mount_free")
+ (return-type "none")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-method free
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_free")
+ (return-type "none")
+)
+
+(define-function unix_mount_compare
+ (c-name "g_unix_mount_compare")
+ (return-type "gint")
+ (parameters
+ '("GUnixMountEntry*" "mount1")
+ '("GUnixMountEntry*" "mount2")
+ )
+)
+
+(define-function unix_mount_get_mount_path
+ (c-name "g_unix_mount_get_mount_path")
+ (return-type "const-char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_get_device_path
+ (c-name "g_unix_mount_get_device_path")
+ (return-type "const-char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_get_fs_type
+ (c-name "g_unix_mount_get_fs_type")
+ (return-type "const-char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_is_readonly
+ (c-name "g_unix_mount_is_readonly")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_is_system_internal
+ (c-name "g_unix_mount_is_system_internal")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_can_eject
+ (c-name "g_unix_mount_guess_can_eject")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_should_display
+ (c-name "g_unix_mount_guess_should_display")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_name
+ (c-name "g_unix_mount_guess_name")
+ (return-type "char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_icon
+ (c-name "g_unix_mount_guess_icon")
+ (return-type "GIcon*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-method compare
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_compare")
+ (return-type "gint")
+ (parameters
+ '("GUnixMountPoint*" "mount2")
+ )
+)
+
+(define-method get_mount_path
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_get_mount_path")
+ (return-type "const-char*")
+)
+
+(define-method get_device_path
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_get_device_path")
+ (return-type "const-char*")
+)
+
+(define-method get_fs_type
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_get_fs_type")
+ (return-type "const-char*")
+)
+
+(define-method is_readonly
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_is_readonly")
+ (return-type "gboolean")
+)
+
+(define-method is_user_mountable
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_is_user_mountable")
+ (return-type "gboolean")
+)
+
+(define-method is_loopback
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_is_loopback")
+ (return-type "gboolean")
+)
+
+(define-method guess_can_eject
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_guess_can_eject")
+ (return-type "gboolean")
+)
+
+(define-method guess_name
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_guess_name")
+ (return-type "char*")
+)
+
+(define-method guess_icon
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_guess_icon")
+ (return-type "GIcon*")
+)
+
+(define-function unix_mount_points_get
+ (c-name "g_unix_mount_points_get")
+ (return-type "GList*")
+ (parameters
+ '("guint64*" "time_read")
+ )
+)
+
+(define-function unix_mounts_get
+ (c-name "g_unix_mounts_get")
+ (return-type "GList*")
+ (parameters
+ '("guint64*" "time_read")
+ )
+)
+
+(define-function unix_mount_at
+ (c-name "g_unix_mount_at")
+ (return-type "GUnixMountEntry*")
+ (parameters
+ '("const-char*" "mount_path")
+ '("guint64*" "time_read")
+ )
+)
+
+(define-function unix_mounts_changed_since
+ (c-name "g_unix_mounts_changed_since")
+ (return-type "gboolean")
+ (parameters
+ '("guint64" "time")
+ )
+)
+
+(define-function unix_mount_points_changed_since
+ (c-name "g_unix_mount_points_changed_since")
+ (return-type "gboolean")
+ (parameters
+ '("guint64" "time")
+ )
+)
+
+(define-function unix_mount_monitor_get_type
+ (c-name "g_unix_mount_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_mount_monitor_new
+ (c-name "g_unix_mount_monitor_new")
+ (is-constructor-of "GUnixMountMonitor")
+ (return-type "GUnixMountMonitor*")
+)
+
+(define-method set_rate_limit
+ (of-object "GUnixMountMonitor")
+ (c-name "g_unix_mount_monitor_set_rate_limit")
+ (return-type "none")
+ (parameters
+ '("int" "limit_msec")
+ )
+)
+
+(define-function unix_is_mount_path_system_internal
+ (c-name "g_unix_is_mount_path_system_internal")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "mount_path")
+ )
+)
+
+
+
+;; From gunixinputstream.h
+
+(define-function unix_input_stream_get_type
+ (c-name "g_unix_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_input_stream_new
+ (c-name "g_unix_input_stream_new")
+ (is-constructor-of "GUnixInputStream")
+ (return-type "GInputStream*")
+ (parameters
+ '("int" "fd")
+ '("gboolean" "close_fd_at_close")
+ )
+)
+
+(define-method set_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method get_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_close_fd")
+ (return-type "gboolean")
+)
+
+(define-method get_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_fd")
+ (return-type "gint")
+)
+
+
+
+;; From gunixoutputstream.h
+
+(define-function unix_output_stream_get_type
+ (c-name "g_unix_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_output_stream_new
+ (c-name "g_unix_output_stream_new")
+ (is-constructor-of "GUnixOutputStream")
+ (return-type "GOutputStream*")
+ (parameters
+ '("int" "fd")
+ '("gboolean" "close_fd_at_close")
+ )
+)
+
+(define-method set_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method get_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_close_fd")
+ (return-type "gboolean")
+)
+
+(define-method get_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_fd")
+ (return-type "gint")
+)
+
+
+
+;; From gunixsocketaddress.h
+
+(define-function g_unix_socket_address_get_type
+ (c-name "g_unix_socket_address_get_type")
+ (return-type "GType")
+)
+
+(define-function g_unix_socket_address_new
+ (c-name "g_unix_socket_address_new")
+ (is-constructor-of "GUnixSocketAddress")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("const-gchar*" "path")
+ )
+)
+
+(define-function g_unix_socket_address_new_abstract
+ (c-name "g_unix_socket_address_new_abstract")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("const-gchar*" "path")
+ '("int" "path_len")
+ )
+)
+
+(define-method get_path
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_path")
+ (return-type "const-char*")
+)
+
+(define-method get_path_len
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_path_len")
+ (return-type "gsize")
+)
+
+(define-method get_is_abstract
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_is_abstract")
+ (return-type "gboolean")
+)
+
+(define-function g_unix_socket_address_abstract_names_supported
+ (c-name "g_unix_socket_address_abstract_names_supported")
+ (return-type "gboolean")
+)
+
diff --git a/gio/unix.override b/gio/unix.override
new file mode 100644
index 0000000..aebc6fc
--- /dev/null
+++ b/gio/unix.override
@@ -0,0 +1,62 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * unixmodule.c: module wrapping the GIO UNIX library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
+#include <gio/gunixinputstream.h>
+#include <gio/gunixmounts.h>
+#include <gio/gunixoutputstream.h>
+#define GIO_COMPILATION
+#include <gio/gunixconnection.h>
+#undef GIO_COMPILATION
+#include <gio/gunixfdmessage.h>
+#include <gio/gunixsocketaddress.h>
+
+#define GIO_UNIX_MOUNT_ENTRY_TYPE (_gio_unix_mount_entry_get_type ())
+
+static GType _gio_unix_mount_entry_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_pointer_type_register_static ("GUnixMountEntry");
+
+ return our_type;
+}
+
+%%
+modulename gio.unix
+%%
+import gobject.GObject as PyGObject_Type
+import gio.InputStream as PyGInputStream_Type
+import gio.OutputStream as PyGOutputStream_Type
+import gio.SocketAddress as PyGSocketAddress_Type
+import gio.Cancellable as PyGCancellable_Type
+import gio.SocketConnection as PyGSocketConnection_Type
+import gio.SocketControlMessage as PyGSocketControlMessage_Type
+%%
+ignore-glob
+ *_get_type
+%%
diff --git a/gio/unixmodule.c b/gio/unixmodule.c
new file mode 100644
index 0000000..7a49856
--- /dev/null
+++ b/gio/unixmodule.c
@@ -0,0 +1,52 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * unixmodule.c: module wrapping the GIO UNIX library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <Python.h>
+#include <pygobject.h>
+
+#include <gio/gio.h>
+
+/* include any extra headers needed here */
+
+void pyunix_register_classes(PyObject *d);
+void pyunix_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pyunix_functions[];
+
+DL_EXPORT(void)
+initunix(void)
+{
+ PyObject *m, *d;
+
+ /* perform any initialisation required by the library here */
+
+ m = Py_InitModule("gio.unix", pyunix_functions);
+ d = PyModule_GetDict(m);
+
+ init_pygobject();
+
+ pyunix_register_classes(d);
+
+}
+
diff --git a/glib/Makefile.am b/glib/Makefile.am
new file mode 100644
index 0000000..d230da4
--- /dev/null
+++ b/glib/Makefile.am
@@ -0,0 +1,59 @@
+AUTOMAKE_OPTIONS = 1.7
+INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
+
+pkgincludedir = $(includedir)/pygtk-2.0
+pkginclude_HEADERS = pyglib.h
+
+lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
+
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+
+pyglibdir = $(pkgpyexecdir)/glib
+pyglib_PYTHON = \
+ __init__.py \
+ option.py
+pyglib_LTLIBRARIES = _glib.la
+
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
+ pyglib.c \
+ pyglib.h \
+ pyglib-private.h \
+ pyglib-python-compat.h
+
+_glib_la_CFLAGS = $(GLIB_CFLAGS)
+_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
+_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
+_glib_la_SOURCES = \
+ glibmodule.c \
+ pygiochannel.c \
+ pygiochannel.h \
+ pygoptioncontext.c \
+ pygoptioncontext.h \
+ pygoptiongroup.c \
+ pygoptiongroup.h \
+ pygmaincontext.c \
+ pygmaincontext.h \
+ pygmainloop.c \
+ pygmainloop.h \
+ pygsource.c \
+ pygsource.h \
+ pygspawn.c \
+ pygspawn.h
+
+if PLATFORM_WIN32
+_glib_la_CFLAGS += -DPLATFORM_WIN32
+endif
+
+
+all: $(pyglib_LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(pyglib_LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
diff --git a/glib/Makefile.in b/glib/Makefile.in
new file mode 100644
index 0000000..634bdce
--- /dev/null
+++ b/glib/Makefile.in
@@ -0,0 +1,787 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@PLATFORM_WIN32_TRUE@am__append_2 = -DPLATFORM_WIN32
+subdir = glib
+DIST_COMMON = $(pkginclude_HEADERS) $(pyglib_PYTHON) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" \
+ "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pkgincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(pyglib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_glib_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ libpyglib-2.0-@PYTHON_BASENAME@.la
+am__glib_la_OBJECTS = _glib_la-glibmodule.lo _glib_la-pygiochannel.lo \
+ _glib_la-pygoptioncontext.lo _glib_la-pygoptiongroup.lo \
+ _glib_la-pygmaincontext.lo _glib_la-pygmainloop.lo \
+ _glib_la-pygsource.lo _glib_la-pygspawn.lo
+_glib_la_OBJECTS = $(am__glib_la_OBJECTS)
+_glib_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(_glib_la_CFLAGS) $(CFLAGS) \
+ $(_glib_la_LDFLAGS) $(LDFLAGS) -o $@
+libpyglib_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES = \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS = \
+ libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo
+libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS = \
+ $(am_libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_LINK = $(LIBTOOL) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(_glib_la_SOURCES) \
+ $(libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES)
+DIST_SOURCES = $(_glib_la_SOURCES) \
+ $(libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES)
+py_compile = $(top_srcdir)/py-compile
+HEADERS = $(pkginclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/pygtk-2.0
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
+pkginclude_HEADERS = pyglib.h
+lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
+pyglibdir = $(pkgpyexecdir)/glib
+pyglib_PYTHON = \
+ __init__.py \
+ option.py
+
+pyglib_LTLIBRARIES = _glib.la
+common_ldflags = -module -avoid-version $(am__append_1)
+libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
+ pyglib.c \
+ pyglib.h \
+ pyglib-private.h \
+ pyglib-python-compat.h
+
+_glib_la_CFLAGS = $(GLIB_CFLAGS) $(am__append_2)
+_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
+_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
+_glib_la_SOURCES = \
+ glibmodule.c \
+ pygiochannel.c \
+ pygiochannel.h \
+ pygoptioncontext.c \
+ pygoptioncontext.h \
+ pygoptiongroup.c \
+ pygoptiongroup.h \
+ pygmaincontext.c \
+ pygmaincontext.h \
+ pygmainloop.c \
+ pygmainloop.h \
+ pygsource.c \
+ pygsource.h \
+ pygspawn.c \
+ pygspawn.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: $(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) --gnu glib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu glib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-pyglibLTLIBRARIES: $(pyglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pyglibdir)"
+ @list='$(pyglib_LTLIBRARIES)'; test -n "$(pyglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyglibdir)"; \
+ }
+
+uninstall-pyglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyglib_LTLIBRARIES)'; test -n "$(pyglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyglibdir)/$$f"; \
+ done
+
+clean-pyglibLTLIBRARIES:
+ -test -z "$(pyglib_LTLIBRARIES)" || rm -f $(pyglib_LTLIBRARIES)
+ @list='$(pyglib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+_glib.la: $(_glib_la_OBJECTS) $(_glib_la_DEPENDENCIES)
+ $(_glib_la_LINK) -rpath $(pyglibdir) $(_glib_la_OBJECTS) $(_glib_la_LIBADD) $(LIBS)
+libpyglib-2.0-@PYTHON_BASENAME@.la: $(libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES)
+ $(libpyglib_2_0_@PYTHON_BASENAME@_la_LINK) -rpath $(libdir) $(libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-glibmodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygiochannel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygmaincontext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygmainloop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygoptioncontext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygoptiongroup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygsource.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygspawn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+_glib_la-glibmodule.lo: glibmodule.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-glibmodule.lo -MD -MP -MF $(DEPDIR)/_glib_la-glibmodule.Tpo -c -o _glib_la-glibmodule.lo `test -f 'glibmodule.c' || echo '$(srcdir)/'`glibmodule.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-glibmodule.Tpo $(DEPDIR)/_glib_la-glibmodule.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glibmodule.c' object='_glib_la-glibmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-glibmodule.lo `test -f 'glibmodule.c' || echo '$(srcdir)/'`glibmodule.c
+
+_glib_la-pygiochannel.lo: pygiochannel.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygiochannel.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygiochannel.Tpo -c -o _glib_la-pygiochannel.lo `test -f 'pygiochannel.c' || echo '$(srcdir)/'`pygiochannel.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygiochannel.Tpo $(DEPDIR)/_glib_la-pygiochannel.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygiochannel.c' object='_glib_la-pygiochannel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygiochannel.lo `test -f 'pygiochannel.c' || echo '$(srcdir)/'`pygiochannel.c
+
+_glib_la-pygoptioncontext.lo: pygoptioncontext.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygoptioncontext.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygoptioncontext.Tpo -c -o _glib_la-pygoptioncontext.lo `test -f 'pygoptioncontext.c' || echo '$(srcdir)/'`pygoptioncontext.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygoptioncontext.Tpo $(DEPDIR)/_glib_la-pygoptioncontext.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygoptioncontext.c' object='_glib_la-pygoptioncontext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygoptioncontext.lo `test -f 'pygoptioncontext.c' || echo '$(srcdir)/'`pygoptioncontext.c
+
+_glib_la-pygoptiongroup.lo: pygoptiongroup.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygoptiongroup.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygoptiongroup.Tpo -c -o _glib_la-pygoptiongroup.lo `test -f 'pygoptiongroup.c' || echo '$(srcdir)/'`pygoptiongroup.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygoptiongroup.Tpo $(DEPDIR)/_glib_la-pygoptiongroup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygoptiongroup.c' object='_glib_la-pygoptiongroup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygoptiongroup.lo `test -f 'pygoptiongroup.c' || echo '$(srcdir)/'`pygoptiongroup.c
+
+_glib_la-pygmaincontext.lo: pygmaincontext.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygmaincontext.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygmaincontext.Tpo -c -o _glib_la-pygmaincontext.lo `test -f 'pygmaincontext.c' || echo '$(srcdir)/'`pygmaincontext.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygmaincontext.Tpo $(DEPDIR)/_glib_la-pygmaincontext.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygmaincontext.c' object='_glib_la-pygmaincontext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygmaincontext.lo `test -f 'pygmaincontext.c' || echo '$(srcdir)/'`pygmaincontext.c
+
+_glib_la-pygmainloop.lo: pygmainloop.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygmainloop.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygmainloop.Tpo -c -o _glib_la-pygmainloop.lo `test -f 'pygmainloop.c' || echo '$(srcdir)/'`pygmainloop.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygmainloop.Tpo $(DEPDIR)/_glib_la-pygmainloop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygmainloop.c' object='_glib_la-pygmainloop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygmainloop.lo `test -f 'pygmainloop.c' || echo '$(srcdir)/'`pygmainloop.c
+
+_glib_la-pygsource.lo: pygsource.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygsource.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygsource.Tpo -c -o _glib_la-pygsource.lo `test -f 'pygsource.c' || echo '$(srcdir)/'`pygsource.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygsource.Tpo $(DEPDIR)/_glib_la-pygsource.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygsource.c' object='_glib_la-pygsource.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygsource.lo `test -f 'pygsource.c' || echo '$(srcdir)/'`pygsource.c
+
+_glib_la-pygspawn.lo: pygspawn.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygspawn.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygspawn.Tpo -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo '$(srcdir)/'`pygspawn.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_glib_la-pygspawn.Tpo $(DEPDIR)/_glib_la-pygspawn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygspawn.c' object='_glib_la-pygspawn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo '$(srcdir)/'`pygspawn.c
+
+libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo: pyglib.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -MT libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo -MD -MP -MF $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo -c -o libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pyglib.c' object='libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -c -o libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-pyglibPYTHON: $(pyglib_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pyglibdir)"
+ @list='$(pyglib_PYTHON)'; dlist=; list2=; test -n "$(pyglibdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyglibdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pyglibdir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyglibdir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyglibdir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-pyglibPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyglib_PYTHON)'; test -n "$(pyglibdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pyglibdir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(pyglibdir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(pyglibdir)" && rm -f $$fileso
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+ done
+
+uninstall-pkgincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pkgincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
+ clean-pyglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS install-pyglibLTLIBRARIES \
+ install-pyglibPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \
+ uninstall-pyglibLTLIBRARIES uninstall-pyglibPYTHON
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-local \
+ clean-pyglibLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-pdf install-pdf-am \
+ install-pkgincludeHEADERS install-ps install-ps-am \
+ install-pyglibLTLIBRARIES install-pyglibPYTHON install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES \
+ uninstall-pkgincludeHEADERS uninstall-pyglibLTLIBRARIES \
+ uninstall-pyglibPYTHON
+
+
+all: $(pyglib_LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(pyglib_LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/glib/__init__.py b/glib/__init__.py
new file mode 100644
index 0000000..b114cb9
--- /dev/null
+++ b/glib/__init__.py
@@ -0,0 +1,25 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006-2008 Johan Dahlin
+#
+# glib/__init__.py: initialisation file for glib module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+from glib._glib import *
+_PyGLib_API = _glib._PyGLib_API
+
+del _glib
diff --git a/glib/glibmodule.c b/glib/glibmodule.c
new file mode 100644
index 0000000..f794d5d
--- /dev/null
+++ b/glib/glibmodule.c
@@ -0,0 +1,896 @@
+/* -*- Mode: C; c-set-style: python; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * glibmodule.c: wrapper for the glib library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Python.h>
+#include <glib.h>
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygiochannel.h"
+#include "pygmaincontext.h"
+#include "pygmainloop.h"
+#include "pygoptioncontext.h"
+#include "pygoptiongroup.h"
+#include "pygsource.h"
+#include "pygspawn.h"
+
+#define PYGLIB_MAJOR_VERSION PYGOBJECT_MAJOR_VERSION
+#define PYGLIB_MINOR_VERSION PYGOBJECT_MINOR_VERSION
+#define PYGLIB_MICRO_VERSION PYGOBJECT_MICRO_VERSION
+
+
+/* ---------------- glib module functions -------------------- */
+
+struct _PyGChildData {
+ PyObject *func;
+ PyObject *data;
+};
+
+static gint
+get_handler_priority(gint *priority, PyObject *kwargs)
+{
+ Py_ssize_t len, pos;
+ PyObject *key, *val;
+
+ /* no keyword args? leave as default */
+ if (kwargs == NULL) return 0;
+
+ len = PyDict_Size(kwargs);
+ if (len == 0) return 0;
+
+ if (len != 1) {
+ PyErr_SetString(PyExc_TypeError,
+ "expecting at most one keyword argument");
+ return -1;
+ }
+ pos = 0;
+ PyDict_Next(kwargs, &pos, &key, &val);
+ if (!_PyUnicode_Check(key)) {
+ PyErr_SetString(PyExc_TypeError,
+ "keyword argument name is not a string");
+ return -1;
+ }
+
+ if (strcmp(_PyUnicode_AsString(key), "priority") != 0) {
+ PyErr_SetString(PyExc_TypeError,
+ "only 'priority' keyword argument accepted");
+ return -1;
+ }
+
+ *priority = _PyLong_AsLong(val);
+ if (PyErr_Occurred()) {
+ PyErr_Clear();
+ PyErr_SetString(PyExc_ValueError, "could not get priority value");
+ return -1;
+ }
+ return 0;
+}
+
+static PyObject *
+pyglib_threads_init(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+ if (!pyglib_enable_threads())
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyglib_idle_add(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *first, *callback, *cbargs = NULL, *data;
+ gint len, priority = G_PRIORITY_DEFAULT_IDLE;
+ guint handler_id;
+
+ len = PyTuple_Size(args);
+ if (len < 1) {
+ PyErr_SetString(PyExc_TypeError,
+ "idle_add requires at least 1 argument");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 1);
+ if (!PyArg_ParseTuple(first, "O:idle_add", &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "first argument not callable");
+ return NULL;
+ }
+ if (get_handler_priority(&priority, kwargs) < 0)
+ return NULL;
+
+ cbargs = PySequence_GetSlice(args, 1, len);
+ if (cbargs == NULL)
+ return NULL;
+
+ data = Py_BuildValue("(ON)", callback, cbargs);
+ if (data == NULL)
+ return NULL;
+ handler_id = g_idle_add_full(priority,
+ _pyglib_handler_marshal, data,
+ _pyglib_destroy_notify);
+ return _PyLong_FromLong(handler_id);
+}
+
+
+static PyObject *
+pyglib_timeout_add(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *first, *callback, *cbargs = NULL, *data;
+ gint len, priority = G_PRIORITY_DEFAULT;
+ guint interval, handler_id;
+
+ len = PyTuple_Size(args);
+ if (len < 2) {
+ PyErr_SetString(PyExc_TypeError,
+ "timeout_add requires at least 2 args");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 2);
+ if (!PyArg_ParseTuple(first, "IO:timeout_add", &interval, &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second argument not callable");
+ return NULL;
+ }
+ if (get_handler_priority(&priority, kwargs) < 0)
+ return NULL;
+
+ cbargs = PySequence_GetSlice(args, 2, len);
+ if (cbargs == NULL)
+ return NULL;
+
+ data = Py_BuildValue("(ON)", callback, cbargs);
+ if (data == NULL)
+ return NULL;
+ handler_id = g_timeout_add_full(priority, interval,
+ _pyglib_handler_marshal, data,
+ _pyglib_destroy_notify);
+ return _PyLong_FromLong(handler_id);
+}
+
+static PyObject *
+pyglib_timeout_add_seconds(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *first, *callback, *cbargs = NULL, *data;
+ gint len, priority = G_PRIORITY_DEFAULT;
+ guint interval, handler_id;
+
+ len = PyTuple_Size(args);
+ if (len < 2) {
+ PyErr_SetString(PyExc_TypeError,
+ "timeout_add_seconds requires at least 2 args");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 2);
+ if (!PyArg_ParseTuple(first, "IO:timeout_add_seconds", &interval, &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second argument not callable");
+ return NULL;
+ }
+ if (get_handler_priority(&priority, kwargs) < 0)
+ return NULL;
+
+ cbargs = PySequence_GetSlice(args, 2, len);
+ if (cbargs == NULL)
+ return NULL;
+
+ data = Py_BuildValue("(ON)", callback, cbargs);
+ if (data == NULL)
+ return NULL;
+ handler_id = g_timeout_add_seconds_full(priority, interval,
+ _pyglib_handler_marshal, data,
+ _pyglib_destroy_notify);
+ return _PyLong_FromLong(handler_id);
+}
+
+static gboolean
+iowatch_marshal(GIOChannel *source,
+ GIOCondition condition,
+ gpointer user_data)
+{
+ PyGILState_STATE state;
+ PyObject *tuple, *func, *firstargs, *args, *ret;
+ gboolean res;
+
+ g_return_val_if_fail(user_data != NULL, FALSE);
+
+ state = pyglib_gil_state_ensure();
+
+ tuple = (PyObject *)user_data;
+ func = PyTuple_GetItem(tuple, 0);
+
+ /* arg vector is (fd, condtion, *args) */
+ firstargs = Py_BuildValue("(Oi)", PyTuple_GetItem(tuple, 1), condition);
+ args = PySequence_Concat(firstargs, PyTuple_GetItem(tuple, 2));
+ Py_DECREF(firstargs);
+
+ ret = PyObject_CallObject(func, args);
+ Py_DECREF(args);
+ if (!ret) {
+ PyErr_Print();
+ res = FALSE;
+ } else {
+ if (ret == Py_None) {
+ if (PyErr_Warn(PyExc_Warning,
+ "glib.io_add_watch callback returned None; "
+ "should return True/False")) {
+ PyErr_Print();
+ }
+ }
+ res = PyObject_IsTrue(ret);
+ Py_DECREF(ret);
+ }
+
+ pyglib_gil_state_release(state);
+
+ return res;
+}
+
+static PyObject *
+pyglib_io_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *first, *pyfd, *callback, *cbargs = NULL, *data;
+ gint fd, priority = G_PRIORITY_DEFAULT, condition;
+ Py_ssize_t len;
+ GIOChannel *iochannel;
+ guint handler_id;
+
+ len = PyTuple_Size(args);
+ if (len < 3) {
+ PyErr_SetString(PyExc_TypeError,
+ "io_add_watch requires at least 3 args");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 3);
+ if (!PyArg_ParseTuple(first, "OiO:io_add_watch", &pyfd, &condition,
+ &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ fd = PyObject_AsFileDescriptor(pyfd);
+ if (fd < 0) {
+ return NULL;
+ }
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "third argument not callable");
+ return NULL;
+ }
+ if (get_handler_priority(&priority, kwargs) < 0)
+ return NULL;
+
+ cbargs = PySequence_GetSlice(args, 3, len);
+ if (cbargs == NULL)
+ return NULL;
+ data = Py_BuildValue("(OON)", callback, pyfd, cbargs);
+ if (data == NULL)
+ return NULL;
+ iochannel = g_io_channel_unix_new(fd);
+ handler_id = g_io_add_watch_full(iochannel, priority, condition,
+ iowatch_marshal, data,
+ (GDestroyNotify)_pyglib_destroy_notify);
+ g_io_channel_unref(iochannel);
+
+ return _PyLong_FromLong(handler_id);
+}
+
+static PyObject *
+pyglib_source_remove(PyObject *self, PyObject *args)
+{
+ guint tag;
+
+ if (!PyArg_ParseTuple(args, "i:source_remove", &tag))
+ return NULL;
+
+ return PyBool_FromLong(g_source_remove(tag));
+}
+
+static PyObject *
+pyglib_main_context_default(PyObject *unused)
+{
+ return pyglib_main_context_new(g_main_context_default());
+}
+
+static void
+child_watch_func(GPid pid, gint status, gpointer data)
+{
+ struct _PyGChildData *child_data = (struct _PyGChildData *) data;
+ PyObject *retval;
+ PyGILState_STATE gil;
+
+ gil = pyglib_gil_state_ensure();
+ if (child_data->data)
+ retval = PyObject_CallFunction(child_data->func, "iiO", pid, status,
+ child_data->data);
+ else
+ retval = PyObject_CallFunction(child_data->func, "ii", pid, status);
+
+ if (retval)
+ Py_DECREF(retval);
+ else
+ PyErr_Print();
+
+ pyglib_gil_state_release(gil);
+}
+
+static void
+child_watch_dnotify(gpointer data)
+{
+ struct _PyGChildData *child_data = (struct _PyGChildData *) data;
+ Py_DECREF(child_data->func);
+ Py_XDECREF(child_data->data);
+ g_slice_free(struct _PyGChildData, child_data);
+}
+
+
+static PyObject *
+pyglib_child_watch_add(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "pid", "function", "data", "priority", NULL };
+ guint id;
+ gint priority = G_PRIORITY_DEFAULT;
+ int pid;
+ PyObject *func, *user_data = NULL;
+ struct _PyGChildData *child_data;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "iO|Oi:glib.child_watch_add", kwlist,
+ &pid, &func, &user_data, &priority))
+ return NULL;
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError,
+ "glib.child_watch_add: second argument must be callable");
+ return NULL;
+ }
+
+ child_data = g_slice_new(struct _PyGChildData);
+ child_data->func = func;
+ child_data->data = user_data;
+ Py_INCREF(child_data->func);
+ if (child_data->data)
+ Py_INCREF(child_data->data);
+ id = g_child_watch_add_full(priority, pid, child_watch_func,
+ child_data, child_watch_dnotify);
+ return _PyLong_FromLong(id);
+}
+
+static PyObject *
+pyglib_markup_escape_text(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "text", NULL };
+ char *text_in, *text_out;
+ Py_ssize_t text_size;
+ PyObject *retval;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#:glib.markup_escape_text", kwlist,
+ &text_in, &text_size))
+ return NULL;
+
+ text_out = g_markup_escape_text(text_in, text_size);
+ retval = _PyUnicode_FromString(text_out);
+ g_free(text_out);
+ return retval;
+}
+
+static PyObject *
+pyglib_get_current_time(PyObject *unused)
+{
+ GTimeVal timeval;
+
+ g_get_current_time(&timeval);
+ return pyglib_float_from_timeval(timeval);
+}
+
+static PyObject*
+pyglib_get_user_cache_dir(PyObject *self)
+{
+ const char *path = g_get_user_cache_dir();
+
+ if (path)
+ return _PyUnicode_FromString(path);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+
+static PyObject*
+pyglib_get_user_config_dir(PyObject *self)
+{
+ const char *path = g_get_user_config_dir();
+
+ if (path)
+ return _PyUnicode_FromString(path);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+
+static PyObject*
+pyglib_get_user_data_dir(PyObject *self)
+{
+ const char *path = g_get_user_data_dir();
+
+ if (path)
+ return _PyUnicode_FromString(path);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+
+static PyObject *
+pyglib_get_user_special_dir(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "directory", NULL };
+ guint directory;
+ const char *path;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i:glib.get_user_special_dir", kwlist,
+ &directory))
+ return NULL;
+
+ path = g_get_user_special_dir(directory);
+ if (path)
+ return _PyUnicode_FromString(path);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+
+static PyObject *
+pyglib_main_depth(PyObject *unused)
+{
+ return _PyLong_FromLong(g_main_depth());
+}
+
+static PyObject *
+pyglib_filename_display_name(PyObject *self, PyObject *args)
+{
+ PyObject *py_display_name;
+ char *filename, *display_name;
+
+ if (!PyArg_ParseTuple(args, "s:glib.filename_display_name",
+ &filename))
+ return NULL;
+
+ display_name = g_filename_display_name(filename);
+ py_display_name = PyUnicode_DecodeUTF8(display_name,
+ strlen(display_name), NULL);
+ g_free(display_name);
+ return py_display_name;
+}
+
+static PyObject *
+pyglib_filename_display_basename(PyObject *self, PyObject *args)
+{
+ PyObject *py_display_basename;
+ char *filename, *display_basename;
+
+ if (!PyArg_ParseTuple(args, "s:glib.filename_display_basename",
+ &filename))
+ return NULL;
+
+ display_basename = g_filename_display_basename(filename);
+ py_display_basename = PyUnicode_DecodeUTF8(display_basename,
+ strlen(display_basename), NULL);
+ g_free(display_basename);
+ return py_display_basename;
+}
+
+static PyObject *
+pyglib_filename_from_utf8(PyObject *self, PyObject *args)
+{
+ char *filename, *utf8string;
+ Py_ssize_t utf8string_len;
+ gsize bytes_written;
+ GError *error = NULL;
+ PyObject *py_filename;
+
+ if (!PyArg_ParseTuple(args, "s#:glib.filename_from_utf8",
+ &utf8string, &utf8string_len))
+ return NULL;
+
+ filename = g_filename_from_utf8(utf8string, utf8string_len,
+ NULL, &bytes_written, &error);
+ if (pyglib_error_check(&error)) {
+ g_free(filename);
+ return NULL;
+ }
+ py_filename = _PyUnicode_FromStringAndSize(filename, bytes_written);
+ g_free(filename);
+ return py_filename;
+}
+
+
+static PyObject*
+pyglib_get_application_name(PyObject *self)
+{
+ const char *name;
+
+ name = g_get_application_name();
+ if (!name) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return _PyUnicode_FromString(name);
+}
+
+static PyObject*
+pyglib_set_application_name(PyObject *self, PyObject *arg)
+{
+ if (!PyString_Check(arg)) {
+ PyErr_Format(PyExc_TypeError,
+ "first argument must be a string, not '%s'",
+ PyString_AS_STRING(PyObject_Repr(arg)));
+ return NULL;
+ }
+ g_set_application_name(PyString_AS_STRING(arg));
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject*
+pyglib_get_prgname(PyObject *self)
+{
+ char *name;
+
+ name = g_get_prgname();
+ if (!name) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return _PyUnicode_FromString(name);
+}
+
+static PyObject*
+pyglib_set_prgname(PyObject *self, PyObject *arg)
+{
+ if (!PyString_Check(arg)) {
+ PyErr_Format(PyExc_TypeError,
+ "first argument must be a string, not '%s'",
+ PyString_AS_STRING(PyObject_Repr(arg)));
+ return NULL;
+ }
+ g_set_prgname(PyString_AS_STRING(arg));
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyglib_find_program_in_path(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "program", NULL };
+ char *program, *ret;
+ PyObject *retval;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:glib.find_program_in_path", kwlist,
+ &program))
+ return NULL;
+
+ ret = g_find_program_in_path(program);
+ retval = _PyUnicode_FromString(ret);
+ g_free(ret);
+ return retval;
+}
+
+static PyMethodDef _glib_functions[] = {
+ { "threads_init",
+ (PyCFunction) pyglib_threads_init, METH_NOARGS,
+ "threads_init()\n"
+ "Initialize GLib for use from multiple threads. If you also use GTK+\n"
+ "itself (i.e. GUI, not just PyGObject), use gtk.gdk.threads_init()\n"
+ "instead." },
+ { "idle_add",
+ (PyCFunction)pyglib_idle_add, METH_VARARGS|METH_KEYWORDS,
+ "idle_add(callable, user_data=None, priority=None) -> source id\n"
+ " callable receives (user_data)\n"
+ "Adds a callable to be called whenever there are no higher priority\n"
+ "events pending to the default main loop." },
+ { "timeout_add",
+ (PyCFunction)pyglib_timeout_add, METH_VARARGS|METH_KEYWORDS,
+ "timeout_add(interval, callable, user_data=None,\n"
+ " priority=None) -> source id\n"
+ " callable receives (user_data)\n"
+ "Sets a callable be called repeatedly until it returns False." },
+ { "timeout_add_seconds",
+ (PyCFunction)pyglib_timeout_add_seconds, METH_VARARGS|METH_KEYWORDS,
+ "timeout_add(interval, callable, user_data=None,\n"
+ " priority=None) -> source_id\n"
+ " callable receives (user_data)\n"
+ "Sets a callable be called repeatedly until it returns False.\n"
+ "Use this if you want to have a timer in the \"seconds\" range\n"
+ "and do not care about the exact time of the first call of the\n"
+ "timer, use this for more efficient system power usage." },
+ { "io_add_watch",
+ (PyCFunction)pyglib_io_add_watch, METH_VARARGS|METH_KEYWORDS,
+ "io_add_watch(fd, condition, callback, user_data=None) -> source id\n"
+ " callable receives (fd, condition, user_data)\n"
+ "Arranges for the fd to be monitored by the main loop for the\n"
+ "specified condition. Condition is a combination of glib.IO_IN,\n"
+ "glib.IO_OUT, glib.IO_PRI, gio.IO_ERR and gio.IO_HUB.\n" },
+ { "child_watch_add",
+ (PyCFunction)pyglib_child_watch_add, METH_VARARGS|METH_KEYWORDS,
+ "child_watch_add(pid, callable, user_data=None,\n"
+ "priority=None) -> source id\n"
+ " callable receives (pid, condition, user_data)\n"
+ "Sets the function specified by function to be called with the user\n"
+ "data specified by data when the child indicated by pid exits.\n"
+ "Condition is a combination of glib.IO_IN, glib.IO_OUT, glib.IO_PRI,\n"
+ "gio.IO_ERR and gio.IO_HUB." },
+ { "source_remove",
+ (PyCFunction)pyglib_source_remove, METH_VARARGS,
+ "source_remove(source_id) -> True if removed\n"
+ "Removes the event source specified by source id as returned by the\n"
+ "glib.idle_add(), glib.timeout_add() or glib.io_add_watch()\n"
+ "functions." },
+ { "spawn_async",
+ (PyCFunction)pyglib_spawn_async, METH_VARARGS|METH_KEYWORDS,
+ "spawn_async(argv, envp=None, working_directory=None,\n"
+ " flags=0, child_setup=None, user_data=None,\n"
+ " standard_input=None, standard_output=None,\n"
+ " standard_error=None) -> (pid, stdin, stdout, stderr)\n"
+ "Execute a child program asynchronously within a glib.MainLoop()\n"
+ "See the reference manual for a complete reference." },
+ { "main_context_default",
+ (PyCFunction)pyglib_main_context_default, METH_NOARGS,
+ "main_context_default() -> a main context\n"
+ "Returns the default main context. This is the main context used\n"
+ "for main loop functions when a main loop is not explicitly specified." },
+ { "main_depth",
+ (PyCFunction)pyglib_main_depth, METH_NOARGS,
+ "main_depth() -> stack depth\n"
+ "Returns the depth of the stack of calls in the main context." },
+ { "filename_display_name",
+ (PyCFunction)pyglib_filename_display_name, METH_VARARGS },
+ { "filename_display_basename",
+ (PyCFunction)pyglib_filename_display_basename, METH_VARARGS },
+ { "filename_from_utf8",
+ (PyCFunction)pyglib_filename_from_utf8, METH_VARARGS },
+ { "get_application_name",
+ (PyCFunction)pyglib_get_application_name, METH_NOARGS },
+ { "set_application_name",
+ (PyCFunction)pyglib_set_application_name, METH_O },
+ { "get_prgname",
+ (PyCFunction)pyglib_get_prgname, METH_NOARGS },
+ { "set_prgname",
+ (PyCFunction)pyglib_set_prgname, METH_O },
+ { "get_current_time",
+ (PyCFunction)pyglib_get_current_time, METH_NOARGS },
+ { "get_user_cache_dir",
+ (PyCFunction)pyglib_get_user_cache_dir, METH_NOARGS },
+ { "get_user_config_dir",
+ (PyCFunction)pyglib_get_user_config_dir, METH_NOARGS },
+ { "get_user_data_dir",
+ (PyCFunction)pyglib_get_user_data_dir, METH_NOARGS },
+ { "get_user_special_dir",
+ (PyCFunction)pyglib_get_user_special_dir, METH_VARARGS|METH_KEYWORDS },
+ { "markup_escape_text",
+ (PyCFunction)pyglib_markup_escape_text, METH_VARARGS|METH_KEYWORDS },
+ { "find_program_in_path",
+ (PyCFunction)pyglib_find_program_in_path, METH_VARARGS|METH_KEYWORDS },
+ { NULL, NULL, 0 }
+};
+
+/* ----------------- glib module initialisation -------------- */
+
+static struct _PyGLib_Functions pyglib_api = {
+ FALSE, /* threads_enabled */
+ NULL, /* gerror_exception */
+ NULL, /* block_threads */
+ NULL /* unblock_threads */
+};
+
+static void
+pyglib_register_api(PyObject *d)
+{
+ PyObject *o;
+
+ /* for addon libraries ... */
+ PyDict_SetItemString(d, "_PyGLib_API",
+ o=PyCObject_FromVoidPtr(&pyglib_api,NULL));
+ Py_DECREF(o);
+
+ pyglib_init_internal(o);
+}
+
+static void
+pyglib_register_error(PyObject *d)
+{
+ PyObject *dict;
+ PyObject *gerror_class;
+ dict = PyDict_New();
+ /* This is a hack to work around the deprecation warning of
+ * BaseException.message in Python 2.6+.
+ * GError has also an "message" attribute.
+ */
+ PyDict_SetItemString(dict, "message", Py_None);
+ gerror_class = PyErr_NewException("glib.GError", PyExc_RuntimeError, dict);
+ Py_DECREF(dict);
+
+ PyDict_SetItemString(d, "GError", gerror_class);
+ pyglib_api.gerror_exception = gerror_class;
+}
+
+static void
+pyglib_register_version_tuples(PyObject *d)
+{
+ PyObject *o;
+
+ /* glib version */
+ o = Py_BuildValue("(iii)", glib_major_version, glib_minor_version,
+ glib_micro_version);
+ PyDict_SetItemString(d, "glib_version", o);
+ Py_DECREF(o);
+
+ /* pyglib version */
+ o = Py_BuildValue("(iii)",
+ PYGLIB_MAJOR_VERSION,
+ PYGLIB_MINOR_VERSION,
+ PYGLIB_MICRO_VERSION);
+ PyDict_SetItemString(d, "pyglib_version", o);
+ Py_DECREF(o);
+}
+
+static void
+pyglib_register_constants(PyObject *m)
+{
+ PyModule_AddIntConstant(m, "SPAWN_LEAVE_DESCRIPTORS_OPEN",
+ G_SPAWN_LEAVE_DESCRIPTORS_OPEN);
+ PyModule_AddIntConstant(m, "SPAWN_DO_NOT_REAP_CHILD",
+ G_SPAWN_DO_NOT_REAP_CHILD);
+ PyModule_AddIntConstant(m, "SPAWN_SEARCH_PATH",
+ G_SPAWN_SEARCH_PATH);
+ PyModule_AddIntConstant(m, "SPAWN_STDOUT_TO_DEV_NULL",
+ G_SPAWN_STDOUT_TO_DEV_NULL);
+ PyModule_AddIntConstant(m, "SPAWN_STDERR_TO_DEV_NULL",
+ G_SPAWN_STDERR_TO_DEV_NULL);
+ PyModule_AddIntConstant(m, "SPAWN_CHILD_INHERITS_STDIN",
+ G_SPAWN_CHILD_INHERITS_STDIN);
+ PyModule_AddIntConstant(m, "SPAWN_FILE_AND_ARGV_ZERO",
+ G_SPAWN_FILE_AND_ARGV_ZERO);
+
+ PyModule_AddIntConstant(m, "PRIORITY_HIGH",
+ G_PRIORITY_HIGH);
+ PyModule_AddIntConstant(m, "PRIORITY_DEFAULT",
+ G_PRIORITY_DEFAULT);
+ PyModule_AddIntConstant(m, "PRIORITY_HIGH_IDLE",
+ G_PRIORITY_HIGH_IDLE);
+ PyModule_AddIntConstant(m, "PRIORITY_DEFAULT_IDLE",
+ G_PRIORITY_DEFAULT_IDLE);
+ PyModule_AddIntConstant(m, "PRIORITY_LOW",
+ G_PRIORITY_LOW);
+
+ PyModule_AddIntConstant(m, "IO_IN", G_IO_IN);
+ PyModule_AddIntConstant(m, "IO_OUT", G_IO_OUT);
+ PyModule_AddIntConstant(m, "IO_PRI", G_IO_PRI);
+ PyModule_AddIntConstant(m, "IO_ERR", G_IO_ERR);
+ PyModule_AddIntConstant(m, "IO_HUP", G_IO_HUP);
+ PyModule_AddIntConstant(m, "IO_NVAL", G_IO_NVAL);
+
+ PyModule_AddIntConstant(m, "IO_STATUS_ERROR",
+ G_IO_STATUS_ERROR);
+ PyModule_AddIntConstant(m, "IO_STATUS_NORMAL",
+ G_IO_STATUS_NORMAL);
+ PyModule_AddIntConstant(m, "IO_STATUS_EOF",
+ G_IO_STATUS_EOF);
+ PyModule_AddIntConstant(m, "IO_STATUS_AGAIN",
+ G_IO_STATUS_AGAIN);
+ PyModule_AddIntConstant(m, "IO_FLAG_APPEND",
+ G_IO_FLAG_APPEND);
+ PyModule_AddIntConstant(m, "IO_FLAG_NONBLOCK",
+ G_IO_FLAG_NONBLOCK);
+ PyModule_AddIntConstant(m, "IO_FLAG_IS_READABLE",
+ G_IO_FLAG_IS_READABLE);
+ PyModule_AddIntConstant(m, "IO_FLAG_IS_WRITEABLE",
+ G_IO_FLAG_IS_WRITEABLE);
+ PyModule_AddIntConstant(m, "IO_FLAG_IS_SEEKABLE",
+ G_IO_FLAG_IS_SEEKABLE);
+ PyModule_AddIntConstant(m, "IO_FLAG_MASK",
+ G_IO_FLAG_MASK);
+ PyModule_AddIntConstant(m, "IO_FLAG_GET_MASK",
+ G_IO_FLAG_GET_MASK);
+ PyModule_AddIntConstant(m, "IO_FLAG_SET_MASK",
+ G_IO_FLAG_SET_MASK);
+
+ PyModule_AddIntConstant(m, "OPTION_FLAG_HIDDEN",
+ G_OPTION_FLAG_HIDDEN);
+ PyModule_AddIntConstant(m, "OPTION_FLAG_IN_MAIN",
+ G_OPTION_FLAG_IN_MAIN);
+ PyModule_AddIntConstant(m, "OPTION_FLAG_REVERSE",
+ G_OPTION_FLAG_REVERSE);
+ PyModule_AddIntConstant(m, "OPTION_FLAG_NO_ARG",
+ G_OPTION_FLAG_NO_ARG);
+ PyModule_AddIntConstant(m, "OPTION_FLAG_FILENAME",
+ G_OPTION_FLAG_FILENAME);
+ PyModule_AddIntConstant(m, "OPTION_FLAG_OPTIONAL_ARG",
+ G_OPTION_FLAG_OPTIONAL_ARG);
+ PyModule_AddIntConstant(m, "OPTION_FLAG_NOALIAS",
+ G_OPTION_FLAG_NOALIAS);
+
+ PyModule_AddIntConstant(m, "OPTION_ERROR_UNKNOWN_OPTION",
+ G_OPTION_ERROR_UNKNOWN_OPTION);
+ PyModule_AddIntConstant(m, "OPTION_ERROR_BAD_VALUE",
+ G_OPTION_ERROR_BAD_VALUE);
+ PyModule_AddIntConstant(m, "OPTION_ERROR_FAILED",
+ G_OPTION_ERROR_FAILED);
+
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_DESKTOP",
+ G_USER_DIRECTORY_DESKTOP);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_DOCUMENTS",
+ G_USER_DIRECTORY_DOCUMENTS);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_DOWNLOAD",
+ G_USER_DIRECTORY_DOWNLOAD);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_MUSIC",
+ G_USER_DIRECTORY_MUSIC);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_PICTURES",
+ G_USER_DIRECTORY_PICTURES);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_PUBLIC_SHARE",
+ G_USER_DIRECTORY_PUBLIC_SHARE);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_TEMPLATES",
+ G_USER_DIRECTORY_TEMPLATES);
+ PyModule_AddIntConstant(m, "USER_DIRECTORY_VIDEOS",
+ G_USER_DIRECTORY_VIDEOS);
+
+ PyModule_AddStringConstant(m, "OPTION_REMAINING",
+ G_OPTION_REMAINING);
+ PyModule_AddStringConstant(m, "OPTION_ERROR",
+ (char*) g_quark_to_string(G_OPTION_ERROR));
+}
+
+PYGLIB_MODULE_START(_glib, "glib._glib")
+{
+ PyObject *d = PyModule_GetDict(module);
+
+ pyglib_register_constants(module);
+ pyglib_register_api(d);
+ pyglib_register_error(d);
+ pyglib_register_version_tuples(d);
+ pyglib_iochannel_register_types(d);
+ pyglib_mainloop_register_types(d);
+ pyglib_maincontext_register_types(d);
+ pyglib_source_register_types(d);
+ pyglib_spawn_register_types(d);
+ pyglib_option_context_register_types(d);
+ pyglib_option_group_register_types(d);
+}
+PYGLIB_MODULE_END
diff --git a/glib/option.py b/glib/option.py
new file mode 100644
index 0000000..027752f
--- /dev/null
+++ b/glib/option.py
@@ -0,0 +1,350 @@
+# -*- Mode: Python -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006 Johannes Hoelzl
+#
+# glib/option.py: GOption command line parser
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+"""GOption command line parser
+
+Extends optparse to use the GOptionGroup, GOptionEntry and GOptionContext
+objects. So it is possible to use the gtk, gnome_program and gstreamer command
+line groups and contexts.
+
+Use this interface instead of the raw wrappers of GOptionContext and
+GOptionGroup in glib.
+"""
+
+import sys
+import optparse
+from optparse import OptParseError, OptionError, OptionValueError, \
+ BadOptionError, OptionConflictError
+
+import glib
+_glib = sys.modules['glib._glib']
+
+__all__ = [
+ "OptParseError",
+ "OptionError",
+ "OptionValueError",
+ "BadOptionError",
+ "OptionConflictError"
+ "Option",
+ "OptionGroup",
+ "OptionParser",
+ "make_option",
+]
+
+class Option(optparse.Option):
+ """Represents a command line option
+
+ To use the extended possibilities of the GOption API Option
+ (and make_option) are extended with new types and attributes.
+
+ Types:
+ filename The supplied arguments are read as filename, GOption
+ parses this type in with the GLib filename encoding.
+
+ Attributes:
+ optional_arg This does not need a arguement, but it can be supplied.
+ hidden The help list does not show this option
+ in_main This option apears in the main group, this should only
+ be used for backwards compatibility.
+
+ Use Option.REMAINING as option name to get all positional arguments.
+
+ NOTE: Every argument to an option is passed as utf-8 coded string, the only
+ exception are options which use the 'filename' type, its arguments
+ are passed as strings in the GLib filename encoding.
+
+ For further help, see optparse.Option.
+ """
+ TYPES = optparse.Option.TYPES + (
+ 'filename',
+ )
+
+ ATTRS = optparse.Option.ATTRS + [
+ 'hidden',
+ 'in_main',
+ 'optional_arg',
+ ]
+
+ REMAINING = '--' + _glib.OPTION_REMAINING
+
+ def __init__(self, *args, **kwargs):
+ optparse.Option.__init__(self, *args, **kwargs)
+ if not self._long_opts:
+ raise ValueError("%s at least one long option name.")
+
+ if len(self._long_opts) < len(self._short_opts):
+ raise ValueError(
+ "%s at least more long option names than short option names.")
+
+ if not self.help:
+ raise ValueError("%s needs a help message.", self._long_opts[0])
+
+
+ def _set_opt_string(self, opts):
+ if self.REMAINING in opts:
+ self._long_opts.append(self.REMAINING)
+ optparse.Option._set_opt_string(self, opts)
+ if len(self._short_opts) > len(self._long_opts):
+ raise OptionError("goption.Option needs more long option names "
+ "than short option names")
+
+ def _to_goptionentries(self):
+ flags = 0
+
+ if self.hidden:
+ self.flags |= _glib.OPTION_FLAG_HIDDEN
+
+ if self.in_main:
+ self.flags |= _glib.OPTION_FLAG_IN_MAIN
+
+ if self.takes_value():
+ if self.optional_arg:
+ flags |= _glib.OPTION_FLAG_OPTIONAL_ARG
+ else:
+ flags |= _glib.OPTION_FLAG_NO_ARG
+
+ if self.type == 'filename':
+ flags |= _glib.OPTION_FLAG_FILENAME
+
+ for (long_name, short_name) in zip(self._long_opts, self._short_opts):
+ yield (long_name[2:], short_name[1], flags, self.help, self.metavar)
+
+ for long_name in self._long_opts[len(self._short_opts):]:
+ yield (long_name[2:], '\0', flags, self.help, self.metavar)
+
+class OptionGroup(optparse.OptionGroup):
+ """A group of command line options.
+
+ Arguements:
+ name: The groups name, used to create the
+ --help-{name} option
+ description: Shown as title of the groups help view
+ help_description: Shown as help to the --help-{name} option
+ option_list: The options used in this group, must be option.Option()
+ defaults: A dicitionary of default values
+ translation_domain: Sets the translation domain for gettext().
+
+ NOTE: This OptionGroup does not exactly map the optparse.OptionGroup
+ interface. There is no parser object to supply, but it is possible
+ to set default values and option_lists. Also the default values and
+ values are not shared with the OptionParser.
+
+ To pass a OptionGroup into a function which expects a GOptionGroup (e.g.
+ gnome_program_init() ). OptionGroup.get_option_group() can be used.
+
+ For further help, see optparse.OptionGroup.
+ """
+ def __init__(self, name, description, help_description="",
+ option_list=None, defaults=None,
+ translation_domain=None):
+ optparse.OptionContainer.__init__(self, Option, 'error', description)
+ self.name = name
+ self.parser = None
+ self.help_description = help_description
+ if defaults:
+ self.defaults = defaults
+
+ self.values = None
+
+ self.translation_domain = translation_domain
+
+ if option_list:
+ for option in option_list:
+ self.add_option(option)
+
+ def _create_option_list(self):
+ self.option_list = []
+ self._create_option_mappings()
+
+ def _to_goptiongroup(self, parser):
+ def callback(option_name, option_value, group):
+ if option_name.startswith('--'):
+ opt = self._long_opt[option_name]
+ else:
+ opt = self._short_opt[option_name]
+
+ try:
+ opt.process(option_name, option_value, self.values, parser)
+ except OptionValueError:
+ error = sys.exc_info()[1]
+ gerror = _glib.GError(str(error))
+ gerror.domain = _glib.OPTION_ERROR
+ gerror.code = _glib.OPTION_ERROR_BAD_VALUE
+ gerror.message = str(error)
+ raise gerror
+
+ group = _glib.OptionGroup(self.name, self.description,
+ self.help_description, callback)
+ if self.translation_domain:
+ group.set_translation_domain(self.translation_domain)
+
+ entries = []
+ for option in self.option_list:
+ entries.extend(option._to_goptionentries())
+ group.add_entries(entries)
+
+ return group
+
+ def get_option_group(self, parser = None):
+ """ Returns the corresponding GOptionGroup object.
+
+ Can be used as parameter for gnome_program_init(), gtk_init().
+ """
+ self.set_values_to_defaults()
+ return self._to_goptiongroup(parser)
+
+ def set_values_to_defaults(self):
+ for option in self.option_list:
+ default = self.defaults.get(option.dest)
+ if isinstance(default, basestring):
+ opt_str = option.get_opt_string()
+ self.defaults[option.dest] = option.check_value(
+ opt_str, default)
+ self.values = optparse.Values(self.defaults)
+
+class OptionParser(optparse.OptionParser):
+ """Command line parser with GOption support.
+
+ NOTE: The OptionParser interface is not the exactly the same as the
+ optparse.OptionParser interface. Especially the usage parameter
+ is only used to show the metavar of the arguements.
+
+ Attribues:
+ help_enabled: The --help, --help-all and --help-{group}
+ options are enabled (default).
+ ignore_unknown_options: Do not throw a exception when a option is not
+ knwon, the option will be in the result list.
+
+ OptionParser.add_option_group() does not only accept OptionGroup instances
+ but also glib.OptionGroup, which is returned by gtk_get_option_group().
+
+ Only glib.option.OptionGroup and glib.option.Option instances should
+ be passed as groups and options.
+
+ For further help, see optparse.OptionParser.
+ """
+
+ def __init__(self, *args, **kwargs):
+ if 'option_class' not in kwargs:
+ kwargs['option_class'] = Option
+ self.help_enabled = kwargs.pop('help_enabled', True)
+ self.ignore_unknown_options = kwargs.pop('ignore_unknown_options',
+ False)
+ optparse.OptionParser.__init__(self, add_help_option=False,
+ *args, **kwargs)
+
+ def set_usage(self, usage):
+ if usage is None:
+ self.usage = ''
+ elif usage.startswith("%prog"):
+ self.usage = usage[len("%prog"):]
+ else:
+ self.usage = usage
+
+ def _to_goptioncontext(self, values):
+ if self.description:
+ parameter_string = self.usage + " - " + self.description
+ else:
+ parameter_string = self.usage
+ context = _glib.OptionContext(parameter_string)
+ context.set_help_enabled(self.help_enabled)
+ context.set_ignore_unknown_options(self.ignore_unknown_options)
+
+ for option_group in self.option_groups:
+ if isinstance(option_group, _glib.OptionGroup):
+ g_group = option_group
+ else:
+ g_group = option_group.get_option_group(self)
+ context.add_group(g_group)
+
+ def callback(option_name, option_value, group):
+ if option_name.startswith('--'):
+ opt = self._long_opt[option_name]
+ else:
+ opt = self._short_opt[option_name]
+ opt.process(option_name, option_value, values, self)
+
+ main_group = _glib.OptionGroup(None, None, None, callback)
+ main_entries = []
+ for option in self.option_list:
+ main_entries.extend(option._to_goptionentries())
+ main_group.add_entries(main_entries)
+ context.set_main_group(main_group)
+
+ return context
+
+ def add_option_group(self, *args, **kwargs):
+ if isinstance(args[0], basestring):
+ optparse.OptionParser.add_option_group(self,
+ OptionGroup(self, *args, **kwargs))
+ return
+ elif len(args) == 1 and not kwargs:
+ if isinstance(args[0], OptionGroup):
+ if not args[0].parser:
+ args[0].parser = self
+ if args[0].parser is not self:
+ raise ValueError("invalid OptionGroup (wrong parser)")
+ if isinstance(args[0], _glib.OptionGroup):
+ self.option_groups.append(args[0])
+ return
+ optparse.OptionParser.add_option_group(self, *args, **kwargs)
+
+ def _get_all_options(self):
+ options = self.option_list[:]
+ for group in self.option_groups:
+ if isinstance(group, optparse.OptionGroup):
+ options.extend(group.option_list)
+ return options
+
+ def _process_args(self, largs, rargs, values):
+ context = self._to_goptioncontext(values)
+
+ # _process_args() returns the remaining parameters in rargs.
+ # The prepended program name is used to all g_set_prgname()
+ # The program name is cut away so it doesn't appear in the result.
+ rargs[:] = context.parse([sys.argv[0]] + rargs)[1:]
+
+ def parse_args(self, args=None, values=None):
+ old_args = args or []
+ try:
+ options, args = optparse.OptionParser.parse_args(
+ self, args, values)
+ except _glib.GError:
+ error = sys.exc_info()[1]
+ if error.domain != _glib.OPTION_ERROR:
+ raise
+ if error.code == _glib.OPTION_ERROR_BAD_VALUE:
+ raise OptionValueError(error.message)
+ elif error.code == _glib.OPTION_ERROR_UNKNOWN_OPTION:
+ raise BadOptionError(error.message)
+ elif error.code == _glib.OPTION_ERROR_FAILED:
+ raise OptParseError(error.message)
+ else:
+ raise
+
+ for group in self.option_groups:
+ for key, value in group.values.__dict__.items():
+ options.ensure_value(key, value)
+
+ args = args[2:-len(old_args)]
+ return options, args
+
+make_option = Option
diff --git a/glib/pygiochannel.c b/glib/pygiochannel.c
new file mode 100644
index 0000000..4c935e8
--- /dev/null
+++ b/glib/pygiochannel.c
@@ -0,0 +1,740 @@
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include <structmember.h> /* for PyMemberDef */
+
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygsource.h"
+
+typedef struct {
+ PyObject_HEAD
+ GIOChannel *channel;
+ int softspace; /* to make print >> chan, "foo" ... work */
+} PyGIOChannel;
+
+PYGLIB_DEFINE_TYPE("glib.IOChannel", PyGIOChannel_Type, PyGIOChannel)
+
+static PyObject*
+py_io_channel_next(PyGIOChannel *self)
+{
+ PyObject* ret_obj = NULL;
+ gsize length = 0, terminator_pos;
+ gchar *str_return = NULL;
+ GError *error = NULL;
+ GIOStatus status;
+
+ status = g_io_channel_read_line(self->channel, &str_return, &length,
+ &terminator_pos, &error);
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ if (status == G_IO_STATUS_EOF) {
+ PyErr_SetString(PyExc_StopIteration, "EOF");
+ return NULL;
+ }
+
+ ret_obj = _PyUnicode_FromStringAndSize(str_return, length);
+ g_free(str_return);
+ return ret_obj;
+}
+
+static int
+py_io_channel_compare(PyGIOChannel *self, PyGIOChannel *v)
+{
+ if (self->channel == v->channel) return 0;
+ if (self->channel > v->channel) return -1;
+ return 1;
+}
+
+static PyObject*
+py_io_channel_get_iter(PyObject *self)
+{
+ Py_INCREF(self);
+ return self;
+}
+
+static long
+py_io_channel_hash(PyGIOChannel *self)
+{
+ return (long) self->channel;
+}
+
+static void
+py_io_channel_dealloc(PyGIOChannel *self)
+{
+ if (self->channel)
+ g_io_channel_unref(self->channel);
+ PyObject_DEL(self);
+}
+
+static PyObject*
+py_io_channel_shutdown(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "flush", NULL };
+ GIOStatus ret;
+ PyObject* flush = Py_True;
+ GError* error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:glib.IOChannel.shutdown", kwlist, &flush))
+ return NULL;
+
+ ret = g_io_channel_shutdown(self->channel, PyObject_IsTrue(flush), &error);
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ return _PyLong_FromLong(ret);
+}
+
+/* character encoding conversion involved functions.
+ */
+
+static PyObject*
+py_io_channel_set_buffer_size(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "size", NULL };
+ int size;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_buffer_size", kwlist, &size))
+ return NULL;
+
+ g_io_channel_set_buffer_size(self->channel, size);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_buffer_size(PyGIOChannel* self)
+{
+ return _PyLong_FromLong(g_io_channel_get_buffer_size(self->channel));
+}
+
+static PyObject*
+py_io_channel_set_buffered(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffered", NULL };
+ int buffered;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_buffered", kwlist, &buffered))
+ return NULL;
+
+ g_io_channel_set_buffered(self->channel, buffered);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_buffered(PyGIOChannel* self)
+{
+ return _PyLong_FromLong(g_io_channel_get_buffered(self->channel));
+}
+
+static PyObject*
+py_io_channel_set_encoding(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "encoding", NULL };
+ const char* encoding;
+ GError* error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "z:glib.IOChannel.set_encoding", kwlist, &encoding))
+ return NULL;
+
+ g_io_channel_set_encoding(self->channel, encoding, &error);
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_encoding(PyGIOChannel* self)
+{
+ const char* encoding = g_io_channel_get_encoding(self->channel);
+
+ if (encoding == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ return _PyUnicode_FromString(encoding);
+}
+
+#define CHUNK_SIZE (8 * 1024)
+
+static PyObject*
+py_io_channel_read_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "max_count", NULL };
+ int max_count = -1;
+ PyObject* ret_obj = NULL;
+ gsize total_read = 0;
+ GError* error = NULL;
+ GIOStatus status = G_IO_STATUS_NORMAL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.read", kwlist, &max_count))
+ return NULL;
+
+ if (max_count == 0)
+ return _PyUnicode_FromString("");
+
+ while (status == G_IO_STATUS_NORMAL
+ && (max_count == -1 || total_read < max_count)) {
+ gsize single_read;
+ char* buf;
+ gsize buf_size;
+
+ if (max_count == -1)
+ buf_size = CHUNK_SIZE;
+ else {
+ buf_size = max_count - total_read;
+ if (buf_size > CHUNK_SIZE)
+ buf_size = CHUNK_SIZE;
+ }
+
+ if ( ret_obj == NULL ) {
+ ret_obj = _PyUnicode_FromStringAndSize((char *)NULL, buf_size);
+ if (ret_obj == NULL)
+ goto failure;
+ }
+ else if (buf_size + total_read > _PyUnicode_GET_SIZE(ret_obj)) {
+ if (_PyUnicode_Resize(&ret_obj, buf_size + total_read) == -1)
+ goto failure;
+ }
+
+ buf = _PyUnicode_AS_STRING(ret_obj) + total_read;
+
+ pyglib_unblock_threads();
+ status = g_io_channel_read_chars(self->channel, buf, buf_size,
+ &single_read, &error);
+ pyglib_block_threads();
+ if (pyglib_error_check(&error))
+ goto failure;
+
+ total_read += single_read;
+ }
+
+ if ( total_read != _PyUnicode_GET_SIZE(ret_obj) ) {
+ if (_PyUnicode_Resize(&ret_obj, total_read) == -1)
+ goto failure;
+ }
+ return ret_obj;
+
+ failure:
+ Py_XDECREF(ret_obj);
+ return NULL;
+}
+
+static PyObject*
+py_io_channel_write_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "buf", NULL };
+ const char* buf;
+ Py_ssize_t buf_len;
+ gsize count;
+ GError* error = NULL;
+ GIOStatus status;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:glib.IOChannel.write",
+ kwlist, &buf, &buf_len))
+ return NULL;
+
+ pyglib_unblock_threads();
+ status = g_io_channel_write_chars(self->channel, buf, buf_len, &count, &error);
+ pyglib_block_threads();
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ return _PyLong_FromLong(count);
+}
+
+static PyObject*
+py_io_channel_write_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "lines", NULL };
+ char *buf;
+ Py_ssize_t buf_len;
+ gsize count;
+ GError* error = NULL;
+ GIOStatus status;
+ PyObject *iter, *value, *pylines;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:glib.IOChannel.writelines",
+ kwlist, &pylines))
+ return NULL;
+
+ iter = PyObject_GetIter(pylines);
+
+ while (1) {
+ value = PyIter_Next(iter);
+ if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
+ PyErr_Clear();
+ goto normal_exit;
+ }
+ if (!_PyUnicode_Check(value)) {
+ PyErr_SetString(PyExc_TypeError, "glib.IOChannel.writelines must"
+ " be sequence/iterator of strings");
+ Py_DECREF(iter);
+ return NULL;
+ }
+ _PyUnicode_AsStringAndSize(value, &buf, &buf_len);
+ pyglib_unblock_threads();
+ status = g_io_channel_write_chars(self->channel, buf, buf_len, &count, &error);
+ pyglib_unblock_threads();
+ Py_DECREF(value);
+ if (pyglib_error_check(&error)) {
+ Py_DECREF(iter);
+ return NULL;
+ }
+ }
+normal_exit:
+ Py_DECREF(iter);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject*
+py_io_channel_flush(PyGIOChannel* self)
+{
+ GError* error = NULL;
+ GIOStatus status;
+
+ pyglib_unblock_threads();
+ status = g_io_channel_flush(self->channel, &error);
+ pyglib_block_threads();
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ return _PyLong_FromLong(status);
+}
+
+static PyObject*
+py_io_channel_set_flags(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "flags", NULL };
+ GIOFlags flags;
+ GIOStatus status;
+ GError* error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_flags",
+ kwlist, &flags))
+ return NULL;
+
+ status = g_io_channel_set_flags(self->channel, flags, &error);
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ return _PyLong_FromLong(status);
+}
+
+static PyObject*
+py_io_channel_get_flags(PyGIOChannel* self)
+{
+ return _PyLong_FromLong(g_io_channel_get_flags(self->channel));
+}
+
+static PyObject*
+py_io_channel_get_buffer_condition(PyGIOChannel* self)
+{
+ return _PyLong_FromLong(g_io_channel_get_buffer_condition(self->channel));
+}
+
+static PyObject*
+py_io_channel_set_close_on_unref(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "do_close", NULL };
+ PyObject *do_close;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:glib.IOChannel.set_close_on_unref",
+ kwlist, &do_close))
+ return NULL;
+
+ g_io_channel_set_close_on_unref(self->channel, PyObject_IsTrue(do_close));
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_close_on_unref(PyGIOChannel* self)
+{
+ if (g_io_channel_get_close_on_unref(self->channel)) {
+ Py_INCREF(Py_True);
+ return Py_True;
+ } else {
+ Py_INCREF(Py_False);
+ return Py_False;
+ }
+}
+
+typedef struct {
+ PyObject *callback;
+ PyObject *iochannel;
+ PyObject *user_data;
+} PyGIOWatchData;
+
+static void
+pyg_iowatch_data_free(PyGIOWatchData *data)
+{
+ Py_DECREF(data->callback);
+ Py_XDECREF(data->user_data);
+ Py_DECREF(data->iochannel);
+ g_slice_free(PyGIOWatchData, data);
+}
+
+static gboolean
+pyg_iowatch_marshal(GIOChannel *source,
+ GIOCondition condition,
+ gpointer user_data)
+{
+ PyObject *ret;
+ gboolean res;
+ PyGIOWatchData *data = (PyGIOWatchData *) user_data;
+ PyGILState_STATE state;
+
+ g_return_val_if_fail(user_data != NULL, FALSE);
+ g_return_val_if_fail(((PyGIOChannel *) data->iochannel)->channel == source,
+ FALSE);
+
+ state = pyglib_gil_state_ensure();
+
+ if (data->user_data)
+ ret = PyObject_CallFunction(data->callback, "OiO", data->iochannel,
+ condition, data->user_data);
+ else
+ ret = PyObject_CallFunction(data->callback, "Oi", data->iochannel,
+ condition);
+
+ if (!ret) {
+ PyErr_Print();
+ res = FALSE;
+ } else {
+ res = PyObject_IsTrue(ret);
+ Py_DECREF(ret);
+ }
+ pyglib_gil_state_release(state);
+
+ return res;
+}
+
+
+
+static PyObject *
+py_io_channel_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "condition", "callback", "user_data", "priority", NULL };
+ PyObject *callback, *user_data = NULL;
+ int priority = G_PRIORITY_DEFAULT, condition;
+ GIOChannel *iochannel = NULL;
+ guint handler_id;
+ PyGIOWatchData *data;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "iO|Oi:glib.IOChannel.add_watch",
+ kwlist, &condition, &callback,
+ &user_data, &priority))
+ return NULL;
+
+ iochannel = ((PyGIOChannel *) self)->channel;
+
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second must be callable");
+ return NULL;
+ }
+
+ data = g_slice_new(PyGIOWatchData);
+ data->callback = callback; Py_INCREF(callback);
+ data->user_data = user_data; Py_XINCREF(user_data);
+ data->iochannel = self; Py_INCREF(self);
+
+ handler_id = g_io_add_watch_full(((PyGIOChannel *) self)->channel,
+ priority, condition,
+ pyg_iowatch_marshal, data,
+ (GDestroyNotify) pyg_iowatch_data_free);
+ return PyLong_FromUnsignedLong(handler_id);
+}
+
+
+#ifdef G_OS_WIN32
+
+static PyObject *
+py_io_channel_win32_poll(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "fds", "timeout", NULL };
+ GPollFD *pollfd;
+ PyObject *pyfds, *pyfd;
+ guint len, i;
+ gint timeout = -1;
+ gint result;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!|i:glib.IOChannel.win32_poll",
+ kwlist, &PyList_Type, &pyfds, &timeout))
+ return NULL;
+
+ len = PyList_Size(pyfds);
+ pollfd = g_newa(GPollFD, len);
+ for (i = 0; i < len; ++i) {
+ pyfd = PyList_GET_ITEM(pyfds, i);
+ if (!PyObject_TypeCheck(pyfd, &PyGPollFD_Type)) {
+ PyErr_SetString(PyExc_TypeError, "'fds' must be a list of glib.PollFD objects");
+ return NULL;
+ }
+ pollfd[i] = ((PyGPollFD *) pyfd)->pollfd;
+ }
+
+ result = g_io_channel_win32_poll(pollfd, len, timeout);
+ for (i = 0; i < len; ++i) {
+ pyfd = PyList_GET_ITEM(pyfds, i);
+ ((PyGPollFD *) pyfd)->pollfd = pollfd[i];
+ }
+ return _PyLong_FromLong(result);
+}
+
+static PyObject *
+py_io_channel_win32_make_pollfd(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "condition", NULL };
+ int condition;
+ GPollFD pollfd;
+ PyGPollFD *pypollfd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i:glib.IOChannel.win32_make_pollfd",
+ kwlist, &condition))
+ return NULL;
+
+ g_io_channel_win32_make_pollfd(((PyGIOChannel *) self)->channel,
+ condition, &pollfd);
+ pypollfd = PyObject_NEW(PyGPollFD, &PyGPollFD_Type);
+ pypollfd->pollfd = pollfd;
+ return (PyObject *) pypollfd;
+}
+#endif /* def G_OS_WIN32 */
+
+
+static PyObject*
+py_io_channel_read_line(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "size", NULL };
+ PyObject* ret_obj = NULL;
+ gsize length = 0, terminator_pos;
+ gchar *str_return = NULL;
+ GError *error = NULL;
+ gint size_hint = -1;
+ GIOStatus status;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.readline", kwlist,
+ &size_hint))
+ return NULL;
+
+ status = g_io_channel_read_line(self->channel, &str_return, &length,
+ &terminator_pos, &error);
+ if (pyglib_error_check(&error))
+ return NULL;
+ ret_obj = _PyUnicode_FromStringAndSize(str_return, length);
+ g_free(str_return);
+ return ret_obj;
+}
+
+static PyObject*
+py_io_channel_read_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "size", NULL };
+ PyObject *line = NULL;
+ gsize length = 0, terminator_pos;
+ gchar *str_return = NULL;
+ GError *error = NULL;
+ gint size_hint = -1;
+ GIOStatus status = G_IO_STATUS_NORMAL;
+ PyObject *list;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.readlines", kwlist,
+ &size_hint))
+ return NULL;
+
+ list = PyList_New(0);
+ while (status == G_IO_STATUS_NORMAL) {
+ status = g_io_channel_read_line(self->channel, &str_return, &length,
+ &terminator_pos, &error);
+ if (pyglib_error_check(&error)) {
+ Py_DECREF(line);
+ return NULL;
+ }
+ line = _PyUnicode_FromStringAndSize(str_return, length);
+ g_free(str_return);
+ if (PyList_Append(list, line)) {
+ Py_DECREF(line);
+ Py_DECREF(list);
+ return NULL;
+ }
+ }
+ return list;
+}
+
+
+static PyObject*
+py_io_channel_seek(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "offset", "whence", NULL };
+ gint64 offset;
+ int whence = 0;
+ GIOStatus status;
+ GSeekType seek_type;
+ GError* error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "L|i:glib.IOChannel.seek",
+ kwlist, &offset, &whence))
+ return NULL;
+
+ switch (whence)
+ {
+ case 0: seek_type = G_SEEK_SET; break;
+ case 1: seek_type = G_SEEK_CUR; break;
+ case 2: seek_type = G_SEEK_END; break;
+ default:
+ PyErr_SetString(PyExc_ValueError, "invalid 'whence' value");
+ return NULL;
+ }
+
+ status = g_io_channel_seek_position(self->channel, offset,
+ seek_type, &error);
+ if (pyglib_error_check(&error))
+ return NULL;
+
+ return _PyLong_FromLong(status);
+}
+
+#if 0 // Not wrapped
+void g_io_channel_set_line_term (GIOChannel *channel,
+ const gchar *line_term,
+ gint length);
+
+G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel,
+ gint *length);
+
+
+
+GIOStatus g_io_channel_read_line_string (GIOChannel *channel,
+ GString *buffer,
+ gsize *terminator_pos,
+ GError **error);
+GIOStatus g_io_channel_read_to_end (GIOChannel *channel,
+ gchar **str_return,
+ gsize *length,
+ GError **error);
+GIOStatus g_io_channel_read_unichar (GIOChannel *channel,
+ gunichar *thechar,
+ GError **error);
+GIOStatus g_io_channel_write_unichar (GIOChannel *channel,
+ gunichar thechar,
+ GError **error);
+#endif // Not wrapped
+
+static PyMemberDef py_io_channel_members[] = {
+ { "softspace", T_INT, offsetof(PyGIOChannel, softspace), 0, NULL },
+ { NULL, 0, 0, 0, NULL }
+};
+
+static PyMethodDef py_io_channel_methods[] = {
+ { "close", (PyCFunction)py_io_channel_shutdown, METH_KEYWORDS },
+ { "flush", (PyCFunction)py_io_channel_flush, METH_NOARGS },
+ { "set_encoding", (PyCFunction)py_io_channel_set_encoding, METH_KEYWORDS },
+ { "get_encoding", (PyCFunction)py_io_channel_get_encoding, METH_NOARGS },
+ { "set_buffered", (PyCFunction)py_io_channel_set_buffered, METH_KEYWORDS },
+ { "get_buffered", (PyCFunction)py_io_channel_get_buffered, METH_NOARGS },
+ { "set_buffer_size", (PyCFunction)py_io_channel_set_buffer_size, METH_KEYWORDS },
+ { "get_buffer_size", (PyCFunction)py_io_channel_get_buffer_size, METH_NOARGS },
+ { "read", (PyCFunction)py_io_channel_read_chars, METH_KEYWORDS },
+ { "readline", (PyCFunction)py_io_channel_read_line, METH_KEYWORDS },
+ { "readlines", (PyCFunction)py_io_channel_read_lines, METH_KEYWORDS },
+ { "write", (PyCFunction)py_io_channel_write_chars, METH_KEYWORDS },
+ { "writelines", (PyCFunction)py_io_channel_write_lines, METH_KEYWORDS },
+ { "set_flags", (PyCFunction)py_io_channel_set_flags, METH_KEYWORDS },
+ { "get_flags", (PyCFunction)py_io_channel_get_flags, METH_NOARGS },
+ { "get_buffer_condition", (PyCFunction)py_io_channel_get_buffer_condition, METH_NOARGS },
+ { "set_close_on_unref", (PyCFunction)py_io_channel_set_close_on_unref, METH_KEYWORDS },
+ { "get_close_on_unref", (PyCFunction)py_io_channel_get_close_on_unref, METH_NOARGS },
+ { "add_watch", (PyCFunction)py_io_channel_add_watch, METH_KEYWORDS },
+ { "seek", (PyCFunction)py_io_channel_seek, METH_KEYWORDS },
+#ifdef G_OS_WIN32
+ { "win32_make_pollfd", (PyCFunction)py_io_channel_win32_make_pollfd, METH_KEYWORDS },
+ { "win32_poll", (PyCFunction)py_io_channel_win32_poll, METH_KEYWORDS|METH_STATIC },
+#endif
+ { NULL, NULL, 0 }
+};
+
+
+static int
+py_io_channel_init(PyGIOChannel *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "filedes", "filename", "mode",
+#ifdef G_OS_WIN32
+ "hwnd",
+#endif
+ NULL };
+ int fd = -1;
+ char *mode = "r", *filename = NULL;
+ GError *error = NULL;
+#ifdef G_OS_WIN32
+ guint hwnd = 0;
+#endif
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iss"
+#ifdef G_OS_WIN32
+ "I"
+#endif
+ ":glib.IOChannel.__init__",
+ kwlist, &fd, &filename, &mode
+#ifdef G_OS_WIN32
+ , &hwnd
+#endif
+ ))
+ return -1;
+
+ if (fd != -1)
+ self->channel = g_io_channel_unix_new(fd);
+ else if (filename != NULL) {
+ self->channel = g_io_channel_new_file(filename, mode, &error);
+ if (pyglib_error_check(&error))
+ return -1;
+ }
+#ifdef G_OS_WIN32
+ else if (hwnd != 0) {
+ self->channel = g_io_channel_win32_new_messages(hwnd);
+ }
+#endif
+ else {
+#ifdef G_OS_WIN32
+ PyErr_SetString(PyExc_TypeError, "either a valid file descriptor, "
+ "file name, or window handle must be supplied");
+#else
+ PyErr_SetString(PyExc_TypeError, "either a valid file descriptor "
+ "or file name must be supplied");
+#endif
+ return -1;
+ }
+ return 0;
+}
+
+void
+pyglib_iochannel_register_types(PyObject *d)
+{
+ PyGIOChannel_Type.tp_init = (initproc)py_io_channel_init;
+ PyGIOChannel_Type.tp_dealloc = (destructor)py_io_channel_dealloc;
+ PyGIOChannel_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGIOChannel_Type.tp_members = py_io_channel_members;
+ PyGIOChannel_Type.tp_methods = py_io_channel_methods;
+ PyGIOChannel_Type.tp_hash = (hashfunc)py_io_channel_hash;
+ PyGIOChannel_Type.tp_compare = (cmpfunc)py_io_channel_compare;
+ PyGIOChannel_Type.tp_iter = (getiterfunc)py_io_channel_get_iter;
+ PyGIOChannel_Type.tp_iternext = (iternextfunc)py_io_channel_next;
+
+ PYGLIB_REGISTER_TYPE(d, PyGIOChannel_Type, "IOChannel");
+}
diff --git a/glib/pygiochannel.h b/glib/pygiochannel.h
new file mode 100644
index 0000000..9b03edd
--- /dev/null
+++ b/glib/pygiochannel.h
@@ -0,0 +1,29 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_IOCHANNEL_H__
+#define __PYG_IOCHANNEL_H__
+
+extern PyTypeObject PyGIOChannel_Type;
+
+void pyglib_iochannel_register_types(PyObject *d);
+
+#endif /* __PYG_IOCHANNEL_H__ */
diff --git a/glib/pyglib-private.h b/glib/pyglib-private.h
new file mode 100644
index 0000000..8b033e1
--- /dev/null
+++ b/glib/pyglib-private.h
@@ -0,0 +1,46 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGLIB_PRIVATE_H__
+#define __PYGLIB_PRIVATE_H__
+
+#include <Python.h>
+#include <glib.h>
+
+#include <pyglib-python-compat.h>
+
+G_BEGIN_DECLS
+
+struct _PyGLib_Functions {
+ gboolean threads_enabled;
+ PyObject *gerror_exception;
+ PyGLibThreadBlockFunc block_threads;
+ PyGLibThreadBlockFunc unblock_threads;
+};
+
+gboolean _pyglib_handler_marshal(gpointer user_data);
+void _pyglib_destroy_notify(gpointer user_data);
+
+G_END_DECLS
+
+#endif /* __PYGLIB_PRIVATE_H__ */
+
+
diff --git a/glib/pyglib-python-compat.h b/glib/pyglib-python-compat.h
new file mode 100644
index 0000000..915a912
--- /dev/null
+++ b/glib/pyglib-python-compat.h
@@ -0,0 +1,120 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGLIB_PYTHON_COMPAT_H__
+#define __PYGLIB_PYTHON_COMPAT_H__
+
+/* Python 2.3 does not define Py_CLEAR */
+#ifndef Py_CLEAR
+#define Py_CLEAR(op) \
+ do { \
+ if (op) { \
+ PyObject *tmp = (PyObject *)(op); \
+ (op) = NULL; \
+ Py_DECREF(tmp); \
+ } \
+ } while (0)
+#endif
+
+/* Compilation on Python 2.4 */
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+typedef inquiry lenfunc;
+#endif
+
+/* Compilation on Python 2.x */
+#if PY_VERSION_HEX < 0x03000000
+#define RO READONLY
+#define _PyUnicode_Check PyString_Check
+#define _PyUnicode_AsString PyString_AsString
+#define _PyUnicode_AsStringAndSize PyString_AsStringAndSize
+#define _PyUnicode_FromString PyString_FromString
+#define _PyUnicode_FromStringAndSize PyString_FromStringAndSize
+#define _PyUnicode_FromFormat PyString_FromFormat
+#define _PyUnicode_AS_STRING PyString_AS_STRING
+#define _PyUnicode_GET_SIZE PyString_GET_SIZE
+#define _PyUnicode_Resize _PyString_Resize
+#define _PyUnicode_Type PyString_Type
+#define _PyLong_Check PyInt_Check
+#define _PyLong_FromLong PyInt_FromLong
+#define _PyLong_AsLong PyInt_AsLong
+#define _PyLongObject PyIntObject
+#define _PyLong_Type PyInt_Type
+#define _PyLong_AS_LONG PyInt_AS_LONG
+#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+#else
+#undef PYGLIB_MODULE_START
+#undef PYGLIB_MODULE_END
+#undef PYGLIB_DEFINE_TYPE
+#undef PYGLIB_REGISTER_TYPE
+
+#define PYGLIB_MODULE_START(symbol, modname) \
+ static struct PyModuleDef _##symbol##module = { \
+ PyModuleDef_HEAD_INIT, \
+ modname, \
+ NULL, \
+ -1, \
+ symbol##_functions, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL \
+}; \
+PyMODINIT_FUNC PyInit_##symbol(void) \
+{ \
+ PyObject *module; \
+ module = PyModule_Create(&_##symbol##module);
+#define PYGLIB_MODULE_END return module; }
+#define PYGLIB_DEFINE_TYPE(typename, symbol, csymbol) \
+PyTypeObject symbol = { \
+ PyVarObject_HEAD_INIT(NULL, 0) \
+ typename, \
+ sizeof(csymbol) \
+};
+#define PYGLIB_REGISTER_TYPE(d, type, name) \
+ if (!type.tp_alloc) \
+ type.tp_alloc = PyType_GenericAlloc; \
+ if (!type.tp_new) \
+ type.tp_new = PyType_GenericNew; \
+ if (PyType_Ready(&type)) \
+ return; \
+ PyDict_SetItemString(d, name, (PyObject *)&type);
+
+#define _PyUnicode_Check PyUnicode_Check
+#define _PyUnicode_AsString PyUnicode_AsString
+#define _PyUnicode_AsStringAndSize(obj, buf, size) PyUnicode_AsStringAndSize(obj, size)
+#define _PyUnicode_FromString PyUnicode_FromString
+#define _PyUnicode_FromStringAndSize PyUnicode_FromStringAndSize
+#define _PyUnicode_FromFormat PyUnicode_FromFormat
+#define _PyUnicode_AS_STRING _PyUnicode_AsString
+#define _PyUnicode_GET_SIZE PyUnicode_GET_SIZE
+#define _PyUnicode_Resize PyUnicode_Resize
+#define _PyUnicode_Type PyUnicode_Type
+#define _PyLong_Check PyLong_Check
+#define _PyLong_FromLong PyLong_FromLong
+#define _PyLong_AsLong PyLong_AsLong
+#define _PyLong_AS_LONG PyLong_AS_LONG
+#define _PyLongObject PyLongObject
+#define _PyLong_Type PyLong_Type
+#endif
+
+#endif /* __PYGLIB_PYTHON_COMPAT_H__ */
diff --git a/glib/pyglib.c b/glib/pyglib.c
new file mode 100644
index 0000000..a1bdbb9
--- /dev/null
+++ b/glib/pyglib.c
@@ -0,0 +1,577 @@
+/* -*- Mode: C; c-set-style: python; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygmaincontext.h"
+#include "pygoptioncontext.h"
+#include "pygoptiongroup.h"
+
+static struct _PyGLib_Functions *_PyGLib_API;
+static int pyglib_thread_state_tls_key;
+static PyObject *exception_table = NULL;
+
+static PyTypeObject *_PyGMainContext_Type;
+#define PyGMainContext_Type (*_PyGMainContext_Type)
+
+static PyTypeObject *_PyGOptionGroup_Type;
+#define PyGOptionGroup_Type (*_PyGOptionGroup_Type)
+
+static PyTypeObject *_PyGOptionContext_Type;
+#define PyGOptionContext_Type (*_PyGOptionContext_Type)
+
+void
+pyglib_init(void)
+{
+ PyObject *glib, *cobject;
+
+ glib = PyImport_ImportModule("glib");
+ if (!glib) {
+ if (PyErr_Occurred()) {
+ PyObject *type, *value, *traceback;
+ PyObject *py_orig_exc;
+ PyErr_Fetch(&type, &value, &traceback);
+ py_orig_exc = PyObject_Repr(value);
+ Py_XDECREF(type);
+ Py_XDECREF(value);
+ Py_XDECREF(traceback);
+ PyErr_Format(PyExc_ImportError,
+ "could not import glib (error was: %s)",
+ _PyUnicode_AsString(py_orig_exc));
+ Py_DECREF(py_orig_exc);
+ } else {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import glib (no error given)");
+ }
+ return;
+ }
+
+ cobject = PyObject_GetAttrString(glib, "_PyGLib_API");
+ if (cobject && PyCObject_Check(cobject))
+ _PyGLib_API = (struct _PyGLib_Functions *) PyCObject_AsVoidPtr(cobject);
+ else {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import glib (could not find _PyGLib_API object)");
+ Py_DECREF(glib);
+ return;
+ }
+
+ _PyGMainContext_Type = (PyTypeObject*)PyObject_GetAttrString(glib, "MainContext");
+ _PyGOptionGroup_Type = (PyTypeObject*)PyObject_GetAttrString(glib, "OptionGroup");
+ _PyGOptionContext_Type = (PyTypeObject*)PyObject_GetAttrString(glib, "OptionContext");
+}
+
+void
+pyglib_init_internal(PyObject *api)
+{
+ _PyGLib_API = (struct _PyGLib_Functions *) PyCObject_AsVoidPtr(api);
+}
+
+gboolean
+pyglib_threads_enabled(void)
+{
+ g_return_val_if_fail (_PyGLib_API != NULL, FALSE);
+
+ return _PyGLib_API->threads_enabled;
+}
+
+PyGILState_STATE
+pyglib_gil_state_ensure(void)
+{
+ g_return_val_if_fail (_PyGLib_API != NULL, PyGILState_LOCKED);
+
+ if (!_PyGLib_API->threads_enabled)
+ return PyGILState_LOCKED;
+
+ return PyGILState_Ensure();
+}
+
+void
+pyglib_gil_state_release(PyGILState_STATE state)
+{
+ g_return_if_fail (_PyGLib_API != NULL);
+
+ if (!_PyGLib_API->threads_enabled)
+ return;
+
+ PyGILState_Release(state);
+}
+
+/**
+ * pyglib_enable_threads:
+ *
+ * Returns: TRUE if threading is enabled, FALSE otherwise.
+ *
+ */
+#ifdef DISABLE_THREADING
+gboolean
+pyglib_enable_threads(void)
+{
+ PyErr_SetString(PyExc_RuntimeError,
+ "pyglib threading disabled at compile time");
+ return FALSE;
+}
+
+void
+_pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback)
+{
+ /* Ignore, threads cannot be enabled. */
+}
+
+#else
+
+static GSList *thread_enabling_callbacks = NULL;
+
+/* Enable threading; note that the GIL must be held by the current
+ * thread when this function is called
+ */
+gboolean
+pyglib_enable_threads(void)
+{
+ GSList *callback;
+
+ g_return_val_if_fail (_PyGLib_API != NULL, FALSE);
+
+ if (_PyGLib_API->threads_enabled)
+ return TRUE;
+
+ PyEval_InitThreads();
+ if (!g_threads_got_initialized)
+ g_thread_init(NULL);
+
+ _PyGLib_API->threads_enabled = TRUE;
+ pyglib_thread_state_tls_key = PyThread_create_key();
+
+ for (callback = thread_enabling_callbacks; callback; callback = callback->next)
+ ((PyGLibThreadsEnabledFunc) callback->data) ();
+
+ g_slist_free(thread_enabling_callbacks);
+ return TRUE;
+}
+
+void
+_pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback)
+{
+ if (callback && !pyglib_threads_enabled())
+ thread_enabling_callbacks = g_slist_append(thread_enabling_callbacks, callback);
+}
+#endif
+
+int
+pyglib_gil_state_ensure_py23 (void)
+{
+ return PyGILState_Ensure();
+}
+
+void
+pyglib_gil_state_release_py23 (int flag)
+{
+ PyGILState_Release(flag);
+}
+
+/**
+ * pyglib_block_threads:
+ *
+ */
+void
+pyglib_block_threads(void)
+{
+ g_return_if_fail (_PyGLib_API != NULL);
+
+ if (_PyGLib_API->block_threads != NULL)
+ (* _PyGLib_API->block_threads)();
+}
+
+/**
+ * pyglib_unblock_threads:
+ *
+ */
+void
+pyglib_unblock_threads(void)
+{
+ g_return_if_fail (_PyGLib_API != NULL);
+ if (_PyGLib_API->unblock_threads != NULL)
+ (* _PyGLib_API->unblock_threads)();
+}
+
+/**
+ * pyglib_set_thread_block_funcs:
+ *
+ * hooks to register handlers for getting GDK threads to cooperate
+ * with python threading
+ */
+void
+pyglib_set_thread_block_funcs (PyGLibThreadBlockFunc block_threads_func,
+ PyGLibThreadBlockFunc unblock_threads_func)
+{
+ g_return_if_fail (_PyGLib_API != NULL);
+
+ _PyGLib_API->block_threads = block_threads_func;
+ _PyGLib_API->unblock_threads = unblock_threads_func;
+}
+
+
+/**
+ * pyglib_error_check:
+ * @error: a pointer to the GError.
+ *
+ * Checks to see if the GError has been set. If the error has been
+ * set, then the glib.GError Python exception will be raised, and
+ * the GError cleared.
+ *
+ * Returns: True if an error was set.
+ */
+gboolean
+pyglib_error_check(GError **error)
+{
+ PyGILState_STATE state;
+ PyObject *exc_type;
+ PyObject *exc_instance;
+ PyObject *d;
+
+ g_return_val_if_fail(error != NULL, FALSE);
+
+ if (*error == NULL)
+ return FALSE;
+
+ state = pyglib_gil_state_ensure();
+
+ exc_type = _PyGLib_API->gerror_exception;
+ if (exception_table != NULL)
+ {
+ PyObject *item;
+ item = PyDict_GetItem(exception_table, _PyLong_FromLong((*error)->domain));
+ if (item != NULL)
+ exc_type = item;
+ }
+
+ exc_instance = PyObject_CallFunction(exc_type, "z", (*error)->message);
+
+ if ((*error)->domain) {
+ PyObject_SetAttrString(exc_instance, "domain",
+ d=_PyUnicode_FromString(g_quark_to_string((*error)->domain)));
+ Py_DECREF(d);
+ }
+ else
+ PyObject_SetAttrString(exc_instance, "domain", Py_None);
+
+ PyObject_SetAttrString(exc_instance, "code",
+ d=_PyLong_FromLong((*error)->code));
+ Py_DECREF(d);
+
+ if ((*error)->message) {
+ PyObject_SetAttrString(exc_instance, "message",
+ d=_PyUnicode_FromString((*error)->message));
+ Py_DECREF(d);
+ } else {
+ PyObject_SetAttrString(exc_instance, "message", Py_None);
+ }
+
+ PyErr_SetObject(_PyGLib_API->gerror_exception, exc_instance);
+ Py_DECREF(exc_instance);
+ g_clear_error(error);
+
+ pyglib_gil_state_release(state);
+
+ return TRUE;
+}
+
+/**
+ * pyglib_gerror_exception_check:
+ * @error: a standard GLib GError ** output parameter
+ *
+ * Checks to see if a GError exception has been raised, and if so
+ * translates the python exception to a standard GLib GError. If the
+ * raised exception is not a GError then PyErr_Print() is called.
+ *
+ * Returns: 0 if no exception has been raised, -1 if it is a
+ * valid glib.GError, -2 otherwise.
+ */
+gboolean
+pyglib_gerror_exception_check(GError **error)
+{
+ PyObject *type, *value, *traceback;
+ PyObject *py_message, *py_domain, *py_code;
+ const char *bad_gerror_message;
+
+ PyErr_Fetch(&type, &value, &traceback);
+ if (type == NULL)
+ return 0;
+ PyErr_NormalizeException(&type, &value, &traceback);
+ if (value == NULL) {
+ PyErr_Restore(type, value, traceback);
+ PyErr_Print();
+ return -2;
+ }
+ if (!value ||
+ !PyErr_GivenExceptionMatches(type,
+ (PyObject *) _PyGLib_API->gerror_exception)) {
+ PyErr_Restore(type, value, traceback);
+ PyErr_Print();
+ return -2;
+ }
+ Py_DECREF(type);
+ Py_XDECREF(traceback);
+
+ py_message = PyObject_GetAttrString(value, "message");
+ if (!py_message || !_PyUnicode_Check(py_message)) {
+ bad_gerror_message = "glib.GError instances must have a 'message' string attribute";
+ goto bad_gerror;
+ }
+
+ py_domain = PyObject_GetAttrString(value, "domain");
+ if (!py_domain || !_PyUnicode_Check(py_domain)) {
+ bad_gerror_message = "glib.GError instances must have a 'domain' string attribute";
+ Py_DECREF(py_message);
+ goto bad_gerror;
+ }
+
+ py_code = PyObject_GetAttrString(value, "code");
+ if (!py_code || !_PyLong_Check(py_code)) {
+ bad_gerror_message = "glib.GError instances must have a 'code' int attribute";
+ Py_DECREF(py_message);
+ Py_DECREF(py_domain);
+ goto bad_gerror;
+ }
+
+ g_set_error(error, g_quark_from_string(_PyUnicode_AsString(py_domain)),
+ _PyLong_AsLong(py_code), _PyUnicode_AsString(py_message));
+
+ Py_DECREF(py_message);
+ Py_DECREF(py_code);
+ Py_DECREF(py_domain);
+ return -1;
+
+bad_gerror:
+ Py_DECREF(value);
+ g_set_error(error, g_quark_from_static_string("pyglib"), 0, bad_gerror_message);
+ PyErr_SetString(PyExc_ValueError, bad_gerror_message);
+ PyErr_Print();
+ return -2;
+}
+
+/**
+ * pyglib_register_exception_for_domain:
+ * @name: name of the exception
+ * @error_domain: error domain
+ *
+ * Registers a new glib.GError exception subclass called #name for
+ * a specific #domain. This exception will be raised when a GError
+ * of the same domain is passed in to pyglib_error_check().
+ *
+ * Returns: the new exception
+ */
+PyObject *
+pyglib_register_exception_for_domain(gchar *name,
+ gint error_domain)
+{
+ PyObject *exception;
+
+ exception = PyErr_NewException(name, _PyGLib_API->gerror_exception, NULL);
+
+ if (exception_table == NULL)
+ exception_table = PyDict_New();
+
+ PyDict_SetItem(exception_table,
+ _PyLong_FromLong(error_domain),
+ exception);
+
+ return exception;
+}
+
+/**
+ * pyglib_main_context_new:
+ * @context: a GMainContext.
+ *
+ * Creates a wrapper for a GMainContext.
+ *
+ * Returns: the GMainContext wrapper.
+ */
+PyObject *
+pyglib_main_context_new(GMainContext *context)
+{
+ PyGMainContext *self;
+
+ self = (PyGMainContext *)PyObject_NEW(PyGMainContext,
+ &PyGMainContext_Type);
+ if (self == NULL)
+ return NULL;
+
+ self->context = g_main_context_ref(context);
+ return (PyObject *)self;
+}
+
+/**
+ * pyg_option_group_transfer_group:
+ * @group: a GOptionGroup wrapper
+ *
+ * This is used to transfer the GOptionGroup to a GOptionContext. After this
+ * is called, the calle must handle the release of the GOptionGroup.
+ *
+ * When #NULL is returned, the GOptionGroup was already transfered.
+ *
+ * Returns: Either #NULL or the wrapped GOptionGroup.
+ */
+GOptionGroup *
+pyglib_option_group_transfer_group(PyObject *obj)
+{
+ PyGOptionGroup *self = (PyGOptionGroup*)obj;
+
+ if (self->is_in_context)
+ return NULL;
+
+ self->is_in_context = TRUE;
+
+ /* Here we increase the reference count of the PyGOptionGroup, because now
+ * the GOptionContext holds an reference to us (it is the userdata passed
+ * to g_option_group_new().
+ *
+ * The GOptionGroup is freed with the GOptionContext.
+ *
+ * We set it here because if we would do this in the init method we would
+ * hold two references and the PyGOptionGroup would never be freed.
+ */
+ Py_INCREF(self);
+
+ return self->group;
+}
+
+/**
+ * pyglib_option_group_new:
+ * @group: a GOptionGroup
+ *
+ * The returned GOptionGroup can't be used to set any hooks, translation domains
+ * or add entries. It's only intend is, to use for GOptionContext.add_group().
+ *
+ * Returns: the GOptionGroup wrapper.
+ */
+PyObject *
+pyglib_option_group_new (GOptionGroup *group)
+{
+ PyGOptionGroup *self;
+
+ self = (PyGOptionGroup *)PyObject_NEW(PyGOptionGroup,
+ &PyGOptionGroup_Type);
+ if (self == NULL)
+ return NULL;
+
+ self->group = group;
+ self->other_owner = TRUE;
+ self->is_in_context = FALSE;
+
+ return (PyObject *)self;
+}
+
+/**
+ * pyglib_option_context_new:
+ * @context: a GOptionContext
+ *
+ * Returns: A new GOptionContext wrapper.
+ */
+PyObject *
+pyglib_option_context_new (GOptionContext *context)
+{
+ PyGOptionContext *self;
+
+ self = (PyGOptionContext *)PyObject_NEW(PyGOptionContext,
+ &PyGOptionContext_Type);
+ if (self == NULL)
+ return NULL;
+
+ self->context = context;
+ self->main_group = NULL;
+
+ return (PyObject *)self;
+}
+
+/**
+ * pyglib_option_context_new:
+ * @context: a GTimeVal struct
+ *
+ * Converts a GTimeVal struct to a python float
+ *
+ * Returns: a float representing the timeval
+ */
+PyObject *
+pyglib_float_from_timeval(GTimeVal timeval)
+{
+ double ret;
+ ret = (double)timeval.tv_sec + (double)timeval.tv_usec * 0.000001;
+ return PyFloat_FromDouble(ret);
+}
+
+
+/****** Private *****/
+
+/**
+ * _pyglib_destroy_notify:
+ * @user_data: a PyObject pointer.
+ *
+ * A function that can be used as a GDestroyNotify callback that will
+ * call Py_DECREF on the data.
+ */
+void
+_pyglib_destroy_notify(gpointer user_data)
+{
+ PyObject *obj = (PyObject *)user_data;
+ PyGILState_STATE state;
+
+ g_return_if_fail (_PyGLib_API != NULL);
+
+ state = pyglib_gil_state_ensure();
+ Py_DECREF(obj);
+ pyglib_gil_state_release(state);
+}
+
+gboolean
+_pyglib_handler_marshal(gpointer user_data)
+{
+ PyObject *tuple, *ret;
+ gboolean res;
+ PyGILState_STATE state;
+
+ g_return_val_if_fail(user_data != NULL, FALSE);
+
+ state = pyglib_gil_state_ensure();
+
+ tuple = (PyObject *)user_data;
+ ret = PyObject_CallObject(PyTuple_GetItem(tuple, 0),
+ PyTuple_GetItem(tuple, 1));
+ if (!ret) {
+ PyErr_Print();
+ res = FALSE;
+ } else {
+ res = PyObject_IsTrue(ret);
+ Py_DECREF(ret);
+ }
+
+ pyglib_gil_state_release(state);
+
+ return res;
+}
+
+
diff --git a/glib/pyglib.h b/glib/pyglib.h
new file mode 100644
index 0000000..84bb36c
--- /dev/null
+++ b/glib/pyglib.h
@@ -0,0 +1,94 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGLIB_H__
+#define __PYGLIB_H__
+
+#include <Python.h>
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef void (*PyGLibThreadsEnabledFunc) (void);
+typedef void (*PyGLibThreadBlockFunc) (void);
+
+void pyglib_init(void);
+void pyglib_init_internal(PyObject *api);
+PyGILState_STATE pyglib_gil_state_ensure(void);
+void pyglib_gil_state_release(PyGILState_STATE state);
+int pyglib_enable_threads(void);
+gboolean pyglib_error_check(GError **error);
+gboolean pyglib_gerror_exception_check(GError **error);
+PyObject *pyglib_register_exception_for_domain(gchar *name,
+ gint error_domain);
+gboolean pyglib_threads_enabled(void);
+PyObject * pyglib_main_context_new(GMainContext *context);
+void pyglib_set_thread_block_funcs(PyGLibThreadBlockFunc block_threads_func,
+ PyGLibThreadBlockFunc unblock_threads_func);
+void pyglib_block_threads(void);
+void pyglib_unblock_threads(void);
+PyObject * pyglib_option_context_new(GOptionContext *context);
+PyObject * pyglib_option_group_new(GOptionGroup *group);
+GOptionGroup * pyglib_option_group_transfer_group(PyObject *self);
+PyObject * pyglib_float_from_timeval(GTimeVal timeval);
+
+/* Private: for gobject <-> glib interaction only. */
+void _pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback);
+
+#define pyglib_begin_allow_threads \
+ G_STMT_START { \
+ PyThreadState *_save = NULL; \
+ if (pyglib_threads_enabled()) \
+ _save = PyEval_SaveThread();
+
+#define pyglib_end_allow_threads \
+ if (pyglib_threads_enabled()) \
+ PyEval_RestoreThread(_save); \
+ } G_STMT_END
+
+#define PYGLIB_MODULE_START(symbol, modname) \
+DL_EXPORT(void) init##symbol(void) \
+{ \
+ PyObject *module; \
+ module = Py_InitModule(modname, symbol##_functions);
+#define PYGLIB_MODULE_END }
+#define PYGLIB_DEFINE_TYPE(typename, symbol, csymbol) \
+PyTypeObject symbol = { \
+ PyObject_HEAD_INIT(NULL) \
+ 0, \
+ typename, \
+ sizeof(csymbol), \
+ 0, \
+};
+#define PYGLIB_REGISTER_TYPE(d, type, name) \
+ if (!type.tp_alloc) \
+ type.tp_alloc = PyType_GenericAlloc; \
+ if (!type.tp_new) \
+ type.tp_new = PyType_GenericNew; \
+ if (PyType_Ready(&type)) \
+ return; \
+ PyDict_SetItemString(d, name, (PyObject *)&type);
+
+G_END_DECLS
+
+#endif /* __PYGLIB_H__ */
+
diff --git a/glib/pygmaincontext.c b/glib/pygmaincontext.c
new file mode 100644
index 0000000..186215a
--- /dev/null
+++ b/glib/pygmaincontext.c
@@ -0,0 +1,99 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ *
+ * pygmaincontext.c: GMainContext wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include <glib.h>
+#include "pygmaincontext.h"
+#include "pyglib.h"
+#include "pyglib-private.h"
+
+PYGLIB_DEFINE_TYPE("glib.MainContext", PyGMainContext_Type, PyGMainContext)
+
+static int
+pyg_main_context_init(PyGMainContext *self)
+{
+ self->context = g_main_context_new();
+ return 0;
+}
+
+static void
+pyg_main_context_dealloc(PyGMainContext *self)
+{
+ if (self->context != NULL) {
+ g_main_context_unref(self->context);
+ self->context = NULL;
+ }
+
+ PyObject_Del(self);
+}
+
+static int
+pyg_main_context_compare(PyGMainContext *self, PyGMainContext *v)
+{
+ if (self->context == v->context) return 0;
+ if (self->context > v->context) return -1;
+ return 1;
+}
+
+static PyObject *
+_wrap_g_main_context_iteration (PyGMainContext *self, PyObject *args)
+{
+ gboolean ret, may_block = TRUE;
+
+ if (!PyArg_ParseTuple(args, "|i:GMainContext.iteration",
+ &may_block))
+ return NULL;
+
+ pyglib_begin_allow_threads;
+ ret = g_main_context_iteration(self->context, may_block);
+ pyglib_end_allow_threads;
+
+ return PyBool_FromLong(ret);
+}
+
+static PyObject *
+_wrap_g_main_context_pending (PyGMainContext *self)
+{
+ return PyBool_FromLong(g_main_context_pending(self->context));
+}
+
+static PyMethodDef _PyGMainContext_methods[] = {
+ { "iteration", (PyCFunction)_wrap_g_main_context_iteration, METH_VARARGS },
+ { "pending", (PyCFunction)_wrap_g_main_context_pending, METH_NOARGS },
+ { NULL, NULL, 0 }
+};
+
+void
+pyglib_maincontext_register_types(PyObject *d)
+{
+ PyGMainContext_Type.tp_dealloc = (destructor)pyg_main_context_dealloc;
+ PyGMainContext_Type.tp_compare = (cmpfunc)pyg_main_context_compare;
+ PyGMainContext_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGMainContext_Type.tp_methods = _PyGMainContext_methods;
+ PyGMainContext_Type.tp_init = (initproc)pyg_main_context_init;
+ PYGLIB_REGISTER_TYPE(d, PyGMainContext_Type, "MainContext");
+}
diff --git a/glib/pygmaincontext.h b/glib/pygmaincontext.h
new file mode 100644
index 0000000..038cb37
--- /dev/null
+++ b/glib/pygmaincontext.h
@@ -0,0 +1,40 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_MAINCONTEXT_H__
+#define __PYG_MAINCONTEXT_H__
+
+#include <Python.h>
+#include <glib.h>
+
+typedef struct {
+ PyObject_HEAD
+ GMainContext *context;
+} PyGMainContext;
+
+extern PyTypeObject PyGMainContext_Type;
+
+PyObject * pyglib_main_context_new(GMainContext *context);
+
+void pyglib_maincontext_register_types(PyObject *d);
+
+#endif /* __PYG_MAINCONTEXT_H__ */
+
diff --git a/glib/pygmainloop.c b/glib/pygmainloop.c
new file mode 100644
index 0000000..d9f048c
--- /dev/null
+++ b/glib/pygmainloop.c
@@ -0,0 +1,354 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * Copyright (C) 2004 Johan Dahlin
+ *
+ * pygmainloop.c: GMainLoop wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <fcntl.h>
+
+#include <Python.h>
+#include <pythread.h>
+#include <glib.h>
+
+#include "pygmainloop.h"
+#include "pygmaincontext.h"
+#include "pyglib.h"
+#include "pyglib-private.h"
+
+static int pipe_fds[2];
+
+typedef struct {
+ GSource source;
+ GPollFD fd;
+} PySignalWatchSource;
+
+#ifdef DISABLE_THREADING
+static GMainLoop *pyg_current_main_loop = NULL;;
+
+static inline GMainLoop *
+pyg_save_current_main_loop (GMainLoop *main_loop)
+{
+ GMainLoop *retval = pyg_current_main_loop;
+
+ g_return_val_if_fail(main_loop != NULL, NULL);
+
+ pyg_current_main_loop = g_main_loop_ref(main_loop);
+
+ return retval;
+}
+
+static inline void
+pyg_restore_current_main_loop (GMainLoop *main_loop)
+{
+ if (pyg_current_main_loop != NULL)
+ g_main_loop_unref(pyg_current_main_loop);
+ pyg_current_main_loop = main_loop;
+}
+
+static inline GMainLoop *
+pyg_get_current_main_loop (void)
+{
+ return pyg_current_main_loop;
+}
+#else /* !defined(#ifndef DISABLE_THREADING) */
+
+static int pyg_current_main_loop_key = -1;
+
+static inline GMainLoop *
+pyg_save_current_main_loop (GMainLoop *main_loop)
+{
+ GMainLoop *retval;
+
+ g_return_val_if_fail(main_loop != NULL, NULL);
+
+ if (pyg_current_main_loop_key == -1)
+ pyg_current_main_loop_key = PyThread_create_key();
+
+ retval = PyThread_get_key_value(pyg_current_main_loop_key);
+ PyThread_delete_key_value(pyg_current_main_loop_key);
+ PyThread_set_key_value(pyg_current_main_loop_key,
+ g_main_loop_ref(main_loop));
+
+ return retval;
+}
+
+static inline void
+pyg_restore_current_main_loop (GMainLoop *main_loop)
+{
+ GMainLoop *prev;
+
+ g_return_if_fail (pyg_current_main_loop_key != -1);
+
+ prev = PyThread_get_key_value(pyg_current_main_loop_key);
+ if (prev != NULL)
+ g_main_loop_unref(prev);
+ PyThread_delete_key_value(pyg_current_main_loop_key);
+ if (main_loop != NULL)
+ PyThread_set_key_value(pyg_current_main_loop_key, main_loop);
+}
+
+static inline GMainLoop *
+pyg_get_current_main_loop (void)
+{
+ if (pyg_current_main_loop_key == -1)
+ return NULL;
+ return PyThread_get_key_value(pyg_current_main_loop_key);
+}
+#endif /* DISABLE_THREADING */
+
+static gboolean
+pyg_signal_watch_prepare(GSource *source,
+ int *timeout)
+{
+ /* Python only invokes signal handlers from the main thread,
+ * so if a thread other than the main thread receives the signal
+ * from the kernel, PyErr_CheckSignals() from that thread will
+ * do nothing.
+ */
+
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+ return FALSE;
+#else /* !HAVE_PYSIGNAL_SETWAKEUPFD */
+ /* On Windows g_poll() won't be interrupted by a signal
+ * (AFAIK), so we need the timeout there too, even if there's
+ * only one thread.
+ */
+#ifndef PLATFORM_WIN32
+ if (!pyglib_threads_enabled())
+ return FALSE;
+#endif /* PLATFORM_WIN32 */
+
+ /* If we're using 2.5 or an earlier version of python we
+ * will default to a timeout every second, be aware,
+ * this will cause unnecessary wakeups, see
+ * http://bugzilla.gnome.org/show_bug.cgi?id=481569
+ */
+ *timeout = 1000;
+ return FALSE;
+#endif /* HAVE_PYSIGNAL_SETWAKEUPFD */
+}
+
+static gboolean
+pyg_signal_watch_check(GSource *source)
+{
+ PyGILState_STATE state;
+ GMainLoop *main_loop;
+
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+ PySignalWatchSource *real_source = (PySignalWatchSource *)source;
+ GPollFD *poll_fd = &real_source->fd;
+ unsigned char dummy;
+ if (poll_fd->revents & G_IO_IN)
+ read(poll_fd->fd, &dummy, 1);
+#endif
+
+ state = pyglib_gil_state_ensure();
+
+ main_loop = pyg_get_current_main_loop();
+
+ if (PyErr_CheckSignals() == -1 && main_loop != NULL) {
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ g_main_loop_quit(main_loop);
+ }
+
+ pyglib_gil_state_release(state);
+
+ return FALSE;
+}
+
+static gboolean
+pyg_signal_watch_dispatch(GSource *source,
+ GSourceFunc callback,
+ gpointer user_data)
+{
+ /* We should never be dispatched */
+ g_assert_not_reached();
+ return TRUE;
+}
+
+static GSourceFuncs pyg_signal_watch_funcs =
+{
+ pyg_signal_watch_prepare,
+ pyg_signal_watch_check,
+ pyg_signal_watch_dispatch
+};
+
+static GSource *
+pyg_signal_watch_new(void)
+{
+ GSource *source = g_source_new(&pyg_signal_watch_funcs,
+ sizeof(PySignalWatchSource));
+
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+ PySignalWatchSource *real_source = (PySignalWatchSource *)source;
+ int flag;
+
+ /* Unfortunately we need to create a new pipe here instead of
+ * reusing the pipe inside the GMainContext.
+ * Ideally an api should be added to GMainContext which allows us
+ * to reuse that pipe which would suit us perfectly fine.
+ * XXX More efficient than a pipe, we could use an eventfd on Linux
+ * kernels that support it.
+ */
+ gint already_piped = (pipe_fds[0] > 0);
+ if (!already_piped) {
+ if (pipe(pipe_fds) < 0)
+ g_error("Cannot create main loop pipe: %s\n",
+ g_strerror(errno));
+
+ /* Make the write end of the fd non blocking */
+ flag = fcntl(pipe_fds[1], F_GETFL, 0);
+ flag |= O_NONBLOCK;
+ fcntl(pipe_fds[1], F_SETFL, flag);
+ }
+
+ real_source->fd.fd = pipe_fds[0];
+ real_source->fd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+ g_source_add_poll(source, &real_source->fd);
+
+ if (!already_piped)
+ PySignal_SetWakeupFd(pipe_fds[1]);
+#endif
+ return source;
+}
+
+PYGLIB_DEFINE_TYPE("glib.MainLoop", PyGMainLoop_Type, PyGMainLoop)
+
+static int
+pyg_main_loop_init(PyGMainLoop *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "context", "is_running", NULL };
+ PyObject *py_context = Py_None;
+ int is_running = 0;
+ GMainContext *context;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|Ob:GMainLoop.__init__",
+ kwlist, &py_context, &is_running))
+ return -1;
+
+ if (!PyObject_TypeCheck(py_context, &PyGMainContext_Type) &&
+ py_context != Py_None) {
+ PyErr_SetString(PyExc_TypeError,
+ "context must be a glib.MainContext or None");
+ return -1;
+ }
+
+ if (py_context != Py_None) {
+ context = ((PyGMainContext*)py_context)->context;
+ } else {
+ context = NULL;
+ }
+
+ self->loop = g_main_loop_new(context, is_running);
+
+ self->signal_source = pyg_signal_watch_new();
+ g_source_attach(self->signal_source, context);
+ g_source_unref(self->signal_source);
+
+ return 0;
+}
+
+static void
+pyg_main_loop_dealloc(PyGMainLoop *self)
+{
+ if (self->signal_source != NULL) {
+ g_source_destroy(self->signal_source);
+ self->signal_source = NULL;
+ }
+
+ if (self->loop != NULL) {
+ g_main_loop_unref(self->loop);
+ self->loop = NULL;
+ }
+
+ PyObject_Del(self);
+}
+
+static int
+pyg_main_loop_compare(PyGMainLoop *self, PyGMainLoop *v)
+{
+ if (self->loop == v->loop) return 0;
+ if (self->loop > v->loop) return -1;
+ return 1;
+}
+
+static PyObject *
+_wrap_g_main_loop_get_context (PyGMainLoop *loop)
+{
+ return pyglib_main_context_new(g_main_loop_get_context(loop->loop));
+}
+
+static PyObject *
+_wrap_g_main_loop_is_running (PyGMainLoop *self)
+{
+ return PyBool_FromLong(g_main_loop_is_running(self->loop));
+}
+
+static PyObject *
+_wrap_g_main_loop_quit (PyGMainLoop *self)
+{
+ g_main_loop_quit(self->loop);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+_wrap_g_main_loop_run (PyGMainLoop *self)
+{
+ GMainLoop *prev_loop;
+
+ prev_loop = pyg_save_current_main_loop(self->loop);
+
+ pyglib_begin_allow_threads;
+ g_main_loop_run(self->loop);
+ pyglib_end_allow_threads;
+
+ pyg_restore_current_main_loop(prev_loop);
+
+ if (PyErr_Occurred())
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef _PyGMainLoop_methods[] = {
+ { "get_context", (PyCFunction)_wrap_g_main_loop_get_context, METH_NOARGS },
+ { "is_running", (PyCFunction)_wrap_g_main_loop_is_running, METH_NOARGS },
+ { "quit", (PyCFunction)_wrap_g_main_loop_quit, METH_NOARGS },
+ { "run", (PyCFunction)_wrap_g_main_loop_run, METH_NOARGS },
+ { NULL, NULL, 0 }
+};
+
+void
+pyglib_mainloop_register_types(PyObject *d)
+{
+ PyGMainLoop_Type.tp_dealloc = (destructor)pyg_main_loop_dealloc;
+ PyGMainLoop_Type.tp_compare = (cmpfunc)pyg_main_loop_compare;
+ PyGMainLoop_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGMainLoop_Type.tp_methods = _PyGMainLoop_methods;
+ PyGMainLoop_Type.tp_init = (initproc)pyg_main_loop_init;
+ PYGLIB_REGISTER_TYPE(d, PyGMainLoop_Type, "MainLoop");
+}
diff --git a/glib/pygmainloop.h b/glib/pygmainloop.h
new file mode 100644
index 0000000..dec82d8
--- /dev/null
+++ b/glib/pygmainloop.h
@@ -0,0 +1,36 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_MAINLOOP_H__
+#define __PYG_MAINLOOP_H__
+
+typedef struct {
+ PyObject_HEAD
+ GMainLoop *loop;
+ GSource *signal_source;
+} PyGMainLoop;
+
+extern PyTypeObject PyGMainLoop_Type;
+
+void pyglib_mainloop_register_types(PyObject *d);
+
+#endif /* __PYG_MAINLOOP_H__ */
+
diff --git a/glib/pygoptioncontext.c b/glib/pygoptioncontext.c
new file mode 100644
index 0000000..92ba901
--- /dev/null
+++ b/glib/pygoptioncontext.c
@@ -0,0 +1,312 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2006 Johannes Hoelzl
+ *
+ * pygoptioncontext.c: GOptionContext wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pyglib-private.h"
+#include "pygoptioncontext.h"
+
+PYGLIB_DEFINE_TYPE("glib.OptionContext", PyGOptionContext_Type, PyGOptionContext)
+
+static int
+pyg_option_context_init(PyGOptionContext *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ char *parameter_string;
+
+ if (!PyArg_ParseTuple(args, "s:glib.GOptionContext.__init__",
+ &parameter_string))
+ return -1;
+
+ self->context = g_option_context_new(parameter_string);
+ return 0;
+}
+
+static void
+pyg_option_context_dealloc(PyGOptionContext *self)
+{
+ Py_CLEAR(self->main_group);
+
+ if (self->context != NULL)
+ {
+ GOptionContext *tmp = self->context;
+ self->context = NULL;
+ g_option_context_free(tmp);
+ }
+
+ PyObject_Del(self);
+}
+
+static PyObject *
+pyg_option_context_parse(PyGOptionContext *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "argv", NULL };
+ PyObject *arg;
+ PyObject *new_argv, *argv;
+ Py_ssize_t argv_length, pos;
+ gint argv_length_int;
+ char **argv_content, **original;
+ GError *error = NULL;
+ gboolean result;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GOptionContext.parse",
+ kwlist, &argv))
+ return NULL;
+
+ if (!PyList_Check(argv))
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "GOptionContext.parse expects a list of strings.");
+ return NULL;
+ }
+
+ argv_length = PyList_Size(argv);
+ if (argv_length == -1)
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "GOptionContext.parse expects a list of strings.");
+ return NULL;
+ }
+
+ argv_content = g_new(char*, argv_length + 1);
+ argv_content[argv_length] = NULL;
+ for (pos = 0; pos < argv_length; pos++)
+ {
+ arg = PyList_GetItem(argv, pos);
+ argv_content[pos] = g_strdup(_PyUnicode_AsString(arg));
+ if (argv_content[pos] == NULL)
+ {
+ g_strfreev(argv_content);
+ return NULL;
+ }
+ }
+ original = g_strdupv(argv_content);
+
+ g_assert(argv_length <= G_MAXINT);
+ argv_length_int = argv_length;
+ pyglib_begin_allow_threads;
+ result = g_option_context_parse(self->context, &argv_length_int, &argv_content,
+ &error);
+ pyglib_end_allow_threads;
+ argv_length = argv_length_int;
+
+ if (!result)
+ {
+ g_strfreev(argv_content);
+ g_strfreev(original);
+ pyglib_error_check(&error);
+ return NULL;
+ }
+
+ new_argv = PyList_New(g_strv_length(argv_content));
+ for (pos = 0; pos < argv_length; pos++)
+ {
+ arg = _PyUnicode_FromString(argv_content[pos]);
+ PyList_SetItem(new_argv, pos, arg);
+ }
+
+ g_strfreev(original);
+ g_strfreev(argv_content);
+ return new_argv;
+}
+
+static PyObject *
+pyg_option_context_set_help_enabled(PyGOptionContext *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "help_enable", NULL };
+
+ PyObject *help_enabled;
+ if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:GOptionContext.set_help_enabled",
+ kwlist, &help_enabled))
+ return NULL;
+
+ g_option_context_set_help_enabled(self->context, PyObject_IsTrue(help_enabled));
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_option_context_get_help_enabled(PyGOptionContext *self)
+{
+ return PyBool_FromLong(g_option_context_get_help_enabled(self->context));
+}
+
+static PyObject *
+pyg_option_context_set_ignore_unknown_options(PyGOptionContext *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "ignore_unknown_options", NULL };
+ PyObject *ignore_unknown_options;
+
+ if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:GOptionContext.set_ignore_unknown_options",
+ kwlist, &ignore_unknown_options))
+ return NULL;
+
+ g_option_context_set_ignore_unknown_options(self->context,
+ PyObject_IsTrue(ignore_unknown_options));
+
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_option_context_get_ignore_unknown_options(PyGOptionContext *self)
+{
+ return PyBool_FromLong(
+ g_option_context_get_ignore_unknown_options(self->context));
+}
+
+static PyObject *
+pyg_option_context_set_main_group(PyGOptionContext *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "group", NULL };
+ GOptionGroup *g_group;
+ PyObject *group;
+
+ if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:GOptionContext.set_main_group",
+ kwlist, &group))
+ return NULL;
+
+ if (PyObject_IsInstance(group, (PyObject*) &PyGOptionGroup_Type) != 1) {
+ PyErr_SetString(PyExc_TypeError,
+ "GOptionContext.set_main_group expects a GOptionGroup.");
+ return NULL;
+ }
+
+ g_group = pyglib_option_group_transfer_group(group);
+ if (g_group == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Group is already in a OptionContext.");
+ return NULL;
+ }
+
+ g_option_context_set_main_group(self->context, g_group);
+
+ Py_INCREF(group);
+ self->main_group = (PyGOptionGroup*) group;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_option_context_get_main_group(PyGOptionContext *self)
+{
+ if (self->main_group == NULL)
+ {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ Py_INCREF(self->main_group);
+ return (PyObject*) self->main_group;
+}
+
+static PyObject *
+pyg_option_context_add_group(PyGOptionContext *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "group", NULL };
+ GOptionGroup *g_group;
+ PyObject *group;
+
+ if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:GOptionContext.add_group",
+ kwlist, &group))
+ return NULL;
+
+ if (PyObject_IsInstance(group, (PyObject*) &PyGOptionGroup_Type) != 1) {
+ PyErr_SetString(PyExc_TypeError,
+ "GOptionContext.add_group expects a GOptionGroup.");
+ return NULL;
+ }
+
+ g_group = pyglib_option_group_transfer_group(group);
+ if (g_group == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Group is already in a OptionContext.");
+ return NULL;
+ }
+ Py_INCREF(group);
+
+ g_option_context_add_group(self->context, g_group);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static int
+pyg_option_context_compare(PyGOptionContext *self, PyGOptionContext *context)
+{
+ if (self->context == context->context) return 0;
+ if (self->context > context->context)
+ return 1;
+ return -1;
+}
+
+static PyObject *
+pyg_option_get_context(PyGOptionContext *self)
+{
+ return PyCObject_FromVoidPtr(self->context, NULL);
+}
+
+static PyMethodDef pyg_option_context_methods[] = {
+ { "parse", (PyCFunction)pyg_option_context_parse, METH_VARARGS | METH_KEYWORDS },
+ { "set_help_enabled", (PyCFunction)pyg_option_context_set_help_enabled, METH_VARARGS | METH_KEYWORDS },
+ { "get_help_enabled", (PyCFunction)pyg_option_context_get_help_enabled, METH_NOARGS },
+ { "set_ignore_unknown_options", (PyCFunction)pyg_option_context_set_ignore_unknown_options, METH_VARARGS | METH_KEYWORDS },
+ { "get_ignore_unknown_options", (PyCFunction)pyg_option_context_get_ignore_unknown_options, METH_NOARGS },
+ { "set_main_group", (PyCFunction)pyg_option_context_set_main_group, METH_VARARGS | METH_KEYWORDS },
+ { "get_main_group", (PyCFunction)pyg_option_context_get_main_group, METH_NOARGS },
+ { "add_group", (PyCFunction)pyg_option_context_add_group, METH_VARARGS | METH_KEYWORDS },
+ { "_get_context", (PyCFunction)pyg_option_get_context, METH_NOARGS },
+ { NULL, NULL, 0 },
+};
+
+void
+pyglib_option_context_register_types(PyObject *d)
+{
+ PyGOptionContext_Type.tp_dealloc = (destructor)pyg_option_context_dealloc;
+ PyGOptionContext_Type.tp_compare = (cmpfunc)pyg_option_context_compare;
+ PyGOptionContext_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGOptionContext_Type.tp_methods = pyg_option_context_methods;
+ PyGOptionContext_Type.tp_init = (initproc)pyg_option_context_init;
+ PYGLIB_REGISTER_TYPE(d, PyGOptionContext_Type, "OptionContext");
+}
diff --git a/glib/pygoptioncontext.h b/glib/pygoptioncontext.h
new file mode 100644
index 0000000..85d0a47
--- /dev/null
+++ b/glib/pygoptioncontext.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_OPTIONCONTEXT_H__
+#define __PYG_OPTIONCONTEXT_H__
+
+#include "pygoptiongroup.h"
+
+extern PyTypeObject PyGOptionContext_Type;
+
+typedef struct {
+ PyObject_HEAD
+ PyGOptionGroup *main_group;
+ GOptionContext *context;
+} PyGOptionContext;
+
+void pyglib_option_context_register_types(PyObject *d);
+
+#endif /* __PYG_OPTIONCONTEXT_H__ */
diff --git a/glib/pygoptiongroup.c b/glib/pygoptiongroup.c
new file mode 100644
index 0000000..70e4529
--- /dev/null
+++ b/glib/pygoptiongroup.c
@@ -0,0 +1,270 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for the GLib, GObject and GIO
+ * Copyright (C) 2006 Johannes Hoelzl
+ *
+ * pygoptiongroup.c: GOptionContext and GOptionGroup wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pyglib-private.h"
+#include "pygoptiongroup.h"
+
+PYGLIB_DEFINE_TYPE("glib.OptionGroup", PyGOptionGroup_Type, PyGOptionGroup)
+
+static gboolean
+check_if_owned(PyGOptionGroup *self)
+{
+ if (self->other_owner)
+ {
+ PyErr_SetString(PyExc_ValueError, "The GOptionGroup was not created by "
+ "glib.OptionGroup(), so operation is not possible.");
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+destroy_g_group(PyGOptionGroup *self)
+{
+ PyGILState_STATE state;
+ state = pyglib_gil_state_ensure();
+
+ self->group = NULL;
+ Py_CLEAR(self->callback);
+ g_slist_foreach(self->strings, (GFunc) g_free, NULL);
+ g_slist_free(self->strings);
+ self->strings = NULL;
+
+ if (self->is_in_context)
+ {
+ Py_DECREF(self);
+ }
+
+ pyglib_gil_state_release(state);
+}
+
+static int
+pyg_option_group_init(PyGOptionGroup *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "name", "description", "help_description",
+ "callback", NULL };
+ char *name, *description, *help_description;
+ PyObject *callback;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "zzzO:GOptionGroup.__init__",
+ kwlist, &name, &description,
+ &help_description, &callback))
+ return -1;
+
+ self->group = g_option_group_new(name, description, help_description,
+ self, (GDestroyNotify) destroy_g_group);
+ self->other_owner = FALSE;
+ self->is_in_context = FALSE;
+
+ Py_INCREF(callback);
+ self->callback = callback;
+
+ return 0;
+}
+
+static void
+pyg_option_group_dealloc(PyGOptionGroup *self)
+{
+ if (!self->other_owner && !self->is_in_context)
+ {
+ GOptionGroup *tmp = self->group;
+ self->group = NULL;
+ if (tmp)
+ g_option_group_free(tmp);
+ }
+
+ PyObject_Del(self);
+}
+
+static gboolean
+arg_func(const gchar *option_name,
+ const gchar *value,
+ PyGOptionGroup *self,
+ GError **error)
+{
+ PyObject *ret;
+ PyGILState_STATE state;
+ gboolean no_error;
+
+ state = pyglib_gil_state_ensure();
+
+ if (value == NULL)
+ ret = PyObject_CallFunction(self->callback, "sOO",
+ option_name, Py_None, self);
+ else
+ ret = PyObject_CallFunction(self->callback, "ssO",
+ option_name, value, self);
+
+ if (ret != NULL)
+ {
+ Py_DECREF(ret);
+ no_error = TRUE;
+ } else
+ no_error = pyglib_gerror_exception_check(error) != -1;
+
+ pyglib_gil_state_release(state);
+ return no_error;
+}
+
+static PyObject *
+pyg_option_group_add_entries(PyGOptionGroup *self, PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "entries", NULL };
+ gssize entry_count, pos;
+ PyObject *entry_tuple, *list;
+ GOptionEntry *entries;
+
+ if (check_if_owned(self))
+ return NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GOptionGroup.add_entries",
+ kwlist, &list))
+ return NULL;
+
+ if (!PyList_Check(list))
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "GOptionGroup.add_entries expected a list of entries");
+ return NULL;
+ }
+
+ entry_count = PyList_Size(list);
+ if (entry_count == -1)
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "GOptionGroup.add_entries expected a list of entries");
+ return NULL;
+ }
+
+ entries = g_new0(GOptionEntry, entry_count + 1);
+ for (pos = 0; pos < entry_count; pos++)
+ {
+ gchar *long_name, *description, *arg_description;
+ entry_tuple = PyList_GetItem(list, pos);
+ if (!PyTuple_Check(entry_tuple))
+ {
+ PyErr_SetString(PyExc_TypeError, "GOptionGroup.add_entries "
+ "expected a list of entries");
+ g_free(entries);
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(entry_tuple, "scisz",
+ &long_name,
+ &(entries[pos].short_name),
+ &(entries[pos].flags),
+ &description,
+ &arg_description))
+ {
+ PyErr_SetString(PyExc_TypeError, "GOptionGroup.add_entries "
+ "expected a list of entries");
+ g_free(entries);
+ return NULL;
+ }
+ long_name = g_strdup(long_name);
+ self->strings = g_slist_prepend(self->strings, long_name);
+ entries[pos].long_name = long_name;
+
+ description = g_strdup(description);
+ self->strings = g_slist_prepend(self->strings, description);
+ entries[pos].description = description;
+
+ arg_description = g_strdup(arg_description);
+ self->strings = g_slist_prepend(self->strings, arg_description);
+ entries[pos].arg_description = arg_description;
+
+ entries[pos].arg = G_OPTION_ARG_CALLBACK;
+ entries[pos].arg_data = arg_func;
+ }
+
+ g_option_group_add_entries(self->group, entries);
+
+ g_free(entries);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+static PyObject *
+pyg_option_group_set_translation_domain(PyGOptionGroup *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "domain", NULL };
+ char *domain;
+
+ if (check_if_owned(self))
+ return NULL;
+
+ if (self->group == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError,
+ "The corresponding GOptionGroup was already freed, "
+ "probably through the release of GOptionContext");
+ return NULL;
+ }
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "z:GOptionGroup.set_translate_domain",
+ kwlist, &domain))
+ return NULL;
+
+ g_option_group_set_translation_domain(self->group, domain);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static int
+pyg_option_group_compare(PyGOptionGroup *self, PyGOptionGroup *group)
+{
+ if (self->group == group->group)
+ return 0;
+
+ if (self->group > group->group)
+ return 1;
+
+ return -1;
+}
+
+static PyMethodDef pyg_option_group_methods[] = {
+ { "add_entries", (PyCFunction)pyg_option_group_add_entries, METH_VARARGS | METH_KEYWORDS },
+ { "set_translation_domain", (PyCFunction)pyg_option_group_set_translation_domain, METH_VARARGS | METH_KEYWORDS },
+ { NULL, NULL, 0 },
+};
+
+void
+pyglib_option_group_register_types(PyObject *d)
+{
+ PyGOptionGroup_Type.tp_dealloc = (destructor)pyg_option_group_dealloc;
+ PyGOptionGroup_Type.tp_compare = (cmpfunc)pyg_option_group_compare;
+ PyGOptionGroup_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGOptionGroup_Type.tp_methods = pyg_option_group_methods;
+ PyGOptionGroup_Type.tp_init = (initproc)pyg_option_group_init;
+ PYGLIB_REGISTER_TYPE(d, PyGOptionGroup_Type, "OptionGroup");
+}
diff --git a/glib/pygoptiongroup.h b/glib/pygoptiongroup.h
new file mode 100644
index 0000000..cba6a79
--- /dev/null
+++ b/glib/pygoptiongroup.h
@@ -0,0 +1,40 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_OPTIONGROUP_H__
+#define __PYG_OPTIONGROUP_H__
+
+extern PyTypeObject PyGOptionGroup_Type;
+
+typedef struct {
+ PyObject_HEAD
+ GOptionGroup *group;
+ gboolean other_owner, is_in_context;
+ PyObject *callback;
+ GSList *strings; /* all strings added with the entries, are freed on
+ GOptionGroup.destroy() */
+} PyGOptionGroup;
+
+void pyglib_option_group_register_types(PyObject *d);
+
+#endif /* __PYG_OPTIONGROUP_H__ */
+
+
diff --git a/glib/pygsource.c b/glib/pygsource.c
new file mode 100644
index 0000000..298b928
--- /dev/null
+++ b/glib/pygsource.c
@@ -0,0 +1,723 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * Copyright (C) 2005 Oracle
+ *
+ * Author: Manish Singh <manish.singh@oracle.com>
+ *
+ * pygsource.c: GSource wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include <structmember.h> /* for PyMemberDef */
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygmaincontext.h"
+#include "pygsource.h"
+
+#define CHECK_DESTROYED(self, ret) G_STMT_START { \
+ if ((self)->source == NULL) { \
+ PyErr_SetString(PyExc_RuntimeError, "source is destroyed"); \
+ return (ret); \
+ } \
+} G_STMT_END
+
+
+typedef struct {
+ PyObject_HEAD
+ GSource *source;
+ PyObject *inst_dict;
+ PyObject *weakreflist;
+ gboolean python_source;
+} PyGSource;
+
+typedef struct
+{
+ GSource source;
+ PyObject *obj;
+} PyGRealSource;
+
+/* glib.Source */
+
+PYGLIB_DEFINE_TYPE("glib.Source", PyGSource_Type, PyGSource)
+
+static PyObject *
+source_repr(PyGSource *self, const char *type)
+{
+ gchar buf[256], *desc;
+
+ if (self->source) {
+ if (g_source_get_context(self->source))
+ desc = "attached";
+ else
+ desc = "unattached";
+ } else {
+ desc = "destroyed";
+ }
+
+ if (type)
+ g_snprintf(buf, sizeof(buf), "<%s glib %s source at 0x%lx>",
+ desc, type, (long) self);
+ else
+ g_snprintf(buf, sizeof(buf), "<%s glib source at 0x%lx>",
+ desc, (long) self);
+
+ return _PyUnicode_FromString(buf);
+}
+
+static PyObject *
+pyg_source_attach(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "context", NULL };
+ PyGMainContext *py_context = NULL;
+ GMainContext *context = NULL;
+ guint id;
+
+ if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+ "|O!:attach", kwlist,
+ &PyGMainContext_Type, &py_context))
+ return NULL;
+
+ if (py_context)
+ context = py_context->context;
+
+ CHECK_DESTROYED(self, NULL);
+
+ if (self->python_source) {
+ PyGRealSource *pysource = (PyGRealSource *)self->source;
+ Py_INCREF(pysource->obj);
+ }
+
+ id = g_source_attach(self->source, context);
+ return _PyLong_FromLong(id);
+}
+
+static PyObject *
+pyg_source_destroy(PyGSource *self)
+{
+ CHECK_DESTROYED(self, NULL);
+
+ if (self->python_source && self->source->context) {
+ PyGRealSource *pysource = (PyGRealSource *)self->source;
+ Py_DECREF(pysource->obj);
+ }
+
+ g_source_destroy(self->source);
+ self->source = NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_source_set_callback(PyGSource *self, PyObject *args)
+{
+ PyObject *first, *callback, *cbargs = NULL, *data;
+ gint len;
+
+ CHECK_DESTROYED(self, NULL);
+
+ len = PyTuple_Size (args);
+ if (len < 1) {
+ PyErr_SetString(PyExc_TypeError,
+ "set_callback requires at least 1 argument");
+ return NULL;
+ }
+
+ first = PySequence_GetSlice(args, 0, 1);
+ if (!PyArg_ParseTuple(first, "O:set_callback", &callback)) {
+ Py_DECREF (first);
+ return NULL;
+ }
+ Py_DECREF(first);
+
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "first argument not callable");
+ return NULL;
+ }
+
+ cbargs = PySequence_GetSlice(args, 1, len);
+ if (cbargs == NULL)
+ return NULL;
+
+ data = Py_BuildValue("(ON)", callback, cbargs);
+ if (data == NULL)
+ return NULL;
+
+ g_source_set_callback(self->source,
+ _pyglib_handler_marshal, data,
+ _pyglib_destroy_notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_source_get_context(PyGSource *self)
+{
+ GMainContext *context;
+
+ CHECK_DESTROYED(self, NULL);
+
+ context = g_source_get_context(self->source);
+
+ if (context) {
+ return pyglib_main_context_new(context);
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+
+static PyObject *
+pyg_source_add_poll(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "fd", NULL };
+ PyGPollFD *fd;
+
+ if (!self->python_source) {
+ PyErr_SetString(PyExc_TypeError,
+ "add_poll can only be used with sources "
+ "implemented in python");
+ return NULL;
+ }
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:add_poll", kwlist,
+ &PyGPollFD_Type, &fd))
+ return NULL;
+
+ CHECK_DESTROYED(self, NULL);
+
+ g_source_add_poll(self->source, &fd->pollfd);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_source_remove_poll(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "fd", NULL };
+ PyGPollFD *fd;
+
+ if (!self->python_source) {
+ PyErr_SetString(PyExc_TypeError,
+ "remove_poll can only be used with sources "
+ "implemented in python");
+ return NULL;
+ }
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:remove_poll", kwlist,
+ &PyGPollFD_Type, &fd))
+ return NULL;
+
+ CHECK_DESTROYED(self, NULL);
+
+ g_source_remove_poll(self->source, &fd->pollfd);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_source_get_current_time(PyGSource *self)
+{
+ GTimeVal timeval;
+ double ret;
+
+ CHECK_DESTROYED(self, NULL);
+
+ g_source_get_current_time(self->source, &timeval);
+ ret = (double)timeval.tv_sec + (double)timeval.tv_usec * 0.000001;
+ return PyFloat_FromDouble(ret);
+}
+
+static PyMethodDef pyg_source_methods[] = {
+ { "attach", (PyCFunction)pyg_source_attach, METH_KEYWORDS },
+ { "destroy", (PyCFunction)pyg_source_destroy, METH_NOARGS },
+ { "set_callback", (PyCFunction)pyg_source_set_callback, METH_VARARGS },
+ { "get_context", (PyCFunction)pyg_source_get_context, METH_NOARGS },
+ { "add_poll", (PyCFunction)pyg_source_add_poll, METH_KEYWORDS },
+ { "remove_poll", (PyCFunction)pyg_source_remove_poll, METH_KEYWORDS },
+ { "get_current_time", (PyCFunction)pyg_source_get_current_time, METH_NOARGS },
+ { NULL, NULL, 0 }
+};
+
+static PyObject *
+pyg_source_get_dict(PyGSource *self, void *closure)
+{
+ if (self->inst_dict == NULL) {
+ self->inst_dict = PyDict_New();
+ if (self->inst_dict == NULL)
+ return NULL;
+ }
+
+ Py_INCREF(self->inst_dict);
+ return self->inst_dict;
+}
+
+static PyObject *
+pyg_source_get_priority(PyGSource *self, void *closure)
+{
+ CHECK_DESTROYED(self, NULL);
+
+ return _PyLong_FromLong(g_source_get_priority(self->source));
+}
+
+static int
+pyg_source_set_priority(PyGSource *self, PyObject *value, void *closure)
+{
+ CHECK_DESTROYED(self, -1);
+
+ if (value == NULL) {
+ PyErr_SetString(PyExc_TypeError, "cannot delete priority");
+ return -1;
+ }
+
+ if (!_PyLong_Check(value)) {
+ PyErr_SetString(PyExc_TypeError, "type mismatch");
+ return -1;
+ }
+
+ g_source_set_priority(self->source, _PyLong_AsLong(value));
+
+ return 0;
+}
+
+static PyObject *
+pyg_source_get_can_recurse(PyGSource *self, void *closure)
+{
+ CHECK_DESTROYED(self, NULL);
+
+ return PyBool_FromLong(g_source_get_can_recurse(self->source));
+}
+
+static int
+pyg_source_set_can_recurse(PyGSource *self, PyObject *value, void *closure)
+{
+ CHECK_DESTROYED(self, -1);
+
+ if (value == NULL) {
+ PyErr_SetString(PyExc_TypeError, "cannot delete can_recurse");
+ return -1;
+ }
+
+ g_source_set_can_recurse(self->source, PyObject_IsTrue(value));
+
+ return 0;
+}
+
+static PyObject *
+pyg_source_get_id(PyGSource *self, void *closure)
+{
+ CHECK_DESTROYED(self, NULL);
+
+ if (g_source_get_context(self->source) == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "source is not attached");
+ return NULL;
+ }
+
+ return _PyLong_FromLong(g_source_get_id(self->source));
+}
+
+static PyGetSetDef pyg_source_getsets[] = {
+ { "__dict__", (getter)pyg_source_get_dict, (setter)0 },
+ {"priority", (getter)pyg_source_get_priority, (setter)pyg_source_set_priority },
+ {"can_recurse", (getter)pyg_source_get_can_recurse, (setter)pyg_source_set_can_recurse },
+ {"id", (getter)pyg_source_get_id, (setter)0 },
+ {NULL, 0, 0}
+};
+
+static PyObject *
+pyg_source_repr(PyGSource *self)
+{
+ return source_repr(self, NULL);
+}
+
+static int
+pyg_source_traverse(PyGSource *self, visitproc visit, void *arg)
+{
+ int ret = 0;
+
+ if (self->inst_dict) ret = visit(self->inst_dict, arg);
+ if (ret != 0) return ret;
+
+ return 0;
+}
+
+static int
+pyg_source_clear(PyGSource *self)
+{
+ PyObject *tmp;
+
+ tmp = self->inst_dict;
+ self->inst_dict = NULL;
+ Py_XDECREF(tmp);
+
+ if (self->source) {
+ g_source_unref(self->source);
+ self->source = NULL;
+ }
+
+ return 0;
+}
+
+static void
+pyg_source_dealloc(PyGSource *self)
+{
+ PyObject_ClearWeakRefs((PyObject *)self);
+
+ PyObject_GC_UnTrack((PyObject *)self);
+
+ pyg_source_clear(self);
+
+ PyObject_GC_Del(self);
+}
+
+static gboolean
+pyg_source_prepare(GSource *source, gint *timeout)
+{
+ PyGRealSource *pysource = (PyGRealSource *)source;
+ PyObject *t;
+ gboolean ret = FALSE;
+ gboolean got_err = TRUE;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ t = PyObject_CallMethod(pysource->obj, "prepare", NULL);
+
+ if (t == NULL) {
+ goto bail;
+ } else if (!PyObject_IsTrue(t)) {
+ got_err = FALSE;
+ goto bail;
+ } else if (!PyTuple_Check(t)) {
+ PyErr_SetString(PyExc_TypeError,
+ "source prepare function must return a tuple or False");
+ goto bail;
+ } else if (PyTuple_Size(t) != 2) {
+ PyErr_SetString(PyExc_TypeError,
+ "source prepare function return tuple must be exactly "
+ "2 elements long");
+ goto bail;
+ }
+
+ ret = PyObject_IsTrue(PyTuple_GET_ITEM(t, 0));
+ *timeout = _PyLong_AsLong(PyTuple_GET_ITEM(t, 1));
+
+ if (*timeout == -1 && PyErr_Occurred()) {
+ ret = FALSE;
+ goto bail;
+ }
+
+ got_err = FALSE;
+
+bail:
+ if (got_err)
+ PyErr_Print();
+
+ Py_XDECREF(t);
+
+ pyglib_gil_state_release(state);
+
+ return ret;
+}
+
+static gboolean
+pyg_source_check(GSource *source)
+{
+ PyGRealSource *pysource = (PyGRealSource *)source;
+ PyObject *t;
+ gboolean ret;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ t = PyObject_CallMethod(pysource->obj, "check", NULL);
+
+ if (t == NULL) {
+ PyErr_Print();
+ ret = FALSE;
+ } else {
+ ret = PyObject_IsTrue(t);
+ Py_DECREF(t);
+ }
+
+ pyglib_gil_state_release(state);
+
+ return ret;
+}
+
+static gboolean
+pyg_source_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
+{
+ PyGRealSource *pysource = (PyGRealSource *)source;
+ PyObject *func, *args, *tuple, *t;
+ gboolean ret;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ if (callback) {
+ tuple = user_data;
+
+ func = PyTuple_GetItem(tuple, 0);
+ args = PyTuple_GetItem(tuple, 1);
+ } else {
+ func = Py_None;
+ args = Py_None;
+ }
+
+ t = PyObject_CallMethod(pysource->obj, "dispatch", "OO", func, args);
+
+ if (t == NULL) {
+ PyErr_Print();
+ ret = FALSE;
+ } else {
+ ret = PyObject_IsTrue(t);
+ Py_DECREF(t);
+ }
+
+ pyglib_gil_state_release(state);
+
+ return ret;
+}
+
+static void
+pyg_source_finalize(GSource *source)
+{
+ PyGRealSource *pysource = (PyGRealSource *)source;
+ PyObject *func, *t;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ func = PyObject_GetAttrString(pysource->obj, "finalize");
+ if (func) {
+ t = PyObject_CallObject(func, NULL);
+ Py_DECREF(func);
+
+ if (t == NULL) {
+ PyErr_Print();
+ } else {
+ Py_DECREF(t);
+ }
+ }
+
+ pyglib_gil_state_release(state);
+}
+
+static GSourceFuncs pyg_source_funcs =
+{
+ pyg_source_prepare,
+ pyg_source_check,
+ pyg_source_dispatch,
+ pyg_source_finalize
+};
+
+static int
+pyg_source_init(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+ PyGRealSource *pysource;
+
+ self->source = g_source_new(&pyg_source_funcs, sizeof(PyGRealSource));
+
+ pysource = (PyGRealSource *)self->source;
+ pysource->obj = (PyObject*)self;
+
+ self->inst_dict = NULL;
+ self->weakreflist = NULL;
+
+ self->python_source = TRUE;
+
+ return 0;
+}
+
+static void
+pyg_source_free(PyObject *op)
+{
+ PyObject_GC_Del(op);
+}
+
+/* glib.Idle */
+
+PYGLIB_DEFINE_TYPE("glib.Idle", PyGIdle_Type, PyGSource)
+
+static PyObject *
+pyg_idle_repr(PyGSource *self)
+{
+ return source_repr(self, "idle");
+}
+
+static int
+pyg_idle_init(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "priority", NULL };
+ gint priority = G_PRIORITY_DEFAULT_IDLE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|i:glib.Idle.__init__", kwlist,
+ &priority))
+ return -1;
+
+ self->source = g_idle_source_new ();
+
+ if (priority != G_PRIORITY_DEFAULT_IDLE)
+ g_source_set_priority(self->source, priority);
+
+ self->inst_dict = NULL;
+ self->weakreflist = NULL;
+
+ self->python_source = FALSE;
+
+ return 0;
+}
+
+/* glib.Timeout */
+
+PYGLIB_DEFINE_TYPE("glib.Timeout", PyGTimeout_Type, PyGSource)
+
+static PyObject *
+pyg_timeout_repr(PyGSource *self)
+{
+ return source_repr(self, "timeout");
+}
+
+static int
+pyg_timeout_init(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "interval", "priority", NULL };
+ gint priority = G_PRIORITY_DEFAULT;
+ guint interval;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "I|i:glib.Timeout.__init__", kwlist,
+ &interval, &priority))
+ return -1;
+
+ self->source = g_timeout_source_new(interval);
+
+ if (priority != G_PRIORITY_DEFAULT)
+ g_source_set_priority(self->source, priority);
+
+ self->inst_dict = NULL;
+ self->weakreflist = NULL;
+
+ self->python_source = FALSE;
+
+ return 0;
+}
+
+/* glib.PollFD */
+
+PYGLIB_DEFINE_TYPE("glib.PollFD", PyGPollFD_Type, PyGPollFD)
+
+static PyMemberDef pyg_poll_fd_members[] = {
+ { "fd", T_INT, offsetof(PyGPollFD, pollfd.fd), READONLY },
+ { "events", T_USHORT, offsetof(PyGPollFD, pollfd.events), READONLY },
+ { "revents", T_USHORT, offsetof(PyGPollFD, pollfd.revents), READONLY },
+ { NULL, 0, 0, 0 }
+};
+
+static void
+pyg_poll_fd_dealloc(PyGPollFD *self)
+{
+ Py_XDECREF(self->fd_obj);
+ PyObject_DEL(self);
+}
+
+static PyObject *
+pyg_poll_fd_repr(PyGPollFD *self)
+{
+ return _PyUnicode_FromFormat("<GPollFD %d (%d) at 0x%lx>",
+ self->pollfd.fd, self->pollfd.events,
+ (long)self);
+}
+
+static int
+pyg_poll_fd_init(PyGPollFD *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "fd", "events", NULL };
+ PyObject *o;
+ gint fd;
+ gushort events;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OH:glib.PollFD.__init__", kwlist,
+ &o, &events))
+ return -1;
+
+ fd = PyObject_AsFileDescriptor(o);
+ if (fd == -1)
+ return -1;
+
+ self->pollfd.fd = fd;
+ self->pollfd.events = events;
+ self->pollfd.revents = 0;
+
+ Py_INCREF(o);
+ self->fd_obj = o;
+
+ return 0;
+}
+
+void
+pyglib_source_register_types(PyObject *d)
+{
+ PyGSource_Type.tp_flags = (Py_TPFLAGS_DEFAULT |
+ Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_HAVE_GC);
+ PyGSource_Type.tp_init = (initproc)pyg_source_init;
+ PyGSource_Type.tp_free = (freefunc)pyg_source_free;
+ PyGSource_Type.tp_dealloc = (destructor)pyg_source_dealloc;
+ PyGSource_Type.tp_methods = pyg_source_methods;
+ PyGSource_Type.tp_repr = (reprfunc)pyg_source_repr;
+ PyGSource_Type.tp_traverse = (traverseproc)pyg_source_traverse;
+ PyGSource_Type.tp_clear = (inquiry)pyg_source_clear;
+ PyGSource_Type.tp_getset = pyg_source_getsets;
+ PyGSource_Type.tp_weaklistoffset = offsetof(PyGSource, weakreflist);
+ PyGSource_Type.tp_dictoffset = offsetof(PyGSource, inst_dict);
+ PYGLIB_REGISTER_TYPE(d, PyGSource_Type, "Source");
+
+ PyGIdle_Type.tp_repr = (reprfunc)pyg_idle_repr;
+ PyGIdle_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGIdle_Type.tp_base = (PyTypeObject *)&PyGSource_Type;
+ PyGIdle_Type.tp_init = (initproc)pyg_idle_init;
+ PYGLIB_REGISTER_TYPE(d, PyGIdle_Type, "Idle");
+
+ PyGTimeout_Type.tp_repr = (reprfunc)pyg_timeout_repr;
+ PyGTimeout_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGTimeout_Type.tp_base = (PyTypeObject *)&PyGSource_Type;
+ PyGTimeout_Type.tp_init = (initproc)pyg_timeout_init;
+ PYGLIB_REGISTER_TYPE(d, PyGTimeout_Type, "Timeout");
+
+ PyGPollFD_Type.tp_dealloc = (destructor)pyg_poll_fd_dealloc;
+ PyGPollFD_Type.tp_repr = (reprfunc)pyg_poll_fd_repr;
+ PyGPollFD_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGPollFD_Type.tp_members = pyg_poll_fd_members;
+ PyGPollFD_Type.tp_init = (initproc)pyg_poll_fd_init;
+ PYGLIB_REGISTER_TYPE(d, PyGPollFD_Type, "PollFD");
+}
diff --git a/glib/pygsource.h b/glib/pygsource.h
new file mode 100644
index 0000000..bf2c673
--- /dev/null
+++ b/glib/pygsource.h
@@ -0,0 +1,39 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_SOURCE_H__
+#define __PYG_SOURCE_H__
+
+extern PyTypeObject PyGSource_Type;
+extern PyTypeObject PyGIdle_Type;
+extern PyTypeObject PyGTimeout_Type;
+extern PyTypeObject PyGPollFD_Type;
+
+typedef struct
+{
+ PyObject_HEAD
+ GPollFD pollfd;
+ PyObject *fd_obj;
+} PyGPollFD;
+
+void pyglib_source_register_types(PyObject *d);
+
+#endif /* __PYG_SOURCE_H__ */
diff --git a/glib/pygspawn.c b/glib/pygspawn.c
new file mode 100644
index 0000000..cded501
--- /dev/null
+++ b/glib/pygspawn.c
@@ -0,0 +1,263 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * pygspawn.c: wrapper for the glib library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <Python.h>
+#include <glib.h>
+
+#include "pyglib.h"
+#include "pyglib-private.h"
+
+struct _PyGChildSetupData {
+ PyObject *func;
+ PyObject *data;
+};
+
+PYGLIB_DEFINE_TYPE("glib.Pid", PyGPid_Type, _PyLongObject)
+
+static PyObject *
+pyg_pid_close(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ g_spawn_close_pid(_PyLong_AsLong(self));
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef pyg_pid_methods[] = {
+ { "close", (PyCFunction)pyg_pid_close, METH_NOARGS },
+ { NULL, NULL, 0 }
+};
+
+static void
+pyg_pid_free(PyObject *gpid)
+{
+ g_spawn_close_pid((GPid) _PyLong_AsLong(gpid));
+ _PyLong_Type.tp_free((void *) gpid);
+}
+
+static int
+pyg_pid_tp_init(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyErr_SetString(PyExc_TypeError, "glib.Pid cannot be manually instantiated");
+ return -1;
+}
+
+PyObject *
+pyg_pid_new(GPid pid)
+{
+ _PyLongObject *pygpid;
+ pygpid = PyObject_NEW(_PyLongObject, &PyGPid_Type);
+
+#if PY_VERSION_HEX >= 0x03000000
+# warning "FIXME: figure out how to subclass long"
+#else
+ pygpid->ob_ival = pid;
+#endif
+ return (PyObject *) pygpid;
+}
+
+static void
+_pyg_spawn_async_callback(gpointer user_data)
+{
+ struct _PyGChildSetupData *data;
+ PyObject *retval;
+ PyGILState_STATE gil;
+
+ data = (struct _PyGChildSetupData *) user_data;
+ gil = pyglib_gil_state_ensure();
+ if (data->data)
+ retval = PyObject_CallFunction(data->func, "O", data->data);
+ else
+ retval = PyObject_CallFunction(data->func, NULL);
+ if (retval)
+ Py_DECREF(retval);
+ else
+ PyErr_Print();
+ Py_DECREF(data->func);
+ Py_XDECREF(data->data);
+ g_slice_free(struct _PyGChildSetupData, data);
+ pyglib_gil_state_release(gil);
+}
+
+PyObject *
+pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "argv", "envp", "working_directory", "flags",
+ "child_setup", "user_data", "standard_input",
+ "standard_output", "standard_error", NULL };
+ PyObject *pyargv, *pyenvp = NULL;
+ char **argv, **envp = NULL;
+ PyObject *func = Py_None, *user_data = NULL;
+ char *working_directory = NULL;
+ int flags = 0, _stdin = -1, _stdout = -1, _stderr = -1;
+ PyObject *pystdin = NULL, *pystdout = NULL, *pystderr = NULL;
+ gint *standard_input, *standard_output, *standard_error;
+ struct _PyGChildSetupData *callback_data = NULL;
+ GError *error = NULL;
+ GPid child_pid = -1;
+ Py_ssize_t len, i;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OsiOOOOO:glib.spawn_async",
+ kwlist,
+ &pyargv, &pyenvp, &working_directory, &flags,
+ &func, &user_data,
+ &pystdin, &pystdout, &pystderr))
+ return NULL;
+
+ if (pystdin && PyObject_IsTrue(pystdin))
+ standard_input = &_stdin;
+ else
+ standard_input = NULL;
+
+ if (pystdout && PyObject_IsTrue(pystdout))
+ standard_output = &_stdout;
+ else
+ standard_output = NULL;
+
+ if (pystderr && PyObject_IsTrue(pystderr))
+ standard_error = &_stderr;
+ else
+ standard_error = NULL;
+
+ /* parse argv */
+ if (!PySequence_Check(pyargv)) {
+ PyErr_SetString(PyExc_TypeError,
+ "glib.spawn_async: "
+ "first argument must be a sequence of strings");
+ return NULL;
+ }
+ len = PySequence_Length(pyargv);
+ argv = g_new0(char *, len + 1);
+ for (i = 0; i < len; ++i) {
+ PyObject *tmp = PySequence_ITEM(pyargv, i);
+ if (!_PyUnicode_Check(tmp)) {
+ PyErr_SetString(PyExc_TypeError,
+ "glib.spawn_async: "
+ "first argument must be a sequence of strings");
+ g_free(argv);
+ Py_XDECREF(tmp);
+ return NULL;
+ }
+ argv[i] = _PyUnicode_AsString(tmp);
+ Py_DECREF(tmp);
+ }
+
+ /* parse envp */
+ if (pyenvp) {
+ if (!PySequence_Check(pyenvp)) {
+ PyErr_SetString(PyExc_TypeError,
+ "glib.spawn_async: "
+ "second argument must be a sequence of strings");
+ g_free(argv);
+ return NULL;
+ }
+ len = PySequence_Length(pyenvp);
+ envp = g_new0(char *, len + 1);
+ for (i = 0; i < len; ++i) {
+ PyObject *tmp = PySequence_ITEM(pyenvp, i);
+ if (!_PyUnicode_Check(tmp)) {
+ PyErr_SetString(PyExc_TypeError,
+ "glib.spawn_async: "
+ "second argument must be a sequence of strings");
+ g_free(envp);
+ Py_XDECREF(tmp);
+ g_free(argv);
+ return NULL;
+ }
+ envp[i] = _PyUnicode_AsString(tmp);
+ Py_DECREF(tmp);
+ }
+ }
+
+ if (func != Py_None) {
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError, "child_setup parameter must be callable or None");
+ g_free(argv);
+ if (envp)
+ g_free(envp);
+ return NULL;
+ }
+ callback_data = g_slice_new(struct _PyGChildSetupData);
+ callback_data->func = func;
+ callback_data->data = user_data;
+ Py_INCREF(callback_data->func);
+ if (callback_data->data)
+ Py_INCREF(callback_data->data);
+ }
+
+ if (!g_spawn_async_with_pipes(working_directory, argv, envp, flags,
+ (func != Py_None ? _pyg_spawn_async_callback : NULL),
+ callback_data, &child_pid,
+ standard_input,
+ standard_output,
+ standard_error,
+ &error))
+
+
+ {
+ g_free(argv);
+ if (envp) g_free(envp);
+ if (callback_data) {
+ Py_DECREF(callback_data->func);
+ Py_XDECREF(callback_data->data);
+ g_slice_free(struct _PyGChildSetupData, callback_data);
+ }
+ pyglib_error_check(&error);
+ return NULL;
+ }
+ g_free(argv);
+ if (envp) g_free(envp);
+
+ if (standard_input)
+ pystdin = _PyLong_FromLong(*standard_input);
+ else {
+ Py_INCREF(Py_None);
+ pystdin = Py_None;
+ }
+
+ if (standard_output)
+ pystdout = _PyLong_FromLong(*standard_output);
+ else {
+ Py_INCREF(Py_None);
+ pystdout = Py_None;
+ }
+
+ if (standard_error)
+ pystderr = _PyLong_FromLong(*standard_error);
+ else {
+ Py_INCREF(Py_None);
+ pystderr = Py_None;
+ }
+
+ return Py_BuildValue("NNNN", pyg_pid_new(child_pid), pystdin, pystdout, pystderr);
+}
+
+void
+pyglib_spawn_register_types(PyObject *d)
+{
+ PyGPid_Type.tp_base = &_PyLong_Type;
+ PyGPid_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGPid_Type.tp_methods = pyg_pid_methods;
+ PyGPid_Type.tp_init = pyg_pid_tp_init;
+ PyGPid_Type.tp_free = (freefunc)pyg_pid_free;
+ PYGLIB_REGISTER_TYPE(d, PyGPid_Type, "Pid");
+}
diff --git a/glib/pygspawn.h b/glib/pygspawn.h
new file mode 100644
index 0000000..2e8dd3c
--- /dev/null
+++ b/glib/pygspawn.h
@@ -0,0 +1,32 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_PID_H__
+#define __PYG_PID_H__
+
+PyObject * pyg_pid_new(GPid pid);
+void pyglib_spawn_register_types(PyObject *d);
+
+PyObject * pyglib_spawn_async(PyObject *self, PyObject *args, PyObject *kwargs);
+
+
+#endif /* __PYG_PID_H__ */
+
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
new file mode 100644
index 0000000..aff1609
--- /dev/null
+++ b/gobject/Makefile.am
@@ -0,0 +1,67 @@
+AUTOMAKE_OPTIONS = 1.7
+PLATFORM_VERSION = 2.0
+
+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
+pkginclude_HEADERS = pygobject.h
+
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+
+# gobject python scripts
+pygobjectdir = $(pkgpyexecdir)/gobject
+pygobject_PYTHON = \
+ __init__.py \
+ constants.py \
+ propertyhelper.py
+pygobject_LTLIBRARIES = _gobject.la
+
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+_gobject_la_CFLAGS = \
+ -I$(top_srcdir)/glib \
+ $(PYTHON_INCLUDES) \
+ $(FFI_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ -DPY_SSIZE_T_CLEAN
+_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
+_gobject_la_LIBADD = \
+ $(GLIB_LIBS) \
+ $(FFI_LIBS) \
+ $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gobject_la_SOURCES = \
+ gobjectmodule.c \
+ pygboxed.c \
+ pygboxed.h \
+ pygenum.c \
+ pygenum.h \
+ pygflags.c \
+ pygflags.h \
+ pyginterface.c \
+ pyginterface.h \
+ pygobject.c \
+ pygobject.h \
+ pygobject-private.h \
+ pygparamspec.c \
+ pygparamspec.h \
+ pygpointer.c \
+ pygpointer.h \
+ pygtype.c \
+ pygtype.h \
+ pygi-external.h
+
+if HAVE_LIBFFI
+_gobject_la_SOURCES += ffi-marshaller.c ffi-marshaller.h
+endif
+
+if PLATFORM_WIN32
+_gobject_la_CFLAGS += -DPLATFORM_WIN32
+endif
+
+
+all: $(pygobject_LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(pygobject_LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
diff --git a/gobject/Makefile.in b/gobject/Makefile.in
new file mode 100644
index 0000000..ef997d9
--- /dev/null
+++ b/gobject/Makefile.in
@@ -0,0 +1,747 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h
+@PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32
+subdir = gobject
+DIST_COMMON = $(pkginclude_HEADERS) $(pygobject_PYTHON) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pygobjectdir)" \
+ "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"
+LTLIBRARIES = $(pygobject_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_gobject_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \
+ pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \
+ pyginterface.h pygobject.c pygobject.h pygobject-private.h \
+ pygparamspec.c pygparamspec.h pygpointer.c pygpointer.h \
+ pygtype.c pygtype.h pygi-external.h ffi-marshaller.c \
+ ffi-marshaller.h
+@HAVE_LIBFFI_TRUE@am__objects_1 = _gobject_la-ffi-marshaller.lo
+am__gobject_la_OBJECTS = _gobject_la-gobjectmodule.lo \
+ _gobject_la-pygboxed.lo _gobject_la-pygenum.lo \
+ _gobject_la-pygflags.lo _gobject_la-pyginterface.lo \
+ _gobject_la-pygobject.lo _gobject_la-pygparamspec.lo \
+ _gobject_la-pygpointer.lo _gobject_la-pygtype.lo \
+ $(am__objects_1)
+_gobject_la_OBJECTS = $(am__gobject_la_OBJECTS)
+_gobject_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gobject_la_CFLAGS) \
+ $(CFLAGS) $(_gobject_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(_gobject_la_SOURCES)
+DIST_SOURCES = $(am___gobject_la_SOURCES_DIST)
+py_compile = $(top_srcdir)/py-compile
+HEADERS = $(pkginclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+PLATFORM_VERSION = 2.0
+pkginclude_HEADERS = pygobject.h
+
+# gobject python scripts
+pygobjectdir = $(pkgpyexecdir)/gobject
+pygobject_PYTHON = \
+ __init__.py \
+ constants.py \
+ propertyhelper.py
+
+pygobject_LTLIBRARIES = _gobject.la
+common_ldflags = -module -avoid-version $(am__append_1)
+_gobject_la_CFLAGS = -I$(top_srcdir)/glib $(PYTHON_INCLUDES) \
+ $(FFI_CFLAGS) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN \
+ $(am__append_3)
+_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
+_gobject_la_LIBADD = \
+ $(GLIB_LIBS) \
+ $(FFI_LIBS) \
+ $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+
+_gobject_la_SOURCES = gobjectmodule.c pygboxed.c pygboxed.h pygenum.c \
+ pygenum.h pygflags.c pygflags.h pyginterface.c pyginterface.h \
+ pygobject.c pygobject.h pygobject-private.h pygparamspec.c \
+ pygparamspec.h pygpointer.c pygpointer.h pygtype.c pygtype.h \
+ pygi-external.h $(am__append_2)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gobject/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu gobject/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pygobjectLTLIBRARIES: $(pygobject_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)"
+ @list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygobjectdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygobjectdir)"; \
+ }
+
+uninstall-pygobjectLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pygobjectdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pygobjectdir)/$$f"; \
+ done
+
+clean-pygobjectLTLIBRARIES:
+ -test -z "$(pygobject_LTLIBRARIES)" || rm -f $(pygobject_LTLIBRARIES)
+ @list='$(pygobject_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+_gobject.la: $(_gobject_la_OBJECTS) $(_gobject_la_DEPENDENCIES)
+ $(_gobject_la_LINK) -rpath $(pygobjectdir) $(_gobject_la_OBJECTS) $(_gobject_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-ffi-marshaller.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-gobjectmodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygboxed.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygenum.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygflags.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pyginterface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygobject.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygparamspec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygpointer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygtype.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+_gobject_la-gobjectmodule.lo: gobjectmodule.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF $(DEPDIR)/_gobject_la-gobjectmodule.Tpo -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-gobjectmodule.Tpo $(DEPDIR)/_gobject_la-gobjectmodule.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gobjectmodule.c' object='_gobject_la-gobjectmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c
+
+_gobject_la-pygboxed.lo: pygboxed.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygboxed.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygboxed.Tpo -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygboxed.Tpo $(DEPDIR)/_gobject_la-pygboxed.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygboxed.c' object='_gobject_la-pygboxed.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c
+
+_gobject_la-pygenum.lo: pygenum.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygenum.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygenum.Tpo -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygenum.Tpo $(DEPDIR)/_gobject_la-pygenum.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygenum.c' object='_gobject_la-pygenum.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c
+
+_gobject_la-pygflags.lo: pygflags.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygflags.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygflags.Tpo -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygflags.Tpo $(DEPDIR)/_gobject_la-pygflags.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygflags.c' object='_gobject_la-pygflags.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c
+
+_gobject_la-pyginterface.lo: pyginterface.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pyginterface.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pyginterface.Tpo -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pyginterface.Tpo $(DEPDIR)/_gobject_la-pyginterface.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pyginterface.c' object='_gobject_la-pyginterface.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c
+
+_gobject_la-pygobject.lo: pygobject.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygobject.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygobject.Tpo -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygobject.Tpo $(DEPDIR)/_gobject_la-pygobject.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygobject.c' object='_gobject_la-pygobject.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c
+
+_gobject_la-pygparamspec.lo: pygparamspec.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygparamspec.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygparamspec.Tpo -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygparamspec.Tpo $(DEPDIR)/_gobject_la-pygparamspec.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygparamspec.c' object='_gobject_la-pygparamspec.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c
+
+_gobject_la-pygpointer.lo: pygpointer.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygpointer.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygpointer.Tpo -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygpointer.Tpo $(DEPDIR)/_gobject_la-pygpointer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygpointer.c' object='_gobject_la-pygpointer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c
+
+_gobject_la-pygtype.lo: pygtype.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygtype.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygtype.Tpo -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygtype.Tpo $(DEPDIR)/_gobject_la-pygtype.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygtype.c' object='_gobject_la-pygtype.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c
+
+_gobject_la-ffi-marshaller.lo: ffi-marshaller.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-ffi-marshaller.lo -MD -MP -MF $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo $(DEPDIR)/_gobject_la-ffi-marshaller.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ffi-marshaller.c' object='_gobject_la-ffi-marshaller.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-pygobjectPYTHON: $(pygobject_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)"
+ @list='$(pygobject_PYTHON)'; dlist=; list2=; test -n "$(pygobjectdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygobjectdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pygobjectdir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygobjectdir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygobjectdir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-pygobjectPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pygobject_PYTHON)'; test -n "$(pygobjectdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$fileso
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+ done
+
+uninstall-pkgincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-pygobjectLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS \
+ install-pygobjectLTLIBRARIES install-pygobjectPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkgincludeHEADERS \
+ uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-local clean-pygobjectLTLIBRARIES ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-pkgincludeHEADERS install-ps install-ps-am \
+ install-pygobjectLTLIBRARIES install-pygobjectPYTHON \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-pkgincludeHEADERS uninstall-pygobjectLTLIBRARIES \
+ uninstall-pygobjectPYTHON
+
+
+all: $(pygobject_LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(pygobject_LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gobject/__init__.py b/gobject/__init__.py
new file mode 100644
index 0000000..d5aec45
--- /dev/null
+++ b/gobject/__init__.py
@@ -0,0 +1,117 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006 Johan Dahlin
+#
+# gobject/__init__.py: initialisation file for gobject module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+# this can go when things are a little further along
+
+import sys
+
+from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
+ io_add_watch, source_remove, child_watch_add, markup_escape_text, \
+ get_current_time, filename_display_name, filename_display_basename, \
+ filename_from_utf8, get_application_name, set_application_name, \
+ get_prgname, set_prgname, main_depth, Pid, GError, glib_version, \
+ MainLoop, MainContext, main_context_default, IOChannel, Source, Idle, \
+ Timeout, PollFD, OptionGroup, OptionContext, option
+from glib import SPAWN_LEAVE_DESCRIPTORS_OPEN, SPAWN_DO_NOT_REAP_CHILD, \
+ SPAWN_SEARCH_PATH, SPAWN_STDOUT_TO_DEV_NULL, SPAWN_STDERR_TO_DEV_NULL, \
+ SPAWN_CHILD_INHERITS_STDIN, SPAWN_FILE_AND_ARGV_ZERO, PRIORITY_HIGH, \
+ PRIORITY_DEFAULT, PRIORITY_HIGH_IDLE, PRIORITY_DEFAULT_IDLE, \
+ PRIORITY_LOW, IO_IN, IO_OUT, IO_PRI, IO_ERR, IO_HUP, IO_NVAL, \
+ IO_STATUS_ERROR, IO_STATUS_NORMAL, IO_STATUS_EOF, IO_STATUS_AGAIN, \
+ IO_FLAG_APPEND, IO_FLAG_NONBLOCK, IO_FLAG_IS_READABLE, \
+ IO_FLAG_IS_WRITEABLE, IO_FLAG_IS_SEEKABLE, IO_FLAG_MASK, \
+ IO_FLAG_GET_MASK, IO_FLAG_SET_MASK, OPTION_FLAG_HIDDEN, \
+ OPTION_FLAG_IN_MAIN, OPTION_FLAG_REVERSE, OPTION_FLAG_NO_ARG, \
+ OPTION_FLAG_FILENAME, OPTION_FLAG_OPTIONAL_ARG, OPTION_FLAG_NOALIAS, \
+ OPTION_ERROR_UNKNOWN_OPTION, OPTION_ERROR_BAD_VALUE, \
+ OPTION_ERROR_FAILED, OPTION_REMAINING, OPTION_ERROR
+
+from gobject.constants import *
+from gobject._gobject import *
+_PyGObject_API = _gobject._PyGObject_API
+
+from gobject.propertyhelper import property
+
+sys.modules['gobject.option'] = option
+
+class GObjectMeta(type):
+ "Metaclass for automatically registering GObject classes"
+ def __init__(cls, name, bases, dict_):
+ type.__init__(cls, name, bases, dict_)
+ cls._install_properties()
+ cls._type_register(cls.__dict__)
+
+ def _install_properties(cls):
+ gproperties = getattr(cls, '__gproperties__', {})
+
+ props = []
+ for name, prop in cls.__dict__.items():
+ if isinstance(prop, property): # not same as the built-in
+ if name in gproperties:
+ raise ValueError
+ prop.name = name
+ gproperties[name] = prop.get_pspec_args()
+ props.append(prop)
+
+ if not props:
+ return
+
+ cls.__gproperties__ = gproperties
+
+ if ('do_get_property' in cls.__dict__ or
+ 'do_set_property' in cls.__dict__):
+ for prop in props:
+ if (prop.getter != prop._default_getter or
+ prop.setter != prop._default_setter):
+ raise TypeError(
+ "GObject subclass %r defines do_get/set_property"
+ " and it also uses a property which a custom setter"
+ " or getter. This is not allowed" % (
+ cls.__name__,))
+
+ def obj_get_property(self, pspec):
+ name = pspec.name.replace('-', '_')
+ prop = getattr(cls, name, None)
+ if prop:
+ return prop.getter(self)
+ cls.do_get_property = obj_get_property
+
+ def obj_set_property(self, pspec, value):
+ name = pspec.name.replace('-', '_')
+ prop = getattr(cls, name, None)
+ if prop:
+ prop.setter(self, value)
+ cls.do_set_property = obj_set_property
+
+ def _type_register(cls, namespace):
+ ## don't register the class if already registered
+ if '__gtype__' in namespace:
+ return
+
+ if not ('__gproperties__' in namespace or
+ '__gsignals__' in namespace or
+ '__gtype_name__' in namespace):
+ return
+
+ type_register(cls, namespace.get('__gtype_name__'))
+_gobject._install_metaclass(GObjectMeta)
+
+del _gobject
diff --git a/gobject/constants.py b/gobject/constants.py
new file mode 100644
index 0000000..a6d3ce9
--- /dev/null
+++ b/gobject/constants.py
@@ -0,0 +1,83 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006-2007 Johan Dahlin
+#
+# gobject/constants.py: GObject type constants
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import sys
+
+import gobject._gobject
+_gobject = sys.modules['gobject._gobject']
+
+# TYPE_INVALID defined in gobjectmodule.c
+TYPE_NONE = _gobject.type_from_name('void')
+TYPE_INTERFACE = _gobject.type_from_name('GInterface')
+TYPE_CHAR = _gobject.type_from_name('gchar')
+TYPE_UCHAR = _gobject.type_from_name('guchar')
+TYPE_BOOLEAN = _gobject.type_from_name('gboolean')
+TYPE_INT = _gobject.type_from_name('gint')
+TYPE_UINT = _gobject.type_from_name('guint')
+TYPE_LONG = _gobject.type_from_name('glong')
+TYPE_ULONG = _gobject.type_from_name('gulong')
+TYPE_INT64 = _gobject.type_from_name('gint64')
+TYPE_UINT64 = _gobject.type_from_name('guint64')
+TYPE_ENUM = _gobject.type_from_name('GEnum')
+TYPE_FLAGS = _gobject.type_from_name('GFlags')
+TYPE_FLOAT = _gobject.type_from_name('gfloat')
+TYPE_DOUBLE = _gobject.type_from_name('gdouble')
+TYPE_STRING = _gobject.type_from_name('gchararray')
+TYPE_POINTER = _gobject.type_from_name('gpointer')
+TYPE_BOXED = _gobject.type_from_name('GBoxed')
+TYPE_PARAM = _gobject.type_from_name('GParam')
+TYPE_OBJECT = _gobject.type_from_name('GObject')
+TYPE_PYOBJECT = _gobject.type_from_name('PyObject')
+TYPE_UNICHAR = TYPE_UINT
+
+# do a little dance to maintain API compatibility
+# as these were origianally defined here, and are
+# now defined in gobjectmodule.c
+G_MINFLOAT = _gobject.G_MINFLOAT
+G_MAXFLOAT = _gobject.G_MAXFLOAT
+G_MINDOUBLE = _gobject.G_MINDOUBLE
+G_MAXDOUBLE = _gobject.G_MAXDOUBLE
+G_MINSHORT = _gobject.G_MINSHORT
+G_MAXSHORT = _gobject.G_MAXSHORT
+G_MAXUSHORT = _gobject.G_MAXUSHORT
+G_MININT = _gobject.G_MININT
+G_MAXINT = _gobject.G_MAXINT
+G_MAXUINT = _gobject.G_MAXUINT
+G_MINLONG = _gobject.G_MINLONG
+G_MAXLONG = _gobject.G_MAXLONG
+G_MAXULONG = _gobject.G_MAXULONG
+G_MININT8 = _gobject.G_MININT8
+G_MAXINT8 = _gobject.G_MAXINT8
+G_MAXUINT8 = _gobject.G_MAXUINT8
+G_MININT16 = _gobject.G_MININT16
+G_MAXINT16 = _gobject.G_MAXINT16
+G_MAXUINT16 = _gobject.G_MAXUINT16
+G_MININT32 = _gobject.G_MININT32
+G_MAXINT32 = _gobject.G_MAXINT32
+G_MAXUINT32 = _gobject.G_MAXUINT32
+G_MININT64 = _gobject.G_MININT64
+G_MAXINT64 = _gobject.G_MAXINT64
+G_MAXUINT64 = _gobject.G_MAXUINT64
+G_MAXSIZE = _gobject.G_MAXSIZE
+G_MAXSSIZE = _gobject.G_MAXSSIZE
+G_MINOFFSET = _gobject.G_MINOFFSET
+G_MAXOFFSET = _gobject.G_MAXOFFSET
+
diff --git a/gobject/ffi-marshaller.c b/gobject/ffi-marshaller.c
new file mode 100644
index 0000000..60cfc34
--- /dev/null
+++ b/gobject/ffi-marshaller.c
@@ -0,0 +1,194 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2007 Johan Dahlin
+ *
+ * ffi-marshaller: Generic CMarshaller using libffi
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <glib-object.h>
+#include <ffi.h>
+
+static ffi_type *
+g_value_to_ffi_type (const GValue *gvalue, gpointer *value)
+{
+ ffi_type *rettype = NULL;
+ GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
+ g_assert (type != G_TYPE_INVALID);
+
+ switch (type) {
+ case G_TYPE_BOOLEAN:
+ case G_TYPE_CHAR:
+ case G_TYPE_INT:
+ rettype = &ffi_type_sint;
+ *value = (gpointer)&(gvalue->data[0].v_int);
+ break;
+ case G_TYPE_UCHAR:
+ case G_TYPE_UINT:
+ rettype = &ffi_type_uint;
+ *value = (gpointer)&(gvalue->data[0].v_uint);
+ break;
+ case G_TYPE_STRING:
+ case G_TYPE_OBJECT:
+ case G_TYPE_BOXED:
+ case G_TYPE_POINTER:
+ rettype = &ffi_type_pointer;
+ *value = (gpointer)&(gvalue->data[0].v_pointer);
+ break;
+ case G_TYPE_FLOAT:
+ rettype = &ffi_type_float;
+ *value = (gpointer)&(gvalue->data[0].v_float);
+ break;
+ case G_TYPE_DOUBLE:
+ rettype = &ffi_type_double;
+ *value = (gpointer)&(gvalue->data[0].v_double);
+ break;
+ case G_TYPE_LONG:
+ rettype = &ffi_type_slong;
+ *value = (gpointer)&(gvalue->data[0].v_long);
+ break;
+ case G_TYPE_ULONG:
+ rettype = &ffi_type_ulong;
+ *value = (gpointer)&(gvalue->data[0].v_ulong);
+ break;
+ case G_TYPE_INT64:
+ rettype = &ffi_type_sint64;
+ *value = (gpointer)&(gvalue->data[0].v_int64);
+ break;
+ case G_TYPE_UINT64:
+ rettype = &ffi_type_uint64;
+ *value = (gpointer)&(gvalue->data[0].v_uint64);
+ break;
+ default:
+ rettype = &ffi_type_pointer;
+ *value = NULL;
+ g_warning ("Unsupported fundamental type: %s", g_type_name (type));
+ break;
+ }
+ return rettype;
+}
+
+static void
+g_value_from_ffi_type (GValue *gvalue, gpointer *value)
+{
+ switch (g_type_fundamental (G_VALUE_TYPE (gvalue))) {
+ case G_TYPE_INT:
+ g_value_set_int (gvalue, *(gint*)value);
+ break;
+ case G_TYPE_FLOAT:
+ g_value_set_float (gvalue, *(gfloat*)value);
+ break;
+ case G_TYPE_DOUBLE:
+ g_value_set_double (gvalue, *(gdouble*)value);
+ break;
+ case G_TYPE_BOOLEAN:
+ g_value_set_boolean (gvalue, *(gboolean*)value);
+ break;
+ case G_TYPE_STRING:
+ g_value_set_string (gvalue, *(gchar**)value);
+ break;
+ case G_TYPE_CHAR:
+ g_value_set_char (gvalue, *(gchar*)value);
+ break;
+ case G_TYPE_UCHAR:
+ g_value_set_uchar (gvalue, *(guchar*)value);
+ break;
+ case G_TYPE_UINT:
+ g_value_set_uint (gvalue, *(guint*)value);
+ break;
+ case G_TYPE_POINTER:
+ g_value_set_pointer (gvalue, *(gpointer*)value);
+ break;
+ case G_TYPE_LONG:
+ g_value_set_long (gvalue, *(glong*)value);
+ break;
+ case G_TYPE_ULONG:
+ g_value_set_ulong (gvalue, *(gulong*)value);
+ break;
+ case G_TYPE_INT64:
+ g_value_set_int64 (gvalue, *(gint64*)value);
+ break;
+ case G_TYPE_UINT64:
+ g_value_set_uint64 (gvalue, *(guint64*)value);
+ break;
+ case G_TYPE_BOXED:
+ g_value_set_boxed (gvalue, *(gpointer*)value);
+ break;
+ default:
+ g_warning ("Unsupported fundamental type: %s",
+ g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue))));
+ }
+
+}
+
+void
+g_cclosure_marshal_generic_ffi (GClosure *closure,
+ GValue *return_gvalue,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ ffi_type *rtype;
+ void *rvalue;
+ int n_args;
+ ffi_type **atypes;
+ void **args;
+ int i;
+ ffi_cif cif;
+ GCClosure *cc = (GCClosure*) closure;
+
+ if (return_gvalue && G_VALUE_TYPE (return_gvalue))
+ {
+ rtype = g_value_to_ffi_type (return_gvalue, &rvalue);
+ }
+ else
+ {
+ rtype = &ffi_type_void;
+ }
+
+ rvalue = g_alloca (MAX (rtype->size, sizeof (ffi_arg)));
+
+ n_args = n_param_values + 1;
+ atypes = g_alloca (sizeof (ffi_type *) * n_args);
+ args = g_alloca (sizeof (gpointer) * n_args);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ atypes[n_args-1] = g_value_to_ffi_type (param_values + 0,
+ &args[n_args-1]);
+ atypes[0] = &ffi_type_pointer;
+ args[0] = &closure->data;
+ }
+ else
+ {
+ atypes[0] = g_value_to_ffi_type (param_values + 0, &args[0]);
+ atypes[n_args-1] = &ffi_type_pointer;
+ args[n_args-1] = &closure->data;
+ }
+
+ for (i = 1; i < n_args - 1; i++)
+ atypes[i] = g_value_to_ffi_type (param_values + i, &args[i]);
+
+ if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK)
+ return;
+
+ ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args);
+
+ if (return_gvalue && G_VALUE_TYPE (return_gvalue))
+ g_value_from_ffi_type (return_gvalue, rvalue);
+}
diff --git a/gobject/ffi-marshaller.h b/gobject/ffi-marshaller.h
new file mode 100644
index 0000000..aac18bd
--- /dev/null
+++ b/gobject/ffi-marshaller.h
@@ -0,0 +1,31 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2007 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef _FFI_MARSHALLER_H_
+#define _FFI_MARSHALLER_H_
+
+void g_cclosure_marshal_generic_ffi (GClosure *closure,
+ GValue *return_gvalue,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+#endif /* _FFI_MARSHALLER_H_ */
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
new file mode 100644
index 0000000..09244b8
--- /dev/null
+++ b/gobject/gobjectmodule.c
@@ -0,0 +1,2659 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ *
+ * gobjectmodule.c: wrapper for the gobject library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gobject/gvaluecollector.h>
+#include <pyglib.h>
+#include <pythread.h>
+#include "pygobject-private.h"
+#include "pygboxed.h"
+#include "pygenum.h"
+#include "pygflags.h"
+#include "pyginterface.h"
+#include "pygparamspec.h"
+#include "pygpointer.h"
+#include "pygtype.h"
+
+#ifdef HAVE_FFI_H
+#include "ffi-marshaller.h"
+static GSignalCMarshaller marshal_generic = g_cclosure_marshal_generic_ffi;
+#else
+static GSignalCMarshaller marshal_generic = 0;
+#endif
+
+static PyObject *_pyg_signal_accumulator_true_handled_func;
+static GHashTable *log_handlers = NULL;
+static gboolean log_handlers_disabled = FALSE;
+
+static void pyg_flags_add_constants(PyObject *module, GType flags_type,
+ const gchar *strip_prefix);
+
+
+/* -------------- GDK threading hooks ---------------------------- */
+
+/**
+ * pyg_set_thread_block_funcs:
+ * @block_threads_func: a function to block Python threads.
+ * @unblock_threads_func: a function to unblock Python threads.
+ *
+ * an interface to allow pygtk to add hooks to handle threading
+ * similar to the old PyGTK 0.6.x releases. May not work quite right
+ * anymore.
+ */
+static void
+pyg_set_thread_block_funcs (PyGThreadBlockFunc block_threads_func,
+ PyGThreadBlockFunc unblock_threads_func)
+{
+ g_return_if_fail(pygobject_api_functions.block_threads == NULL &&
+ pygobject_api_functions.unblock_threads == NULL);
+
+ pygobject_api_functions.block_threads = block_threads_func;
+ pygobject_api_functions.unblock_threads = unblock_threads_func;
+ pyglib_set_thread_block_funcs(block_threads_func,
+ unblock_threads_func);
+}
+
+/**
+ * pyg_destroy_notify:
+ * @user_data: a PyObject pointer.
+ *
+ * A function that can be used as a GDestroyNotify callback that will
+ * call Py_DECREF on the data.
+ */
+void
+pyg_destroy_notify(gpointer user_data)
+{
+ PyObject *obj = (PyObject *)user_data;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+ Py_DECREF(obj);
+ pyglib_gil_state_release(state);
+}
+
+
+/* ---------------- gobject module functions -------------------- */
+
+static PyObject *
+pyg_type_name (PyObject *self, PyObject *args)
+{
+ PyObject *gtype;
+ GType type;
+ const gchar *name;
+
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gobject.type_name is deprecated; "
+ "use GType.name instead"))
+ return NULL;
+#endif
+
+ if (!PyArg_ParseTuple(args, "O:gobject.type_name", &gtype))
+ return NULL;
+ if ((type = pyg_type_from_object(gtype)) == 0)
+ return NULL;
+ name = g_type_name(type);
+ if (name)
+ return _PyUnicode_FromString(name);
+ PyErr_SetString(PyExc_RuntimeError, "unknown typecode");
+ return NULL;
+}
+
+static PyObject *
+pyg_type_from_name (PyObject *self, PyObject *args)
+{
+ const gchar *name;
+ GType type;
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gobject.type_from_name is deprecated; "
+ "use GType.from_name instead"))
+ return NULL;
+#endif
+ if (!PyArg_ParseTuple(args, "s:gobject.type_from_name", &name))
+ return NULL;
+ type = _pyg_type_from_name(name);
+ if (type != 0)
+ return pyg_type_wrapper_new(type);
+ PyErr_Format(PyExc_RuntimeError, "%s: unknown type name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+}
+
+static PyObject *
+pyg_type_parent (PyObject *self, PyObject *args)
+{
+ PyObject *gtype;
+ GType type, parent;
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gobject.type_parent is deprecated; "
+ "use GType.parent instead"))
+ return NULL;
+#endif
+ if (!PyArg_ParseTuple(args, "O:gobject.type_parent", &gtype))
+ return NULL;
+ if ((type = pyg_type_from_object(gtype)) == 0)
+ return NULL;
+ parent = g_type_parent(type);
+ if (parent != 0)
+ return pyg_type_wrapper_new(parent);
+ PyErr_SetString(PyExc_RuntimeError, "no parent for type");
+ return NULL;
+}
+
+static PyObject *
+pyg_type_is_a (PyObject *self, PyObject *args)
+{
+ PyObject *gtype, *gparent;
+ GType type, parent;
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gobject.type_is_a is deprecated; "
+ "use GType.is_a instead"))
+ return NULL;
+#endif
+ if (!PyArg_ParseTuple(args, "OO:gobject.type_is_a", &gtype, &gparent))
+ return NULL;
+ if ((type = pyg_type_from_object(gtype)) == 0)
+ return NULL;
+ if ((parent = pyg_type_from_object(gparent)) == 0)
+ return NULL;
+ return PyBool_FromLong(g_type_is_a(type, parent));
+}
+
+static PyObject *
+pyg_type_children (PyObject *self, PyObject *args)
+{
+ PyObject *gtype, *list;
+ GType type, *children;
+ guint n_children, i;
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gobject.type_children is deprecated; "
+ "use GType.children instead"))
+ return NULL;
+#endif
+ if (!PyArg_ParseTuple(args, "O:gobject.type_children", &gtype))
+ return NULL;
+ if ((type = pyg_type_from_object(gtype)) == 0)
+ return NULL;
+ children = g_type_children(type, &n_children);
+ if (children) {
+ list = PyList_New(0);
+ for (i = 0; i < n_children; i++) {
+ PyObject *o;
+ PyList_Append(list, o=pyg_type_wrapper_new(children[i]));
+ Py_DECREF(o);
+ }
+ g_free(children);
+ return list;
+ }
+ PyErr_SetString(PyExc_RuntimeError, "invalid type, or no children");
+ return NULL;
+}
+
+static PyObject *
+pyg_type_interfaces (PyObject *self, PyObject *args)
+{
+ PyObject *gtype, *list;
+ GType type, *interfaces;
+ guint n_interfaces, i;
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gobject.type_interfaces is deprecated; "
+ "use GType.interfaces instead"))
+ return NULL;
+#endif
+ if (!PyArg_ParseTuple(args, "O:gobject.type_interfaces", &gtype))
+ return NULL;
+ if ((type = pyg_type_from_object(gtype)) == 0)
+ return NULL;
+ interfaces = g_type_interfaces(type, &n_interfaces);
+ if (interfaces) {
+ list = PyList_New(0);
+ for (i = 0; i < n_interfaces; i++) {
+ PyObject *o;
+ PyList_Append(list, o=pyg_type_wrapper_new(interfaces[i]));
+ Py_DECREF(o);
+ }
+ g_free(interfaces);
+ return list;
+ }
+ PyErr_SetString(PyExc_RuntimeError, "invalid type, or no interfaces");
+ return NULL;
+}
+
+static void
+pyg_object_set_property (GObject *object, guint property_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ PyObject *object_wrapper, *retval;
+ PyObject *py_pspec, *py_value;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ object_wrapper = pygobject_new(object);
+
+ if (object_wrapper == NULL) {
+ pyglib_gil_state_release(state);
+ return;
+ }
+
+ py_pspec = pyg_param_spec_new(pspec);
+ py_value = pyg_value_as_pyobject (value, TRUE);
+
+ retval = PyObject_CallMethod(object_wrapper, "do_set_property",
+ "OO", py_pspec, py_value);
+ if (retval) {
+ Py_DECREF(retval);
+ } else {
+ PyErr_Print();
+ }
+
+ Py_DECREF(object_wrapper);
+ Py_DECREF(py_pspec);
+ Py_DECREF(py_value);
+
+ pyglib_gil_state_release(state);
+}
+
+static void
+pyg_object_get_property (GObject *object, guint property_id,
+ GValue *value, GParamSpec *pspec)
+{
+ PyObject *object_wrapper, *retval;
+ PyObject *py_pspec;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ object_wrapper = pygobject_new(object);
+
+ if (object_wrapper == NULL) {
+ pyglib_gil_state_release(state);
+ return;
+ }
+
+ py_pspec = pyg_param_spec_new(pspec);
+ retval = PyObject_CallMethod(object_wrapper, "do_get_property",
+ "O", py_pspec);
+ if (retval == NULL || pyg_value_from_pyobject(value, retval) < 0) {
+ PyErr_Print();
+ }
+ Py_DECREF(object_wrapper);
+ Py_DECREF(py_pspec);
+ Py_XDECREF(retval);
+
+ pyglib_gil_state_release(state);
+}
+
+static void
+pyg_object_class_init(GObjectClass *class, PyObject *py_class)
+{
+ class->set_property = pyg_object_set_property;
+ class->get_property = pyg_object_get_property;
+}
+
+typedef struct _PyGSignalAccumulatorData {
+ PyObject *callable;
+ PyObject *user_data;
+} PyGSignalAccumulatorData;
+
+static gboolean
+_pyg_signal_accumulator(GSignalInvocationHint *ihint,
+ GValue *return_accu,
+ const GValue *handler_return,
+ gpointer _data)
+{
+ PyObject *py_ihint, *py_return_accu, *py_handler_return, *py_detail;
+ PyObject *py_retval;
+ gboolean retval = FALSE;
+ PyGSignalAccumulatorData *data = _data;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+ if (ihint->detail)
+ py_detail = _PyUnicode_FromString(g_quark_to_string(ihint->detail));
+ else {
+ Py_INCREF(Py_None);
+ py_detail = Py_None;
+ }
+
+ py_ihint = Py_BuildValue("lNi", (long int) ihint->signal_id,
+ py_detail, ihint->run_type);
+ py_handler_return = pyg_value_as_pyobject(handler_return, TRUE);
+ py_return_accu = pyg_value_as_pyobject(return_accu, FALSE);
+ if (data->user_data)
+ py_retval = PyObject_CallFunction(data->callable, "NNNO", py_ihint,
+ py_return_accu, py_handler_return,
+ data->user_data);
+ else
+ py_retval = PyObject_CallFunction(data->callable, "NNN", py_ihint,
+ py_return_accu, py_handler_return);
+ if (!py_retval)
+ PyErr_Print();
+ else {
+ if (!PyTuple_Check(py_retval) || PyTuple_Size(py_retval) != 2) {
+ PyErr_SetString(PyExc_TypeError, "accumulator function must return"
+ " a (bool, object) tuple");
+ PyErr_Print();
+ } else {
+ retval = PyObject_IsTrue(PyTuple_GET_ITEM(py_retval, 0));
+ if (pyg_value_from_pyobject(return_accu, PyTuple_GET_ITEM(py_retval, 1))) {
+ PyErr_Print();
+ }
+ }
+ Py_DECREF(py_retval);
+ }
+ pyglib_gil_state_release(state);
+ return retval;
+}
+
+static gboolean
+create_signal (GType instance_type, const gchar *signal_name, PyObject *tuple)
+{
+ GSignalFlags signal_flags;
+ PyObject *py_return_type, *py_param_types;
+ GType return_type;
+ guint n_params, i;
+ GType *param_types;
+ guint signal_id;
+ GSignalAccumulator accumulator = NULL;
+ PyGSignalAccumulatorData *accum_data = NULL;
+ PyObject *py_accum = NULL, *py_accum_data = NULL;
+
+ if (!PyArg_ParseTuple(tuple, "iOO|OO", &signal_flags, &py_return_type,
+ &py_param_types, &py_accum, &py_accum_data))
+ {
+ gchar buf[128];
+
+ PyErr_Clear();
+ g_snprintf(buf, sizeof(buf),
+ "value for __gsignals__['%s'] not in correct format", signal_name);
+ PyErr_SetString(PyExc_TypeError, buf);
+ return FALSE;
+ }
+
+ if (py_accum && py_accum != Py_None && !PyCallable_Check(py_accum))
+ {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf),
+ "accumulator for __gsignals__['%s'] must be callable", signal_name);
+ PyErr_SetString(PyExc_TypeError, buf);
+ return FALSE;
+ }
+
+ return_type = pyg_type_from_object(py_return_type);
+ if (!return_type)
+ return FALSE;
+ if (!PySequence_Check(py_param_types)) {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf),
+ "third element of __gsignals__['%s'] tuple must be a sequence", signal_name);
+ PyErr_SetString(PyExc_TypeError, buf);
+ return FALSE;
+ }
+ n_params = PySequence_Length(py_param_types);
+ param_types = g_new(GType, n_params);
+ for (i = 0; i < n_params; i++) {
+ PyObject *item = PySequence_GetItem(py_param_types, i);
+
+ param_types[i] = pyg_type_from_object(item);
+ if (param_types[i] == 0) {
+ Py_DECREF(item);
+ g_free(param_types);
+ return FALSE;
+ }
+ Py_DECREF(item);
+ }
+
+ if (py_accum == _pyg_signal_accumulator_true_handled_func)
+ accumulator = g_signal_accumulator_true_handled;
+ else {
+ if (py_accum != NULL && py_accum != Py_None) {
+ accum_data = g_new(PyGSignalAccumulatorData, 1);
+ accum_data->callable = py_accum;
+ Py_INCREF(py_accum);
+ accum_data->user_data = py_accum_data;
+ Py_XINCREF(py_accum_data);
+ accumulator = _pyg_signal_accumulator;
+ }
+ }
+
+ signal_id = g_signal_newv(signal_name, instance_type, signal_flags,
+ pyg_signal_class_closure_get(),
+ accumulator, accum_data,
+ marshal_generic,
+ return_type, n_params, param_types);
+ g_free(param_types);
+
+ if (signal_id == 0) {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf), "could not create signal for %s",
+ signal_name);
+ PyErr_SetString(PyExc_RuntimeError, buf);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static gboolean
+override_signal(GType instance_type, const gchar *signal_name)
+{
+ guint signal_id;
+
+ signal_id = g_signal_lookup(signal_name, instance_type);
+ if (!signal_id) {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf), "could not look up %s", signal_name);
+ PyErr_SetString(PyExc_TypeError, buf);
+ return FALSE;
+ }
+ g_signal_override_class_closure(signal_id, instance_type,
+ pyg_signal_class_closure_get());
+ return TRUE;
+}
+
+static PyObject *
+add_signals (GType instance_type, PyObject *signals)
+{
+ gboolean ret = TRUE;
+ GObjectClass *oclass;
+ Py_ssize_t pos = 0;
+ PyObject *key, *value, *overridden_signals = NULL;
+
+ overridden_signals = PyDict_New();
+ oclass = g_type_class_ref(instance_type);
+ while (PyDict_Next(signals, &pos, &key, &value)) {
+ const gchar *signal_name;
+ gchar *signal_name_canon, *c;
+
+ if (!_PyUnicode_Check(key)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__gsignals__ keys must be strings");
+ ret = FALSE;
+ break;
+ }
+ signal_name = _PyUnicode_AsString (key);
+
+ if (value == Py_None ||
+ (_PyUnicode_Check(value) &&
+ !strcmp(_PyUnicode_AsString(value), "override")))
+ {
+ /* canonicalize signal name, replacing '-' with '_' */
+ signal_name_canon = g_strdup(signal_name);
+ for (c = signal_name_canon; *c; ++c)
+ if (*c == '-')
+ *c = '_';
+ if (PyDict_SetItemString(overridden_signals,
+ signal_name_canon, key)) {
+ g_free(signal_name_canon);
+ ret = FALSE;
+ break;
+ }
+ g_free(signal_name_canon);
+
+ ret = override_signal(instance_type, signal_name);
+ } else {
+ ret = create_signal(instance_type, signal_name, value);
+ }
+
+ if (!ret)
+ break;
+ }
+ g_type_class_unref(oclass);
+ if (ret)
+ return overridden_signals;
+ else {
+ Py_XDECREF(overridden_signals);
+ return NULL;
+ }
+}
+
+static GParamSpec *
+create_property (const gchar *prop_name,
+ GType prop_type,
+ const gchar *nick,
+ const gchar *blurb,
+ PyObject *args,
+ GParamFlags flags)
+{
+ GParamSpec *pspec = NULL;
+
+ switch (G_TYPE_FUNDAMENTAL(prop_type)) {
+ case G_TYPE_CHAR:
+ {
+ gchar minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "ccc", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_char (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_UCHAR:
+ {
+ gchar minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "ccc", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_uchar (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_BOOLEAN:
+ {
+ gboolean default_value;
+
+ if (!PyArg_ParseTuple(args, "i", &default_value))
+ return NULL;
+ pspec = g_param_spec_boolean (prop_name, nick, blurb,
+ default_value, flags);
+ }
+ break;
+ case G_TYPE_INT:
+ {
+ gint minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "iii", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_int (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_UINT:
+ {
+ guint minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "III", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_uint (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_LONG:
+ {
+ glong minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "lll", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_long (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_ULONG:
+ {
+ gulong minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "kkk", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_ulong (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_INT64:
+ {
+ gint64 minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "LLL", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_int64 (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_UINT64:
+ {
+ guint64 minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "KKK", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_uint64 (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_ENUM:
+ {
+ gint default_value;
+ PyObject *pydefault;
+
+ if (!PyArg_ParseTuple(args, "O", &pydefault))
+ return NULL;
+
+ if (pyg_enum_get_value(prop_type, pydefault,
+ (gint *)&default_value))
+ return NULL;
+
+ pspec = g_param_spec_enum (prop_name, nick, blurb,
+ prop_type, default_value, flags);
+ }
+ break;
+ case G_TYPE_FLAGS:
+ {
+ guint default_value;
+ PyObject *pydefault;
+
+ if (!PyArg_ParseTuple(args, "O", &pydefault))
+ return NULL;
+
+ if (pyg_flags_get_value(prop_type, pydefault,
+ (gint *)&default_value))
+ return NULL;
+
+ pspec = g_param_spec_flags (prop_name, nick, blurb,
+ prop_type, default_value, flags);
+ }
+ break;
+ case G_TYPE_FLOAT:
+ {
+ gfloat minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "fff", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_float (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_DOUBLE:
+ {
+ gdouble minimum, maximum, default_value;
+
+ if (!PyArg_ParseTuple(args, "ddd", &minimum, &maximum,
+ &default_value))
+ return NULL;
+ pspec = g_param_spec_double (prop_name, nick, blurb, minimum,
+ maximum, default_value, flags);
+ }
+ break;
+ case G_TYPE_STRING:
+ {
+ const gchar *default_value;
+
+ if (!PyArg_ParseTuple(args, "z", &default_value))
+ return NULL;
+ pspec = g_param_spec_string (prop_name, nick, blurb,
+ default_value, flags);
+ }
+ break;
+ case G_TYPE_PARAM:
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ pspec = g_param_spec_param (prop_name, nick, blurb, prop_type, flags);
+ break;
+ case G_TYPE_BOXED:
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ pspec = g_param_spec_boxed (prop_name, nick, blurb, prop_type, flags);
+ break;
+ case G_TYPE_POINTER:
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ pspec = g_param_spec_pointer (prop_name, nick, blurb, flags);
+ break;
+ case G_TYPE_OBJECT:
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ pspec = g_param_spec_object (prop_name, nick, blurb, prop_type, flags);
+ break;
+ default:
+ /* unhandled pspec type ... */
+ break;
+ }
+
+ if (!pspec) {
+ char buf[128];
+
+ g_snprintf(buf, sizeof(buf), "could not create param spec for type %s",
+ g_type_name(prop_type));
+ PyErr_SetString(PyExc_TypeError, buf);
+ return NULL;
+ }
+
+ return pspec;
+}
+
+GParamSpec *
+pyg_param_spec_from_object (PyObject *tuple)
+{
+ gint val_length;
+ const gchar *prop_name;
+ GType prop_type;
+ const gchar *nick, *blurb;
+ PyObject *slice, *item, *py_prop_type;
+ GParamSpec *pspec;
+
+ val_length = PyTuple_Size(tuple);
+ if (val_length < 4) {
+ PyErr_SetString(PyExc_TypeError,
+ "paramspec tuples must be at least 4 elements long");
+ return NULL;
+ }
+
+ slice = PySequence_GetSlice(tuple, 0, 4);
+ if (!slice) {
+ return NULL;
+ }
+
+ if (!PyArg_ParseTuple(slice, "sOzz", &prop_name, &py_prop_type, &nick, &blurb)) {
+ Py_DECREF(slice);
+ return NULL;
+ }
+
+ Py_DECREF(slice);
+
+ prop_type = pyg_type_from_object(py_prop_type);
+ if (!prop_type) {
+ return NULL;
+ }
+
+ item = PyTuple_GetItem(tuple, val_length-1);
+ if (!_PyLong_Check(item)) {
+ PyErr_SetString(PyExc_TypeError,
+ "last element in tuple must be an int");
+ return NULL;
+ }
+
+ /* slice is the extra items in the tuple */
+ slice = PySequence_GetSlice(tuple, 4, val_length-1);
+ pspec = create_property(prop_name, prop_type,
+ nick, blurb, slice,
+ _PyLong_AsLong(item));
+
+ return pspec;
+}
+
+static gboolean
+add_properties (GType instance_type, PyObject *properties)
+{
+ gboolean ret = TRUE;
+ GObjectClass *oclass;
+ Py_ssize_t pos = 0;
+ PyObject *key, *value;
+
+ oclass = g_type_class_ref(instance_type);
+ while (PyDict_Next(properties, &pos, &key, &value)) {
+ const gchar *prop_name;
+ GType prop_type;
+ const gchar *nick, *blurb;
+ GParamFlags flags;
+ gint val_length;
+ PyObject *slice, *item, *py_prop_type;
+ GParamSpec *pspec;
+
+ /* values are of format (type,nick,blurb, type_specific_args, flags) */
+
+ if (!_PyUnicode_Check(key)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__gproperties__ keys must be strings");
+ ret = FALSE;
+ break;
+ }
+ prop_name = _PyUnicode_AsString (key);
+
+ if (!PyTuple_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__gproperties__ values must be tuples");
+ ret = FALSE;
+ break;
+ }
+ val_length = PyTuple_Size(value);
+ if (val_length < 4) {
+ PyErr_SetString(PyExc_TypeError,
+ "__gproperties__ values must be at least 4 elements long");
+ ret = FALSE;
+ break;
+ }
+
+ slice = PySequence_GetSlice(value, 0, 3);
+ if (!slice) {
+ ret = FALSE;
+ break;
+ }
+ if (!PyArg_ParseTuple(slice, "Ozz", &py_prop_type, &nick, &blurb)) {
+ Py_DECREF(slice);
+ ret = FALSE;
+ break;
+ }
+ Py_DECREF(slice);
+ prop_type = pyg_type_from_object(py_prop_type);
+ if (!prop_type) {
+ ret = FALSE;
+ break;
+ }
+ item = PyTuple_GetItem(value, val_length-1);
+ if (!_PyLong_Check(item)) {
+ PyErr_SetString(PyExc_TypeError,
+ "last element in __gproperties__ value tuple must be an int");
+ ret = FALSE;
+ break;
+ }
+ flags = _PyLong_AsLong(item);
+
+ /* slice is the extra items in the tuple */
+ slice = PySequence_GetSlice(value, 3, val_length-1);
+ pspec = create_property(prop_name, prop_type, nick, blurb,
+ slice, flags);
+ Py_DECREF(slice);
+
+ if (pspec) {
+ g_object_class_install_property(oclass, 1, pspec);
+ } else {
+ PyObject *type, *value, *traceback;
+ ret = FALSE;
+ PyErr_Fetch(&type, &value, &traceback);
+ if (_PyUnicode_Check(value)) {
+ char msg[256];
+ g_snprintf(msg, 256,
+ "%s (while registering property '%s' for GType '%s')",
+ _PyUnicode_AsString(value),
+ prop_name, g_type_name(instance_type));
+ Py_DECREF(value);
+ value = _PyUnicode_FromString(msg);
+ }
+ PyErr_Restore(type, value, traceback);
+ break;
+ }
+ }
+
+ g_type_class_unref(oclass);
+ return ret;
+}
+
+static void
+pyg_register_class_init(GType gtype, PyGClassInitFunc class_init)
+{
+ GSList *list;
+
+ list = g_type_get_qdata(gtype, pygobject_class_init_key);
+ list = g_slist_prepend(list, class_init);
+ g_type_set_qdata(gtype, pygobject_class_init_key, list);
+}
+
+static int
+pyg_run_class_init(GType gtype, gpointer gclass, PyTypeObject *pyclass)
+{
+ GSList *list;
+ PyGClassInitFunc class_init;
+ GType parent_type;
+ int rv;
+
+ parent_type = g_type_parent(gtype);
+ if (parent_type) {
+ rv = pyg_run_class_init(parent_type, gclass, pyclass);
+ if (rv)
+ return rv;
+ }
+
+ list = g_type_get_qdata(gtype, pygobject_class_init_key);
+ for (; list; list = list->next) {
+ class_init = list->data;
+ rv = class_init(gclass, pyclass);
+ if (rv)
+ return rv;
+ }
+
+ return 0;
+}
+
+static PyObject *
+_wrap_pyg_type_register(PyObject *self, PyObject *args)
+{
+ PyTypeObject *class;
+ char *type_name = NULL;
+
+ if (!PyArg_ParseTuple(args, "O!|z:gobject.type_register",
+ &PyType_Type, &class, &type_name))
+ return NULL;
+ if (!PyType_IsSubtype(class, &PyGObject_Type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "argument must be a GObject subclass");
+ return NULL;
+ }
+
+ /* Check if type already registered */
+ if (pyg_type_from_object((PyObject *) class) ==
+ pyg_type_from_object((PyObject *) class->tp_base))
+ {
+ if (pyg_type_register(class, type_name))
+ return NULL;
+ }
+
+ Py_INCREF(class);
+ return (PyObject *) class;
+}
+
+static char *
+get_type_name_for_class(PyTypeObject *class)
+{
+ gint i, name_serial;
+ char name_serial_str[16];
+ PyObject *module;
+ char *type_name = NULL;
+
+ /* make name for new GType */
+ name_serial = 1;
+ /* give up after 1000 tries, just in case.. */
+ while (name_serial < 1000)
+ {
+ g_free(type_name);
+ snprintf(name_serial_str, 16, "-v%i", name_serial);
+ module = PyObject_GetAttrString((PyObject *)class, "__module__");
+ if (module && _PyUnicode_Check(module)) {
+ type_name = g_strconcat(_PyUnicode_AsString(module), ".",
+ class->tp_name,
+ name_serial > 1 ? name_serial_str : NULL,
+ NULL);
+ Py_DECREF(module);
+ } else {
+ if (module)
+ Py_DECREF(module);
+ else
+ PyErr_Clear();
+ type_name = g_strconcat(class->tp_name,
+ name_serial > 1 ? name_serial_str : NULL,
+ NULL);
+ }
+ /* convert '.' in type name to '+', which isn't banned (grumble) */
+ for (i = 0; type_name[i] != '\0'; i++)
+ if (type_name[i] == '.')
+ type_name[i] = '+';
+ if (_pyg_type_from_name(type_name) == 0)
+ break; /* we now have a unique name */
+ ++name_serial;
+ }
+
+ return type_name;
+}
+
+
+static GStaticPrivate pygobject_contruction_wrapper = G_STATIC_PRIVATE_INIT;
+
+static inline void
+pygobject_init_wrapper_set(PyObject *wrapper)
+{
+ g_static_private_set(&pygobject_contruction_wrapper, wrapper, NULL);
+}
+
+static inline PyObject *
+pygobject_init_wrapper_get(void)
+{
+ return (PyObject *) g_static_private_get(&pygobject_contruction_wrapper);
+}
+
+static void
+pygobject__g_instance_init(GTypeInstance *instance,
+ gpointer g_class)
+{
+ GObject *object = (GObject *) instance;
+ PyObject *wrapper, *args, *kwargs;
+
+ if (!g_type_get_qdata(G_OBJECT_TYPE(object),
+ pygobject_has_updated_constructor_key))
+ return;
+
+ wrapper = g_object_get_qdata(object, pygobject_wrapper_key);
+ if (wrapper == NULL) {
+ wrapper = pygobject_init_wrapper_get();
+ if (wrapper && ((PyGObject *) wrapper)->obj == NULL) {
+ ((PyGObject *) wrapper)->obj = object;
+ pygobject_register_wrapper(wrapper);
+ }
+ }
+ pygobject_init_wrapper_set(NULL);
+ if (wrapper == NULL) {
+ /* this looks like a python object created through
+ * g_object_new -> we have no python wrapper, so create it
+ * now */
+ PyGILState_STATE state;
+ state = pyglib_gil_state_ensure();
+ wrapper = pygobject_new_full(object, FALSE, g_class);
+ args = PyTuple_New(0);
+ kwargs = PyDict_New();
+ if (Py_TYPE(wrapper)->tp_init(wrapper, args, kwargs))
+ PyErr_Print();
+ Py_DECREF(args);
+ Py_DECREF(kwargs);
+ pyglib_gil_state_release(state);
+ }
+}
+
+
+/* This implementation is bad, see bug 566571 for an example why.
+ * Instead of scanning explicitly declared bases for interfaces, we
+ * should automatically initialize all implemented interfaces to
+ * prevent bugs like that one. However, this will lead to
+ * performance degradation as each virtual method in derived classes
+ * will round-trip through do_*() stuff, *even* if it is not
+ * overriden. We need to teach codegen to retain parent method
+ * instead of setting virtual to *_proxy_do_*() if corresponding
+ * do_*() is not overriden. Ok, that was a messy explanation.
+ */
+static void
+pyg_type_add_interfaces(PyTypeObject *class, GType instance_type,
+ PyObject *bases, gboolean new_interfaces,
+ GType *parent_interfaces, guint n_parent_interfaces)
+{
+ int i;
+
+ if (!bases) {
+ g_warning("type has no bases");
+ return;
+ }
+
+ for (i = 0; i < PyTuple_GET_SIZE(bases); ++i) {
+ guint k;
+ PyObject *base = PyTuple_GET_ITEM(bases, i);
+ GType itype;
+ gboolean is_new = TRUE;
+ const GInterfaceInfo *iinfo;
+ GInterfaceInfo iinfo_copy;
+
+ /* 'base' can also be a PyClassObject, see bug #566571. */
+ if (!PyType_Check(base))
+ continue;
+
+ if (!PyType_IsSubtype((PyTypeObject*) base, &PyGInterface_Type))
+ continue;
+
+ itype = pyg_type_from_object(base);
+
+ /* Happens for _implementations_ of an interface. */
+ if (!G_TYPE_IS_INTERFACE(itype))
+ continue;
+
+ for (k = 0; k < n_parent_interfaces; ++k) {
+ if (parent_interfaces[k] == itype) {
+ is_new = FALSE;
+ break;
+ }
+ }
+
+ if ((new_interfaces && !is_new) || (!new_interfaces && is_new))
+ continue;
+
+ iinfo = pyg_lookup_interface_info(itype);
+ if (!iinfo) {
+ gchar *error;
+ error = g_strdup_printf("Interface type %s "
+ "has no Python implementation support",
+ ((PyTypeObject *) base)->tp_name);
+ PyErr_Warn(PyExc_RuntimeWarning, error);
+ g_free(error);
+ continue;
+ }
+
+ iinfo_copy = *iinfo;
+ iinfo_copy.interface_data = class;
+ g_type_add_interface_static(instance_type, itype, &iinfo_copy);
+ }
+}
+
+int
+pyg_type_register(PyTypeObject *class, const char *type_name)
+{
+ PyObject *gtype, *gsignals, *gproperties, *overridden_signals;
+ GType parent_type, instance_type;
+ GType *parent_interfaces;
+ guint n_parent_interfaces;
+ GTypeQuery query;
+ gpointer gclass;
+ gpointer has_new_constructor_api;
+ GTypeInfo type_info = {
+ 0, /* class_size */
+
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+
+ (GClassInitFunc) pyg_object_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+
+ 0, /* instance_size */
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) pygobject__g_instance_init
+ };
+ gchar *new_type_name;
+
+ /* find the GType of the parent */
+ parent_type = pyg_type_from_object((PyObject *)class);
+ if (!parent_type)
+ return -1;
+
+ parent_interfaces = g_type_interfaces(parent_type, &n_parent_interfaces);
+
+ if (type_name)
+ /* care is taken below not to free this */
+ new_type_name = (gchar *) type_name;
+ else
+ new_type_name = get_type_name_for_class(class);
+
+ /* set class_data that will be passed to the class_init function. */
+ type_info.class_data = class;
+
+ /* fill in missing values of GTypeInfo struct */
+ g_type_query(parent_type, &query);
+ type_info.class_size = query.class_size;
+ type_info.instance_size = query.instance_size;
+
+ /* create new typecode */
+ instance_type = g_type_register_static(parent_type, new_type_name,
+ &type_info, 0);
+ if (type_name == NULL)
+ g_free(new_type_name);
+ if (instance_type == 0) {
+ PyErr_Format(PyExc_RuntimeError,
+ "could not create new GType: %s (subclass of %s)",
+ new_type_name,
+ g_type_name(parent_type));
+ return -1;
+ }
+
+ /* store pointer to the class with the GType */
+ Py_INCREF(class);
+ g_type_set_qdata(instance_type, g_quark_from_string("PyGObject::class"),
+ class);
+
+ /* set new value of __gtype__ on class */
+ gtype = pyg_type_wrapper_new(instance_type);
+ PyDict_SetItemString(class->tp_dict, "__gtype__", gtype);
+ Py_DECREF(gtype);
+
+ /* propagate new constructor API compatility flag from parent to child type */
+ has_new_constructor_api =
+ g_type_get_qdata(parent_type,
+ pygobject_has_updated_constructor_key);
+ if (has_new_constructor_api != NULL)
+ g_type_set_qdata(instance_type, pygobject_has_updated_constructor_key,
+ has_new_constructor_api);
+
+ /* if no __doc__, set it to the auto doc descriptor */
+ if (PyDict_GetItemString(class->tp_dict, "__doc__") == NULL) {
+ PyDict_SetItemString(class->tp_dict, "__doc__",
+ pyg_object_descr_doc_get());
+ }
+
+ /*
+ * Note: Interfaces to be implemented are searched twice. First
+ * we register interfaces that are already implemented by a parent
+ * type. The second time, the remaining interfaces are
+ * registered, i.e. the ones that are not implemented by a parent
+ * type. In between these two loops, properties and signals are
+ * registered. It has to be done this way, in two steps,
+ * otherwise glib will complain. If registering all interfaces
+ * always before properties, you get an error like:
+ *
+ * ../gobject:121: Warning: Object class
+ * test_interface+MyObject doesn't implement property
+ * 'some-property' from interface 'TestInterface'
+ *
+ * If, on the other hand, you register interfaces after
+ * registering the properties, you get something like:
+ *
+ * ../gobject:121: Warning: cannot add interface type
+ * `TestInterface' to type `test_interface+MyUnknown', since
+ * type `test_interface+MyUnknown' already conforms to
+ * interface
+ *
+ * This looks like a GLib quirk, but no bug has been filed
+ * upstream. However we have a unit test for this particular
+ * problem, which can be found in test_interfaces.py, class
+ * TestInterfaceImpl.
+ *
+ * See also comment above pyg_type_add_interfaces().
+ */
+ pyg_type_add_interfaces(class, instance_type, class->tp_bases, FALSE,
+ parent_interfaces, n_parent_interfaces);
+
+ /* we look this up in the instance dictionary, so we don't
+ * accidentally get a parent type's __gsignals__ attribute. */
+ gsignals = PyDict_GetItemString(class->tp_dict, "__gsignals__");
+ if (gsignals) {
+ if (!PyDict_Check(gsignals)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__gsignals__ attribute not a dict!");
+ g_free(parent_interfaces);
+ return -1;
+ }
+ if (!(overridden_signals = add_signals(instance_type, gsignals))) {
+ g_free(parent_interfaces);
+ return -1;
+ }
+ if (PyDict_SetItemString(class->tp_dict, "__gsignals__",
+ overridden_signals)) {
+ g_free(parent_interfaces);
+ return -1;
+ }
+ Py_DECREF(overridden_signals);
+ } else {
+ PyErr_Clear();
+ }
+
+ /* we look this up in the instance dictionary, so we don't
+ * accidentally get a parent type's __gsignals__ attribute. */
+ gproperties = PyDict_GetItemString(class->tp_dict, "__gproperties__");
+ if (gproperties) {
+ if (!PyDict_Check(gproperties)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__gproperties__ attribute not a dict!");
+ g_free(parent_interfaces);
+ return -1;
+ }
+ if (!add_properties(instance_type, gproperties)) {
+ g_free(parent_interfaces);
+ return -1;
+ }
+ PyDict_DelItemString(class->tp_dict, "__gproperties__");
+ /* Borrowed reference. Py_DECREF(gproperties); */
+ } else {
+ PyErr_Clear();
+ }
+
+ /* Register new interfaces, that are _not_ already defined by
+ * the parent type. FIXME: See above.
+ */
+ pyg_type_add_interfaces(class, instance_type, class->tp_bases, TRUE,
+ parent_interfaces, n_parent_interfaces);
+
+ gclass = g_type_class_ref(instance_type);
+ if (pyg_run_class_init(instance_type, gclass, class)) {
+ g_type_class_unref(gclass);
+ g_free(parent_interfaces);
+ return -1;
+ }
+ g_type_class_unref(gclass);
+ g_free(parent_interfaces);
+
+ if (gsignals)
+ PyDict_DelItemString(class->tp_dict, "__gsignals__");
+
+ return 0;
+}
+
+static PyObject *
+pyg_signal_new(PyObject *self, PyObject *args)
+{
+ gchar *signal_name;
+ PyObject *py_type;
+ GSignalFlags signal_flags;
+ GType return_type;
+ PyObject *py_return_type, *py_param_types;
+
+ GType instance_type = 0;
+ Py_ssize_t n_params, i;
+ GType *param_types;
+
+ guint signal_id;
+
+ if (!PyArg_ParseTuple(args, "sOiOO:gobject.signal_new", &signal_name,
+ &py_type, &signal_flags, &py_return_type,
+ &py_param_types))
+ return NULL;
+
+ instance_type = pyg_type_from_object(py_type);
+ if (!instance_type)
+ return NULL;
+ if (!(G_TYPE_IS_INSTANTIATABLE(instance_type) || G_TYPE_IS_INTERFACE(instance_type))) {
+ PyErr_SetString(PyExc_TypeError,
+ "argument 2 must be an object type or interface type");
+ return NULL;
+ }
+
+ return_type = pyg_type_from_object(py_return_type);
+ if (!return_type)
+ return NULL;
+
+ if (!PySequence_Check(py_param_types)) {
+ PyErr_SetString(PyExc_TypeError,
+ "argument 5 must be a sequence of GType codes");
+ return NULL;
+ }
+ n_params = PySequence_Length(py_param_types);
+ param_types = g_new(GType, n_params);
+ for (i = 0; i < n_params; i++) {
+ PyObject *item = PySequence_GetItem(py_param_types, i);
+
+ param_types[i] = pyg_type_from_object(item);
+ if (param_types[i] == 0) {
+ PyErr_Clear();
+ Py_DECREF(item);
+ PyErr_SetString(PyExc_TypeError,
+ "argument 5 must be a sequence of GType codes");
+ g_free(param_types);
+ return NULL;
+ }
+ Py_DECREF(item);
+ }
+
+ signal_id = g_signal_newv(signal_name, instance_type, signal_flags,
+ pyg_signal_class_closure_get(),
+ (GSignalAccumulator)0, NULL,
+ (GSignalCMarshaller)0,
+ return_type, n_params, param_types);
+ g_free(param_types);
+ if (signal_id != 0)
+ return _PyLong_FromLong(signal_id);
+ PyErr_SetString(PyExc_RuntimeError, "could not create signal");
+ return NULL;
+}
+
+static PyObject *
+pyg_signal_list_names (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "type", NULL };
+ PyObject *py_itype, *list;
+ GObjectClass *class = NULL;
+ GType itype;
+ guint n;
+ guint *ids;
+ guint i;
+ gpointer iface = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:gobject.signal_list_names",
+ kwlist, &py_itype))
+ return NULL;
+ if ((itype = pyg_type_from_object(py_itype)) == 0)
+ return NULL;
+
+ if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+ class = g_type_class_ref(itype);
+ if (!class) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not get a reference to type class");
+ return NULL;
+ }
+ } else if (!G_TYPE_IS_INTERFACE(itype)) {
+ PyErr_SetString(PyExc_TypeError,
+ "type must be instantiable or an interface");
+ return NULL;
+ } else {
+ iface = g_type_default_interface_ref(itype);
+ }
+
+ ids = g_signal_list_ids(itype, &n);
+
+ list = PyTuple_New((gint)n);
+ if (list != NULL) {
+ for (i = 0; i < n; i++)
+ PyTuple_SetItem(list, i,
+ _PyUnicode_FromString(g_signal_name(ids[i])));
+ }
+
+ g_free(ids);
+ if (class)
+ g_type_class_unref(class);
+ else
+ g_type_default_interface_unref(iface);
+
+ return list;
+}
+
+static PyObject *
+pyg_signal_list_ids (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "type", NULL };
+ PyObject *py_itype, *list;
+ GObjectClass *class = NULL;
+ GType itype;
+ guint n;
+ guint *ids;
+ guint i;
+ gpointer iface = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:gobject.signal_list_ids",
+ kwlist, &py_itype))
+ return NULL;
+ if ((itype = pyg_type_from_object(py_itype)) == 0)
+ return NULL;
+
+ if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+ class = g_type_class_ref(itype);
+ if (!class) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not get a reference to type class");
+ return NULL;
+ }
+ } else if (!G_TYPE_IS_INTERFACE(itype)) {
+ PyErr_SetString(PyExc_TypeError,
+ "type must be instantiable or an interface");
+ return NULL;
+ } else {
+ iface = g_type_default_interface_ref(itype);
+ }
+
+ ids = g_signal_list_ids(itype, &n);
+
+ list = PyTuple_New((gint)n);
+ if (list == NULL) {
+ g_free(ids);
+ g_type_class_unref(class);
+ return NULL;
+ }
+
+ for (i = 0; i < n; i++)
+ PyTuple_SetItem(list, i, _PyLong_FromLong(ids[i]));
+ g_free(ids);
+ if (class)
+ g_type_class_unref(class);
+ else
+ g_type_default_interface_unref(iface);
+
+ return list;
+}
+
+static PyObject *
+pyg_signal_lookup (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "name", "type", NULL };
+ PyObject *py_itype;
+ GObjectClass *class = NULL;
+ GType itype;
+ gchar *signal_name;
+ guint id;
+ gpointer iface = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO:gobject.signal_lookup",
+ kwlist, &signal_name, &py_itype))
+ return NULL;
+ if ((itype = pyg_type_from_object(py_itype)) == 0)
+ return NULL;
+
+ if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+ class = g_type_class_ref(itype);
+ if (!class) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not get a reference to type class");
+ return NULL;
+ }
+ } else if (!G_TYPE_IS_INTERFACE(itype)) {
+ PyErr_SetString(PyExc_TypeError,
+ "type must be instantiable or an interface");
+ return NULL;
+ } else {
+ iface = g_type_default_interface_ref(itype);
+ }
+
+ id = g_signal_lookup(signal_name, itype);
+
+ if (class)
+ g_type_class_unref(class);
+ else
+ g_type_default_interface_unref(iface);
+ return _PyLong_FromLong(id);
+}
+
+static PyObject *
+pyg_signal_name (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "signal_id", NULL };
+ const gchar *signal_name;
+ guint id;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:gobject.signal_name",
+ kwlist, &id))
+ return NULL;
+ signal_name = g_signal_name(id);
+ if (signal_name)
+ return _PyUnicode_FromString(signal_name);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_signal_query (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist1[] = { "name", "type", NULL };
+ static char *kwlist2[] = { "signal_id", NULL };
+ PyObject *py_query, *params_list, *py_itype;
+ GObjectClass *class = NULL;
+ GType itype;
+ gchar *signal_name;
+ guint i;
+ GSignalQuery query;
+ guint id;
+ gpointer iface = NULL;
+
+ if (PyArg_ParseTupleAndKeywords(args, kwargs, "sO:gobject.signal_query",
+ kwlist1, &signal_name, &py_itype)) {
+ if ((itype = pyg_type_from_object(py_itype)) == 0)
+ return NULL;
+
+ if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+ class = g_type_class_ref(itype);
+ if (!class) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not get a reference to type class");
+ return NULL;
+ }
+ } else if (!G_TYPE_IS_INTERFACE(itype)) {
+ PyErr_SetString(PyExc_TypeError,
+ "type must be instantiable or an interface");
+ return NULL;
+ } else {
+ iface = g_type_default_interface_ref(itype);
+ }
+ id = g_signal_lookup(signal_name, itype);
+ } else {
+ PyErr_Clear();
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i:gobject.signal_query",
+ kwlist2, &id)) {
+ PyErr_Clear();
+ PyErr_SetString(PyExc_TypeError,
+ "Usage: one of:\n"
+ " gobject.signal_query(name, type)\n"
+ " gobject.signal_query(signal_id)");
+
+ return NULL;
+ }
+ }
+
+ g_signal_query(id, &query);
+
+ if (query.signal_id == 0) {
+ Py_INCREF(Py_None);
+ py_query = Py_None;
+ goto done;
+ }
+ py_query = PyTuple_New(6);
+ if (py_query == NULL) {
+ goto done;
+ }
+ params_list = PyTuple_New(query.n_params);
+ if (params_list == NULL) {
+ Py_DECREF(py_query);
+ py_query = NULL;
+ goto done;
+ }
+
+ PyTuple_SET_ITEM(py_query, 0, _PyLong_FromLong(query.signal_id));
+ PyTuple_SET_ITEM(py_query, 1, _PyUnicode_FromString(query.signal_name));
+ PyTuple_SET_ITEM(py_query, 2, pyg_type_wrapper_new(query.itype));
+ PyTuple_SET_ITEM(py_query, 3, _PyLong_FromLong(query.signal_flags));
+ PyTuple_SET_ITEM(py_query, 4, pyg_type_wrapper_new(query.return_type));
+ for (i = 0; i < query.n_params; i++) {
+ PyTuple_SET_ITEM(params_list, i,
+ pyg_type_wrapper_new(query.param_types[i]));
+ }
+ PyTuple_SET_ITEM(py_query, 5, params_list);
+
+ done:
+ if (class)
+ g_type_class_unref(class);
+ if (iface)
+ g_type_default_interface_unref(iface);
+
+ return py_query;
+}
+
+static PyObject *
+pyg_object_class_list_properties (PyObject *self, PyObject *args)
+{
+ GParamSpec **specs;
+ PyObject *py_itype, *list;
+ GType itype;
+ GObjectClass *class = NULL;
+ gpointer iface = NULL;
+ guint nprops;
+ guint i;
+
+ if (!PyArg_ParseTuple(args, "O:gobject.list_properties",
+ &py_itype))
+ return NULL;
+ if ((itype = pyg_type_from_object(py_itype)) == 0)
+ return NULL;
+
+ if (G_TYPE_IS_INTERFACE(itype)) {
+ iface = g_type_default_interface_ref(itype);
+ if (!iface) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not get a reference to interface type");
+ return NULL;
+ }
+ specs = g_object_interface_list_properties(iface, &nprops);
+ } else if (g_type_is_a(itype, G_TYPE_OBJECT)) {
+ class = g_type_class_ref(itype);
+ if (!class) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not get a reference to type class");
+ return NULL;
+ }
+ specs = g_object_class_list_properties(class, &nprops);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "type must be derived from GObject or an interface");
+ return NULL;
+ }
+
+ list = PyTuple_New(nprops);
+ if (list == NULL) {
+ g_free(specs);
+ g_type_class_unref(class);
+ return NULL;
+ }
+ for (i = 0; i < nprops; i++) {
+ PyTuple_SetItem(list, i, pyg_param_spec_new(specs[i]));
+ }
+ g_free(specs);
+ if (class)
+ g_type_class_unref(class);
+ else
+ g_type_default_interface_unref(iface);
+
+ return list;
+}
+
+static PyObject *
+pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *pytype;
+ GType type;
+ GObject *obj = NULL;
+ GObjectClass *class;
+ int n_params = 0, i;
+ GParameter *params = NULL;
+
+ if (!PyArg_ParseTuple (args, "O:gobject.new", &pytype)) {
+ return NULL;
+ }
+
+ if ((type = pyg_type_from_object (pytype)) == 0)
+ return NULL;
+
+ if (G_TYPE_IS_ABSTRACT(type)) {
+ PyErr_Format(PyExc_TypeError, "cannot create instance of abstract "
+ "(non-instantiable) type `%s'", g_type_name(type));
+ return NULL;
+ }
+
+ if ((class = g_type_class_ref (type)) == NULL) {
+ PyErr_SetString(PyExc_TypeError,
+ "could not get a reference to type class");
+ return NULL;
+ }
+
+ if (kwargs) {
+ Py_ssize_t pos = 0;
+ PyObject *key;
+ PyObject *value;
+
+ params = g_new0(GParameter, PyDict_Size(kwargs));
+ while (PyDict_Next (kwargs, &pos, &key, &value)) {
+ GParamSpec *pspec;
+ const gchar *key_str = _PyUnicode_AsString (key);
+
+ pspec = g_object_class_find_property (class, key_str);
+ if (!pspec) {
+ PyErr_Format(PyExc_TypeError,
+ "gobject `%s' doesn't support property `%s'",
+ g_type_name(type), key_str);
+ goto cleanup;
+ }
+ g_value_init(&params[n_params].value,
+ G_PARAM_SPEC_VALUE_TYPE(pspec));
+ if (pyg_param_gvalue_from_pyobject(&params[n_params].value,
+ value, pspec) < 0) {
+ PyErr_Format(PyExc_TypeError,
+ "could not convert value for property `%s' from %s to %s",
+ key_str, Py_TYPE(value)->tp_name,
+ g_type_name(G_PARAM_SPEC_VALUE_TYPE(pspec)));
+ goto cleanup;
+ }
+ params[n_params].name = g_strdup(key_str);
+ n_params++;
+ }
+ }
+
+ obj = g_object_newv(type, n_params, params);
+ if (!obj)
+ PyErr_SetString (PyExc_RuntimeError, "could not create object");
+
+ cleanup:
+ for (i = 0; i < n_params; i++) {
+ g_free((gchar *) params[i].name);
+ g_value_unset(&params[i].value);
+ }
+ g_free(params);
+ g_type_class_unref(class);
+
+ if (obj) {
+ self = (PyGObject *) pygobject_new_full((GObject *)obj, FALSE, NULL);
+ g_object_unref(obj);
+ } else
+ self = NULL;
+
+ return (PyObject *) self;
+}
+
+gboolean
+pyg_handler_marshal(gpointer user_data)
+{
+ PyObject *tuple, *ret;
+ gboolean res;
+ PyGILState_STATE state;
+
+ g_return_val_if_fail(user_data != NULL, FALSE);
+
+ state = pyglib_gil_state_ensure();
+
+ tuple = (PyObject *)user_data;
+ ret = PyObject_CallObject(PyTuple_GetItem(tuple, 0),
+ PyTuple_GetItem(tuple, 1));
+ if (!ret) {
+ PyErr_Print();
+ res = FALSE;
+ } else {
+ res = PyObject_IsTrue(ret);
+ Py_DECREF(ret);
+ }
+
+ pyglib_gil_state_release(state);
+
+ return res;
+}
+
+static int
+pygobject_gil_state_ensure (void)
+{
+ return pyglib_gil_state_ensure ();
+}
+
+static void
+pygobject_gil_state_release (int flag)
+{
+ pyglib_gil_state_release(flag);
+}
+
+static PyObject *
+pyg_threads_init (PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+ if (!pyglib_enable_threads())
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+/* Only for backwards compatibility */
+int
+pygobject_enable_threads(void)
+{
+ if (!pyglib_enable_threads())
+ return -1;
+ return 0;
+}
+
+static void
+pyg_note_threads_enabled(void)
+{
+ pygobject_api_functions.threads_enabled = TRUE;
+}
+
+static PyObject *
+pyg_signal_accumulator_true_handled(PyObject *unused, PyObject *args)
+{
+ PyErr_SetString(PyExc_TypeError,
+ "signal_accumulator_true_handled can only"
+ " be used as accumulator argument when registering signals");
+ return NULL;
+}
+
+static gboolean
+marshal_emission_hook(GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer user_data)
+{
+ PyGILState_STATE state;
+ gboolean retval = FALSE;
+ PyObject *func, *args;
+ PyObject *retobj;
+ PyObject *params;
+ guint i;
+
+ state = pyglib_gil_state_ensure();
+
+ /* construct Python tuple for the parameter values */
+ params = PyTuple_New(n_param_values);
+
+ for (i = 0; i < n_param_values; i++) {
+ PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+ /* error condition */
+ if (!item) {
+ goto out;
+ }
+ PyTuple_SetItem(params, i, item);
+ }
+
+ args = (PyObject *)user_data;
+ func = PyTuple_GetItem(args, 0);
+ args = PySequence_Concat(params, PyTuple_GetItem(args, 1));
+ Py_DECREF(params);
+
+ /* params passed to function may have extra arguments */
+
+ retobj = PyObject_CallObject(func, args);
+ Py_DECREF(args);
+ if (retobj == NULL) {
+ PyErr_Print();
+ }
+
+ retval = (retobj == Py_True ? TRUE : FALSE);
+ Py_XDECREF(retobj);
+out:
+ pyglib_gil_state_release(state);
+ return retval;
+}
+
+static PyObject *
+pyg_add_emission_hook(PyGObject *self, PyObject *args)
+{
+ PyObject *first, *callback, *extra_args, *data;
+ gchar *name;
+ gulong hook_id;
+ guint sigid;
+ Py_ssize_t len;
+ GQuark detail = 0;
+ GType gtype;
+ PyObject *pygtype;
+
+ len = PyTuple_Size(args);
+ if (len < 3) {
+ PyErr_SetString(PyExc_TypeError,
+ "gobject.add_emission_hook requires at least 3 arguments");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 3);
+ if (!PyArg_ParseTuple(first, "OsO:add_emission_hook",
+ &pygtype, &name, &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+
+ if ((gtype = pyg_type_from_object(pygtype)) == 0) {
+ return NULL;
+ }
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "third argument must be callable");
+ return NULL;
+ }
+
+ if (!g_signal_parse_name(name, gtype, &sigid, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+ extra_args = PySequence_GetSlice(args, 3, len);
+ if (extra_args == NULL)
+ return NULL;
+
+ data = Py_BuildValue("(ON)", callback, extra_args);
+ if (data == NULL)
+ return NULL;
+
+ hook_id = g_signal_add_emission_hook(sigid, detail,
+ marshal_emission_hook,
+ data,
+ (GDestroyNotify)pyg_destroy_notify);
+
+ return PyLong_FromUnsignedLong(hook_id);
+}
+
+static PyObject *
+pyg_remove_emission_hook(PyGObject *self, PyObject *args)
+{
+ PyObject *pygtype;
+ char *name;
+ guint signal_id;
+ gulong hook_id;
+ GType gtype;
+
+ if (!PyArg_ParseTuple(args, "Osk:gobject.remove_emission_hook",
+ &pygtype, &name, &hook_id))
+ return NULL;
+
+ if ((gtype = pyg_type_from_object(pygtype)) == 0) {
+ return NULL;
+ }
+
+ if (!g_signal_parse_name(name, gtype, &signal_id, NULL, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+
+ g_signal_remove_emission_hook(signal_id, hook_id);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg__install_metaclass(PyObject *dummy, PyTypeObject *metaclass)
+{
+ Py_INCREF(metaclass);
+ PyGObject_MetaType = metaclass;
+ Py_INCREF(metaclass);
+
+ Py_TYPE(&PyGObject_Type) = metaclass;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef _gobject_functions[] = {
+ { "type_name", pyg_type_name, METH_VARARGS },
+ { "type_from_name", pyg_type_from_name, METH_VARARGS },
+ { "type_parent", pyg_type_parent, METH_VARARGS },
+ { "type_is_a", pyg_type_is_a, METH_VARARGS },
+ { "type_children", pyg_type_children, METH_VARARGS },
+ { "type_interfaces", pyg_type_interfaces, METH_VARARGS },
+ { "type_register", _wrap_pyg_type_register, METH_VARARGS },
+ { "signal_new", pyg_signal_new, METH_VARARGS },
+ { "signal_list_names",
+ (PyCFunction)pyg_signal_list_names, METH_VARARGS|METH_KEYWORDS },
+ { "signal_list_ids",
+ (PyCFunction)pyg_signal_list_ids, METH_VARARGS|METH_KEYWORDS },
+ { "signal_lookup",
+ (PyCFunction)pyg_signal_lookup, METH_VARARGS|METH_KEYWORDS },
+ { "signal_name",
+ (PyCFunction)pyg_signal_name, METH_VARARGS|METH_KEYWORDS },
+ { "signal_query",
+ (PyCFunction)pyg_signal_query, METH_VARARGS|METH_KEYWORDS },
+ { "list_properties",
+ pyg_object_class_list_properties, METH_VARARGS },
+ { "new",
+ (PyCFunction)pyg_object_new, METH_VARARGS|METH_KEYWORDS },
+ { "threads_init",
+ (PyCFunction)pyg_threads_init, METH_VARARGS|METH_KEYWORDS },
+ { "signal_accumulator_true_handled",
+ (PyCFunction)pyg_signal_accumulator_true_handled, METH_VARARGS },
+ { "add_emission_hook",
+ (PyCFunction)pyg_add_emission_hook, METH_VARARGS },
+ { "remove_emission_hook",
+ (PyCFunction)pyg_remove_emission_hook, METH_VARARGS },
+ { "_install_metaclass",
+ (PyCFunction)pyg__install_metaclass, METH_O },
+
+ { NULL, NULL, 0 }
+};
+
+
+/* ----------------- Constant extraction ------------------------ */
+
+/**
+ * pyg_constant_strip_prefix:
+ * @name: the constant name.
+ * @strip_prefix: the prefix to strip.
+ *
+ * Advances the pointer @name by strlen(@strip_prefix) characters. If
+ * the resulting name does not start with a letter or underscore, the
+ * @name pointer will be rewound. This is to ensure that the
+ * resulting name is a valid identifier. Hence the returned string is
+ * a pointer into the string @name.
+ *
+ * Returns: the stripped constant name.
+ */
+const gchar *
+pyg_constant_strip_prefix(const gchar *name, const gchar *strip_prefix)
+{
+ gint prefix_len;
+ guint i;
+
+ prefix_len = strlen(strip_prefix);
+
+ /* Check so name starts with strip_prefix, if it doesn't:
+ * return the rest of the part which doesn't match
+ */
+ for (i = 0; i < prefix_len; i++) {
+ if (name[i] != strip_prefix[i] && name[i] != '_') {
+ return &name[i];
+ }
+ }
+
+ /* strip off prefix from value name, while keeping it a valid
+ * identifier */
+ for (i = prefix_len; i >= 0; i--) {
+ if (g_ascii_isalpha(name[i]) || name[i] == '_') {
+ return &name[i];
+ }
+ }
+ return name;
+}
+
+/**
+ * pyg_enum_add_constants:
+ * @module: a Python module
+ * @enum_type: the GType of the enumeration.
+ * @strip_prefix: the prefix to strip from the constant names.
+ *
+ * Adds constants to the given Python module for each value name of
+ * the enumeration. A prefix will be stripped from each enum name.
+ */
+static void
+pyg_enum_add_constants(PyObject *module, GType enum_type,
+ const gchar *strip_prefix)
+{
+ GEnumClass *eclass;
+ guint i;
+
+ if (!G_TYPE_IS_ENUM(enum_type)) {
+ if (G_TYPE_IS_FLAGS(enum_type)) /* See bug #136204 */
+ pyg_flags_add_constants(module, enum_type, strip_prefix);
+ else
+ g_warning("`%s' is not an enum type", g_type_name(enum_type));
+ return;
+ }
+ g_return_if_fail (strip_prefix != NULL);
+
+ eclass = G_ENUM_CLASS(g_type_class_ref(enum_type));
+
+ for (i = 0; i < eclass->n_values; i++) {
+ const gchar *name = eclass->values[i].value_name;
+ gint value = eclass->values[i].value;
+
+ PyModule_AddIntConstant(module,
+ (char*) pyg_constant_strip_prefix(name, strip_prefix),
+ (long) value);
+ }
+
+ g_type_class_unref(eclass);
+}
+
+/**
+ * pyg_flags_add_constants:
+ * @module: a Python module
+ * @flags_type: the GType of the flags type.
+ * @strip_prefix: the prefix to strip from the constant names.
+ *
+ * Adds constants to the given Python module for each value name of
+ * the flags set. A prefix will be stripped from each flag name.
+ */
+static void
+pyg_flags_add_constants(PyObject *module, GType flags_type,
+ const gchar *strip_prefix)
+{
+ GFlagsClass *fclass;
+ guint i;
+
+ if (!G_TYPE_IS_FLAGS(flags_type)) {
+ if (G_TYPE_IS_ENUM(flags_type)) /* See bug #136204 */
+ pyg_enum_add_constants(module, flags_type, strip_prefix);
+ else
+ g_warning("`%s' is not an flags type", g_type_name(flags_type));
+ return;
+ }
+ g_return_if_fail (strip_prefix != NULL);
+
+ fclass = G_FLAGS_CLASS(g_type_class_ref(flags_type));
+
+ for (i = 0; i < fclass->n_values; i++) {
+ const gchar *name = fclass->values[i].value_name;
+ guint value = fclass->values[i].value;
+
+ PyModule_AddIntConstant(module,
+ (char*) pyg_constant_strip_prefix(name, strip_prefix),
+ (long) value);
+ }
+
+ g_type_class_unref(fclass);
+}
+
+/**
+ * pyg_error_check:
+ * @error: a pointer to the GError.
+ *
+ * Checks to see if the GError has been set. If the error has been
+ * set, then the gobject.GError Python exception will be raised, and
+ * the GError cleared.
+ *
+ * Returns: True if an error was set.
+ *
+ * Deprecated: Since 2.16, use pyglib_error_check instead.
+ */
+gboolean
+pyg_error_check(GError **error)
+{
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "pyg_error_check is deprecated, use "
+ "pyglib_error_check instead"))
+ return NULL;
+#endif
+ return pyglib_error_check(error);
+}
+
+/**
+ * pyg_gerror_exception_check:
+ * @error: a standard GLib GError ** output parameter
+ *
+ * Checks to see if a GError exception has been raised, and if so
+ * translates the python exception to a standard GLib GError. If the
+ * raised exception is not a GError then PyErr_Print() is called.
+ *
+ * Returns: 0 if no exception has been raised, -1 if it is a
+ * valid gobject.GError, -2 otherwise.
+ *
+ * Deprecated: Since 2.16, use pyglib_gerror_exception_check instead.
+ */
+gboolean
+pyg_gerror_exception_check(GError **error)
+{
+#if 0
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "pyg_gerror_exception_check is deprecated, use "
+ "pyglib_gerror_exception_check instead"))
+ return NULL;
+#endif
+ return pyglib_gerror_exception_check(error);
+}
+
+/**
+ * pyg_parse_constructor_args: helper function for PyGObject constructors
+ * @obj_type: GType of the GObject, for parameter introspection
+ * @arg_names: %NULL-terminated array of constructor argument names
+ * @prop_names: %NULL-terminated array of property names, with direct
+ * correspondence to @arg_names
+ * @params: GParameter array where parameters will be placed; length
+ * of this array must be at least equal to the number of
+ * arguments/properties
+ * @nparams: output parameter to contain actual number of arguments found
+ * @py_args: array of PyObject* containing the actual constructor arguments
+ *
+ * Parses an array of PyObject's and creates a GParameter array
+ *
+ * Return value: %TRUE if all is successful, otherwise %FALSE and
+ * python exception set.
+ **/
+static gboolean
+pyg_parse_constructor_args(GType obj_type,
+ char **arg_names,
+ char **prop_names,
+ GParameter *params,
+ guint *nparams,
+ PyObject **py_args)
+{
+ guint arg_i, param_i;
+ GObjectClass *oclass;
+
+ oclass = g_type_class_ref(obj_type);
+ g_return_val_if_fail(oclass, FALSE);
+
+ for (param_i = arg_i = 0; arg_names[arg_i]; ++arg_i) {
+ GParamSpec *spec;
+ if (!py_args[arg_i])
+ continue;
+ spec = g_object_class_find_property(oclass, prop_names[arg_i]);
+ params[param_i].name = prop_names[arg_i];
+ g_value_init(&params[param_i].value, spec->value_type);
+ if (pyg_value_from_pyobject(&params[param_i].value, py_args[arg_i]) == -1) {
+ int i;
+ PyErr_Format(PyExc_TypeError, "could not convert parameter '%s' of type '%s'",
+ arg_names[arg_i], g_type_name(spec->value_type));
+ g_type_class_unref(oclass);
+ for (i = 0; i < param_i; ++i)
+ g_value_unset(&params[i].value);
+ return FALSE;
+ }
+ ++param_i;
+ }
+ g_type_class_unref(oclass);
+ *nparams = param_i;
+ return TRUE;
+}
+
+int
+pygobject_constructv(PyGObject *self,
+ guint n_parameters,
+ GParameter *parameters)
+{
+ if (self->obj == NULL) {
+ GObject *obj;
+ pygobject_init_wrapper_set((PyObject *) self);
+ obj = g_object_newv(pyg_type_from_object((PyObject *) self),
+ n_parameters, parameters);
+ pygobject_init_wrapper_set(NULL);
+ if (self->obj == NULL) {
+ self->obj = obj;
+ pygobject_register_wrapper((PyObject *) self);
+ }
+ } else {
+ int i;
+ for (i = 0; i < n_parameters; ++i)
+ g_object_set_property(self->obj,
+ parameters[i].name,
+ &parameters[i].value);
+ }
+ return 0;
+}
+
+/* This function is mostly juste copy-paste from g_object_new, but
+ * calls pygobject_constructv instead of g_object_newv */
+int
+pygobject_construct(PyGObject *self, const char *first_property_name, ...)
+{
+ va_list var_args;
+ GObjectClass *class;
+ GParameter *params;
+ const gchar *name;
+ guint n_params = 0, n_alloced_params = 16;
+ GType object_type = pyg_type_from_object((PyObject *) self);
+ int retval;
+
+ if (!first_property_name)
+ return pygobject_constructv(self, 0, NULL);
+
+ va_start(var_args, first_property_name);
+ class = g_type_class_ref(object_type);
+
+ params = g_new(GParameter, n_alloced_params);
+ name = first_property_name;
+ while (name)
+ {
+ gchar *error = NULL;
+ GParamSpec *pspec = g_object_class_find_property(class, name);
+
+ if (!pspec)
+ {
+ g_warning("%s: object class `%s' has no property named `%s'",
+ G_STRFUNC,
+ g_type_name(object_type),
+ name);
+ break;
+ }
+ if (n_params >= n_alloced_params)
+ {
+ n_alloced_params += 16;
+ params = g_renew(GParameter, params, n_alloced_params);
+ }
+ params[n_params].name = name;
+ params[n_params].value.g_type = 0;
+ g_value_init(&params[n_params].value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+ G_VALUE_COLLECT(&params[n_params].value, var_args, 0, &error);
+ if (error)
+ {
+ g_warning("%s: %s", G_STRFUNC, error);
+ g_free(error);
+ g_value_unset(&params[n_params].value);
+ break;
+ }
+ n_params++;
+ name = va_arg(var_args, gchar*);
+ }
+
+ retval = pygobject_constructv(self, n_params, params);
+
+ while (n_params--)
+ g_value_unset(&params[n_params].value);
+ g_free(params);
+ va_end(var_args);
+ g_type_class_unref(class);
+ return retval;
+}
+
+void
+pyg_set_object_has_new_constructor(GType type)
+{
+ g_type_set_qdata(type, pygobject_has_updated_constructor_key, GINT_TO_POINTER(1));
+}
+
+PyObject *
+pyg_integer_richcompare(PyObject *v, PyObject *w, int op)
+{
+ PyObject *result;
+ gboolean t;
+
+ switch (op) {
+ case Py_EQ: t = _PyLong_AS_LONG(v) == _PyLong_AS_LONG(w); break;
+ case Py_NE: t = _PyLong_AS_LONG(v) != _PyLong_AS_LONG(w); break;
+ case Py_LE: t = _PyLong_AS_LONG(v) <= _PyLong_AS_LONG(w); break;
+ case Py_GE: t = _PyLong_AS_LONG(v) >= _PyLong_AS_LONG(w); break;
+ case Py_LT: t = _PyLong_AS_LONG(v) < _PyLong_AS_LONG(w); break;
+ case Py_GT: t = _PyLong_AS_LONG(v) > _PyLong_AS_LONG(w); break;
+ default: g_assert_not_reached();
+ }
+
+ result = t ? Py_True : Py_False;
+ Py_INCREF(result);
+ return result;
+}
+
+static void
+_log_func(const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data)
+{
+ if (G_LIKELY(Py_IsInitialized()))
+ {
+ PyGILState_STATE state;
+ PyObject* warning = user_data;
+
+ state = pyglib_gil_state_ensure();
+ PyErr_Warn(warning, (char *) message);
+ pyglib_gil_state_release(state);
+ } else
+ g_log_default_handler(log_domain, log_level, message, user_data);
+}
+
+static void
+add_warning_redirection(const char *domain,
+ PyObject *warning)
+{
+ g_return_if_fail(domain != NULL);
+ g_return_if_fail(warning != NULL);
+
+ if (!log_handlers_disabled)
+ {
+ guint handler;
+ gpointer old_handler;
+
+ if (!log_handlers)
+ log_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
+
+ if ((old_handler = g_hash_table_lookup(log_handlers, domain)))
+ g_log_remove_handler(domain, GPOINTER_TO_UINT(old_handler));
+
+ handler = g_log_set_handler(domain, G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING,
+ _log_func, warning);
+ g_hash_table_insert(log_handlers, g_strdup(domain), GUINT_TO_POINTER(handler));
+ }
+}
+
+static void
+remove_handler(gpointer domain,
+ gpointer handler,
+ gpointer unused)
+{
+ g_log_remove_handler(domain, GPOINTER_TO_UINT(handler));
+}
+
+static void
+disable_warning_redirections(void)
+{
+ log_handlers_disabled = TRUE;
+
+ if (log_handlers)
+ {
+ g_hash_table_foreach(log_handlers, remove_handler, NULL);
+ g_hash_table_destroy(log_handlers);
+ log_handlers = NULL;
+ }
+}
+
+/* ----------------- gobject module initialisation -------------- */
+
+struct _PyGObject_Functions pygobject_api_functions = {
+ pygobject_register_class,
+ pygobject_register_wrapper,
+ pygobject_register_sinkfunc,
+ pygobject_lookup_class,
+ pygobject_new,
+
+ pyg_closure_new,
+ pygobject_watch_closure,
+ pyg_destroy_notify,
+
+ pyg_type_from_object,
+ pyg_type_wrapper_new,
+ pyg_enum_get_value,
+ pyg_flags_get_value,
+ pyg_register_gtype_custom,
+ pyg_value_from_pyobject,
+ pyg_value_as_pyobject,
+
+ pyg_register_interface,
+
+ &PyGBoxed_Type,
+ pyg_register_boxed,
+ pyg_boxed_new,
+
+ &PyGPointer_Type,
+ pyg_register_pointer,
+ pyg_pointer_new,
+
+ pyg_enum_add_constants,
+ pyg_flags_add_constants,
+
+ pyg_constant_strip_prefix,
+
+ pyg_error_check,
+
+ pyg_set_thread_block_funcs,
+ (PyGThreadBlockFunc)0, /* block_threads */
+ (PyGThreadBlockFunc)0, /* unblock_threads */
+
+ &PyGParamSpec_Type,
+ pyg_param_spec_new,
+ pyg_param_spec_from_object,
+
+ pyg_pyobj_to_unichar_conv,
+ pyg_parse_constructor_args,
+ pyg_param_gvalue_as_pyobject,
+ pyg_param_gvalue_from_pyobject,
+
+ &PyGEnum_Type,
+ pyg_enum_add,
+ pyg_enum_from_gtype,
+
+ &PyGFlags_Type,
+ pyg_flags_add,
+ pyg_flags_from_gtype,
+
+ FALSE, /* threads_enabled */
+ pygobject_enable_threads,
+ pygobject_gil_state_ensure,
+ pygobject_gil_state_release,
+ pyg_register_class_init,
+ pyg_register_interface_info,
+
+ pyg_closure_set_exception_handler,
+ pygobject_constructv,
+ pygobject_construct,
+ pyg_set_object_has_new_constructor,
+
+ add_warning_redirection,
+ disable_warning_redirections,
+
+ pyg_type_register_custom_callback,
+ pyg_gerror_exception_check,
+
+ pyglib_option_group_new
+
+};
+
+/* for addon libraries ... */
+static void
+pygobject_register_api(PyObject *d)
+{
+ PyObject *api;
+
+ api = PyCObject_FromVoidPtr(&pygobject_api_functions,NULL);
+ PyDict_SetItemString(d, "_PyGObject_API", api);
+ Py_DECREF(api);
+}
+
+/* some constants */
+static void
+pygobject_register_constants(PyObject *m)
+{
+ /* PyFloat_ return a new ref, and add object takes the ref */
+ PyModule_AddObject(m, "G_MINFLOAT", PyFloat_FromDouble(G_MINFLOAT));
+ PyModule_AddObject(m, "G_MAXFLOAT", PyFloat_FromDouble(G_MAXFLOAT));
+ PyModule_AddObject(m, "G_MINDOUBLE", PyFloat_FromDouble(G_MINDOUBLE));
+ PyModule_AddObject(m, "G_MAXDOUBLE", PyFloat_FromDouble(G_MAXDOUBLE));
+ PyModule_AddIntConstant(m, "G_MINSHORT", G_MINSHORT);
+ PyModule_AddIntConstant(m, "G_MAXSHORT", G_MAXSHORT);
+ PyModule_AddIntConstant(m, "G_MAXUSHORT", G_MAXUSHORT);
+ PyModule_AddIntConstant(m, "G_MININT", G_MININT);
+ PyModule_AddIntConstant(m, "G_MAXINT", G_MAXINT);
+ PyModule_AddObject(m, "G_MINLONG", PyLong_FromLong(G_MINLONG));
+ PyModule_AddObject(m, "G_MAXLONG", PyLong_FromLong(G_MAXLONG));
+ PyModule_AddObject(m, "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG));
+ PyModule_AddIntConstant(m, "G_MININT8", G_MININT8);
+ PyModule_AddIntConstant(m, "G_MAXINT8", G_MAXINT8);
+ PyModule_AddIntConstant(m, "G_MAXUINT8", G_MAXUINT8);
+ PyModule_AddIntConstant(m, "G_MININT16", G_MININT16);
+ PyModule_AddIntConstant(m, "G_MAXINT16", G_MAXINT16);
+ PyModule_AddIntConstant(m, "G_MAXUINT16", G_MAXUINT16);
+ PyModule_AddIntConstant(m, "G_MININT32", G_MININT32);
+ PyModule_AddIntConstant(m, "G_MAXINT32", G_MAXINT32);
+ PyModule_AddObject(m, "G_MININT64", PyLong_FromLongLong(G_MININT64));
+ PyModule_AddObject(m, "G_MAXINT64", PyLong_FromLongLong(G_MAXINT64));
+ PyModule_AddObject(m, "G_MAXUINT64", PyLong_FromUnsignedLongLong(G_MAXUINT64));
+#if PY_VERSION_HEX < 0x02050000 /* 2.3, 2.4 */
+ PyModule_AddObject(m, "G_MAXSIZE", PyLong_FromUnsignedLongLong(G_MAXSIZE));
+ PyModule_AddObject(m, "G_MAXSSIZE", PyLong_FromUnsignedLongLong(G_MAXSSIZE));
+#elif PY_VERSION_HEX < 0x02060000 /* 2.5 */
+ PyModule_AddObject(m, "G_MAXSIZE", _PyLong_FromSize_t(G_MAXSIZE));
+ PyModule_AddObject(m, "G_MAXSSIZE", _PyLong_FromSsize_t(G_MAXSSIZE));
+#else /* 2.6+ */
+ PyModule_AddObject(m, "G_MAXSIZE", PyLong_FromSize_t(G_MAXSIZE));
+ PyModule_AddObject(m, "G_MAXSSIZE", PyLong_FromSsize_t(G_MAXSSIZE));
+#endif
+ PyModule_AddObject(m, "G_MINOFFSET", PyLong_FromLongLong(G_MINOFFSET));
+ PyModule_AddObject(m, "G_MAXOFFSET", PyLong_FromLongLong(G_MAXOFFSET));
+
+ /* in order for test_properties to pass, G_MAXUINT must be initialized using
+ PyLong_FromUnsignedLong, despite AFAICT it is unecessary for 32bit int types.
+ In the interests of consistancy I did the same for MAXUINT32 */
+ PyModule_AddObject(m, "G_MAXUINT32", PyLong_FromUnsignedLong(G_MAXUINT32));
+ PyModule_AddObject(m, "G_MAXUINT", PyLong_FromUnsignedLong(G_MAXUINT));
+
+ PyModule_AddIntConstant(m, "SIGNAL_RUN_FIRST", G_SIGNAL_RUN_FIRST);
+ PyModule_AddIntConstant(m, "SIGNAL_RUN_LAST", G_SIGNAL_RUN_LAST);
+ PyModule_AddIntConstant(m, "SIGNAL_RUN_CLEANUP", G_SIGNAL_RUN_CLEANUP);
+ PyModule_AddIntConstant(m, "SIGNAL_NO_RECURSE", G_SIGNAL_NO_RECURSE);
+ PyModule_AddIntConstant(m, "SIGNAL_DETAILED", G_SIGNAL_DETAILED);
+ PyModule_AddIntConstant(m, "SIGNAL_ACTION", G_SIGNAL_ACTION);
+ PyModule_AddIntConstant(m, "SIGNAL_NO_HOOKS", G_SIGNAL_NO_HOOKS);
+
+ PyModule_AddIntConstant(m, "PARAM_READABLE", G_PARAM_READABLE);
+ PyModule_AddIntConstant(m, "PARAM_WRITABLE", G_PARAM_WRITABLE);
+ PyModule_AddIntConstant(m, "PARAM_CONSTRUCT", G_PARAM_CONSTRUCT);
+ PyModule_AddIntConstant(m, "PARAM_CONSTRUCT_ONLY", G_PARAM_CONSTRUCT_ONLY);
+ PyModule_AddIntConstant(m, "PARAM_LAX_VALIDATION", G_PARAM_LAX_VALIDATION);
+ PyModule_AddIntConstant(m, "PARAM_READWRITE", G_PARAM_READWRITE);
+
+ /* The rest of the types are set in __init__.py */
+ PyModule_AddObject(m, "TYPE_INVALID", pyg_type_wrapper_new(G_TYPE_INVALID));
+ PyModule_AddObject(m, "TYPE_GSTRING", pyg_type_wrapper_new(G_TYPE_GSTRING));
+}
+
+/* features */
+static void
+pygobject_register_features(PyObject *d)
+{
+ PyObject *features;
+
+ features = PyDict_New();
+#ifdef HAVE_FFI_H
+ PyDict_SetItemString(features, "generic-c-marshaller", Py_True);
+#endif
+ PyDict_SetItemString(d, "features", features);
+ Py_DECREF(features);
+}
+
+static void
+pygobject_register_version_tuples(PyObject *d)
+{
+ PyObject *tuple;
+
+ /* pygobject version */
+ tuple = Py_BuildValue ("(iii)",
+ PYGOBJECT_MAJOR_VERSION,
+ PYGOBJECT_MINOR_VERSION,
+ PYGOBJECT_MICRO_VERSION);
+ PyDict_SetItemString(d, "pygobject_version", tuple);
+
+ /* backwards compatibility */
+ PyDict_SetItemString(d, "pygtk_version", tuple);
+ Py_DECREF(tuple);
+}
+
+static void
+pygobject_register_warnings(PyObject *d)
+{
+ PyObject *warning;
+
+ warning = PyErr_NewException("gobject.Warning", PyExc_Warning, NULL);
+ PyDict_SetItemString(d, "Warning", warning);
+ add_warning_redirection("GLib", warning);
+ add_warning_redirection("GLib-GObject", warning);
+ add_warning_redirection("GThread", warning);
+}
+
+
+PYGLIB_MODULE_START(_gobject, "gobject._gobject")
+{
+ PyObject *d;
+
+ g_type_init();
+ pyglib_init();
+
+ d = PyModule_GetDict(module);
+ pygobject_register_api(d);
+ pygobject_register_constants(module);
+ pygobject_register_features(d);
+ pygobject_register_version_tuples(d);
+ pygobject_register_warnings(d);
+ pygobject_type_register_types(d);
+ pygobject_object_register_types(d);
+ pygobject_interface_register_types(d);
+ pygobject_paramspec_register_types(d);
+ pygobject_boxed_register_types(d);
+ pygobject_pointer_register_types(d);
+ pygobject_enum_register_types(d);
+ pygobject_flags_register_types(d);
+
+ /* signal registration recognizes this special accumulator 'constant' */
+ _pyg_signal_accumulator_true_handled_func = \
+ PyDict_GetItemString(d, "signal_accumulator_true_handled");
+
+ pygobject_api_functions.threads_enabled = pyglib_threads_enabled();
+ _pyglib_notify_on_enabling_threads(pyg_note_threads_enabled);
+}
+PYGLIB_MODULE_END
diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py
new file mode 100644
index 0000000..e299273
--- /dev/null
+++ b/gobject/propertyhelper.py
@@ -0,0 +1,298 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2007 Johan Dahlin
+#
+# gobject/propertyhelper.py: GObject property wrapper/helper
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import sys
+
+import gobject._gobject
+_gobject = sys.modules['gobject._gobject']
+
+from gobject.constants import \
+ TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR, \
+ TYPE_BOOLEAN, TYPE_INT, TYPE_UINT, TYPE_LONG, \
+ TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM, \
+ TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_STRING, \
+ TYPE_POINTER, TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, \
+ TYPE_PYOBJECT
+from gobject.constants import \
+ G_MINFLOAT, G_MAXFLOAT, G_MINDOUBLE, G_MAXDOUBLE, \
+ G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
+ G_MAXULONG
+
+
+class property(object):
+ """
+ Creates a new property which in conjunction with GObject subclass will
+ create a property proxy:
+
+ >>> class MyObject(gobject.GObject):
+ >>> ... prop = gobject.property(type=str)
+
+ >>> obj = MyObject()
+ >>> obj.prop = 'value'
+
+ >>> obj.prop
+ 'value'
+
+ The API is similar to the builtin property:
+
+ class AnotherObject(gobject.GObject):
+ @gobject.property
+ def prop(self):
+ return ...
+
+ Which will create a read-only property called prop.
+ """
+
+ class __metaclass__(type):
+ def __repr__(self):
+ return "<class 'gobject.property'>"
+
+ def __init__(self, getter=None, setter=None, type=None, default=None,
+ nick='', blurb='', flags=_gobject.PARAM_READWRITE,
+ minimum=None, maximum=None):
+ """
+ @param getter: getter to get the value of the property
+ @type getter: callable
+ @param setter: setter to set the value of the property
+ @type setter: callable
+ @param type: type of property
+ @type type: type
+ @param default: default value
+ @param nick: short description
+ @type bick: string
+ @param blurb: long description
+ @type blurb: string
+ @param flags: parameter flags, one of:
+ - gobject.PARAM_READABLE
+ - gobject.PARAM_READWRITE
+ - gobject.PARAM_WRITABLE
+ - gobject.PARAM_CONSTRUCT
+ - gobject.PARAM_CONSTRUCT_ONLY
+ - gobject.PARAM_LAX_VALIDATION
+ @keyword minimum: minimum allowed value (int, float, long only)
+ @keyword maximum: maximum allowed value (int, float, long only)
+ """
+
+ if getter and not setter:
+ setter = self._readonly_setter
+ elif setter and not getter:
+ getter = self._writeonly_getter
+ elif not setter and not getter:
+ getter = self._default_getter
+ setter = self._default_setter
+ self.getter = getter
+ self.setter = setter
+
+ if type is None:
+ type = object
+ self.type = self._type_from_python(type)
+ self.default = self._get_default(default)
+ self._check_default()
+
+ if not isinstance(nick, basestring):
+ raise TypeError("nick must be a string")
+ self.nick = nick
+
+ if not isinstance(blurb, basestring):
+ raise TypeError("blurb must be a string")
+ self.blurb = blurb
+
+ if flags < 0 or flags > 32:
+ raise TypeError("invalid flag value: %r" % (flags,))
+ self.flags = flags
+
+ if minimum is not None:
+ if minimum < self._get_minimum():
+ raise TypeError(
+ "Minimum for type %s cannot be lower than %d" % (
+ self.type, self._get_minimum()))
+ else:
+ minimum = self._get_minimum()
+ self.minimum = minimum
+ if maximum is not None:
+ if maximum > self._get_maximum():
+ raise TypeError(
+ "Maximum for type %s cannot be higher than %d" % (
+ self.type, self._get_maximum()))
+ else:
+ maximum = self._get_maximum()
+ self.maximum = maximum
+
+ self.name = None
+
+ self._values = {}
+ self._exc = None
+
+ def __repr__(self):
+ return '<gobject property %s (%s)>' % (
+ self.name or '(uninitialized)',
+ _gobject.type_name(self.type))
+
+ def __get__(self, instance, klass):
+ if instance is None:
+ return self
+
+ self._exc = None
+ value = instance.get_property(self.name)
+ if self._exc:
+ exc = self._exc
+ self._exc = None
+ raise exc
+
+ return value
+
+ def __set__(self, instance, value):
+ if instance is None:
+ raise TypeError
+
+ self._exc = None
+ instance.set_property(self.name, value)
+ if self._exc:
+ exc = self._exc
+ self._exc = None
+ raise exc
+
+ def _type_from_python(self, type):
+ if type == int:
+ return TYPE_INT
+ elif type == bool:
+ return TYPE_BOOLEAN
+ elif type == long:
+ return TYPE_LONG
+ elif type == float:
+ return TYPE_DOUBLE
+ elif type == str:
+ return TYPE_STRING
+ elif type == object:
+ return TYPE_PYOBJECT
+ elif type == _gobject.GObject:
+ return TYPE_OBJECT
+ elif type in [TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR,
+ TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG,
+ TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM,
+ TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER,
+ TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING,
+ TYPE_PYOBJECT]:
+ return type
+ else:
+ raise TypeError("Unsupported type: %r" % (type,))
+
+ def _get_default(self, default):
+ ptype = self.type
+ if default is not None:
+ return default
+
+ if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
+ TYPE_INT64, TYPE_UINT64]:
+ return 0
+ elif ptype == TYPE_STRING:
+ return ''
+ elif ptype == TYPE_FLOAT or ptype == TYPE_DOUBLE:
+ return 0.0
+ else:
+ return None
+
+ def _check_default(self):
+ ptype = self.type
+ default = self.default
+ if (ptype == TYPE_BOOLEAN and (default not in (True, False))):
+ raise TypeError(
+ "default must be True or False, not %r" % (default,))
+ elif ptype == TYPE_PYOBJECT:
+ if default is not None:
+ raise TypeError("object types does not have default values")
+
+ def _get_minimum(self):
+ ptype = self.type
+ if ptype in [TYPE_UINT, TYPE_ULONG, TYPE_UINT64]:
+ return 0
+ # Remember that G_MINFLOAT and G_MINDOUBLE are something different.
+ elif ptype == TYPE_FLOAT:
+ return -G_MAXFLOAT
+ elif ptype == TYPE_DOUBLE:
+ return -G_MAXDOUBLE
+ elif ptype == TYPE_INT:
+ return G_MININT
+ elif ptype == TYPE_LONG:
+ return G_MINLONG
+ elif ptype == TYPE_INT64:
+ return -2 ** 62 - 1
+
+ return None
+
+ def _get_maximum(self):
+ ptype = self.type
+ if ptype == TYPE_UINT:
+ return G_MAXUINT
+ elif ptype == TYPE_ULONG:
+ return G_MAXULONG
+ elif ptype == TYPE_INT64:
+ return 2 ** 62 - 1
+ elif ptype == TYPE_UINT64:
+ return 2 ** 63 - 1
+ elif ptype == TYPE_FLOAT:
+ return G_MAXFLOAT
+ elif ptype == TYPE_DOUBLE:
+ return G_MAXDOUBLE
+ elif ptype == TYPE_INT:
+ return G_MAXINT
+ elif ptype == TYPE_LONG:
+ return G_MAXLONG
+
+ return None
+
+ #
+ # Getter and Setter
+ #
+
+ def _default_setter(self, instance, value):
+ self._values[instance] = value
+
+ def _default_getter(self, instance):
+ return self._values.get(instance, self.default)
+
+ def _readonly_setter(self, instance, value):
+ self._exc = TypeError("%s property of %s is read-only" % (
+ self.name, type(instance).__name__))
+
+ def _writeonly_getter(self, instance):
+ self._exc = TypeError("%s property of %s is write-only" % (
+ self.name, type(instance).__name__))
+
+ #
+ # Public API
+ #
+
+ def get_pspec_args(self):
+ ptype = self.type
+ if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
+ TYPE_INT64, TYPE_UINT64, TYPE_FLOAT, TYPE_DOUBLE]:
+ args = self._get_minimum(), self._get_maximum(), self.default
+ elif ptype == TYPE_STRING or ptype == TYPE_BOOLEAN:
+ args = (self.default,)
+ elif ptype == TYPE_PYOBJECT:
+ args = ()
+ elif ptype == TYPE_OBJECT:
+ args = ()
+ else:
+ raise NotImplementedError(ptype)
+
+ return (self.type, self.nick, self.blurb) + args + (self.flags,)
diff --git a/gobject/pygboxed.c b/gobject/pygboxed.c
new file mode 100644
index 0000000..87695eb
--- /dev/null
+++ b/gobject/pygboxed.c
@@ -0,0 +1,228 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ *
+ * pygboxed.c: wrapper for GBoxed
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pygboxed.h"
+
+#include "pygi-external.h"
+
+GQuark pygboxed_type_key;
+GQuark pygboxed_marshal_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GBoxed", PyGBoxed_Type, PyGBoxed);
+
+static void
+pyg_boxed_dealloc(PyGBoxed *self)
+{
+ if (self->free_on_dealloc && self->boxed) {
+ PyGILState_STATE state = pyglib_gil_state_ensure();
+ g_boxed_free(self->gtype, self->boxed);
+ pyglib_gil_state_release(state);
+ }
+
+ Py_TYPE(self)->tp_free((PyObject *)self);
+}
+
+static int
+pyg_boxed_compare(PyGBoxed *self, PyGBoxed *v)
+{
+ if (self->boxed == v->boxed) return 0;
+ if (self->boxed > v->boxed) return -1;
+ return 1;
+}
+
+static long
+pyg_boxed_hash(PyGBoxed *self)
+{
+ return (long)self->boxed;
+}
+
+static PyObject *
+pyg_boxed_repr(PyGBoxed *self)
+{
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf), "<%s at 0x%lx>", g_type_name(self->gtype),
+ (long)self->boxed);
+ return _PyUnicode_FromString(buf);
+}
+
+static int
+pyg_boxed_init(PyGBoxed *self, PyObject *args, PyObject *kwargs)
+{
+ gchar buf[512];
+
+ if (!PyArg_ParseTuple(args, ":GBoxed.__init__"))
+ return -1;
+
+ self->boxed = NULL;
+ self->gtype = 0;
+ self->free_on_dealloc = FALSE;
+
+ g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+ Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_NotImplementedError, buf);
+ return -1;
+}
+
+static void
+pyg_boxed_free(PyObject *op)
+{
+ PyObject_FREE(op);
+}
+
+static PyObject *
+pyg_boxed_copy(PyGBoxed *self)
+{
+ return pyg_boxed_new (self->gtype, self->boxed, TRUE, TRUE);
+}
+
+
+
+static PyMethodDef pygboxed_methods[] = {
+ { "copy", (PyCFunction) pyg_boxed_copy, METH_NOARGS },
+ { NULL, NULL, 0 }
+};
+
+
+/**
+ * pyg_register_boxed:
+ * @dict: the module dictionary to store the wrapper class.
+ * @class_name: the Python name for the wrapper class.
+ * @boxed_type: the GType of the boxed type being wrapped.
+ * @type: the wrapper class.
+ *
+ * Registers a wrapper for a boxed type. The wrapper class will be a
+ * subclass of gobject.GBoxed, and a reference to the wrapper class
+ * will be stored in the provided module dictionary.
+ */
+void
+pyg_register_boxed(PyObject *dict, const gchar *class_name,
+ GType boxed_type, PyTypeObject *type)
+{
+ PyObject *o;
+
+ g_return_if_fail(dict != NULL);
+ g_return_if_fail(class_name != NULL);
+ g_return_if_fail(boxed_type != 0);
+
+ if (!type->tp_dealloc) type->tp_dealloc = (destructor)pyg_boxed_dealloc;
+
+ Py_TYPE(type) = &PyType_Type;
+ type->tp_base = &PyGBoxed_Type;
+
+ if (PyType_Ready(type) < 0) {
+ g_warning("could not get type `%s' ready", type->tp_name);
+ return;
+ }
+
+ PyDict_SetItemString(type->tp_dict, "__gtype__",
+ o=pyg_type_wrapper_new(boxed_type));
+ Py_DECREF(o);
+
+ g_type_set_qdata(boxed_type, pygboxed_type_key, type);
+
+ PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+}
+
+/**
+ * pyg_boxed_new:
+ * @boxed_type: the GType of the boxed value.
+ * @boxed: the boxed value.
+ * @copy_boxed: whether the new boxed wrapper should hold a copy of the value.
+ * @own_ref: whether the boxed wrapper should own the boxed value.
+ *
+ * Creates a wrapper for a boxed value. If @copy_boxed is set to
+ * True, the wrapper will hold a copy of the value, instead of the
+ * value itself. If @own_ref is True, then the value held by the
+ * wrapper will be freed when the wrapper is deallocated. If
+ * @copy_boxed is True, then @own_ref must also be True.
+ *
+ * Returns: the boxed wrapper.
+ */
+PyObject *
+pyg_boxed_new(GType boxed_type, gpointer boxed, gboolean copy_boxed,
+ gboolean own_ref)
+{
+ PyGILState_STATE state;
+ PyGBoxed *self;
+ PyTypeObject *tp;
+
+ g_return_val_if_fail(boxed_type != 0, NULL);
+ g_return_val_if_fail(!copy_boxed || (copy_boxed && own_ref), NULL);
+
+ state = pyglib_gil_state_ensure();
+
+ if (!boxed) {
+ Py_INCREF(Py_None);
+ pyglib_gil_state_release(state);
+ return Py_None;
+ }
+
+ tp = g_type_get_qdata(boxed_type, pygboxed_type_key);
+
+ if (!tp)
+ tp = (PyTypeObject *)pygi_type_import_by_g_type(boxed_type);
+
+ if (!tp)
+ tp = (PyTypeObject *)&PyGBoxed_Type; /* fallback */
+
+ self = (PyGBoxed *)tp->tp_alloc(tp, 0);
+
+ if (self == NULL) {
+ pyglib_gil_state_release(state);
+ return NULL;
+ }
+
+ if (copy_boxed)
+ boxed = g_boxed_copy(boxed_type, boxed);
+ self->boxed = boxed;
+ self->gtype = boxed_type;
+ self->free_on_dealloc = own_ref;
+
+ pyglib_gil_state_release(state);
+
+ return (PyObject *)self;
+}
+
+void
+pygobject_boxed_register_types(PyObject *d)
+{
+ pygboxed_type_key = g_quark_from_static_string("PyGBoxed::class");
+ pygboxed_marshal_key = g_quark_from_static_string("PyGBoxed::marshal");
+
+ PyGBoxed_Type.tp_dealloc = (destructor)pyg_boxed_dealloc;
+ PyGBoxed_Type.tp_compare = (cmpfunc)pyg_boxed_compare;
+ PyGBoxed_Type.tp_repr = (reprfunc)pyg_boxed_repr;
+ PyGBoxed_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGBoxed_Type.tp_methods = pygboxed_methods;
+ PyGBoxed_Type.tp_init = (initproc)pyg_boxed_init;
+ PyGBoxed_Type.tp_free = (freefunc)pyg_boxed_free;
+ PyGBoxed_Type.tp_hash = (hashfunc)pyg_boxed_hash;
+
+ PYGOBJECT_REGISTER_GTYPE(d, PyGBoxed_Type, "GBoxed", G_TYPE_BOXED);
+}
diff --git a/gobject/pygboxed.h b/gobject/pygboxed.h
new file mode 100644
index 0000000..8433b9d
--- /dev/null
+++ b/gobject/pygboxed.h
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_BOXED_H__
+#define __PYGOBJECT_BOXED_H__
+
+void pygobject_boxed_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_BOXED_H__ */
diff --git a/gobject/pygenum.c b/gobject/pygenum.c
new file mode 100644
index 0000000..027dbd4
--- /dev/null
+++ b/gobject/pygenum.c
@@ -0,0 +1,356 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * Copyright (C) 2004 Johan Dahlin
+ *
+ * pygenum.c: GEnum wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+
+#include "pygi-external.h"
+
+GQuark pygenum_class_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GEnum", PyGEnum_Type, PyGEnum);
+
+static PyObject *
+pyg_enum_richcompare(PyGEnum *self, PyObject *other, int op)
+{
+ static char warning[256];
+
+ if (!_PyLong_Check(other)) {
+ Py_INCREF(Py_NotImplemented);
+ return Py_NotImplemented;
+ }
+
+ if (PyObject_TypeCheck(other, &PyGEnum_Type) && ((PyGEnum*)other)->gtype != self->gtype) {
+ g_snprintf(warning, sizeof(warning), "comparing different enum types: %s and %s",
+ g_type_name(self->gtype), g_type_name(((PyGEnum*)other)->gtype));
+ if (PyErr_Warn(PyExc_Warning, warning))
+ return NULL;
+ }
+
+ return pyg_integer_richcompare((PyObject *)self, other, op);
+}
+
+static PyObject *
+pyg_enum_repr(PyGEnum *self)
+{
+ GEnumClass *enum_class;
+ const char *value;
+ guint index;
+ static char tmp[256];
+
+ enum_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_ENUM_CLASS(enum_class));
+
+ for (index = 0; index < enum_class->n_values; index++)
+ if (_PyLong_AS_LONG(self) == enum_class->values[index].value)
+ break;
+ value = enum_class->values[index].value_name;
+ if (value)
+ sprintf(tmp, "<enum %s of type %s>", value, g_type_name(self->gtype));
+ else
+ sprintf(tmp, "<enum %ld of type %s>", _PyLong_AS_LONG(self), g_type_name(self->gtype));
+
+ g_type_class_unref(enum_class);
+
+ return _PyUnicode_FromString(tmp);
+}
+
+static PyObject *
+pyg_enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "value", NULL };
+ long value;
+ PyObject *pytc, *values, *ret, *intvalue;
+ GType gtype;
+ GEnumClass *eclass;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "l", kwlist, &value))
+ return NULL;
+
+ pytc = PyObject_GetAttrString((PyObject *)type, "__gtype__");
+ if (!pytc)
+ return NULL;
+
+ if (!PyObject_TypeCheck(pytc, &PyGTypeWrapper_Type)) {
+ Py_DECREF(pytc);
+ PyErr_SetString(PyExc_TypeError,
+ "__gtype__ attribute not a typecode");
+ return NULL;
+ }
+
+ gtype = pyg_type_from_object(pytc);
+ Py_DECREF(pytc);
+
+ eclass = G_ENUM_CLASS(g_type_class_ref(gtype));
+
+ /* A check that 0 < value < eclass->n_values was here but got
+ * removed: enumeration values do not need to be consequitive,
+ * e.g. GtkPathPriorityType values are not.
+ */
+
+ values = PyObject_GetAttrString((PyObject *)type, "__enum_values__");
+ if (!values) {
+ g_type_class_unref(eclass);
+ return NULL;
+ }
+
+ /* Note that size of __enum_values__ dictionary can easily be less
+ * than 'n_values'. This happens if some values of the enum are
+ * numerically equal, e.g. gtk.ANCHOR_N == gtk.ANCHOR_NORTH.
+ * Johan said that "In retrospect, using a dictionary to store the
+ * values might not have been that good", but we need to keep
+ * backward compatibility.
+ */
+ if (!PyDict_Check(values) || PyDict_Size(values) > eclass->n_values) {
+ PyErr_SetString(PyExc_TypeError, "__enum_values__ badly formed");
+ Py_DECREF(values);
+ g_type_class_unref(eclass);
+ return NULL;
+ }
+
+ g_type_class_unref(eclass);
+
+ intvalue = _PyLong_FromLong(value);
+ ret = PyDict_GetItem(values, intvalue);
+ Py_DECREF(intvalue);
+ Py_DECREF(values);
+ if (ret)
+ Py_INCREF(ret);
+ else
+ PyErr_Format(PyExc_ValueError, "invalid enum value: %ld", value);
+
+ return ret;
+}
+
+PyObject*
+pyg_enum_from_gtype (GType gtype, int value)
+{
+ PyObject *pyclass, *values, *retval, *intvalue;
+
+ g_return_val_if_fail(gtype != G_TYPE_INVALID, NULL);
+
+ /* Get a wrapper class by:
+ * 1. check for one attached to the gtype
+ * 2. lookup one in a typelib
+ * 3. creating a new one
+ */
+ pyclass = (PyObject*)g_type_get_qdata(gtype, pygenum_class_key);
+ if (!pyclass)
+ pyclass = pygi_type_import_by_g_type(gtype);
+ if (!pyclass)
+ pyclass = pyg_enum_add(NULL, g_type_name(gtype), NULL, gtype);
+ if (!pyclass)
+ return _PyLong_FromLong(value);
+
+ values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
+ "__enum_values__");
+ intvalue = _PyLong_FromLong(value);
+ retval = PyDict_GetItem(values, intvalue);
+ Py_DECREF(intvalue);
+ if (!retval) {
+ PyErr_Clear();
+ retval = ((PyTypeObject *)pyclass)->tp_alloc((PyTypeObject *)pyclass, 0);
+ g_assert(retval != NULL);
+
+#if PY_VERSION_HEX >= 0x03000000
+# warning "FIXME: figure out how to subclass long"
+#else
+ ((_PyLongObject*)retval)->ob_ival = value;
+#endif
+ ((PyGFlags*)retval)->gtype = gtype;
+ //return _PyLong_FromLong(value);
+ }
+
+ Py_INCREF(retval);
+ return retval;
+}
+
+PyObject *
+pyg_enum_add (PyObject * module,
+ const char * typename,
+ const char * strip_prefix,
+ GType gtype)
+{
+ PyGILState_STATE state;
+ PyObject *instance_dict, *stub, *values, *o;
+ GEnumClass *eclass;
+ int i;
+
+ g_return_val_if_fail(typename != NULL, NULL);
+ if (!g_type_is_a(gtype, G_TYPE_ENUM)) {
+ g_warning("Trying to register gtype '%s' as enum when in fact it is of type '%s'",
+ g_type_name(gtype), g_type_name(G_TYPE_FUNDAMENTAL(gtype)));
+ return NULL;
+ }
+
+ state = pyglib_gil_state_ensure();
+
+ instance_dict = PyDict_New();
+ stub = PyObject_CallFunction((PyObject *)&PyType_Type, "s(O)O",
+ typename, (PyObject *)&PyGEnum_Type,
+ instance_dict);
+ Py_DECREF(instance_dict);
+ if (!stub) {
+ PyErr_SetString(PyExc_RuntimeError, "can't create const");
+ pyglib_gil_state_release(state);
+ return NULL;
+ }
+
+ ((PyTypeObject *)stub)->tp_flags &= ~Py_TPFLAGS_BASETYPE;
+ ((PyTypeObject *)stub)->tp_new = pyg_enum_new;
+
+ if (module)
+ PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+ "__module__",
+ _PyUnicode_FromString(PyModule_GetName(module)));
+
+ g_type_set_qdata(gtype, pygenum_class_key, stub);
+
+ o = pyg_type_wrapper_new(gtype);
+ PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict, "__gtype__", o);
+ Py_DECREF(o);
+
+ if (module) {
+ /* Add it to the module name space */
+ PyModule_AddObject(module, (char*)typename, stub);
+ Py_INCREF(stub);
+ }
+
+ /* Register enum values */
+ eclass = G_ENUM_CLASS(g_type_class_ref(gtype));
+
+ values = PyDict_New();
+ for (i = 0; i < eclass->n_values; i++) {
+ PyObject *item, *intval;
+
+ item = ((PyTypeObject *)stub)->tp_alloc((PyTypeObject *)stub, 0);
+#if PY_VERSION_HEX >= 0x03000000
+# warning "FIXME: figure out how to subclass long"
+#else
+ ((_PyLongObject*)item)->ob_ival = eclass->values[i].value;
+#endif
+ ((PyGEnum*)item)->gtype = gtype;
+
+ intval = _PyLong_FromLong(eclass->values[i].value);
+ PyDict_SetItem(values, intval, item);
+ Py_DECREF(intval);
+
+ if (module) {
+ char *prefix;
+
+ prefix = g_strdup(pyg_constant_strip_prefix(eclass->values[i].value_name, strip_prefix));
+ PyModule_AddObject(module, prefix, item);
+ g_free(prefix);
+
+ Py_INCREF(item);
+ }
+ }
+
+ PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+ "__enum_values__", values);
+ Py_DECREF(values);
+
+ g_type_class_unref(eclass);
+
+ pyglib_gil_state_release(state);
+ return stub;
+}
+
+static PyObject *
+pyg_enum_reduce(PyObject *self, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ":GEnum.__reduce__"))
+ return NULL;
+
+ return Py_BuildValue("(O(i)O)", Py_TYPE(self), _PyLong_AsLong(self),
+ PyObject_GetAttrString(self, "__dict__"));
+}
+
+static PyObject *
+pyg_enum_get_value_name(PyGEnum *self, void *closure)
+{
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+ PyObject *retval;
+
+ enum_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_ENUM_CLASS(enum_class));
+
+ enum_value = g_enum_get_value(enum_class, _PyLong_AS_LONG(self));
+
+ retval = _PyUnicode_FromString(enum_value->value_name);
+ g_type_class_unref(enum_class);
+
+ return retval;
+}
+
+static PyObject *
+pyg_enum_get_value_nick(PyGEnum *self, void *closure)
+{
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+ PyObject *retval;
+
+ enum_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_ENUM_CLASS(enum_class));
+
+ enum_value = g_enum_get_value(enum_class, _PyLong_AS_LONG(self));
+
+ retval = _PyUnicode_FromString(enum_value->value_nick);
+ g_type_class_unref(enum_class);
+
+ return retval;
+}
+
+
+static PyMethodDef pyg_enum_methods[] = {
+ { "__reduce__", (PyCFunction)pyg_enum_reduce, METH_VARARGS },
+ { NULL, NULL, 0 }
+};
+
+static PyGetSetDef pyg_enum_getsets[] = {
+ { "value_name", (getter)pyg_enum_get_value_name, (setter)0 },
+ { "value_nick", (getter)pyg_enum_get_value_nick, (setter)0 },
+ { NULL, 0, 0 }
+};
+
+void
+pygobject_enum_register_types(PyObject *d)
+{
+ pygenum_class_key = g_quark_from_static_string("PyGEnum::class");
+
+ PyGEnum_Type.tp_base = &_PyLong_Type;
+ PyGEnum_Type.tp_repr = (reprfunc)pyg_enum_repr;
+ PyGEnum_Type.tp_str = (reprfunc)pyg_enum_repr;
+ PyGEnum_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGEnum_Type.tp_richcompare = (richcmpfunc)pyg_enum_richcompare;
+ PyGEnum_Type.tp_methods = pyg_enum_methods;
+ PyGEnum_Type.tp_getset = pyg_enum_getsets;
+ PyGEnum_Type.tp_new = pyg_enum_new;
+ PYGOBJECT_REGISTER_GTYPE(d, PyGEnum_Type, "GEnum", G_TYPE_ENUM);
+
+}
diff --git a/gobject/pygenum.h b/gobject/pygenum.h
new file mode 100644
index 0000000..0558831
--- /dev/null
+++ b/gobject/pygenum.h
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_ENUM_H__
+#define __PYGOBJECT_ENUM_H__
+
+void pygobject_enum_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_ENUM_H__ */
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
new file mode 100644
index 0000000..1865abb
--- /dev/null
+++ b/gobject/pygflags.c
@@ -0,0 +1,491 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * Copyright (C) 2004 Johan Dahlin
+ *
+ * pygenum.c: GFlags wrapper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pygflags.h"
+
+#include "pygi-external.h"
+
+GQuark pygflags_class_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GFlags", PyGFlags_Type, PyGFlags);
+
+static PyObject *
+pyg_flags_richcompare(PyGFlags *self, PyObject *other, int op)
+{
+ static char warning[256];
+
+ if (!_PyLong_Check(other)) {
+ Py_INCREF(Py_NotImplemented);
+ return Py_NotImplemented;
+ }
+
+ if (PyObject_TypeCheck(other, &PyGFlags_Type) && ((PyGFlags*)other)->gtype != self->gtype) {
+ g_snprintf(warning, sizeof(warning), "comparing different flags types: %s and %s",
+ g_type_name(self->gtype), g_type_name(((PyGFlags*)other)->gtype));
+ if (PyErr_Warn(PyExc_Warning, warning))
+ return NULL;
+ }
+
+ return pyg_integer_richcompare((PyObject *)self, other, op);
+}
+
+static char *
+generate_repr(GType gtype, int value)
+{
+ GFlagsClass *flags_class;
+ char *retval = NULL, *tmp;
+ int i;
+
+ flags_class = g_type_class_ref(gtype);
+ g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+ for (i = 0; i < flags_class->n_values; i++) {
+ /* Some types (eg GstElementState in GStreamer 0.8) has flags with 0 values,
+ * we're just ignore them for now otherwise they'll always show up
+ */
+ if (flags_class->values[i].value == 0)
+ continue;
+
+ if ((value & flags_class->values[i].value) == flags_class->values[i].value) {
+ if (retval) {
+ tmp = g_strdup_printf("%s | %s", retval, flags_class->values[i].value_name);
+ g_free(retval);
+ retval = tmp;
+ } else {
+ retval = g_strdup_printf("%s", flags_class->values[i].value_name);
+ }
+ }
+ }
+
+ g_type_class_unref(flags_class);
+
+ return retval;
+}
+
+static PyObject *
+pyg_flags_repr(PyGFlags *self)
+{
+ char *tmp, *retval;
+ PyObject *pyretval;
+
+ tmp = generate_repr(self->gtype, _PyLong_AS_LONG(self));
+
+ if (tmp)
+ retval = g_strdup_printf("<flags %s of type %s>", tmp,
+ g_type_name(self->gtype));
+ else
+ retval = g_strdup_printf("<flags %ld of type %s>", _PyLong_AS_LONG(self),
+ g_type_name(self->gtype));
+ g_free(tmp);
+
+ pyretval = _PyUnicode_FromString(retval);
+ g_free(retval);
+
+ return pyretval;
+}
+
+static PyObject *
+pyg_flags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "value", NULL };
+ long value;
+ PyObject *pytc, *values, *ret, *pyint;
+ GType gtype;
+ GFlagsClass *eclass;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "l", kwlist, &value))
+ return NULL;
+
+ pytc = PyObject_GetAttrString((PyObject *)type, "__gtype__");
+ if (!pytc)
+ return NULL;
+
+ if (!PyObject_TypeCheck(pytc, &PyGTypeWrapper_Type)) {
+ Py_DECREF(pytc);
+ PyErr_SetString(PyExc_TypeError,
+ "__gtype__ attribute not a typecode");
+ return NULL;
+ }
+
+ gtype = pyg_type_from_object(pytc);
+ Py_DECREF(pytc);
+
+ eclass = G_FLAGS_CLASS(g_type_class_ref(gtype));
+
+ values = PyObject_GetAttrString((PyObject *)type, "__flags_values__");
+ if (!values) {
+ g_type_class_unref(eclass);
+ return NULL;
+ }
+
+ if (!PyDict_Check(values) || PyDict_Size(values) != eclass->n_values) {
+ PyErr_SetString(PyExc_TypeError, "__flags_values__ badly formed");
+ Py_DECREF(values);
+ g_type_class_unref(eclass);
+ return NULL;
+ }
+
+ g_type_class_unref(eclass);
+
+ pyint = _PyLong_FromLong(value);
+ ret = PyDict_GetItem(values, pyint);
+ Py_DECREF(pyint);
+ Py_DECREF(values);
+
+ if (ret)
+ Py_INCREF(ret);
+ else
+ PyErr_Format(PyExc_ValueError, "invalid flag value: %ld", value);
+ return ret;
+}
+
+PyObject*
+pyg_flags_from_gtype (GType gtype, int value)
+{
+ PyObject *pyclass, *values, *retval, *pyint;
+
+ g_return_val_if_fail(gtype != G_TYPE_INVALID, NULL);
+
+ /* Get a wrapper class by:
+ * 1. check for one attached to the gtype
+ * 2. lookup one in a typelib
+ * 3. creating a new one
+ */
+ pyclass = (PyObject*)g_type_get_qdata(gtype, pygflags_class_key);
+ if (!pyclass)
+ pyclass = pygi_type_import_by_g_type(gtype);
+ if (!pyclass)
+ pyclass = pyg_flags_add(NULL, g_type_name(gtype), NULL, gtype);
+ if (!pyclass)
+ return _PyLong_FromLong(value);
+
+ values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
+ "__flags_values__");
+ pyint = _PyLong_FromLong(value);
+ retval = PyDict_GetItem(values, pyint);
+ Py_DECREF(pyint);
+
+ if (!retval) {
+ PyErr_Clear();
+
+ retval = ((PyTypeObject *)pyclass)->tp_alloc((PyTypeObject *)pyclass, 0);
+ g_assert(retval != NULL);
+
+#if PY_VERSION_HEX >= 0x03000000
+# warning "FIXME: figure out how to subclass long"
+#else
+ ((_PyLongObject*)retval)->ob_ival = value;
+#endif
+ ((PyGFlags*)retval)->gtype = gtype;
+ } else {
+ Py_INCREF(retval);
+ }
+ return retval;
+}
+
+PyObject *
+pyg_flags_add (PyObject * module,
+ const char * typename,
+ const char * strip_prefix,
+ GType gtype)
+{
+ PyGILState_STATE state;
+ PyObject *instance_dict, *stub, *values, *o;
+ GFlagsClass *eclass;
+ int i;
+
+ g_return_val_if_fail(typename != NULL, NULL);
+ if (!g_type_is_a(gtype, G_TYPE_FLAGS)) {
+ g_warning("Trying to register gtype '%s' as flags when in fact it is of type '%s'",
+ g_type_name(gtype), g_type_name(G_TYPE_FUNDAMENTAL(gtype)));
+ return NULL;
+ }
+
+ state = pyglib_gil_state_ensure();
+
+ instance_dict = PyDict_New();
+ stub = PyObject_CallFunction((PyObject *)&PyType_Type, "s(O)O",
+ typename, (PyObject *)&PyGFlags_Type,
+ instance_dict);
+ Py_DECREF(instance_dict);
+ if (!stub) {
+ PyErr_SetString(PyExc_RuntimeError, "can't create const");
+ pyglib_gil_state_release(state);
+ return NULL;
+ }
+
+ ((PyTypeObject *)stub)->tp_flags &= ~Py_TPFLAGS_BASETYPE;
+ ((PyTypeObject *)stub)->tp_new = pyg_flags_new;
+
+ if (module) {
+ PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+ "__module__",
+ _PyUnicode_FromString(PyModule_GetName(module)));
+
+ /* Add it to the module name space */
+ PyModule_AddObject(module, (char*)typename, stub);
+ Py_INCREF(stub);
+ }
+ g_type_set_qdata(gtype, pygflags_class_key, stub);
+
+ o = pyg_type_wrapper_new(gtype);
+ PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict, "__gtype__", o);
+ Py_DECREF(o);
+
+ /* Register flag values */
+ eclass = G_FLAGS_CLASS(g_type_class_ref(gtype));
+
+ values = PyDict_New();
+ for (i = 0; i < eclass->n_values; i++) {
+ PyObject *item, *intval;
+
+ item = ((PyTypeObject *)stub)->tp_alloc((PyTypeObject *)stub, 0);
+#if PY_VERSION_HEX >= 0x03000000
+# warning "FIXME: figure out how to subclass long"
+#else
+ ((_PyLongObject*)item)->ob_ival = eclass->values[i].value;
+#endif
+ ((PyGFlags*)item)->gtype = gtype;
+
+ intval = _PyLong_FromLong(eclass->values[i].value);
+ PyDict_SetItem(values, intval, item);
+ Py_DECREF(intval);
+
+ if (module) {
+ char *prefix;
+
+ prefix = g_strdup(pyg_constant_strip_prefix(eclass->values[i].value_name, strip_prefix));
+ PyModule_AddObject(module, prefix, item);
+ g_free(prefix);
+
+ Py_INCREF(item);
+ }
+ }
+
+ PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+ "__flags_values__", values);
+ Py_DECREF(values);
+
+ g_type_class_unref(eclass);
+
+ pyglib_gil_state_release(state);
+
+ return stub;
+}
+
+static PyObject *
+pyg_flags_and(PyGFlags *a, PyGFlags *b)
+{
+ if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
+ return _PyLong_Type.tp_as_number->nb_and((PyObject*)a,
+ (PyObject*)b);
+
+ return pyg_flags_from_gtype(a->gtype,
+ _PyLong_AS_LONG(a) & _PyLong_AS_LONG(b));
+}
+
+static PyObject *
+pyg_flags_or(PyGFlags *a, PyGFlags *b)
+{
+ if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
+ return _PyLong_Type.tp_as_number->nb_or((PyObject*)a,
+ (PyObject*)b);
+
+ return pyg_flags_from_gtype(a->gtype, _PyLong_AS_LONG(a) | _PyLong_AS_LONG(b));
+}
+
+static PyObject *
+pyg_flags_xor(PyGFlags *a, PyGFlags *b)
+{
+ if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
+ return _PyLong_Type.tp_as_number->nb_xor((PyObject*)a,
+ (PyObject*)b);
+
+ return pyg_flags_from_gtype(a->gtype,
+ _PyLong_AS_LONG(a) ^ _PyLong_AS_LONG(b));
+
+}
+
+static PyObject *
+pyg_flags_warn (PyObject *self, PyObject *args)
+{
+ if (PyErr_Warn(PyExc_Warning, "unsupported arithmetic operation for flags type"))
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_flags_get_first_value_name(PyGFlags *self, void *closure)
+{
+ GFlagsClass *flags_class;
+ GFlagsValue *flags_value;
+ PyObject *retval;
+
+ flags_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_FLAGS_CLASS(flags_class));
+ flags_value = g_flags_get_first_value(flags_class, _PyLong_AS_LONG(self));
+ if (flags_value)
+ retval = _PyUnicode_FromString(flags_value->value_name);
+ else {
+ retval = Py_None;
+ Py_INCREF(Py_None);
+ }
+ g_type_class_unref(flags_class);
+
+ return retval;
+}
+
+static PyObject *
+pyg_flags_get_first_value_nick(PyGFlags *self, void *closure)
+{
+ GFlagsClass *flags_class;
+ GFlagsValue *flags_value;
+ PyObject *retval;
+
+ flags_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+ flags_value = g_flags_get_first_value(flags_class, _PyLong_AS_LONG(self));
+ if (flags_value)
+ retval = _PyUnicode_FromString(flags_value->value_nick);
+ else {
+ retval = Py_None;
+ Py_INCREF(Py_None);
+ }
+ g_type_class_unref(flags_class);
+
+ return retval;
+}
+
+static PyObject *
+pyg_flags_get_value_names(PyGFlags *self, void *closure)
+{
+ GFlagsClass *flags_class;
+ PyObject *retval;
+ int i;
+
+ flags_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+ retval = PyList_New(0);
+ for (i = 0; i < flags_class->n_values; i++)
+ if ((_PyLong_AS_LONG(self) & flags_class->values[i].value) == flags_class->values[i].value)
+ PyList_Append(retval, _PyUnicode_FromString(flags_class->values[i].value_name));
+
+ g_type_class_unref(flags_class);
+
+ return retval;
+}
+
+static PyObject *
+pyg_flags_get_value_nicks(PyGFlags *self, void *closure)
+{
+ GFlagsClass *flags_class;
+ PyObject *retval;
+ int i;
+
+ flags_class = g_type_class_ref(self->gtype);
+ g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+ retval = PyList_New(0);
+ for (i = 0; i < flags_class->n_values; i++)
+ if ((_PyLong_AS_LONG(self) & flags_class->values[i].value) == flags_class->values[i].value)
+ PyList_Append(retval, _PyUnicode_FromString(flags_class->values[i].value_nick));
+
+ g_type_class_unref(flags_class);
+
+ return retval;
+}
+
+static PyGetSetDef pyg_flags_getsets[] = {
+ { "first_value_name", (getter)pyg_flags_get_first_value_name, (setter)0 },
+ { "first_value_nick", (getter)pyg_flags_get_first_value_nick, (setter)0 },
+ { "value_names", (getter)pyg_flags_get_value_names, (setter)0 },
+ { "value_nicks", (getter)pyg_flags_get_value_nicks, (setter)0 },
+ { NULL, 0, 0 }
+};
+
+static PyNumberMethods pyg_flags_as_number = {
+ (binaryfunc)pyg_flags_warn, /* nb_add */
+ (binaryfunc)pyg_flags_warn, /* nb_subtract */
+ (binaryfunc)pyg_flags_warn, /* nb_multiply */
+ (binaryfunc)pyg_flags_warn, /* nb_divide */
+ (binaryfunc)pyg_flags_warn, /* nb_remainder */
+ (binaryfunc)pyg_flags_warn, /* nb_divmod */
+ (ternaryfunc)pyg_flags_warn, /* nb_power */
+ 0, /* nb_negative */
+ 0, /* nb_positive */
+ 0, /* nb_absolute */
+ 0, /* nb_nonzero */
+ 0, /* nb_invert */
+ 0, /* nb_lshift */
+ 0, /* nb_rshift */
+ (binaryfunc)pyg_flags_and, /* nb_and */
+ (binaryfunc)pyg_flags_xor, /* nb_xor */
+ (binaryfunc)pyg_flags_or, /* nb_or */
+ 0, /* nb_coerce */
+ 0, /* nb_int */
+ 0, /* nb_long */
+ 0, /* nb_float */
+ 0, /* nb_oct */
+ 0, /* nb_hex */
+ 0, /* nb_inplace_add */
+ 0, /* nb_inplace_subtract */
+ 0, /* nb_inplace_multiply */
+ 0, /* nb_inplace_divide */
+ 0, /* nb_inplace_remainder */
+ 0, /* nb_inplace_power */
+ 0, /* nb_inplace_lshift */
+ 0, /* nb_inplace_rshift */
+ 0, /* nb_inplace_and */
+ 0, /* nb_inplace_xor */
+ 0, /* nb_inplace_or */
+ 0, /* nb_floor_divide */
+ 0, /* nb_true_divide */
+ 0, /* nb_inplace_floor_divide */
+ 0, /* nb_inplace_true_divide */
+};
+
+void
+pygobject_flags_register_types(PyObject *d)
+{
+ pygflags_class_key = g_quark_from_static_string("PyGFlags::class");
+
+ PyGFlags_Type.tp_base = &_PyLong_Type;
+ PyGFlags_Type.tp_repr = (reprfunc)pyg_flags_repr;
+ PyGFlags_Type.tp_as_number = &pyg_flags_as_number;
+ PyGFlags_Type.tp_str = (reprfunc)pyg_flags_repr;
+ PyGFlags_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGFlags_Type.tp_richcompare = (richcmpfunc)pyg_flags_richcompare;
+ PyGFlags_Type.tp_getset = pyg_flags_getsets;
+ PyGFlags_Type.tp_new = pyg_flags_new;
+ PYGOBJECT_REGISTER_GTYPE(d, PyGFlags_Type, "GFlags", G_TYPE_FLAGS);
+}
diff --git a/gobject/pygflags.h b/gobject/pygflags.h
new file mode 100644
index 0000000..e93265c
--- /dev/null
+++ b/gobject/pygflags.h
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_FLAGS_H__
+#define __PYGOBJECT_FLAGS_H__
+
+void pygobject_flags_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_FLAGS_H__ */
diff --git a/gobject/pygi-external.h b/gobject/pygi-external.h
new file mode 100644
index 0000000..b369dca
--- /dev/null
+++ b/gobject/pygi-external.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ */
+
+#ifndef _PYGI_EXTERNAL_H_
+#define _PYGI_EXTERNAL_H_
+
+#include <Python.h>
+#include <glib.h>
+
+struct PyGI_API {
+ PyObject* (*type_import_by_g_type) (GType g_type);
+};
+
+static struct PyGI_API *PyGI_API = NULL;
+
+static int
+_pygi_import (void)
+{
+#if ENABLE_PYGI
+ PyObject *module;
+ PyObject *api;
+
+ if (PyGI_API != NULL) {
+ return 1;
+ }
+
+ module = PyImport_ImportModule("gi");
+ if (module == NULL) {
+ PyErr_Clear();
+ return -1;
+ }
+
+ api = PyObject_GetAttrString(module, "_API");
+ if (api == NULL) {
+ PyErr_Clear();
+ Py_DECREF(module);
+ return -1;
+ }
+ if (!PyCObject_Check(api)) {
+ Py_DECREF(module);
+ Py_DECREF(api);
+ PyErr_Format(PyExc_TypeError, "gi._API must be cobject, not %s",
+ api->ob_type->tp_name);
+ return -1;
+ }
+
+ PyGI_API = (struct PyGI_API *)PyCObject_AsVoidPtr(api);
+
+ Py_DECREF(module);
+
+ return 0;
+#else
+ return -1;
+#endif /* ENABLE_PYGI */
+}
+
+static inline PyObject *
+pygi_type_import_by_g_type (GType g_type)
+{
+ if (_pygi_import() < 0) {
+ return NULL;
+ }
+ return PyGI_API->type_import_by_g_type(g_type);
+}
+
+#endif /* _PYGI_EXTERNAL_H_ */
diff --git a/gobject/pyginterface.c b/gobject/pyginterface.c
new file mode 100644
index 0000000..29af546
--- /dev/null
+++ b/gobject/pyginterface.c
@@ -0,0 +1,122 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ * pyginterface.c: wrapper for the gobject library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <Python.h>
+#include "pyglib.h"
+#include "pygobject-private.h"
+
+GQuark pyginterface_type_key;
+GQuark pyginterface_info_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GInterface", PyGInterface_Type, PyObject)
+
+static int
+pyg_interface_init(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ gchar buf[512];
+
+ if (!PyArg_ParseTuple(args, ":GInterface.__init__"))
+ return -1;
+
+ g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+ Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_NotImplementedError, buf);
+ return -1;
+}
+
+static void
+pyg_interface_free(PyObject *op)
+{
+ PyObject_FREE(op);
+}
+
+/**
+ * pyg_register_interface:
+ * @dict: a module dictionary.
+ * @class_name: the class name for the wrapper class.
+ * @gtype: the GType of the interface.
+ * @type: the wrapper class for the interface.
+ *
+ * Registers a Python class as the wrapper for a GInterface. As a
+ * convenience it will also place a reference to the wrapper class in
+ * the provided module dictionary.
+ */
+void
+pyg_register_interface(PyObject *dict, const gchar *class_name,
+ GType gtype, PyTypeObject *type)
+{
+ PyObject *o;
+
+ Py_TYPE(type) = &PyType_Type;
+ type->tp_base = &PyGInterface_Type;
+
+ if (PyType_Ready(type) < 0) {
+ g_warning("could not ready `%s'", type->tp_name);
+ return;
+ }
+
+ if (gtype) {
+ o = pyg_type_wrapper_new(gtype);
+ PyDict_SetItemString(type->tp_dict, "__gtype__", o);
+ Py_DECREF(o);
+ }
+
+ g_type_set_qdata(gtype, pyginterface_type_key, type);
+
+ PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+
+}
+
+void
+pyg_register_interface_info(GType gtype, const GInterfaceInfo *info)
+{
+ g_type_set_qdata(gtype, pyginterface_info_key, (gpointer) info);
+}
+
+const GInterfaceInfo *
+pyg_lookup_interface_info(GType gtype)
+{
+ return g_type_get_qdata(gtype, pyginterface_info_key);
+}
+
+void
+pygobject_interface_register_types(PyObject *d)
+{
+ pyginterface_type_key = g_quark_from_static_string("PyGInterface::type");
+ pyginterface_info_key = g_quark_from_static_string("PyGInterface::info");
+
+ PyGInterface_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGInterface_Type.tp_init = (initproc)pyg_interface_init;
+ PyGInterface_Type.tp_free = (freefunc)pyg_interface_free;
+
+ PYGOBJECT_REGISTER_GTYPE(d, PyGInterface_Type, "GInterface", G_TYPE_INTERFACE)
+
+ PyDict_SetItemString(PyGInterface_Type.tp_dict, "__doc__",
+ pyg_object_descr_doc_get());
+ PyDict_SetItemString(PyGInterface_Type.tp_dict, "__gdoc__",
+ pyg_object_descr_doc_get());
+
+}
diff --git a/gobject/pyginterface.h b/gobject/pyginterface.h
new file mode 100644
index 0000000..0f390c2
--- /dev/null
+++ b/gobject/pyginterface.h
@@ -0,0 +1,40 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ * pyginterface.c: wrapper for the gobject library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_INTERFACE_H__
+#define __PYGOBJECT_INTERFACE_H__
+
+extern GQuark pyginterface_type_key;
+extern GQuark pyginterface_info_key;
+
+extern PyTypeObject PyGInterface_Type;
+
+void pyg_register_interface(PyObject *dict,
+ const gchar *class_name,
+ GType gtype,
+ PyTypeObject *type);
+const GInterfaceInfo * pyg_lookup_interface_info(GType gtype);
+void pyg_register_interface_info(GType gtype, const
+ GInterfaceInfo *info);
+void pygobject_interface_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_INTERFACE_H__ */
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h
new file mode 100644
index 0000000..2a09eed
--- /dev/null
+++ b/gobject/pygobject-private.h
@@ -0,0 +1,229 @@
+#ifndef _PYGOBJECT_PRIVATE_H_
+#define _PYGOBJECT_PRIVATE_H_
+
+#ifdef _PYGOBJECT_H_
+# error "include pygobject.h or pygobject-private.h, but not both"
+#endif
+
+#define _INSIDE_PYGOBJECT_
+#include "pygobject.h"
+
+#include "pyglib-python-compat.h"
+
+#define PYGOBJECT_REGISTER_GTYPE(d, type, name, gtype) \
+ { \
+ PyObject *o; \
+ PYGLIB_REGISTER_TYPE(d, type, name); \
+ PyDict_SetItemString(type.tp_dict, "__gtype__", \
+ o=pyg_type_wrapper_new(gtype)); \
+ Py_DECREF(o); \
+}
+
+/* from gobjectmodule.c */
+extern struct _PyGObject_Functions pygobject_api_functions;
+#define pyg_block_threads() G_STMT_START { \
+ if (pygobject_api_functions.block_threads != NULL) \
+ (* pygobject_api_functions.block_threads)(); \
+ } G_STMT_END
+#define pyg_unblock_threads() G_STMT_START { \
+ if (pygobject_api_functions.unblock_threads != NULL) \
+ (* pygobject_api_functions.unblock_threads)(); \
+ } G_STMT_END
+
+#define pyg_threads_enabled (pygobject_api_functions.threads_enabled)
+
+
+#define pyg_gil_state_ensure() (pygobject_api_functions.threads_enabled? (PyGILState_Ensure()) : 0)
+#define pyg_gil_state_release(state) G_STMT_START { \
+ if (pygobject_api_functions.threads_enabled) \
+ PyGILState_Release(state); \
+ } G_STMT_END
+
+#define pyg_begin_allow_threads \
+ G_STMT_START { \
+ PyThreadState *_save = NULL; \
+ if (pygobject_api_functions.threads_enabled) \
+ _save = PyEval_SaveThread();
+#define pyg_end_allow_threads \
+ if (pygobject_api_functions.threads_enabled) \
+ PyEval_RestoreThread(_save); \
+ } G_STMT_END
+
+
+#ifndef Py_CLEAR /* since Python 2.4 */
+# define Py_CLEAR(op) \
+ do { \
+ if (op) { \
+ PyObject *tmp = (PyObject *)(op); \
+ (op) = NULL; \
+ Py_DECREF(tmp); \
+ } \
+ } while (0)
+#endif
+
+extern GType PY_TYPE_OBJECT;
+
+extern GQuark pygboxed_type_key;
+extern GQuark pygboxed_marshal_key;
+extern GQuark pygenum_class_key;
+extern GQuark pygflags_class_key;
+extern GQuark pyginterface_type_key;
+extern GQuark pyginterface_info_key;
+extern GQuark pygobject_class_init_key;
+extern GQuark pygobject_class_key;
+extern GQuark pygobject_wrapper_key;
+extern GQuark pygpointer_class_key;
+extern GQuark pygobject_has_updated_constructor_key;
+extern GQuark pygobject_instance_data_key;
+
+void pygobject_data_free (PyGObjectData *data);
+void pyg_destroy_notify (gpointer user_data);
+gboolean pyg_handler_marshal (gpointer user_data);
+gboolean pyg_error_check (GError **error);
+int pygobject_constructv (PyGObject *self,
+ guint n_parameters,
+ GParameter *parameters);
+int pygobject_construct (PyGObject *self,
+ const char *first_property_name,
+ ...);
+void pyg_set_object_has_new_constructor (GType gtype);
+
+PyObject *pyg_integer_richcompare(PyObject *v,
+ PyObject *w,
+ int op);
+
+gboolean pyg_gerror_exception_check(GError **error);
+
+/* from pygtype.h */
+extern PyTypeObject PyGTypeWrapper_Type;
+
+PyObject *pyg_type_wrapper_new (GType type);
+GType pyg_type_from_object (PyObject *obj);
+
+gint pyg_enum_get_value (GType enum_type, PyObject *obj, gint *val);
+gint pyg_flags_get_value (GType flag_type, PyObject *obj, gint *val);
+int pyg_pyobj_to_unichar_conv (PyObject* py_obj, void* ptr);
+
+typedef PyObject *(* fromvaluefunc)(const GValue *value);
+typedef int (*tovaluefunc)(GValue *value, PyObject *obj);
+
+void pyg_register_gtype_custom(GType gtype,
+ fromvaluefunc from_func,
+ tovaluefunc to_func);
+int pyg_value_from_pyobject(GValue *value, PyObject *obj);
+PyObject *pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed);
+int pyg_param_gvalue_from_pyobject(GValue* value,
+ PyObject* py_obj,
+ const GParamSpec* pspec);
+PyObject *pyg_param_gvalue_as_pyobject(const GValue* gvalue,
+ gboolean copy_boxed,
+ const GParamSpec* pspec);
+
+GClosure *pyg_closure_new(PyObject *callback, PyObject *extra_args, PyObject *swap_data);
+void pyg_closure_set_exception_handler(GClosure *closure,
+ PyClosureExceptionHandler handler);
+GClosure *pyg_signal_class_closure_get(void);
+GClosure *gclosure_from_pyfunc(PyGObject *object, PyObject *func);
+
+PyObject *pyg_object_descr_doc_get(void);
+void pygobject_object_register_types(PyObject *d);
+
+extern PyTypeObject *PyGObject_MetaType;
+
+/* from pygobject.h */
+extern PyTypeObject PyGObject_Type;
+extern PyTypeObject PyGProps_Type;
+extern PyTypeObject PyGPropsDescr_Type;
+extern PyTypeObject PyGPropsIter_Type;
+
+ /* Data that belongs to the GObject instance, not the Python wrapper */
+struct _PyGObjectData {
+ PyTypeObject *type; /* wrapper type for this instance */
+ GSList *closures;
+};
+
+void pygobject_register_class (PyObject *dict,
+ const gchar *type_name,
+ GType gtype, PyTypeObject *type,
+ PyObject *bases);
+void pygobject_register_wrapper (PyObject *self);
+PyObject * pygobject_new (GObject *obj);
+PyObject * pygobject_new_full (GObject *obj, gboolean sink, gpointer g_class);
+void pygobject_sink (GObject *obj);
+PyTypeObject *pygobject_lookup_class (GType gtype);
+void pygobject_watch_closure (PyObject *self, GClosure *closure);
+void pygobject_register_sinkfunc(GType type,
+ void (* sinkfunc)(GObject *object));
+int pyg_type_register (PyTypeObject *class,
+ const gchar *type_name);
+
+/* from pygboxed.c */
+extern PyTypeObject PyGBoxed_Type;
+
+void pyg_register_boxed (PyObject *dict, const gchar *class_name,
+ GType boxed_type, PyTypeObject *type);
+PyObject * pyg_boxed_new (GType boxed_type, gpointer boxed,
+ gboolean copy_boxed, gboolean own_ref);
+
+extern PyTypeObject PyGPointer_Type;
+
+void pyg_register_pointer (PyObject *dict, const gchar *class_name,
+ GType pointer_type, PyTypeObject *type);
+PyObject * pyg_pointer_new (GType pointer_type, gpointer pointer);
+
+const gchar * pyg_constant_strip_prefix(const gchar *name, const gchar *strip_prefix);
+
+/* pygflags */
+typedef struct {
+ _PyLongObject parent;
+ GType gtype;
+} PyGFlags;
+
+extern PyTypeObject PyGFlags_Type;
+
+#define PyGFlags_Check(x) (g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_FLAGS))
+
+extern PyObject * pyg_flags_add (PyObject * module,
+ const char * type_name,
+ const char * strip_prefix,
+ GType gtype);
+extern PyObject * pyg_flags_from_gtype (GType gtype,
+ int value);
+
+/* pygenum */
+#define PyGEnum_Check(x) (g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_ENUM))
+
+typedef struct {
+ _PyLongObject parent;
+ GType gtype;
+} PyGEnum;
+
+extern PyTypeObject PyGEnum_Type;
+
+extern PyObject * pyg_enum_add (PyObject * module,
+ const char * type_name,
+ const char * strip_prefix,
+ GType gtype);
+extern PyObject * pyg_enum_from_gtype (GType gtype,
+ int value);
+
+/* pygtype.c */
+extern GHashTable *custom_type_registration;
+void pyg_type_register_custom_callback(const gchar *type_name,
+ PyGTypeRegistrationFunction callback,
+ gpointer data);
+PyTypeObject * pyg_type_get_custom(const gchar *name);
+GType _pyg_type_from_name(const gchar *name);
+
+/* pygobject.c */
+extern PyTypeObject PyGObjectWeakRef_Type;
+
+static inline PyGObjectData *
+pyg_object_peek_inst_data(GObject *obj)
+{
+ return ((PyGObjectData *)
+ g_object_get_qdata(obj, pygobject_instance_data_key));
+}
+
+
+#endif
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
new file mode 100644
index 0000000..2671fa9
--- /dev/null
+++ b/gobject/pygobject.c
@@ -0,0 +1,2326 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ *
+ * pygobject.c: wrapper for the GObject type.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pyginterface.h"
+#include "pygparamspec.h"
+
+#include "pygi-external.h"
+
+
+static void pygobject_dealloc(PyGObject *self);
+static int pygobject_traverse(PyGObject *self, visitproc visit, void *arg);
+static int pygobject_clear(PyGObject *self);
+static PyObject * pyg_type_get_bases(GType gtype);
+static inline int pygobject_clear(PyGObject *self);
+static PyObject * pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data);
+static inline PyGObjectData * pyg_object_peek_inst_data(GObject *obj);
+static PyObject * pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data);
+static void pygobject_inherit_slots(PyTypeObject *type, PyObject *bases,
+ gboolean check_for_present);
+static void pygobject_find_slot_for(PyTypeObject *type, PyObject *bases, int slot_offset,
+ gboolean check_for_present);
+GType PY_TYPE_OBJECT = 0;
+GQuark pygobject_class_key;
+GQuark pygobject_class_init_key;
+GQuark pygobject_wrapper_key;
+GQuark pygobject_has_updated_constructor_key;
+GQuark pygobject_instance_data_key;
+
+
+/* -------------- class <-> wrapper manipulation --------------- */
+
+void
+pygobject_data_free(PyGObjectData *data)
+{
+ PyGILState_STATE state = pyglib_gil_state_ensure();
+ GSList *closures, *tmp;
+ Py_DECREF(data->type);
+ tmp = closures = data->closures;
+#ifndef NDEBUG
+ data->closures = NULL;
+ data->type = NULL;
+#endif
+ pyg_begin_allow_threads;
+ while (tmp) {
+ GClosure *closure = tmp->data;
+
+ /* we get next item first, because the current link gets
+ * invalidated by pygobject_unwatch_closure */
+ tmp = tmp->next;
+ g_closure_invalidate(closure);
+ }
+ pyg_end_allow_threads;
+
+ if (data->closures != NULL)
+ g_warning("invalidated all closures, but data->closures != NULL !");
+
+ g_free(data);
+ pyglib_gil_state_release(state);
+}
+
+static inline PyGObjectData *
+pygobject_data_new(void)
+{
+ PyGObjectData *data;
+ data = g_new0(PyGObjectData, 1);
+ return data;
+}
+
+static inline PyGObjectData *
+pygobject_get_inst_data(PyGObject *self)
+{
+ PyGObjectData *inst_data;
+
+ if (G_UNLIKELY(!self->obj))
+ return NULL;
+ inst_data = g_object_get_qdata(self->obj, pygobject_instance_data_key);
+ if (inst_data == NULL)
+ {
+ inst_data = pygobject_data_new();
+
+ inst_data->type = Py_TYPE(self);
+ Py_INCREF((PyObject *) inst_data->type);
+
+ g_object_set_qdata_full(self->obj, pygobject_instance_data_key,
+ inst_data, (GDestroyNotify) pygobject_data_free);
+ }
+ return inst_data;
+}
+
+
+typedef struct {
+ GType type;
+ void (* sinkfunc)(GObject *object);
+} SinkFunc;
+static GArray *sink_funcs = NULL;
+
+GHashTable *custom_type_registration = NULL;
+
+PyTypeObject *PyGObject_MetaType = NULL;
+
+/**
+ * pygobject_sink:
+ * @obj: a GObject
+ *
+ * As Python handles reference counting for us, the "floating
+ * reference" code in GTK is not all that useful. In fact, it can
+ * cause leaks. This function should be called to remove the floating
+ * references on objects on construction.
+ **/
+void
+pygobject_sink(GObject *obj)
+{
+ if (sink_funcs) {
+ gint i;
+
+ for (i = 0; i < sink_funcs->len; i++) {
+ if (g_type_is_a(G_OBJECT_TYPE(obj),
+ g_array_index(sink_funcs, SinkFunc, i).type)) {
+ g_array_index(sink_funcs, SinkFunc, i).sinkfunc(obj);
+ return;
+ }
+ }
+ }
+ if (G_IS_INITIALLY_UNOWNED(obj) && !g_object_is_floating(obj)) {
+ /* GtkWindow and GtkInvisible does not return a ref to caller of
+ * g_object_new.
+ */
+ g_object_ref(obj);
+ } else if (g_object_is_floating(obj)) {
+ g_object_ref_sink(obj);
+ }
+}
+
+/**
+ * pygobject_register_sinkfunc:
+ * type: the GType the sink function applies to.
+ * sinkfunc: a function to remove the floating reference on an object.
+ *
+ * As Python handles reference counting for us, the "floating
+ * reference" code in GTK is not all that useful. In fact, it can
+ * cause leaks. For this reason, PyGTK removes the floating
+ * references on objects on construction.
+ *
+ * The sinkfunc should be able to remove the floating reference on
+ * instances of the given type, or any subclasses.
+ *
+ * Deprecated: Since 2.22, sinkfuncs are not needed.
+ */
+void
+pygobject_register_sinkfunc(GType type, void (* sinkfunc)(GObject *object))
+{
+ SinkFunc sf;
+
+ g_message ("pygobject_register_sinkfunc is deprecated (%s)",
+ g_type_name(type));
+
+#if 0
+ g_return_if_fail(G_TYPE_IS_OBJECT(type));
+#endif
+ g_return_if_fail(sinkfunc != NULL);
+
+ if (!sink_funcs)
+ sink_funcs = g_array_new(FALSE, FALSE, sizeof(SinkFunc));
+
+ sf.type = type;
+ sf.sinkfunc = sinkfunc;
+ g_array_append_val(sink_funcs, sf);
+}
+
+typedef struct {
+ PyObject_HEAD
+ GParamSpec **props;
+ guint n_props;
+ guint index;
+} PyGPropsIter;
+
+PYGLIB_DEFINE_TYPE("gobject.GPropsIter", PyGPropsIter_Type, PyGPropsIter);
+
+static void
+pyg_props_iter_dealloc(PyGPropsIter *self)
+{
+ g_free(self->props);
+ PyObject_Del((PyObject*) self);
+}
+
+static PyObject*
+pygobject_props_iter_next(PyGPropsIter *iter)
+{
+ if (iter->index < iter->n_props)
+ return pyg_param_spec_new(iter->props[iter->index++]);
+ else {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+}
+
+typedef struct {
+ PyObject_HEAD
+ /* a reference to the object containing the properties */
+ PyGObject *pygobject;
+ GType gtype;
+} PyGProps;
+
+static void
+PyGProps_dealloc(PyGProps* self)
+{
+ PyGObject *tmp;
+
+ PyObject_GC_UnTrack((PyObject*)self);
+
+ tmp = self->pygobject;
+ self->pygobject = NULL;
+ Py_XDECREF(tmp);
+
+ PyObject_GC_Del((PyObject*)self);
+}
+
+static PyObject*
+build_parameter_list(GObjectClass *class)
+{
+ GParamSpec **props;
+ guint n_props = 0, i;
+ PyObject *prop_str;
+ PyObject *props_list;
+
+ props = g_object_class_list_properties(class, &n_props);
+ props_list = PyList_New(n_props);
+ for (i = 0; i < n_props; i++) {
+ char *name;
+ name = g_strdup(g_param_spec_get_name(props[i]));
+ /* hyphens cannot belong in identifiers */
+ g_strdelimit(name, "-", '_');
+ prop_str = _PyUnicode_FromString(name);
+
+ PyList_SetItem(props_list, i, prop_str);
+ g_free(name);
+ }
+
+ if (props)
+ g_free(props);
+
+ return props_list;
+}
+
+static PyObject*
+PyGProps_getattro(PyGProps *self, PyObject *attr)
+{
+ char *attr_name;
+ GObjectClass *class;
+ GParamSpec *pspec;
+ GValue value = { 0, };
+ PyObject *ret;
+
+ attr_name = _PyUnicode_AsString(attr);
+ if (!attr_name) {
+ PyErr_Clear();
+ return PyObject_GenericGetAttr((PyObject *)self, attr);
+ }
+
+ class = g_type_class_ref(self->gtype);
+
+ if (!strcmp(attr_name, "__members__")) {
+ return build_parameter_list(class);
+ }
+
+ pspec = g_object_class_find_property(class, attr_name);
+ g_type_class_unref(class);
+
+ if (!pspec) {
+ return PyObject_GenericGetAttr((PyObject *)self, attr);
+ }
+
+ if (!(pspec->flags & G_PARAM_READABLE)) {
+ PyErr_Format(PyExc_TypeError,
+ "property '%s' is not readable", attr_name);
+ return NULL;
+ }
+
+ /* If we're doing it without an instance, return a GParamSpec */
+ if (!self->pygobject) {
+ return pyg_param_spec_new(pspec);
+ }
+
+ g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+ pyg_begin_allow_threads;
+ g_object_get_property(self->pygobject->obj, attr_name, &value);
+ pyg_end_allow_threads;
+ ret = pyg_param_gvalue_as_pyobject(&value, TRUE, pspec);
+ g_value_unset(&value);
+
+ return ret;
+}
+
+static gboolean
+set_property_from_pspec(GObject *obj,
+ char *attr_name,
+ GParamSpec *pspec,
+ PyObject *pvalue)
+{
+ GValue value = { 0, };
+
+ if (pspec->flags & G_PARAM_CONSTRUCT_ONLY) {
+ PyErr_Format(PyExc_TypeError,
+ "property '%s' can only be set in constructor",
+ attr_name);
+ return FALSE;
+ }
+
+ if (!(pspec->flags & G_PARAM_WRITABLE)) {
+ PyErr_Format(PyExc_TypeError,
+ "property '%s' is not writable", attr_name);
+ return FALSE;
+ }
+
+ g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+ if (pyg_param_gvalue_from_pyobject(&value, pvalue, pspec) < 0) {
+ PyErr_SetString(PyExc_TypeError,
+ "could not convert argument to correct param type");
+ return FALSE;
+ }
+
+ pyg_begin_allow_threads;
+ g_object_set_property(obj, attr_name, &value);
+ pyg_end_allow_threads;
+
+ g_value_unset(&value);
+
+ return TRUE;
+}
+
+PYGLIB_DEFINE_TYPE("gobject.GProps", PyGProps_Type, PyGProps);
+
+static int
+PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
+{
+ GParamSpec *pspec;
+ char *attr_name;
+ GObject *obj;
+
+ if (pvalue == NULL) {
+ PyErr_SetString(PyExc_TypeError, "properties cannot be "
+ "deleted");
+ return -1;
+ }
+
+ attr_name = _PyUnicode_AsString(attr);
+ if (!attr_name) {
+ PyErr_Clear();
+ return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
+ }
+
+ if (!self->pygobject) {
+ PyErr_SetString(PyExc_TypeError,
+ "cannot set GOject properties without an instance");
+ return -1;
+ }
+
+ obj = self->pygobject->obj;
+ pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(obj), attr_name);
+ if (!pspec) {
+ return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
+ }
+
+ if (!set_property_from_pspec(obj, attr_name, pspec, pvalue))
+ return -1;
+
+ return 0;
+}
+
+static int
+pygobject_props_traverse(PyGProps *self, visitproc visit, void *arg)
+{
+ if (self->pygobject && visit((PyObject *) self->pygobject, arg) < 0)
+ return -1;
+ return 0;
+}
+
+static PyObject*
+pygobject_props_get_iter(PyGProps *self)
+{
+ PyGPropsIter *iter;
+ GObjectClass *class;
+
+ iter = PyObject_NEW(PyGPropsIter, &PyGPropsIter_Type);
+ class = g_type_class_ref(self->gtype);
+ iter->props = g_object_class_list_properties(class, &iter->n_props);
+ iter->index = 0;
+ g_type_class_unref(class);
+ return (PyObject *) iter;
+}
+
+static Py_ssize_t
+PyGProps_length(PyGProps *self)
+{
+ GObjectClass *class;
+ GParamSpec **props;
+ guint n_props;
+
+ class = g_type_class_ref(self->gtype);
+ props = g_object_class_list_properties(class, &n_props);
+ g_type_class_unref(class);
+ g_free(props);
+
+ return (Py_ssize_t)n_props;
+}
+
+static PySequenceMethods _PyGProps_as_sequence = {
+ (lenfunc) PyGProps_length,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+PYGLIB_DEFINE_TYPE("gobject.GPropsDescr", PyGPropsDescr_Type, PyObject);
+
+static PyObject *
+pyg_props_descr_descr_get(PyObject *self, PyObject *obj, PyObject *type)
+{
+ PyGProps *gprops;
+
+ gprops = PyObject_GC_New(PyGProps, &PyGProps_Type);
+ if (obj == NULL || obj == Py_None) {
+ gprops->pygobject = NULL;
+ gprops->gtype = pyg_type_from_object(type);
+ } else {
+ if (!PyObject_IsInstance(obj, (PyObject *) &PyGObject_Type)) {
+ PyErr_SetString(PyExc_TypeError, "cannot use GObject property"
+ " descriptor on non-GObject instances");
+ return NULL;
+ }
+ Py_INCREF(obj);
+ gprops->pygobject = (PyGObject *) obj;
+ gprops->gtype = pyg_type_from_object(obj);
+ }
+ return (PyObject *) gprops;
+}
+
+/**
+ * pygobject_register_class:
+ * @dict: the module dictionary. A reference to the type will be stored here.
+ * @type_name: not used ?
+ * @gtype: the GType of the GObject subclass.
+ * @type: the Python type object for this wrapper.
+ * @static_bases: a tuple of Python type objects that are the bases of
+ * this type
+ *
+ * This function is used to register a Python type as the wrapper for
+ * a particular GObject subclass. It will also insert a reference to
+ * the wrapper class into the module dictionary passed as a reference,
+ * which simplifies initialisation.
+ */
+void
+pygobject_register_class(PyObject *dict, const gchar *type_name,
+ GType gtype, PyTypeObject *type,
+ PyObject *static_bases)
+{
+ PyObject *o;
+ const char *class_name, *s;
+ PyObject *runtime_bases;
+ PyObject *bases_list, *bases, *mod_name;
+ int i;
+
+ class_name = type->tp_name;
+ s = strrchr(class_name, '.');
+ if (s != NULL)
+ class_name = s + 1;
+
+ runtime_bases = pyg_type_get_bases(gtype);
+ if (static_bases) {
+ PyTypeObject *py_parent_type = (PyTypeObject *) PyTuple_GET_ITEM(static_bases, 0);
+ bases_list = PySequence_List(static_bases);
+ /* we start at index 1 because we want to skip the primary
+ * base, otherwise we might get MRO conflict */
+ for (i = 1; i < PyTuple_GET_SIZE(runtime_bases); ++i)
+ {
+ PyObject *base = PyTuple_GET_ITEM(runtime_bases, i);
+ int contains = PySequence_Contains(bases_list, base);
+ if (contains < 0)
+ PyErr_Print();
+ else if (!contains) {
+ if (!PySequence_Contains(py_parent_type->tp_mro, base)) {
+#if 0
+ g_message("Adding missing base %s to type %s",
+ ((PyTypeObject *)base)->tp_name, type->tp_name);
+#endif
+ PyList_Append(bases_list, base);
+ }
+ }
+ }
+ bases = PySequence_Tuple(bases_list);
+ Py_DECREF(bases_list);
+ Py_DECREF(runtime_bases);
+ } else
+ bases = runtime_bases;
+
+ Py_TYPE(type) = PyGObject_MetaType;
+ type->tp_bases = bases;
+ if (G_LIKELY(bases)) {
+ type->tp_base = (PyTypeObject *)PyTuple_GetItem(bases, 0);
+ Py_INCREF(type->tp_base);
+ }
+
+ pygobject_inherit_slots(type, bases, TRUE);
+
+ if (PyType_Ready(type) < 0) {
+ g_warning ("couldn't make the type `%s' ready", type->tp_name);
+ return;
+ }
+
+ /* Set type.__module__ to the name of the module,
+ * otherwise it'll default to 'gobject', see #376099
+ */
+ s = strrchr(type->tp_name, '.');
+ if (s != NULL) {
+ mod_name = _PyUnicode_FromStringAndSize(type->tp_name, (int)(s - type->tp_name));
+ PyDict_SetItemString(type->tp_dict, "__module__", mod_name);
+ Py_DECREF(mod_name);
+ }
+
+ if (gtype) {
+ o = pyg_type_wrapper_new(gtype);
+ PyDict_SetItemString(type->tp_dict, "__gtype__", o);
+ Py_DECREF(o);
+
+ /* stash a pointer to the python class with the GType */
+ Py_INCREF(type);
+ g_type_set_qdata(gtype, pygobject_class_key, type);
+ }
+
+ /* set up __doc__ descriptor on type */
+ PyDict_SetItemString(type->tp_dict, "__doc__",
+ pyg_object_descr_doc_get());
+
+ PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+}
+
+static void
+pyg_toggle_notify (gpointer data, GObject *object, gboolean is_last_ref)
+{
+ PyGObject *self = (PyGObject*) data;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+
+ if (is_last_ref)
+ Py_DECREF(self);
+ else
+ Py_INCREF(self);
+
+ pyglib_gil_state_release(state);
+}
+
+ /* Called when the inst_dict is first created; switches the
+ reference counting strategy to start using toggle ref to keep the
+ wrapper alive while the GObject lives. In contrast, while
+ inst_dict was NULL the python wrapper is allowed to die at
+ will and is recreated on demand. */
+static inline void
+pygobject_switch_to_toggle_ref(PyGObject *self)
+{
+ g_assert(self->obj->ref_count >= 1);
+
+ if (self->private_flags.flags & PYGOBJECT_USING_TOGGLE_REF)
+ return; /* already using toggle ref */
+ self->private_flags.flags |= PYGOBJECT_USING_TOGGLE_REF;
+ /* Note that add_toggle_ref will never immediately call back into
+ pyg_toggle_notify */
+ Py_INCREF((PyObject *) self);
+ g_object_add_toggle_ref(self->obj, pyg_toggle_notify, self);
+ g_object_unref(self->obj);
+}
+
+/**
+ * pygobject_register_wrapper:
+ * @self: the wrapper instance
+ *
+ * In the constructor of PyGTK wrappers, this function should be
+ * called after setting the obj member. It will tie the wrapper
+ * instance to the GObject so that the same wrapper instance will
+ * always be used for this GObject instance.
+ */
+void
+pygobject_register_wrapper(PyObject *self)
+{
+ PyGObject *gself;
+
+ g_return_if_fail(self != NULL);
+ g_return_if_fail(PyObject_TypeCheck(self, &PyGObject_Type));
+
+ gself = (PyGObject *)self;
+
+ pygobject_sink(gself->obj);
+ g_assert(gself->obj->ref_count >= 1);
+ /* save wrapper pointer so we can access it later */
+ g_object_set_qdata_full(gself->obj, pygobject_wrapper_key, gself, NULL);
+ if (gself->inst_dict)
+ pygobject_switch_to_toggle_ref(gself);
+}
+
+static PyObject *
+pyg_type_get_bases(GType gtype)
+{
+ GType *interfaces, parent_type, interface_type;
+ guint n_interfaces;
+ PyTypeObject *py_parent_type, *py_interface_type;
+ PyObject *bases;
+ int i;
+
+ if (G_UNLIKELY(gtype == G_TYPE_OBJECT))
+ return NULL;
+
+ /* Lookup the parent type */
+ parent_type = g_type_parent(gtype);
+ py_parent_type = pygobject_lookup_class(parent_type);
+ interfaces = g_type_interfaces(gtype, &n_interfaces);
+ bases = PyTuple_New(n_interfaces + 1);
+ /* We will always put the parent at the first position in bases */
+ Py_INCREF(py_parent_type); /* PyTuple_SetItem steals a reference */
+ PyTuple_SetItem(bases, 0, (PyObject *) py_parent_type);
+
+ /* And traverse interfaces */
+ if (n_interfaces) {
+ for (i = 0; i < n_interfaces; i++) {
+ interface_type = interfaces[i];
+ py_interface_type = pygobject_lookup_class(interface_type);
+ Py_INCREF(py_interface_type); /* PyTuple_SetItem steals a reference */
+ PyTuple_SetItem(bases, i + 1, (PyObject *) py_interface_type);
+ }
+ }
+ g_free(interfaces);
+ return bases;
+}
+
+/**
+ * pygobject_new_with_interfaces
+ * @gtype: the GType of the GObject subclass.
+ *
+ * Creates a new PyTypeObject from the given GType with interfaces attached in
+ * bases.
+ *
+ * Returns: a PyTypeObject for the new type or NULL if it couldn't be created
+ */
+PyTypeObject *
+pygobject_new_with_interfaces(GType gtype)
+{
+ PyGILState_STATE state;
+ PyObject *o;
+ PyTypeObject *type;
+ PyObject *dict;
+ PyTypeObject *py_parent_type;
+ PyObject *bases;
+ PyObject *modules, *module;
+ gchar *type_name, *mod_name, *gtype_name;
+
+ state = pyglib_gil_state_ensure();
+
+ bases = pyg_type_get_bases(gtype);
+ py_parent_type = (PyTypeObject *) PyTuple_GetItem(bases, 0);
+
+ dict = PyDict_New();
+
+ o = pyg_type_wrapper_new(gtype);
+ PyDict_SetItemString(dict, "__gtype__", o);
+ Py_DECREF(o);
+
+ /* set up __doc__ descriptor on type */
+ PyDict_SetItemString(dict, "__doc__", pyg_object_descr_doc_get());
+
+ /* generate the pygtk module name and extract the base type name */
+ gtype_name = (gchar*)g_type_name(gtype);
+ if (g_str_has_prefix(gtype_name, "Gtk")) {
+ mod_name = "gtk";
+ gtype_name += 3;
+ type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+ } else if (g_str_has_prefix(gtype_name, "Gdk")) {
+ mod_name = "gtk.gdk";
+ gtype_name += 3;
+ type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+ } else if (g_str_has_prefix(gtype_name, "Atk")) {
+ mod_name = "atk";
+ gtype_name += 3;
+ type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+ } else if (g_str_has_prefix(gtype_name, "Pango")) {
+ mod_name = "pango";
+ gtype_name += 5;
+ type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+ } else {
+ mod_name = "__main__";
+ type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+ }
+
+ type = (PyTypeObject*)PyObject_CallFunction((PyObject *) Py_TYPE(py_parent_type),
+ "sNN", type_name, bases, dict);
+ g_free(type_name);
+
+ if (type == NULL) {
+ PyErr_Print();
+ pyglib_gil_state_release(state);
+ return NULL;
+ }
+
+ /* Workaround python tp_(get|set)attr slot inheritance bug.
+ * Fixes bug #144135. */
+ if (!type->tp_getattr && py_parent_type->tp_getattr) {
+ type->tp_getattro = NULL;
+ type->tp_getattr = py_parent_type->tp_getattr;
+ }
+ if (!type->tp_setattr && py_parent_type->tp_setattr) {
+ type->tp_setattro = NULL;
+ type->tp_setattr = py_parent_type->tp_setattr;
+ }
+ /* override more python stupid hacks behind our back */
+ type->tp_dealloc = py_parent_type->tp_dealloc;
+ type->tp_alloc = py_parent_type->tp_alloc;
+ type->tp_free = py_parent_type->tp_free;
+ type->tp_traverse = py_parent_type->tp_traverse;
+ type->tp_clear = py_parent_type->tp_clear;
+
+ pygobject_inherit_slots(type, bases, FALSE);
+
+ if (PyType_Ready(type) < 0) {
+ g_warning ("couldn't make the type `%s' ready", type->tp_name);
+ pyglib_gil_state_release(state);
+ return NULL;
+ }
+ /* insert type name in module dict */
+ modules = PyImport_GetModuleDict();
+ if ((module = PyDict_GetItemString(modules, mod_name)) != NULL) {
+ if (PyObject_SetAttrString(module, gtype_name, (PyObject *)type) < 0)
+ PyErr_Clear();
+ }
+
+ /* stash a pointer to the python class with the GType */
+ Py_INCREF(type);
+ g_type_set_qdata(gtype, pygobject_class_key, type);
+
+ pyglib_gil_state_release(state);
+
+ return type;
+}
+
+/* Pick appropriate value for given slot (at slot_offset inside
+ * PyTypeObject structure). It must be a pointer, e.g. a pointer to a
+ * function. We use the following heuristic:
+ *
+ * - Scan all types listed as bases of the type.
+ * - If for exactly one base type slot value is non-NULL and
+ * different from that of 'object' and 'GObject', set current type
+ * slot into that value.
+ * - Otherwise (if there is more than one such base type or none at
+ * all) don't touch it and live with Python default.
+ *
+ * The intention here is to propagate slot from custom wrappers to
+ * wrappers created at runtime when appropriate. We prefer to be on
+ * the safe side, so if there is potential collision (more than one
+ * custom slot value), we discard custom overrides altogether.
+ *
+ * When registering type with pygobject_register_class(), i.e. a type
+ * that has been manually created (likely with Codegen help),
+ * `check_for_present' should be set to TRUE. In this case, the
+ * function will never overwrite any non-NULL slots already present in
+ * the type. If `check_for_present' is FALSE, such non-NULL slots are
+ * though to be set by Python interpreter and so will be overwritten
+ * if heuristic above says so.
+ */
+static void
+pygobject_inherit_slots(PyTypeObject *type, PyObject *bases, gboolean check_for_present)
+{
+ static int slot_offsets[] = { offsetof(PyTypeObject, tp_richcompare),
+ offsetof(PyTypeObject, tp_compare),
+ offsetof(PyTypeObject, tp_hash),
+ offsetof(PyTypeObject, tp_iter),
+ offsetof(PyTypeObject, tp_repr),
+ offsetof(PyTypeObject, tp_str),
+ offsetof(PyTypeObject, tp_print) };
+ int i;
+
+ /* Happens when registering gobject.GObject itself, at least. */
+ if (!bases)
+ return;
+
+ for (i = 0; i < G_N_ELEMENTS(slot_offsets); ++i)
+ pygobject_find_slot_for(type, bases, slot_offsets[i], check_for_present);
+}
+
+static void
+pygobject_find_slot_for(PyTypeObject *type, PyObject *bases, int slot_offset,
+ gboolean check_for_present)
+{
+#define TYPE_SLOT(type) (* (void **) (((char *) (type)) + slot_offset))
+
+ void *found_slot = NULL;
+ int num_bases = PyTuple_Size(bases);
+ int i;
+
+ if (check_for_present && TYPE_SLOT(type) != NULL) {
+ /* We are requested to check if there is any custom slot value
+ * in this type already and there actually is. Don't
+ * overwrite it.
+ */
+ return;
+ }
+
+ for (i = 0; i < num_bases; ++i) {
+ PyTypeObject *base_type = (PyTypeObject *) PyTuple_GetItem(bases, i);
+ void *slot = TYPE_SLOT(base_type);
+
+ if (slot == NULL)
+ continue;
+ if (slot == TYPE_SLOT(&PyGObject_Type) ||
+ slot == TYPE_SLOT(&PyBaseObject_Type))
+ continue;
+
+ if (found_slot != NULL && found_slot != slot) {
+ /* We have a conflict: more than one base use different
+ * custom slots. To be on the safe side, we bail out.
+ */
+ return;
+ }
+
+ found_slot = slot;
+ }
+
+ /* Only perform the final assignment if at least one base has a
+ * custom value. Otherwise just leave this type's slot untouched.
+ */
+ if (found_slot != NULL)
+ TYPE_SLOT(type) = found_slot;
+
+#undef TYPE_SLOT
+}
+
+/**
+ * pygobject_lookup_class:
+ * @gtype: the GType of the GObject subclass.
+ *
+ * This function looks up the wrapper class used to represent
+ * instances of a GObject represented by @gtype. If no wrapper class
+ * or interface has been registered for the given GType, then a new
+ * type will be created.
+ *
+ * Returns: The wrapper class for the GObject or NULL if the
+ * GType has no registered type and a new type couldn't be created
+ */
+PyTypeObject *
+pygobject_lookup_class(GType gtype)
+{
+ PyTypeObject *py_type;
+
+ if (gtype == G_TYPE_INTERFACE)
+ return &PyGInterface_Type;
+
+ py_type = pyg_type_get_custom(g_type_name(gtype));
+ if (py_type)
+ return py_type;
+
+ py_type = g_type_get_qdata(gtype, pygobject_class_key);
+ if (py_type == NULL) {
+ py_type = g_type_get_qdata(gtype, pyginterface_type_key);
+
+ if (py_type == NULL)
+ py_type = (PyTypeObject *)pygi_type_import_by_g_type(gtype);
+
+ if (py_type == NULL) {
+ py_type = pygobject_new_with_interfaces(gtype);
+ g_type_set_qdata(gtype, pyginterface_type_key, py_type);
+ }
+ }
+
+ return py_type;
+}
+
+/**
+ * pygobject_new_full:
+ * @obj: a GObject instance.
+ * @sink: whether to sink any floating reference found on the GObject. DEPRECATED.
+ * @g_class: the GObjectClass
+ *
+ * This function gets a reference to a wrapper for the given GObject
+ * instance. If a wrapper has already been created, a new reference
+ * to that wrapper will be returned. Otherwise, a wrapper instance
+ * will be created.
+ *
+ * Returns: a reference to the wrapper for the GObject.
+ */
+PyObject *
+pygobject_new_full(GObject *obj, gboolean sink, gpointer g_class)
+{
+ PyGObject *self;
+
+ if (obj == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ /* we already have a wrapper for this object -- return it. */
+ self = (PyGObject *)g_object_get_qdata(obj, pygobject_wrapper_key);
+ if (self != NULL) {
+ Py_INCREF(self);
+ } else {
+ /* create wrapper */
+ PyGObjectData *inst_data = pyg_object_peek_inst_data(obj);
+ PyTypeObject *tp;
+ if (inst_data)
+ tp = inst_data->type;
+ else {
+ if (g_class)
+ tp = pygobject_lookup_class(G_OBJECT_CLASS_TYPE(g_class));
+ else
+ tp = pygobject_lookup_class(G_OBJECT_TYPE(obj));
+ }
+ g_assert(tp != NULL);
+
+ /* need to bump type refcount if created with
+ pygobject_new_with_interfaces(). fixes bug #141042 */
+ if (tp->tp_flags & Py_TPFLAGS_HEAPTYPE)
+ Py_INCREF(tp);
+ self = PyObject_GC_New(PyGObject, tp);
+ if (self == NULL)
+ return NULL;
+ self->inst_dict = NULL;
+ self->weakreflist = NULL;
+ self->private_flags.flags = 0;
+ self->obj = obj;
+ g_object_ref(obj);
+ pygobject_register_wrapper((PyObject *)self);
+ PyObject_GC_Track((PyObject *)self);
+ }
+
+ return (PyObject *)self;
+}
+
+
+PyObject *
+pygobject_new(GObject *obj)
+{
+ return pygobject_new_full(obj, TRUE, NULL);
+}
+
+static void
+pygobject_unwatch_closure(gpointer data, GClosure *closure)
+{
+ PyGObjectData *inst_data = data;
+
+ inst_data->closures = g_slist_remove (inst_data->closures, closure);
+}
+
+/**
+ * pygobject_watch_closure:
+ * @self: a GObject wrapper instance
+ * @closure: a GClosure to watch
+ *
+ * Adds a closure to the list of watched closures for the wrapper.
+ * The closure must be one returned by pyg_closure_new(). When the
+ * cycle GC traverses the wrapper instance, it will enumerate the
+ * references to Python objects stored in watched closures. If the
+ * cycle GC tells the wrapper to clear itself, the watched closures
+ * will be invalidated.
+ */
+void
+pygobject_watch_closure(PyObject *self, GClosure *closure)
+{
+ PyGObject *gself;
+ PyGObjectData *data;
+
+ g_return_if_fail(self != NULL);
+ g_return_if_fail(PyObject_TypeCheck(self, &PyGObject_Type));
+ g_return_if_fail(closure != NULL);
+
+ gself = (PyGObject *)self;
+ data = pygobject_get_inst_data(gself);
+ g_return_if_fail(g_slist_find(data->closures, closure) == NULL);
+ data->closures = g_slist_prepend(data->closures, closure);
+ g_closure_add_invalidate_notifier(closure, data, pygobject_unwatch_closure);
+}
+
+/* -------------- PyGObject behaviour ----------------- */
+
+PYGLIB_DEFINE_TYPE("gobject.GObject", PyGObject_Type, PyGObject);
+
+static void
+pygobject_dealloc(PyGObject *self)
+{
+ PyObject_ClearWeakRefs((PyObject *)self);
+ PyObject_GC_UnTrack((PyObject *)self);
+ /* this forces inst_data->type to be updated, which could prove
+ * important if a new wrapper has to be created and it is of a
+ * unregistered type */
+ pygobject_get_inst_data(self);
+ pygobject_clear(self);
+ /* the following causes problems with subclassed types */
+ /* Py_TYPE(self)->tp_free((PyObject *)self); */
+ PyObject_GC_Del(self);
+}
+
+static int
+pygobject_compare(PyGObject *self, PyGObject *v)
+{
+ if (self->obj == v->obj) return 0;
+ if (self->obj > v->obj) return -1;
+ return 1;
+}
+
+static long
+pygobject_hash(PyGObject *self)
+{
+ return (long)self->obj;
+}
+
+static PyObject *
+pygobject_repr(PyGObject *self)
+{
+ gchar buf[256];
+
+ g_snprintf(buf, sizeof(buf),
+ "<%s object at 0x%lx (%s at 0x%lx)>",
+ Py_TYPE(self)->tp_name,
+ (long)self,
+ self->obj ? G_OBJECT_TYPE_NAME(self->obj) : "uninitialized",
+ (long)self->obj);
+ return _PyUnicode_FromString(buf);
+}
+
+
+static int
+pygobject_traverse(PyGObject *self, visitproc visit, void *arg)
+{
+ int ret = 0;
+ GSList *tmp;
+ PyGObjectData *data = pygobject_get_inst_data(self);
+
+ if (self->inst_dict) ret = visit(self->inst_dict, arg);
+ if (ret != 0) return ret;
+
+ if (data) {
+
+ for (tmp = data->closures; tmp != NULL; tmp = tmp->next) {
+ PyGClosure *closure = tmp->data;
+
+ if (closure->callback) ret = visit(closure->callback, arg);
+ if (ret != 0) return ret;
+
+ if (closure->extra_args) ret = visit(closure->extra_args, arg);
+ if (ret != 0) return ret;
+
+ if (closure->swap_data) ret = visit(closure->swap_data, arg);
+ if (ret != 0) return ret;
+ }
+ }
+ return ret;
+}
+
+static inline int
+pygobject_clear(PyGObject *self)
+{
+ if (self->obj) {
+ g_object_set_qdata_full(self->obj, pygobject_wrapper_key, NULL, NULL);
+ if (self->inst_dict) {
+ g_object_remove_toggle_ref(self->obj, pyg_toggle_notify, self);
+ self->private_flags.flags &= ~PYGOBJECT_USING_TOGGLE_REF;
+ } else {
+ pyg_begin_allow_threads;
+ g_object_unref(self->obj);
+ pyg_end_allow_threads;
+ }
+ self->obj = NULL;
+ }
+ Py_CLEAR(self->inst_dict);
+ return 0;
+}
+
+static void
+pygobject_free(PyObject *op)
+{
+ PyObject_GC_Del(op);
+}
+
+
+/* ---------------- PyGObject methods ----------------- */
+
+static int
+pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ GType object_type;
+ guint n_params = 0, i;
+ GParameter *params = NULL;
+ GObjectClass *class;
+
+ if (!PyArg_ParseTuple(args, ":GObject.__init__", &object_type))
+ return -1;
+
+ object_type = pyg_type_from_object((PyObject *)self);
+ if (!object_type)
+ return -1;
+
+ if (G_TYPE_IS_ABSTRACT(object_type)) {
+ PyErr_Format(PyExc_TypeError, "cannot create instance of abstract "
+ "(non-instantiable) type `%s'", g_type_name(object_type));
+ return -1;
+ }
+
+ if ((class = g_type_class_ref (object_type)) == NULL) {
+ PyErr_SetString(PyExc_TypeError,
+ "could not get a reference to type class");
+ return -1;
+ }
+
+ if (kwargs) {
+ Py_ssize_t pos = 0;
+ PyObject *key;
+ PyObject *value;
+
+ params = g_new0(GParameter, PyDict_Size(kwargs));
+ while (PyDict_Next (kwargs, &pos, &key, &value)) {
+ GParamSpec *pspec;
+ gchar *key_str = _PyUnicode_AsString(key);
+
+ pspec = g_object_class_find_property (class, key_str);
+ if (!pspec) {
+ PyErr_Format(PyExc_TypeError,
+ "object of type `%s' doesn't support property `%s'",
+ g_type_name(object_type), key_str);
+ goto cleanup;
+ }
+ g_value_init(&params[n_params].value,
+ G_PARAM_SPEC_VALUE_TYPE(pspec));
+ if (pyg_value_from_pyobject(&params[n_params].value, value)) {
+ PyErr_Format(PyExc_TypeError,
+ "could not convert value for property `%s'",
+ key_str);
+ goto cleanup;
+ }
+ params[n_params].name = g_strdup(key_str);
+ n_params++;
+ }
+ }
+ if (pygobject_constructv(self, n_params, params))
+ PyErr_SetString(PyExc_RuntimeError, "could not create object");
+
+ cleanup:
+ for (i = 0; i < n_params; i++) {
+ g_free((gchar *) params[i].name);
+ g_value_unset(&params[i].value);
+ }
+ g_free(params);
+ g_type_class_unref(class);
+
+ return (self->obj) ? 0 : -1;
+}
+
+static PyObject *
+pygobject__gobject_init__(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ if (pygobject_init(self, args, kwargs) < 0)
+ return NULL;
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+#define CHECK_GOBJECT(self) \
+ if (!G_IS_OBJECT(self->obj)) { \
+ PyErr_Format(PyExc_TypeError, \
+ "object at %p of type %s is not initialized", \
+ self, Py_TYPE(self)->tp_name); \
+ return NULL; \
+ }
+
+static PyObject *
+pygobject_get_property(PyGObject *self, PyObject *args)
+{
+ gchar *param_name;
+ GParamSpec *pspec;
+ GValue value = { 0, };
+ PyObject *ret;
+
+ if (!PyArg_ParseTuple(args, "s:GObject.get_property", &param_name))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+ param_name);
+ if (!pspec) {
+ PyErr_Format(PyExc_TypeError,
+ "object of type `%s' does not have property `%s'",
+ g_type_name(G_OBJECT_TYPE(self->obj)), param_name);
+ return NULL;
+ }
+ if (!(pspec->flags & G_PARAM_READABLE)) {
+ PyErr_Format(PyExc_TypeError, "property %s is not readable",
+ param_name);
+ return NULL;
+ }
+ g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+ pyg_begin_allow_threads;
+ g_object_get_property(self->obj, param_name, &value);
+ pyg_end_allow_threads;
+ ret = pyg_param_gvalue_as_pyobject(&value, TRUE, pspec);
+ g_value_unset(&value);
+ return ret;
+}
+
+static PyObject *
+pygobject_get_properties(PyGObject *self, PyObject *args)
+{
+ GObjectClass *class;
+ int len, i;
+ PyObject *tuple;
+
+ if ((len = PyTuple_Size(args)) < 1) {
+ PyErr_SetString(PyExc_TypeError, "requires at least one argument");
+ return NULL;
+ }
+
+ tuple = PyTuple_New(len);
+ class = G_OBJECT_GET_CLASS(self->obj);
+ for (i = 0; i < len; i++) {
+ PyObject *py_property = PyTuple_GetItem(args, i);
+ gchar *property_name;
+ GParamSpec *pspec;
+ GValue value = { 0 };
+ PyObject *item;
+
+ if (!_PyUnicode_Check(py_property)) {
+ PyErr_SetString(PyExc_TypeError,
+ "Expected string argument for property.");
+ return NULL;
+ }
+
+ property_name = _PyUnicode_AsString(py_property);
+
+ pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+ property_name);
+ if (!pspec) {
+ PyErr_Format(PyExc_TypeError,
+ "object of type `%s' does not have property `%s'",
+ g_type_name(G_OBJECT_TYPE(self->obj)), property_name);
+ return NULL;
+ }
+ if (!(pspec->flags & G_PARAM_READABLE)) {
+ PyErr_Format(PyExc_TypeError, "property %s is not readable",
+ property_name);
+ return NULL;
+ }
+ g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+
+ pyg_begin_allow_threads;
+ g_object_get_property(self->obj, property_name, &value);
+ pyg_end_allow_threads;
+
+ item = pyg_value_as_pyobject(&value, TRUE);
+ PyTuple_SetItem(tuple, i, item);
+
+ g_value_unset(&value);
+ }
+
+ return tuple;
+}
+
+static PyObject *
+pygobject_set_property(PyGObject *self, PyObject *args)
+{
+ gchar *param_name;
+ GParamSpec *pspec;
+ PyObject *pvalue;
+
+ if (!PyArg_ParseTuple(args, "sO:GObject.set_property", &param_name,
+ &pvalue))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+ param_name);
+ if (!pspec) {
+ PyErr_Format(PyExc_TypeError,
+ "object of type `%s' does not have property `%s'",
+ g_type_name(G_OBJECT_TYPE(self->obj)), param_name);
+ return NULL;
+ }
+
+ if (!set_property_from_pspec(self->obj, param_name, pspec, pvalue))
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_set_properties(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ GObjectClass *class;
+ Py_ssize_t pos;
+ PyObject *value;
+ PyObject *key;
+ PyObject *result = NULL;
+
+ CHECK_GOBJECT(self);
+
+ class = G_OBJECT_GET_CLASS(self->obj);
+
+ g_object_freeze_notify (G_OBJECT(self->obj));
+ pos = 0;
+
+ while (kwargs && PyDict_Next (kwargs, &pos, &key, &value)) {
+ gchar *key_str = _PyUnicode_AsString(key);
+ GParamSpec *pspec;
+
+ pspec = g_object_class_find_property(class, key_str);
+ if (!pspec) {
+ gchar buf[512];
+
+ g_snprintf(buf, sizeof(buf),
+ "object `%s' doesn't support property `%s'",
+ g_type_name(G_OBJECT_TYPE(self->obj)), key_str);
+ PyErr_SetString(PyExc_TypeError, buf);
+ goto exit;
+ }
+
+ if (!set_property_from_pspec(G_OBJECT(self->obj), key_str, pspec, value))
+ goto exit;
+ }
+
+ result = Py_None;
+
+ exit:
+ g_object_thaw_notify (G_OBJECT(self->obj));
+ Py_XINCREF(result);
+ return result;
+}
+
+static PyObject *
+pygobject_freeze_notify(PyGObject *self, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ":GObject.freeze_notify"))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ g_object_freeze_notify(self->obj);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_notify(PyGObject *self, PyObject *args)
+{
+ char *property_name;
+
+ if (!PyArg_ParseTuple(args, "s:GObject.notify", &property_name))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ g_object_notify(self->obj, property_name);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_thaw_notify(PyGObject *self, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ":GObject.thaw_notify"))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ g_object_thaw_notify(self->obj);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_get_data(PyGObject *self, PyObject *args)
+{
+ char *key;
+ GQuark quark;
+ PyObject *data;
+
+ if (!PyArg_ParseTuple(args, "s:GObject.get_data", &key))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ quark = g_quark_from_string(key);
+ data = g_object_get_qdata(self->obj, quark);
+ if (!data) data = Py_None;
+ Py_INCREF(data);
+ return data;
+}
+
+static PyObject *
+pygobject_set_data(PyGObject *self, PyObject *args)
+{
+ char *key;
+ GQuark quark;
+ PyObject *data;
+
+ if (!PyArg_ParseTuple(args, "sO:GObject.set_data", &key, &data))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ quark = g_quark_from_string(key);
+ Py_INCREF(data);
+ g_object_set_qdata_full(self->obj, quark, data, pyg_destroy_notify);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_connect(PyGObject *self, PyObject *args)
+{
+ PyObject *first, *callback, *extra_args;
+ gchar *name;
+ guint sigid, len;
+ gulong handlerid;
+ GQuark detail = 0;
+ GClosure *closure;
+
+ len = PyTuple_Size(args);
+ if (len < 2) {
+ PyErr_SetString(PyExc_TypeError,
+ "GObject.connect requires at least 2 arguments");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 2);
+ if (!PyArg_ParseTuple(first, "sO:GObject.connect", &name, &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+ return NULL;
+ }
+
+ CHECK_GOBJECT(self);
+
+ if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+ &sigid, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+ extra_args = PySequence_GetSlice(args, 2, len);
+ if (extra_args == NULL)
+ return NULL;
+ closure = pyg_closure_new(callback, extra_args, NULL);
+ pygobject_watch_closure((PyObject *)self, closure);
+ handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+ closure, FALSE);
+ Py_DECREF(extra_args);
+ return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_connect_after(PyGObject *self, PyObject *args)
+{
+ PyObject *first, *callback, *extra_args;
+ gchar *name;
+ guint sigid;
+ gulong handlerid;
+ Py_ssize_t len;
+ GQuark detail;
+ GClosure *closure;
+
+ len = PyTuple_Size(args);
+ if (len < 2) {
+ PyErr_SetString(PyExc_TypeError,
+ "GObject.connect_after requires at least 2 arguments");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 2);
+ if (!PyArg_ParseTuple(first, "sO:GObject.connect_after",
+ &name, &callback)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+ return NULL;
+ }
+
+ CHECK_GOBJECT(self);
+
+ if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+ &sigid, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+ extra_args = PySequence_GetSlice(args, 2, len);
+ if (extra_args == NULL)
+ return NULL;
+ closure = pyg_closure_new(callback, extra_args, NULL);
+ pygobject_watch_closure((PyObject *)self, closure);
+ handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+ closure, TRUE);
+ Py_DECREF(extra_args);
+ return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_connect_object(PyGObject *self, PyObject *args)
+{
+ PyObject *first, *callback, *extra_args, *object;
+ gchar *name;
+ guint sigid;
+ gulong handlerid;
+ Py_ssize_t len;
+ GQuark detail;
+ GClosure *closure;
+
+ len = PyTuple_Size(args);
+ if (len < 3) {
+ PyErr_SetString(PyExc_TypeError,
+ "GObject.connect_object requires at least 3 arguments");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 3);
+ if (!PyArg_ParseTuple(first, "sOO:GObject.connect_object",
+ &name, &callback, &object)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+ return NULL;
+ }
+
+ CHECK_GOBJECT(self);
+
+ if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+ &sigid, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+ extra_args = PySequence_GetSlice(args, 3, len);
+ if (extra_args == NULL)
+ return NULL;
+ closure = pyg_closure_new(callback, extra_args, object);
+ pygobject_watch_closure((PyObject *)self, closure);
+ handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+ closure, FALSE);
+ Py_DECREF(extra_args);
+ return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_connect_object_after(PyGObject *self, PyObject *args)
+{
+ PyObject *first, *callback, *extra_args, *object;
+ gchar *name;
+ guint sigid;
+ gulong handlerid;
+ Py_ssize_t len;
+ GQuark detail;
+ GClosure *closure;
+
+ len = PyTuple_Size(args);
+ if (len < 3) {
+ PyErr_SetString(PyExc_TypeError,
+ "GObject.connect_object_after requires at least 3 arguments");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 3);
+ if (!PyArg_ParseTuple(first, "sOO:GObject.connect_object_after",
+ &name, &callback, &object)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+ if (!PyCallable_Check(callback)) {
+ PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+ return NULL;
+ }
+
+ CHECK_GOBJECT(self);
+
+ if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+ &sigid, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+ extra_args = PySequence_GetSlice(args, 3, len);
+ if (extra_args == NULL)
+ return NULL;
+ closure = pyg_closure_new(callback, extra_args, object);
+ pygobject_watch_closure((PyObject *)self, closure);
+ handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+ closure, TRUE);
+ Py_DECREF(extra_args);
+ return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_disconnect(PyGObject *self, PyObject *args)
+{
+ gulong handler_id;
+
+ if (!PyArg_ParseTuple(args, "k:GObject.disconnect", &handler_id))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ g_signal_handler_disconnect(self->obj, handler_id);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_handler_is_connected(PyGObject *self, PyObject *args)
+{
+ gulong handler_id;
+
+ if (!PyArg_ParseTuple(args, "k:GObject.handler_is_connected", &handler_id))
+ return NULL;
+
+
+ CHECK_GOBJECT(self);
+
+ return PyBool_FromLong(g_signal_handler_is_connected(self->obj, handler_id));
+}
+
+static PyObject *
+pygobject_handler_block(PyGObject *self, PyObject *args)
+{
+ gulong handler_id;
+
+ if (!PyArg_ParseTuple(args, "k:GObject.handler_block", &handler_id))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ g_signal_handler_block(self->obj, handler_id);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_handler_unblock(PyGObject *self, PyObject *args)
+{
+ gulong handler_id;
+
+ if (!PyArg_ParseTuple(args, "k:GObject.handler_unblock", &handler_id))
+ return NULL;
+ g_signal_handler_unblock(self->obj, handler_id);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_emit(PyGObject *self, PyObject *args)
+{
+ guint signal_id, i;
+ Py_ssize_t len;
+ GQuark detail;
+ PyObject *first, *py_ret;
+ gchar *name;
+ GSignalQuery query;
+ GValue *params, ret = { 0, };
+
+ len = PyTuple_Size(args);
+ if (len < 1) {
+ PyErr_SetString(PyExc_TypeError,"GObject.emit needs at least one arg");
+ return NULL;
+ }
+ first = PySequence_GetSlice(args, 0, 1);
+ if (!PyArg_ParseTuple(first, "s:GObject.emit", &name)) {
+ Py_DECREF(first);
+ return NULL;
+ }
+ Py_DECREF(first);
+
+ CHECK_GOBJECT(self);
+
+ if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+ &signal_id, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ name);
+ return NULL;
+ }
+ g_signal_query(signal_id, &query);
+ if (len != query.n_params + 1) {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf),
+ "%d parameters needed for signal %s; %ld given",
+ query.n_params, name, (long int) (len - 1));
+ PyErr_SetString(PyExc_TypeError, buf);
+ return NULL;
+ }
+
+ params = g_new0(GValue, query.n_params + 1);
+ g_value_init(&params[0], G_OBJECT_TYPE(self->obj));
+ g_value_set_object(&params[0], G_OBJECT(self->obj));
+
+ for (i = 0; i < query.n_params; i++)
+ g_value_init(&params[i + 1],
+ query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+ for (i = 0; i < query.n_params; i++) {
+ PyObject *item = PyTuple_GetItem(args, i+1);
+
+ if (pyg_value_from_pyobject(&params[i+1], item) < 0) {
+ gchar buf[128];
+ g_snprintf(buf, sizeof(buf),
+ "could not convert type %s to %s required for parameter %d",
+ Py_TYPE(item)->tp_name,
+ g_type_name(G_VALUE_TYPE(&params[i+1])), i);
+ PyErr_SetString(PyExc_TypeError, buf);
+
+ for (i = 0; i < query.n_params + 1; i++)
+ g_value_unset(&params[i]);
+
+ g_free(params);
+ return NULL;
+ }
+ }
+
+ if (query.return_type != G_TYPE_NONE)
+ g_value_init(&ret, query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ g_signal_emitv(params, signal_id, detail, &ret);
+
+ for (i = 0; i < query.n_params + 1; i++)
+ g_value_unset(&params[i]);
+
+ g_free(params);
+ if ((query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE) != G_TYPE_NONE) {
+ py_ret = pyg_value_as_pyobject(&ret, TRUE);
+ g_value_unset(&ret);
+ } else {
+ Py_INCREF(Py_None);
+ py_ret = Py_None;
+ }
+
+ return py_ret;
+}
+
+static PyObject *
+pygobject_stop_emission(PyGObject *self, PyObject *args)
+{
+ gchar *signal;
+ guint signal_id;
+ GQuark detail;
+
+ if (!PyArg_ParseTuple(args, "s:GObject.stop_emission", &signal))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+
+ if (!g_signal_parse_name(signal, G_OBJECT_TYPE(self->obj),
+ &signal_id, &detail, TRUE)) {
+ PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+ signal);
+ return NULL;
+ }
+ g_signal_stop_emission(self->obj, signal_id, detail);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pygobject_chain_from_overridden(PyGObject *self, PyObject *args)
+{
+ GSignalInvocationHint *ihint;
+ guint signal_id, i;
+ Py_ssize_t len;
+ PyObject *py_ret;
+ const gchar *name;
+ GSignalQuery query;
+ GValue *params, ret = { 0, };
+
+ CHECK_GOBJECT(self);
+
+ ihint = g_signal_get_invocation_hint(self->obj);
+ if (!ihint) {
+ PyErr_SetString(PyExc_TypeError, "could not find signal invocation "
+ "information for this object.");
+ return NULL;
+ }
+
+ signal_id = ihint->signal_id;
+ name = g_signal_name(signal_id);
+
+ len = PyTuple_Size(args);
+ if (signal_id == 0) {
+ PyErr_SetString(PyExc_TypeError, "unknown signal name");
+ return NULL;
+ }
+ g_signal_query(signal_id, &query);
+ if (len != query.n_params) {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf),
+ "%d parameters needed for signal %s; %ld given",
+ query.n_params, name, (long int) len);
+ PyErr_SetString(PyExc_TypeError, buf);
+ return NULL;
+ }
+ params = g_new0(GValue, query.n_params + 1);
+ g_value_init(&params[0], G_OBJECT_TYPE(self->obj));
+ g_value_set_object(&params[0], G_OBJECT(self->obj));
+
+ for (i = 0; i < query.n_params; i++)
+ g_value_init(&params[i + 1],
+ query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+ for (i = 0; i < query.n_params; i++) {
+ PyObject *item = PyTuple_GetItem(args, i);
+
+ if (pyg_boxed_check(item, (query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE))) {
+ g_value_set_static_boxed(&params[i+1], pyg_boxed_get(item, void));
+ }
+ else if (pyg_value_from_pyobject(&params[i+1], item) < 0) {
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf),
+ "could not convert type %s to %s required for parameter %d",
+ Py_TYPE(item)->tp_name,
+ g_type_name(G_VALUE_TYPE(&params[i+1])), i);
+ PyErr_SetString(PyExc_TypeError, buf);
+ for (i = 0; i < query.n_params + 1; i++)
+ g_value_unset(&params[i]);
+ g_free(params);
+ return NULL;
+ }
+ }
+ if (query.return_type != G_TYPE_NONE)
+ g_value_init(&ret, query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+ g_signal_chain_from_overridden(params, &ret);
+ for (i = 0; i < query.n_params + 1; i++)
+ g_value_unset(&params[i]);
+ g_free(params);
+ if (query.return_type != G_TYPE_NONE) {
+ py_ret = pyg_value_as_pyobject(&ret, TRUE);
+ g_value_unset(&ret);
+ } else {
+ Py_INCREF(Py_None);
+ py_ret = Py_None;
+ }
+ return py_ret;
+}
+
+
+static PyObject *
+pygobject_weak_ref(PyGObject *self, PyObject *args)
+{
+ int len;
+ PyObject *callback = NULL, *user_data = NULL;
+ PyObject *retval;
+
+ CHECK_GOBJECT(self);
+
+ if ((len = PySequence_Length(args)) >= 1) {
+ callback = PySequence_ITEM(args, 0);
+ user_data = PySequence_GetSlice(args, 1, len);
+ }
+ retval = pygobject_weak_ref_new(self->obj, callback, user_data);
+ Py_XDECREF(callback);
+ Py_XDECREF(user_data);
+ return retval;
+}
+
+
+static PyObject *
+pygobject_copy(PyGObject *self)
+{
+ PyErr_SetString(PyExc_TypeError,
+ "gobject.GObject descendants' instances are non-copyable");
+ return NULL;
+}
+
+static PyObject *
+pygobject_deepcopy(PyGObject *self, PyObject *args)
+{
+ PyErr_SetString(PyExc_TypeError,
+ "gobject.GObject descendants' instances are non-copyable");
+ return NULL;
+}
+
+
+static PyObject *
+pygobject_disconnect_by_func(PyGObject *self, PyObject *args)
+{
+ PyObject *pyfunc = NULL;
+ GClosure *closure = NULL;
+ guint retval;
+
+ CHECK_GOBJECT(self);
+
+ if (!PyArg_ParseTuple(args, "O:GObject.disconnect_by_func", &pyfunc))
+ return NULL;
+
+ if (!PyCallable_Check(pyfunc)) {
+ PyErr_SetString(PyExc_TypeError, "first argument must be callable");
+ return NULL;
+ }
+
+ closure = gclosure_from_pyfunc(self, pyfunc);
+ if (!closure) {
+ PyErr_Format(PyExc_TypeError, "nothing connected to %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+ return NULL;
+ }
+
+ retval = g_signal_handlers_disconnect_matched(self->obj,
+ G_SIGNAL_MATCH_CLOSURE,
+ 0, 0,
+ closure,
+ NULL, NULL);
+ return _PyLong_FromLong(retval);
+}
+
+static PyObject *
+pygobject_handler_block_by_func(PyGObject *self, PyObject *args)
+{
+ PyObject *pyfunc = NULL;
+ GClosure *closure = NULL;
+ guint retval;
+
+ CHECK_GOBJECT(self);
+
+ if (!PyArg_ParseTuple(args, "O:GObject.handler_block_by_func", &pyfunc))
+ return NULL;
+
+ if (!PyCallable_Check(pyfunc)) {
+ PyErr_SetString(PyExc_TypeError, "first argument must be callable");
+ return NULL;
+ }
+
+ closure = gclosure_from_pyfunc(self, pyfunc);
+ if (!closure) {
+ PyErr_Format(PyExc_TypeError, "nothing connected to %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+ return NULL;
+ }
+
+ retval = g_signal_handlers_block_matched(self->obj,
+ G_SIGNAL_MATCH_CLOSURE,
+ 0, 0,
+ closure,
+ NULL, NULL);
+ return _PyLong_FromLong(retval);
+}
+
+static PyObject *
+pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args)
+{
+ PyObject *pyfunc = NULL;
+ GClosure *closure = NULL;
+ guint retval;
+
+ CHECK_GOBJECT(self);
+
+ if (!PyArg_ParseTuple(args, "O:GObject.handler_unblock_by_func", &pyfunc))
+ return NULL;
+
+ if (!PyCallable_Check(pyfunc)) {
+ PyErr_SetString(PyExc_TypeError, "first argument must be callable");
+ return NULL;
+ }
+
+ closure = gclosure_from_pyfunc(self, pyfunc);
+ if (!closure) {
+ PyErr_Format(PyExc_TypeError, "nothing connected to %s",
+ _PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+ return NULL;
+ }
+
+ retval = g_signal_handlers_unblock_matched(self->obj,
+ G_SIGNAL_MATCH_CLOSURE,
+ 0, 0,
+ closure,
+ NULL, NULL);
+ return _PyLong_FromLong(retval);
+}
+
+static PyMethodDef pygobject_methods[] = {
+ { "__gobject_init__", (PyCFunction)pygobject__gobject_init__,
+ METH_VARARGS|METH_KEYWORDS },
+ { "get_property", (PyCFunction)pygobject_get_property, METH_VARARGS },
+ { "get_properties", (PyCFunction)pygobject_get_properties, METH_VARARGS },
+ { "set_property", (PyCFunction)pygobject_set_property, METH_VARARGS },
+ { "set_properties", (PyCFunction)pygobject_set_properties, METH_KEYWORDS },
+ { "freeze_notify", (PyCFunction)pygobject_freeze_notify, METH_VARARGS },
+ { "notify", (PyCFunction)pygobject_notify, METH_VARARGS },
+ { "thaw_notify", (PyCFunction)pygobject_thaw_notify, METH_VARARGS },
+ { "get_data", (PyCFunction)pygobject_get_data, METH_VARARGS },
+ { "set_data", (PyCFunction)pygobject_set_data, METH_VARARGS },
+ { "connect", (PyCFunction)pygobject_connect, METH_VARARGS },
+ { "connect_after", (PyCFunction)pygobject_connect_after, METH_VARARGS },
+ { "connect_object", (PyCFunction)pygobject_connect_object, METH_VARARGS },
+ { "connect_object_after", (PyCFunction)pygobject_connect_object_after, METH_VARARGS },
+ { "disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS },
+ { "disconnect_by_func", (PyCFunction)pygobject_disconnect_by_func, METH_VARARGS },
+ { "handler_disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS },
+ { "handler_is_connected", (PyCFunction)pygobject_handler_is_connected, METH_VARARGS },
+ { "handler_block", (PyCFunction)pygobject_handler_block, METH_VARARGS },
+ { "handler_unblock", (PyCFunction)pygobject_handler_unblock,METH_VARARGS },
+ { "handler_block_by_func", (PyCFunction)pygobject_handler_block_by_func, METH_VARARGS },
+ { "handler_unblock_by_func", (PyCFunction)pygobject_handler_unblock_by_func, METH_VARARGS },
+ { "emit", (PyCFunction)pygobject_emit, METH_VARARGS },
+ { "stop_emission", (PyCFunction)pygobject_stop_emission, METH_VARARGS },
+ { "emit_stop_by_name", (PyCFunction)pygobject_stop_emission,METH_VARARGS },
+ { "chain", (PyCFunction)pygobject_chain_from_overridden,METH_VARARGS },
+ { "weak_ref", (PyCFunction)pygobject_weak_ref, METH_VARARGS },
+ { "__copy__", (PyCFunction)pygobject_copy, METH_NOARGS },
+ { "__deepcopy__", (PyCFunction)pygobject_deepcopy, METH_VARARGS },
+ { NULL, NULL, 0 }
+};
+
+
+static PyObject *
+pygobject_get_dict(PyGObject *self, void *closure)
+{
+ if (self->inst_dict == NULL) {
+ self->inst_dict = PyDict_New();
+ if (self->inst_dict == NULL)
+ return NULL;
+ if (G_LIKELY(self->obj))
+ pygobject_switch_to_toggle_ref(self);
+ }
+ Py_INCREF(self->inst_dict);
+ return self->inst_dict;
+}
+
+static PyObject *
+pygobject_get_refcount(PyGObject *self, void *closure)
+{
+ return _PyLong_FromLong(self->obj->ref_count);
+}
+
+static int
+pygobject_setattro(PyObject *self, PyObject *name, PyObject *value)
+{
+ int res;
+ PyGObject *gself = (PyGObject *) self;
+ PyObject *inst_dict_before = gself->inst_dict;
+ /* call parent type's setattro */
+ res = PyGObject_Type.tp_base->tp_setattro(self, name, value);
+ if (inst_dict_before == NULL && gself->inst_dict != NULL) {
+ if (G_LIKELY(gself->obj))
+ pygobject_switch_to_toggle_ref(gself);
+ }
+ return res;
+}
+
+static PyGetSetDef pygobject_getsets[] = {
+ { "__dict__", (getter)pygobject_get_dict, (setter)0 },
+ { "__grefcount__", (getter)pygobject_get_refcount, (setter)0, },
+ { NULL, 0, 0 }
+};
+
+/* ------------------------------------ */
+/* ****** GObject weak reference ****** */
+/* ------------------------------------ */
+
+typedef struct {
+ PyObject_HEAD
+ GObject *obj;
+ PyObject *callback;
+ PyObject *user_data;
+ gboolean have_floating_ref;
+} PyGObjectWeakRef;
+
+PYGLIB_DEFINE_TYPE("gobject.GObjectWeakRef", PyGObjectWeakRef_Type, PyGObjectWeakRef);
+
+static int
+pygobject_weak_ref_traverse(PyGObjectWeakRef *self, visitproc visit, void *arg)
+{
+ if (self->callback && visit(self->callback, arg) < 0)
+ return -1;
+ if (self->user_data && visit(self->user_data, arg) < 0)
+ return -1;
+ return 0;
+}
+
+static void
+pygobject_weak_ref_notify(PyGObjectWeakRef *self, GObject *dummy)
+{
+ self->obj = NULL;
+ if (self->callback) {
+ PyObject *retval;
+ PyGILState_STATE state = pyglib_gil_state_ensure();
+ retval = PyObject_Call(self->callback, self->user_data, NULL);
+ if (retval) {
+ if (retval != Py_None)
+ PyErr_Format(PyExc_TypeError,
+ "GObject weak notify callback returned a value"
+ " of type %s, should return None",
+ Py_TYPE(retval)->tp_name);
+ Py_DECREF(retval);
+ PyErr_Print();
+ } else
+ PyErr_Print();
+ Py_CLEAR(self->callback);
+ Py_CLEAR(self->user_data);
+ if (self->have_floating_ref) {
+ self->have_floating_ref = FALSE;
+ Py_DECREF((PyObject *) self);
+ }
+ pyglib_gil_state_release(state);
+ }
+}
+
+static inline int
+pygobject_weak_ref_clear(PyGObjectWeakRef *self)
+{
+ Py_CLEAR(self->callback);
+ Py_CLEAR(self->user_data);
+ if (self->obj) {
+ g_object_weak_unref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+ self->obj = NULL;
+ }
+ return 0;
+}
+
+static void
+pygobject_weak_ref_dealloc(PyGObjectWeakRef *self)
+{
+ PyObject_GC_UnTrack((PyObject *)self);
+ pygobject_weak_ref_clear(self);
+ PyObject_GC_Del(self);
+}
+
+static PyObject *
+pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data)
+{
+ PyGObjectWeakRef *self;
+
+ self = PyObject_GC_New(PyGObjectWeakRef, &PyGObjectWeakRef_Type);
+ self->callback = callback;
+ self->user_data = user_data;
+ Py_XINCREF(self->callback);
+ Py_XINCREF(self->user_data);
+ self->obj = obj;
+ g_object_weak_ref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+ if (callback != NULL) {
+ /* when we have a callback, we should INCREF the weakref
+ * object to make it stay alive even if it goes out of scope */
+ self->have_floating_ref = TRUE;
+ Py_INCREF((PyObject *) self);
+ }
+ return (PyObject *) self;
+}
+
+static PyObject *
+pygobject_weak_ref_unref(PyGObjectWeakRef *self, PyObject *args)
+{
+ if (!self->obj) {
+ PyErr_SetString(PyExc_ValueError, "weak ref already unreffed");
+ return NULL;
+ }
+ g_object_weak_unref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+ self->obj = NULL;
+ if (self->have_floating_ref) {
+ self->have_floating_ref = FALSE;
+ Py_DECREF(self);
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef pygobject_weak_ref_methods[] = {
+ { "unref", (PyCFunction)pygobject_weak_ref_unref, METH_NOARGS},
+ { NULL, NULL, 0}
+};
+
+static PyObject *
+pygobject_weak_ref_call(PyGObjectWeakRef *self, PyObject *args, PyObject *kw)
+{
+ static char *argnames[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kw, ":__call__", argnames))
+ return NULL;
+
+ if (self->obj)
+ return pygobject_new_full(self->obj, FALSE, NULL);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+
+static gpointer
+pyobject_copy(gpointer boxed)
+{
+ PyObject *object = boxed;
+
+ Py_INCREF(object);
+ return object;
+}
+
+static void
+pyobject_free(gpointer boxed)
+{
+ PyObject *object = boxed;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+ Py_DECREF(object);
+ pyglib_gil_state_release(state);
+}
+
+void
+pygobject_object_register_types(PyObject *d)
+{
+ PyObject *o, *descr;
+
+ pygobject_class_key = g_quark_from_static_string("PyGObject::class");
+ pygobject_class_init_key = g_quark_from_static_string("PyGObject::class-init");
+ pygobject_wrapper_key = g_quark_from_static_string("PyGObject::wrapper");
+ pygobject_has_updated_constructor_key =
+ g_quark_from_static_string("PyGObject::has-updated-constructor");
+ pygobject_instance_data_key = g_quark_from_static_string("PyGObject::instance-data");
+
+ /* GObject */
+ if (!PY_TYPE_OBJECT)
+ PY_TYPE_OBJECT = g_boxed_type_register_static("PyObject",
+ pyobject_copy,
+ pyobject_free);
+ PyGObject_Type.tp_dealloc = (destructor)pygobject_dealloc;
+ PyGObject_Type.tp_compare = (cmpfunc)pygobject_compare;
+ PyGObject_Type.tp_repr = (reprfunc)pygobject_repr;
+ PyGObject_Type.tp_hash = (hashfunc)pygobject_hash;
+ PyGObject_Type.tp_setattro = (setattrofunc)pygobject_setattro;
+ PyGObject_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_HAVE_GC);
+ PyGObject_Type.tp_traverse = (traverseproc)pygobject_traverse;
+ PyGObject_Type.tp_clear = (inquiry)pygobject_clear;
+ PyGObject_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+ PyGObject_Type.tp_methods = pygobject_methods;
+ PyGObject_Type.tp_getset = pygobject_getsets;
+ PyGObject_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+ PyGObject_Type.tp_init = (initproc)pygobject_init;
+ PyGObject_Type.tp_free = (freefunc)pygobject_free;
+ PyGObject_Type.tp_alloc = PyType_GenericAlloc;
+ PyGObject_Type.tp_new = PyType_GenericNew;
+ pygobject_register_class(d, "GObject", G_TYPE_OBJECT,
+ &PyGObject_Type, NULL);
+ PyDict_SetItemString(PyGObject_Type.tp_dict, "__gdoc__",
+ pyg_object_descr_doc_get());
+ pyg_set_object_has_new_constructor(G_TYPE_OBJECT);
+
+ /* GProps */
+ PyGProps_Type.tp_dealloc = (destructor)PyGProps_dealloc;
+ PyGProps_Type.tp_as_sequence = (PySequenceMethods*)&_PyGProps_as_sequence;
+ PyGProps_Type.tp_getattro = (getattrofunc)PyGProps_getattro;
+ PyGProps_Type.tp_setattro = (setattrofunc)PyGProps_setattro;
+ PyGProps_Type.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
+ PyGProps_Type.tp_doc = "The properties of the GObject accessible as "
+ "Python attributes.";
+ PyGProps_Type.tp_traverse = (traverseproc)pygobject_props_traverse;
+ PyGProps_Type.tp_iter = (getiterfunc)pygobject_props_get_iter;
+ if (PyType_Ready(&PyGProps_Type) < 0)
+ return;
+
+ /* GPropsDescr */
+ PyGPropsDescr_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGPropsDescr_Type.tp_descr_get = pyg_props_descr_descr_get;
+ if (PyType_Ready(&PyGPropsDescr_Type) < 0)
+ return;
+ descr = PyObject_New(PyObject, &PyGPropsDescr_Type);
+ PyDict_SetItemString(PyGObject_Type.tp_dict, "props", descr);
+ PyDict_SetItemString(PyGObject_Type.tp_dict, "__module__",
+ o=_PyUnicode_FromString("gobject._gobject"));
+ Py_DECREF(o);
+
+ /* GPropsIter */
+ PyGPropsIter_Type.tp_dealloc = (destructor)pyg_props_iter_dealloc;
+ PyGPropsIter_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGPropsIter_Type.tp_doc = "GObject properties iterator";
+ PyGPropsIter_Type.tp_iternext = (iternextfunc)pygobject_props_iter_next;
+ if (PyType_Ready(&PyGPropsIter_Type) < 0)
+ return;
+
+ PyGObjectWeakRef_Type.tp_dealloc = (destructor)pygobject_weak_ref_dealloc;
+ PyGObjectWeakRef_Type.tp_call = (ternaryfunc)pygobject_weak_ref_call;
+ PyGObjectWeakRef_Type.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
+ PyGObjectWeakRef_Type.tp_doc = "A GObject weak reference";
+ PyGObjectWeakRef_Type.tp_traverse = (traverseproc)pygobject_weak_ref_traverse;
+ PyGObjectWeakRef_Type.tp_clear = (inquiry)pygobject_weak_ref_clear;
+ PyGObjectWeakRef_Type.tp_methods = pygobject_weak_ref_methods;
+ if (PyType_Ready(&PyGObjectWeakRef_Type) < 0)
+ return;
+ PyDict_SetItemString(d, "GObjectWeakRef", (PyObject *) &PyGObjectWeakRef_Type);
+}
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
new file mode 100644
index 0000000..85d8bca
--- /dev/null
+++ b/gobject/pygobject.h
@@ -0,0 +1,636 @@
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+#ifndef _PYGOBJECT_H_
+#define _PYGOBJECT_H_
+
+#include <Python.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* This is deprecated, don't use */
+#define PYGIL_API_IS_BUGGY FALSE
+
+ /* PyGClosure is a _private_ structure */
+typedef void (* PyClosureExceptionHandler) (GValue *ret, guint n_param_values, const GValue *params);
+typedef struct _PyGClosure PyGClosure;
+typedef struct _PyGObjectData PyGObjectData;
+
+struct _PyGClosure {
+ GClosure closure;
+ PyObject *callback;
+ PyObject *extra_args; /* tuple of extra args to pass to callback */
+ PyObject *swap_data; /* other object for gtk_signal_connect__object */
+ PyClosureExceptionHandler exception_handler;
+};
+
+typedef enum {
+ PYGOBJECT_USING_TOGGLE_REF = 1 << 0
+} PyGObjectFlags;
+
+ /* closures is just an alias for what is found in the
+ * PyGObjectData */
+typedef struct {
+ PyObject_HEAD
+ GObject *obj;
+ PyObject *inst_dict; /* the instance dictionary -- must be last */
+ PyObject *weakreflist; /* list of weak references */
+
+ /*< private >*/
+ /* using union to preserve ABI compatibility (structure size
+ * must not change) */
+ union {
+ GSList *closures; /* stale field; no longer updated DO-NOT-USE! */
+ PyGObjectFlags flags;
+ } private_flags;
+
+} PyGObject;
+
+#define pygobject_get(v) (((PyGObject *)(v))->obj)
+#define pygobject_check(v,base) (PyObject_TypeCheck(v,base))
+
+typedef struct {
+ PyObject_HEAD
+ gpointer boxed;
+ GType gtype;
+ gboolean free_on_dealloc;
+} PyGBoxed;
+
+#define pyg_boxed_get(v,t) ((t *)((PyGBoxed *)(v))->boxed)
+#define pyg_boxed_check(v,typecode) (PyObject_TypeCheck(v, &PyGBoxed_Type) && ((PyGBoxed *)(v))->gtype == typecode)
+
+typedef struct {
+ PyObject_HEAD
+ gpointer pointer;
+ GType gtype;
+} PyGPointer;
+
+#define pyg_pointer_get(v,t) ((t *)((PyGPointer *)(v))->pointer)
+#define pyg_pointer_check(v,typecode) (PyObject_TypeCheck(v, &PyGPointer_Type) && ((PyGPointer *)(v))->gtype == typecode)
+
+typedef void (*PyGFatalExceptionFunc) (void);
+typedef void (*PyGThreadBlockFunc) (void);
+
+typedef struct {
+ PyObject_HEAD
+ GParamSpec *pspec;
+} PyGParamSpec;
+
+#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec)
+#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type))
+
+typedef int (*PyGClassInitFunc) (gpointer gclass, PyTypeObject *pyclass);
+typedef PyTypeObject * (*PyGTypeRegistrationFunction) (const gchar *name,
+ gpointer data);
+
+struct _PyGObject_Functions {
+ /*
+ * All field names in here are considered private,
+ * use the macros below instead, which provides stability
+ */
+ void (* register_class)(PyObject *dict, const gchar *class_name,
+ GType gtype, PyTypeObject *type, PyObject *bases);
+ void (* register_wrapper)(PyObject *self);
+ void (* register_sinkfunc)(GType type,
+ void (* sinkfunc)(GObject *object));
+ PyTypeObject *(* lookup_class)(GType type);
+ PyObject *(* newgobj)(GObject *obj);
+
+ GClosure *(* closure_new)(PyObject *callback, PyObject *extra_args,
+ PyObject *swap_data);
+ void (* object_watch_closure)(PyObject *self, GClosure *closure);
+ GDestroyNotify destroy_notify;
+
+ GType (* type_from_object)(PyObject *obj);
+ PyObject *(* type_wrapper_new)(GType type);
+
+ gint (* enum_get_value)(GType enum_type, PyObject *obj, gint *val);
+ gint (* flags_get_value)(GType flag_type, PyObject *obj, gint *val);
+ void (* register_gtype_custom)(GType gtype,
+ PyObject *(* from_func)(const GValue *value),
+ int (* to_func)(GValue *value, PyObject *obj));
+ int (* value_from_pyobject)(GValue *value, PyObject *obj);
+ PyObject *(* value_as_pyobject)(const GValue *value, gboolean copy_boxed);
+
+ void (* register_interface)(PyObject *dict, const gchar *class_name,
+ GType gtype, PyTypeObject *type);
+
+ PyTypeObject *boxed_type;
+ void (* register_boxed)(PyObject *dict, const gchar *class_name,
+ GType boxed_type, PyTypeObject *type);
+ PyObject *(* boxed_new)(GType boxed_type, gpointer boxed,
+ gboolean copy_boxed, gboolean own_ref);
+
+ PyTypeObject *pointer_type;
+ void (* register_pointer)(PyObject *dict, const gchar *class_name,
+ GType pointer_type, PyTypeObject *type);
+ PyObject *(* pointer_new)(GType boxed_type, gpointer pointer);
+
+ void (* enum_add_constants)(PyObject *module, GType enum_type,
+ const gchar *strip_prefix);
+ void (* flags_add_constants)(PyObject *module, GType flags_type,
+ const gchar *strip_prefix);
+
+ const gchar *(* constant_strip_prefix)(const gchar *name,
+ const gchar *strip_prefix);
+
+ gboolean (* error_check)(GError **error);
+
+ /* hooks to register handlers for getting GDK threads to cooperate
+ * with python threading */
+ void (* set_thread_block_funcs) (PyGThreadBlockFunc block_threads_func,
+ PyGThreadBlockFunc unblock_threads_func);
+ PyGThreadBlockFunc block_threads;
+ PyGThreadBlockFunc unblock_threads;
+ PyTypeObject *paramspec_type;
+ PyObject *(* paramspec_new)(GParamSpec *spec);
+ GParamSpec *(*paramspec_get)(PyObject *tuple);
+ int (*pyobj_to_unichar_conv)(PyObject *pyobj, void* ptr);
+ gboolean (*parse_constructor_args)(GType obj_type,
+ char **arg_names,
+ char **prop_names,
+ GParameter *params,
+ guint *nparams,
+ PyObject **py_args);
+ PyObject *(* param_gvalue_as_pyobject) (const GValue* gvalue,
+ gboolean copy_boxed,
+ const GParamSpec* pspec);
+ int (* gvalue_from_param_pyobject) (GValue* value,
+ PyObject* py_obj,
+ const GParamSpec* pspec);
+ PyTypeObject *enum_type;
+ PyObject *(*enum_add)(PyObject *module,
+ const char *type_name_,
+ const char *strip_prefix,
+ GType gtype);
+ PyObject* (*enum_from_gtype)(GType gtype, int value);
+
+ PyTypeObject *flags_type;
+ PyObject *(*flags_add)(PyObject *module,
+ const char *type_name_,
+ const char *strip_prefix,
+ GType gtype);
+ PyObject* (*flags_from_gtype)(GType gtype, int value);
+
+ gboolean threads_enabled;
+ int (*enable_threads) (void);
+
+ int (*gil_state_ensure) (void);
+ void (*gil_state_release) (int flag);
+
+ void (*register_class_init) (GType gtype, PyGClassInitFunc class_init);
+ void (*register_interface_info) (GType gtype, const GInterfaceInfo *info);
+ void (*closure_set_exception_handler) (GClosure *closure, PyClosureExceptionHandler handler);
+ int (*pygobject_constructv) (PyGObject *self,
+ guint n_parameters,
+ GParameter *parameters);
+ int (*pygobject_construct) (PyGObject *self,
+ const char *first_property_name,
+ ...);
+ void (*set_object_has_new_constructor) (GType type);
+
+ void (*add_warning_redirection) (const char *domain,
+ PyObject *warning);
+ void (*disable_warning_redirections) (void);
+ void (*type_register_custom)(const gchar *type_name,
+ PyGTypeRegistrationFunction callback,
+ gpointer data);
+ gboolean (*gerror_exception_check) (GError **error);
+ PyObject* (*option_group_new) (GOptionGroup *group);
+};
+
+#ifndef _INSIDE_PYGOBJECT_
+
+#if defined(NO_IMPORT) || defined(NO_IMPORT_PYGOBJECT)
+extern struct _PyGObject_Functions *_PyGObject_API;
+#else
+struct _PyGObject_Functions *_PyGObject_API;
+#endif
+
+#define pygobject_register_class (_PyGObject_API->register_class)
+#define pygobject_register_wrapper (_PyGObject_API->register_wrapper)
+/* This is deprecated, sinkfuncs are not needed anymore */
+#define pygobject_register_sinkfunc (_PyGObject_API->register_sinkfunc)
+#define pygobject_lookup_class (_PyGObject_API->lookup_class)
+#define pygobject_new (_PyGObject_API->newgobj)
+#define pyg_closure_new (_PyGObject_API->closure_new)
+#define pygobject_watch_closure (_PyGObject_API->object_watch_closure)
+#define pyg_closure_set_exception_handler (_PyGObject_API->closure_set_exception_handler)
+#define pyg_destroy_notify (_PyGObject_API->destroy_notify)
+#define pyg_type_from_object (_PyGObject_API->type_from_object)
+#define pyg_type_wrapper_new (_PyGObject_API->type_wrapper_new)
+#define pyg_enum_get_value (_PyGObject_API->enum_get_value)
+#define pyg_flags_get_value (_PyGObject_API->flags_get_value)
+/* This is deprecated, call pyg_register_gtype_custom directly instead */
+#define pyg_register_boxed_custom pyg_register_gtype_custom
+#define pyg_register_gtype_custom (_PyGObject_API->register_gtype_custom)
+#define pyg_value_from_pyobject (_PyGObject_API->value_from_pyobject)
+#define pyg_value_as_pyobject (_PyGObject_API->value_as_pyobject)
+#define pyg_register_interface (_PyGObject_API->register_interface)
+#define PyGBoxed_Type (*_PyGObject_API->boxed_type)
+#define pyg_register_boxed (_PyGObject_API->register_boxed)
+#define pyg_boxed_new (_PyGObject_API->boxed_new)
+#define PyGPointer_Type (*_PyGObject_API->pointer_type)
+#define pyg_register_pointer (_PyGObject_API->register_pointer)
+#define pyg_pointer_new (_PyGObject_API->pointer_new)
+#define pyg_enum_add_constants (_PyGObject_API->enum_add_constants)
+#define pyg_flags_add_constants (_PyGObject_API->flags_add_constants)
+#define pyg_constant_strip_prefix (_PyGObject_API->constant_strip_prefix)
+#define pyg_error_check (_PyGObject_API->error_check)
+#define pyg_set_thread_block_funcs (_PyGObject_API->set_thread_block_funcs)
+#define PyGParamSpec_Type (*_PyGObject_API->paramspec_type)
+#define pyg_param_spec_new (_PyGObject_API->paramspec_new)
+#define pyg_param_spec_from_object (_PyGObject_API->paramspec_get)
+#define pyg_pyobj_to_unichar_conv (_PyGObject_API->pyobj_to_unichar_conv)
+#define pyg_parse_constructor_args (_PyGObject_API->parse_constructor_args)
+#define pyg_param_gvalue_as_pyobject (_PyGObject_API->value_as_pyobject)
+#define pyg_param_gvalue_from_pyobject (_PyGObject_API->gvalue_from_param_pyobject)
+#define PyGEnum_Type (*_PyGObject_API->enum_type)
+#define pyg_enum_add (_PyGObject_API->enum_add)
+#define pyg_enum_from_gtype (_PyGObject_API->enum_from_gtype)
+#define PyGFlags_Type (*_PyGObject_API->flags_type)
+#define pyg_flags_add (_PyGObject_API->flags_add)
+#define pyg_flags_from_gtype (_PyGObject_API->flags_from_gtype)
+#define pyg_enable_threads (_PyGObject_API->enable_threads)
+#define pyg_gil_state_ensure (_PyGObject_API->gil_state_ensure)
+#define pyg_gil_state_release (_PyGObject_API->gil_state_release)
+#define pyg_register_class_init (_PyGObject_API->register_class_init)
+#define pyg_register_interface_info (_PyGObject_API->register_interface_info)
+#define pygobject_construct (_PyGObject_API->pygobject_construct)
+#define pygobject_constructv (_PyGObject_API->pygobject_constructv)
+#define pyg_set_object_has_new_constructor (_PyGObject_API->set_object_has_new_constructor)
+#define pyg_add_warning_redirection (_PyGObject_API->add_warning_redirection)
+#define pyg_disable_warning_redirections (_PyGObject_API->disable_warning_redirections)
+#define pyg_type_register_custom_callback (_PyGObject_API->type_register_custom)
+#define pyg_gerror_exception_check (_PyGObject_API->gerror_exception_check)
+#define pyg_option_group_new (_PyGObject_API->option_group_new)
+
+#define pyg_block_threads() G_STMT_START { \
+ if (_PyGObject_API->block_threads != NULL) \
+ (* _PyGObject_API->block_threads)(); \
+ } G_STMT_END
+#define pyg_unblock_threads() G_STMT_START { \
+ if (_PyGObject_API->unblock_threads != NULL) \
+ (* _PyGObject_API->unblock_threads)(); \
+ } G_STMT_END
+
+#define pyg_threads_enabled (_PyGObject_API->threads_enabled)
+
+#define pyg_begin_allow_threads \
+ G_STMT_START { \
+ PyThreadState *_save = NULL; \
+ if (_PyGObject_API->threads_enabled) \
+ _save = PyEval_SaveThread();
+#define pyg_end_allow_threads \
+ if (_PyGObject_API->threads_enabled) \
+ PyEval_RestoreThread(_save); \
+ } G_STMT_END
+
+
+/**
+ * pygobject_init:
+ * @req_major: minimum version major number, or -1
+ * @req_minor: minimum version minor number, or -1
+ * @req_micro: minimum version micro number, or -1
+ *
+ * Imports and initializes the 'gobject' python module. Can
+ * optionally check for a required minimum version if @req_major,
+ * @req_minor, and @req_micro are all different from -1.
+ *
+ * Returns: a new reference to the gobject module on success, NULL in
+ * case of failure (and raises ImportError).
+ **/
+static inline PyObject *
+pygobject_init(int req_major, int req_minor, int req_micro)
+{
+ PyObject *gobject, *cobject;
+
+ gobject = PyImport_ImportModule("gobject");
+ if (!gobject) {
+ if (PyErr_Occurred())
+ {
+ PyObject *type, *value, *traceback;
+ PyObject *py_orig_exc;
+ PyErr_Fetch(&type, &value, &traceback);
+ py_orig_exc = PyObject_Repr(value);
+ Py_XDECREF(type);
+ Py_XDECREF(value);
+ Py_XDECREF(traceback);
+ PyErr_Format(PyExc_ImportError,
+ "could not import gobject (error was: %s)",
+ PyString_AsString(py_orig_exc));
+ Py_DECREF(py_orig_exc);
+ } else {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import gobject (no error given)");
+ }
+ return NULL;
+ }
+
+ cobject = PyObject_GetAttrString(gobject, "_PyGObject_API");
+ if (cobject && PyCObject_Check(cobject))
+ _PyGObject_API = (struct _PyGObject_Functions *) PyCObject_AsVoidPtr(cobject);
+ else {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import gobject (could not find _PyGObject_API object)");
+ Py_DECREF(gobject);
+ return NULL;
+ }
+
+ if (req_major != -1)
+ {
+ int found_major, found_minor, found_micro;
+ PyObject *version;
+
+ version = PyObject_GetAttrString(gobject, "pygobject_version");
+ if (!version)
+ version = PyObject_GetAttrString(gobject, "pygtk_version");
+ if (!version) {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import gobject (version too old)");
+ Py_DECREF(gobject);
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(version, "iii",
+ &found_major, &found_minor, &found_micro)) {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import gobject (version has invalid format)");
+ Py_DECREF(version);
+ Py_DECREF(gobject);
+ return NULL;
+ }
+ Py_DECREF(version);
+ if (req_major != found_major ||
+ req_minor > found_minor ||
+ (req_minor == found_minor && req_micro > found_micro)) {
+ PyErr_Format(PyExc_ImportError,
+ "could not import gobject (version mismatch, %d.%d.%d is required, "
+ "found %d.%d.%d)", req_major, req_minor, req_micro,
+ found_major, found_minor, found_micro);
+ Py_DECREF(gobject);
+ return NULL;
+ }
+ }
+ return gobject;
+}
+
+/* deprecated macro, use pygobject_init() instead. */
+#define init_pygobject() G_STMT_START { \
+ if (!pygobject_init(-1, -1, -1)) \
+ return; \
+} G_STMT_END
+
+/* deprecated macro, use pygobject_init() instead. */
+#define init_pygobject_check(req_major, req_minor, req_micro) G_STMT_START { \
+ if (!pygobject_init(req_major, req_minor, req_micro)) \
+ return; \
+} G_STMT_END
+
+/**
+ * PYLIST_FROMGLIBLIST:
+ * @type: the type of the GLib list e.g. #GList or #GSList
+ * @prefix: the prefix of functions that manipulate a list of the type
+ * given by type.
+ *
+ * A macro that creates a type specific code block which converts a GLib
+ * list (#GSList or #GList) to a Python list. The first two args of the macro
+ * are used to specify the type and list function prefix so that the type
+ * specific macros can be generated.
+ *
+ * The rest of the args are for the standard args for the type specific
+ * macro(s) created from this macro.
+ */
+ #define PYLIST_FROMGLIBLIST(type,prefix,py_list,list,item_convert_func,\
+ list_free,list_item_free) \
+G_STMT_START \
+{ \
+ gint i, len; \
+ PyObject *item; \
+ void (*glib_list_free)(type*) = list_free; \
+ GFunc glib_list_item_free = (GFunc)list_item_free; \
+ \
+ len = prefix##_length(list); \
+ py_list = PyList_New(len); \
+ for (i = 0; i < len; i++) { \
+ gpointer list_item = prefix##_nth_data(list, i); \
+ \
+ item = item_convert_func; \
+ PyList_SetItem(py_list, i, item); \
+ } \
+ if (glib_list_item_free != NULL) \
+ prefix##_foreach(list, glib_list_item_free, NULL); \
+ if (glib_list_free != NULL) \
+ glib_list_free(list); \
+} G_STMT_END
+
+/**
+ * PYLIST_FROMGLIST:
+ * @py_list: the name of the Python list
+ *
+ * @list: the #GList to be converted to a Python list
+ *
+ * @item_convert_func: the function that converts a list item to a Python
+ * object. The function must refer to the list item using "@list_item" and
+ * must return a #PyObject* object. An example conversion function is:
+ * [[
+ * PyString_FromString(list_item)
+ * ]]
+ * A more elaborate function is:
+ * [[
+ * pyg_boxed_new(GTK_TYPE_RECENT_INFO, list_item, TRUE, TRUE)
+ * ]]
+ * @list_free: the name of a function that takes a single arg (the list) and
+ * frees its memory. Can be NULL if the list should not be freed. An example
+ * is:
+ * [[
+ * g_list_free
+ * ]]
+ * @list_item_free: the name of a #GFunc function that frees the memory used
+ * by the items in the list or %NULL if the list items do not have to be
+ * freed. A simple example is:
+ * [[
+ * g_free
+ * ]]
+ *
+ * A macro that adds code that converts a #GList to a Python list.
+ *
+ */
+#define PYLIST_FROMGLIST(py_list,list,item_convert_func,list_free,\
+ list_item_free) \
+ PYLIST_FROMGLIBLIST(GList,g_list,py_list,list,item_convert_func,\
+ list_free,list_item_free)
+
+/**
+ * PYLIST_FROMGSLIST:
+ * @py_list: the name of the Python list
+ *
+ * @list: the #GSList to be converted to a Python list
+ *
+ * @item_convert_func: the function that converts a list item to a Python
+ * object. The function must refer to the list item using "@list_item" and
+ * must return a #PyObject* object. An example conversion function is:
+ * [[
+ * PyString_FromString(list_item)
+ * ]]
+ * A more elaborate function is:
+ * [[
+ * pyg_boxed_new(GTK_TYPE_RECENT_INFO, list_item, TRUE, TRUE)
+ * ]]
+ * @list_free: the name of a function that takes a single arg (the list) and
+ * frees its memory. Can be %NULL if the list should not be freed. An example
+ * is:
+ * [[
+ * g_list_free
+ * ]]
+ * @list_item_free: the name of a #GFunc function that frees the memory used
+ * by the items in the list or %NULL if the list items do not have to be
+ * freed. A simple example is:
+ * [[
+ * g_free
+ * ]]
+ *
+ * A macro that adds code that converts a #GSList to a Python list.
+ *
+ */
+#define PYLIST_FROMGSLIST(py_list,list,item_convert_func,list_free,\
+ list_item_free) \
+ PYLIST_FROMGLIBLIST(GSList,g_slist,py_list,list,item_convert_func,\
+ list_free,list_item_free)
+
+/**
+ * PYLIST_ASGLIBLIST
+ * @type: the type of the GLib list e.g. GList or GSList
+ * @prefix: the prefix of functions that manipulate a list of the type
+ * given by type e.g. g_list or g_slist
+ *
+ * A macro that creates a type specific code block to be used to convert a
+ * Python list to a GLib list (GList or GSList). The first two args of the
+ * macro are used to specify the type and list function prefix so that the
+ * type specific macros can be generated.
+ *
+ * The rest of the args are for the standard args for the type specific
+ * macro(s) created from this macro.
+ */
+#define PYLIST_ASGLIBLIST(type,prefix,py_list,list,check_func,\
+ convert_func,child_free_func,errormsg,errorreturn) \
+G_STMT_START \
+{ \
+ Py_ssize_t i, n_list; \
+ GFunc glib_child_free_func = (GFunc)child_free_func; \
+ \
+ if (!(py_list = PySequence_Fast(py_list, ""))) { \
+ errormsg; \
+ return errorreturn; \
+ } \
+ n_list = PySequence_Fast_GET_SIZE(py_list); \
+ for (i = 0; i < n_list; i++) { \
+ PyObject *py_item = PySequence_Fast_GET_ITEM(py_list, i); \
+ \
+ if (!check_func) { \
+ if (glib_child_free_func) \
+ prefix##_foreach(list, glib_child_free_func, NULL); \
+ prefix##_free(list); \
+ Py_DECREF(py_list); \
+ errormsg; \
+ return errorreturn; \
+ } \
+ list = prefix##_prepend(list, convert_func); \
+ }; \
+ Py_DECREF(py_list); \
+ list = prefix##_reverse(list); \
+} \
+G_STMT_END
+/**
+ * PYLIST_ASGLIST
+ * @py_list: the Python list to be converted
+ * @list: the #GList list to be converted
+ * @check_func: the expression that takes a #PyObject* arg (must be named
+ * @py_item) and returns an int value indicating if the Python object matches
+ * the required list item type (0 - %False or 1 - %True). An example is:
+ * [[
+ * (PyString_Check(py_item)||PyUnicode_Check(py_item))
+ * ]]
+ * @convert_func: the function that takes a #PyObject* arg (must be named
+ * py_item) and returns a pointer to the converted list object. An example
+ * is:
+ * [[
+ * pygobject_get(py_item)
+ * ]]
+ * @child_free_func: the name of a #GFunc function that frees a GLib list
+ * item or %NULL if the list item does not have to be freed. This function is
+ * used to help free the items in a partially created list if there is an
+ * error. An example is:
+ * [[
+ * g_free
+ * ]]
+ * @errormsg: a function that sets up a Python error message. An example is:
+ * [[
+ * PyErr_SetString(PyExc_TypeError, "strings must be a sequence of" "strings
+ * or unicode objects")
+ * ]]
+ * @errorreturn: the value to return if an error occurs, e.g.:
+ * [[
+ * %NULL
+ * ]]
+ *
+ * A macro that creates code that converts a Python list to a #GList. The
+ * returned list must be freed using the appropriate list free function when
+ * it's no longer needed. If an error occurs the child_free_func is used to
+ * release the memory used by the list items and then the list memory is
+ * freed.
+ */
+#define PYLIST_ASGLIST(py_list,list,check_func,convert_func,child_free_func,\
+ errormsg,errorreturn) \
+ PYLIST_ASGLIBLIST(GList,g_list,py_list,list,check_func,convert_func,\
+ child_free_func,errormsg,errorreturn)
+
+/**
+ * PYLIST_ASGSLIST
+ * @py_list: the Python list to be converted
+ * @list: the #GSList list to be converted
+ * @check_func: the expression that takes a #PyObject* arg (must be named
+ * @py_item) and returns an int value indicating if the Python object matches
+ * the required list item type (0 - %False or 1 - %True). An example is:
+ * [[
+ * (PyString_Check(py_item)||PyUnicode_Check(py_item))
+ * ]]
+ * @convert_func: the function that takes a #PyObject* arg (must be named
+ * py_item) and returns a pointer to the converted list object. An example
+ * is:
+ * [[
+ * pygobject_get(py_item)
+ * ]]
+ * @child_free_func: the name of a #GFunc function that frees a GLib list
+ * item or %NULL if the list item does not have to be freed. This function is
+ * used to help free the items in a partially created list if there is an
+ * error. An example is:
+ * [[
+ * g_free
+ * ]]
+ * @errormsg: a function that sets up a Python error message. An example is:
+ * [[
+ * PyErr_SetString(PyExc_TypeError, "strings must be a sequence of" "strings
+ * or unicode objects")
+ * ]]
+ * @errorreturn: the value to return if an error occurs, e.g.:
+ * [[
+ * %NULL
+ * ]]
+ *
+ * A macro that creates code that converts a Python list to a #GSList. The
+ * returned list must be freed using the appropriate list free function when
+ * it's no longer needed. If an error occurs the child_free_func is used to
+ * release the memory used by the list items and then the list memory is
+ * freed.
+ */
+#define PYLIST_ASGSLIST(py_list,list,check_func,convert_func,child_free_func,\
+ errormsg,errorreturn) \
+ PYLIST_ASGLIBLIST(GSList,g_slist,py_list,list,check_func,convert_func,\
+ child_free_func,errormsg,errorreturn)
+
+#endif /* !_INSIDE_PYGOBJECT_ */
+
+G_END_DECLS
+
+#endif /* !_PYGOBJECT_H_ */
diff --git a/gobject/pygparamspec.c b/gobject/pygparamspec.c
new file mode 100644
index 0000000..be3840b
--- /dev/null
+++ b/gobject/pygparamspec.c
@@ -0,0 +1,397 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * Copyright (C) 2004 Johan Dahlin
+ *
+ * pygenum.c: GEnum and GFlag wrappers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+
+#include "pygobject-private.h"
+#include "pygparamspec.h"
+
+PYGLIB_DEFINE_TYPE("gobject.GParamSpec", PyGParamSpec_Type, PyGParamSpec);
+
+static int
+pyg_param_spec_compare(PyGParamSpec *self, PyGParamSpec *v)
+{
+ if (self->pspec == v->pspec) return 0;
+ if (self->pspec > v->pspec) return -1;
+ return 1;
+}
+
+static long
+pyg_param_spec_hash(PyGParamSpec *self)
+{
+ return (long)self->pspec;
+}
+
+static PyObject *
+pyg_param_spec_repr(PyGParamSpec *self)
+{
+ char buf[80];
+
+ g_snprintf(buf, sizeof(buf), "<%s '%s'>",
+ G_PARAM_SPEC_TYPE_NAME(self->pspec),
+ g_param_spec_get_name(self->pspec));
+ return _PyUnicode_FromString(buf);
+}
+
+static void
+pyg_param_spec_dealloc(PyGParamSpec *self)
+{
+ g_param_spec_unref(self->pspec);
+ PyObject_DEL(self);
+}
+
+
+static PyObject *
+pygenum_from_pspec(GParamSpec *pspec)
+{
+ PyObject *pyclass;
+ GParamSpecEnum *enum_pspec;
+ GType enum_type;
+
+ enum_pspec = G_PARAM_SPEC_ENUM(pspec);
+ enum_type = G_ENUM_CLASS_TYPE(enum_pspec->enum_class);
+ pyclass = (PyObject*)g_type_get_qdata(enum_type, pygenum_class_key);
+ if (pyclass == NULL) {
+ pyclass = pyg_enum_add(NULL, g_type_name(enum_type), NULL, enum_type);
+ if (pyclass == NULL)
+ pyclass = Py_None;
+ }
+
+ Py_INCREF(pyclass);
+ return pyclass;
+}
+
+static PyObject *
+pygflags_from_pspec(GParamSpec *pspec)
+{
+ PyObject *pyclass;
+ GParamSpecFlags *flag_pspec;
+ GType flag_type;
+
+ flag_pspec = G_PARAM_SPEC_FLAGS(pspec);
+ flag_type = G_FLAGS_CLASS_TYPE(flag_pspec->flags_class);
+ pyclass = (PyObject*)g_type_get_qdata(flag_type, pygflags_class_key);
+ if (pyclass == NULL) {
+ pyclass = pyg_flags_add(NULL, g_type_name(flag_type), NULL, flag_type);
+ if (pyclass == NULL)
+ pyclass = Py_None;
+ }
+ Py_INCREF(pyclass);
+ return pyclass;
+}
+
+static PyObject *
+pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
+{
+ GParamSpec *pspec;
+
+ pspec = self->pspec;
+
+ /* common attributes */
+ if (!strcmp(attr, "__gtype__")) {
+ return pyg_type_wrapper_new(G_PARAM_SPEC_TYPE(pspec));
+ } else if (!strcmp(attr, "name")) {
+ return Py_BuildValue("s", g_param_spec_get_name(pspec));
+ } else if (!strcmp(attr, "nick")) {
+ return Py_BuildValue("s", g_param_spec_get_nick(pspec));
+ } else if (!strcmp(attr, "blurb") || !strcmp(attr, "__doc__")) {
+ return Py_BuildValue("s", g_param_spec_get_blurb(pspec));
+ } else if (!strcmp(attr, "flags")) {
+ return _PyLong_FromLong(pspec->flags);
+ } else if (!strcmp(attr, "value_type")) {
+ return pyg_type_wrapper_new(pspec->value_type);
+ } else if (!strcmp(attr, "owner_type")) {
+ return pyg_type_wrapper_new(pspec->owner_type);
+ }
+
+ if (G_IS_PARAM_SPEC_CHAR(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value", "flags",
+ "maximum", "minimum", "name", "nick",
+ "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return _PyUnicode_FromFormat(
+ "%c", G_PARAM_SPEC_CHAR(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_UCHAR(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum",
+ "name", "nick", "owner_type",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return _PyUnicode_FromFormat(
+ "%c", G_PARAM_SPEC_UCHAR(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_BOOLEAN(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "name", "nick", "owner_type",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyBool_FromLong(G_PARAM_SPEC_BOOLEAN(pspec)->default_value);
+ }
+ } else if (G_IS_PARAM_SPEC_INT(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum", "name",
+ "nick", "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_UINT(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum",
+ "name", "nick", "owner_type",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyLong_FromUnsignedLong(G_PARAM_SPEC_UINT(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyLong_FromUnsignedLong(G_PARAM_SPEC_UINT(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyLong_FromUnsignedLong(G_PARAM_SPEC_UINT(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_LONG(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum", "name",
+ "nick", "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyLong_FromLong(G_PARAM_SPEC_LONG(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyLong_FromLong(G_PARAM_SPEC_LONG(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyLong_FromLong(G_PARAM_SPEC_LONG(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_ULONG(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum", "name",
+ "nick", "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyLong_FromUnsignedLong(G_PARAM_SPEC_ULONG(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyLong_FromUnsignedLong(G_PARAM_SPEC_ULONG(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyLong_FromUnsignedLong(G_PARAM_SPEC_ULONG(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_INT64(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum", "name",
+ "nick", "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyLong_FromLongLong(G_PARAM_SPEC_INT64(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyLong_FromLongLong(G_PARAM_SPEC_INT64(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyLong_FromLongLong(G_PARAM_SPEC_INT64(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_UINT64(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "maximum", "minimum",
+ "name", "nick", "owner_type",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyLong_FromUnsignedLongLong(G_PARAM_SPEC_UINT64(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyLong_FromUnsignedLongLong(G_PARAM_SPEC_UINT64(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyLong_FromUnsignedLongLong(G_PARAM_SPEC_UINT64(pspec)->maximum);
+ }
+ } else if (G_IS_PARAM_SPEC_UNICHAR(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[sssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "name", "nick", "owner_type",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return _PyUnicode_FromFormat(
+ "%c", G_PARAM_SPEC_UNICHAR(pspec)->default_value);
+ }
+ } else if (G_IS_PARAM_SPEC_ENUM(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[ssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value", "enum_class",
+ "flags", "name", "nick", "owner_type",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return pyg_enum_from_gtype(
+ pspec->value_type, G_PARAM_SPEC_ENUM(pspec)->default_value);
+ } else if (!strcmp(attr, "enum_class")) {
+ return pygenum_from_pspec(pspec);
+ }
+ } else if (G_IS_PARAM_SPEC_FLAGS(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[ssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value",
+ "flags", "flags_class", "name", "nick",
+ "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return pyg_flags_from_gtype(
+ pspec->value_type, G_PARAM_SPEC_FLAGS(pspec)->default_value);
+ } else if (!strcmp(attr, "flags_class")) {
+ return pygflags_from_pspec(pspec);
+ }
+ } else if (G_IS_PARAM_SPEC_FLOAT(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[ssssssssssss]", "__doc__", "__gtype__",
+ "blurb", "epsilon",
+ "flags", "maximum", "minimum", "name", "nick", "owner_type",
+ "value_type",
+ "default_value");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->maximum);
+ } else if (!strcmp(attr, "epsilon")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->epsilon);
+ }
+ } else if (G_IS_PARAM_SPEC_DOUBLE(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[ssssssssssss]", "__doc__", "__gtype__",
+ "blurb", "default_value", "epsilon",
+ "flags", "maximum", "minimum", "name", "nick",
+ "owner_type", "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return PyFloat_FromDouble(
+ G_PARAM_SPEC_DOUBLE(pspec)->default_value);
+ } else if (!strcmp(attr, "minimum")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_DOUBLE(pspec)->minimum);
+ } else if (!strcmp(attr, "maximum")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_DOUBLE(pspec)->maximum);
+ } else if (!strcmp(attr, "epsilon")) {
+ return PyFloat_FromDouble(G_PARAM_SPEC_DOUBLE(pspec)->epsilon);
+ }
+ } else if (G_IS_PARAM_SPEC_STRING(pspec)) {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[ssssssssssssss]", "__doc__", "__gtype__",
+ "blurb", "cset_firth", "cset_nth", "default_value",
+ "ensure_non_null", "flags", "name", "nick",
+ "null_fold_if_empty", "owner_type", "substitutor",
+ "value_type");
+ } else if (!strcmp(attr, "default_value")) {
+ return Py_BuildValue(
+ "s", G_PARAM_SPEC_STRING(pspec)->default_value);
+ } else if (!strcmp(attr, "cset_first")) {
+ return Py_BuildValue(
+ "s", G_PARAM_SPEC_STRING(pspec)->cset_first);
+ } else if (!strcmp(attr, "cset_nth")) {
+ return Py_BuildValue(
+ "s", G_PARAM_SPEC_STRING(pspec)->cset_nth);
+ } else if (!strcmp(attr, "substitutor")) {
+ return Py_BuildValue(
+ "c", G_PARAM_SPEC_STRING(pspec)->substitutor);
+ } else if (!strcmp(attr, "null_fold_if_empty")) {
+ return PyBool_FromLong(
+ G_PARAM_SPEC_STRING(pspec)->null_fold_if_empty);
+ } else if (!strcmp(attr, "ensure_non_null")) {
+ return PyBool_FromLong(
+ G_PARAM_SPEC_STRING(pspec)->ensure_non_null);
+ }
+ } else {
+ if (!strcmp(attr, "__members__")) {
+ return Py_BuildValue("[ssssssss]", "__doc__", "__gtype__", "blurb",
+ "flags", "name", "nick",
+ "owner_type", "value_type");
+
+ /* This is actually not what's exported by GObjects paramspecs,
+ * But we exported this in earlier versions, so it's better to keep it here
+ * compatibility. But don't add it in __members__, to "hide" it.
+ */
+ } else if (!strcmp(attr, "default_value")) {
+ /* XXX: Raise deprecation warning */
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+
+ PyErr_SetString(PyExc_AttributeError, attr);
+ return NULL;
+}
+
+/**
+ * pyg_param_spec_new:
+ * @pspec: a GParamSpec.
+ *
+ * Creates a wrapper for a GParamSpec.
+ *
+ * Returns: the GParamSpec wrapper.
+ */
+PyObject *
+pyg_param_spec_new(GParamSpec *pspec)
+{
+ PyGParamSpec *self;
+
+ self = (PyGParamSpec *)PyObject_NEW(PyGParamSpec,
+ &PyGParamSpec_Type);
+ if (self == NULL)
+ return NULL;
+
+ self->pspec = g_param_spec_ref(pspec);
+ return (PyObject *)self;
+}
+
+void
+pygobject_paramspec_register_types(PyObject *d)
+{
+ Py_TYPE(&PyGParamSpec_Type) = &PyType_Type;
+ PyGParamSpec_Type.tp_dealloc = (destructor)pyg_param_spec_dealloc;
+ PyGParamSpec_Type.tp_getattr = (getattrfunc)pyg_param_spec_getattr;
+ PyGParamSpec_Type.tp_compare = (cmpfunc)pyg_param_spec_compare;
+ PyGParamSpec_Type.tp_repr = (reprfunc)pyg_param_spec_repr;
+ PyGParamSpec_Type.tp_hash = (hashfunc)pyg_param_spec_hash;
+
+ if (PyType_Ready(&PyGParamSpec_Type))
+ return;
+ PyDict_SetItemString(d, "GParamSpec", (PyObject *)&PyGParamSpec_Type);
+}
diff --git a/gobject/pygparamspec.h b/gobject/pygparamspec.h
new file mode 100644
index 0000000..64aab0c
--- /dev/null
+++ b/gobject/pygparamspec.h
@@ -0,0 +1,31 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ * pyginterface.c: wrapper for the gobject library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_PARAMSPEC_H__
+#define __PYGOBJECT_PARAMSPEC_H__
+
+extern PyTypeObject PyGParamSpec_Type;
+PyObject * pyg_param_spec_new (GParamSpec *pspec);
+
+void pygobject_paramspec_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_PARAMSPEC_H__ */
diff --git a/gobject/pygpointer.c b/gobject/pygpointer.c
new file mode 100644
index 0000000..5f6417f
--- /dev/null
+++ b/gobject/pygpointer.c
@@ -0,0 +1,193 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ *
+ * pygpointer.c: wrapper for GPointer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pygpointer.h"
+
+#include "pygi-external.h"
+
+
+GQuark pygpointer_class_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GPointer", PyGPointer_Type, PyGPointer);
+
+static void
+pyg_pointer_dealloc(PyGPointer *self)
+{
+ Py_TYPE(self)->tp_free((PyObject *)self);
+}
+
+static int
+pyg_pointer_compare(PyGPointer *self, PyGPointer *v)
+{
+ if (self->pointer == v->pointer) return 0;
+ if (self->pointer > v->pointer) return -1;
+ return 1;
+}
+
+static long
+pyg_pointer_hash(PyGPointer *self)
+{
+ return (long)self->pointer;
+}
+
+static PyObject *
+pyg_pointer_repr(PyGPointer *self)
+{
+ gchar buf[128];
+
+ g_snprintf(buf, sizeof(buf), "<%s at 0x%lx>", g_type_name(self->gtype),
+ (long)self->pointer);
+ return _PyUnicode_FromString(buf);
+}
+
+static int
+pyg_pointer_init(PyGPointer *self, PyObject *args, PyObject *kwargs)
+{
+ gchar buf[512];
+
+ if (!PyArg_ParseTuple(args, ":GPointer.__init__"))
+ return -1;
+
+ self->pointer = NULL;
+ self->gtype = 0;
+
+ g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+ Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_NotImplementedError, buf);
+ return -1;
+}
+
+static void
+pyg_pointer_free(PyObject *op)
+{
+ PyObject_FREE(op);
+}
+
+/**
+ * pyg_register_pointer:
+ * @dict: the module dictionary to store the wrapper class.
+ * @class_name: the Python name for the wrapper class.
+ * @pointer_type: the GType of the pointer type being wrapped.
+ * @type: the wrapper class.
+ *
+ * Registers a wrapper for a pointer type. The wrapper class will be
+ * a subclass of gobject.GPointer, and a reference to the wrapper
+ * class will be stored in the provided module dictionary.
+ */
+void
+pyg_register_pointer(PyObject *dict, const gchar *class_name,
+ GType pointer_type, PyTypeObject *type)
+{
+ PyObject *o;
+
+ g_return_if_fail(dict != NULL);
+ g_return_if_fail(class_name != NULL);
+ g_return_if_fail(pointer_type != 0);
+
+ if (!type->tp_dealloc) type->tp_dealloc = (destructor)pyg_pointer_dealloc;
+
+ Py_TYPE(type) = &PyType_Type;
+ type->tp_base = &PyGPointer_Type;
+
+ if (PyType_Ready(type) < 0) {
+ g_warning("could not get type `%s' ready", type->tp_name);
+ return;
+ }
+
+ PyDict_SetItemString(type->tp_dict, "__gtype__",
+ o=pyg_type_wrapper_new(pointer_type));
+ Py_DECREF(o);
+
+ g_type_set_qdata(pointer_type, pygpointer_class_key, type);
+
+ PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+}
+
+/**
+ * pyg_pointer_new:
+ * @pointer_type: the GType of the pointer value.
+ * @pointer: the pointer value.
+ *
+ * Creates a wrapper for a pointer value. Since G_TYPE_POINTER types
+ * don't register any information about how to copy/free them, there
+ * is no guarantee that the pointer will remain valid, and there is
+ * nothing registered to release the pointer when the pointer goes out
+ * of scope. This is why we don't recommend people use these types.
+ *
+ * Returns: the boxed wrapper.
+ */
+PyObject *
+pyg_pointer_new(GType pointer_type, gpointer pointer)
+{
+ PyGILState_STATE state;
+ PyGPointer *self;
+ PyTypeObject *tp;
+ g_return_val_if_fail(pointer_type != 0, NULL);
+
+ state = pyglib_gil_state_ensure();
+
+ if (!pointer) {
+ Py_INCREF(Py_None);
+ pyglib_gil_state_release(state);
+ return Py_None;
+ }
+
+ tp = g_type_get_qdata(pointer_type, pygpointer_class_key);
+
+ if (!tp)
+ tp = (PyTypeObject *)pygi_type_import_by_g_type(pointer_type);
+
+ if (!tp)
+ tp = (PyTypeObject *)&PyGPointer_Type; /* fallback */
+ self = PyObject_NEW(PyGPointer, tp);
+
+ pyglib_gil_state_release(state);
+
+ if (self == NULL)
+ return NULL;
+
+ self->pointer = pointer;
+ self->gtype = pointer_type;
+
+ return (PyObject *)self;
+}
+
+void
+pygobject_pointer_register_types(PyObject *d)
+{
+ pygpointer_class_key = g_quark_from_static_string("PyGPointer::class");
+
+ PyGPointer_Type.tp_dealloc = (destructor)pyg_pointer_dealloc;
+ PyGPointer_Type.tp_compare = (cmpfunc)pyg_pointer_compare;
+ PyGPointer_Type.tp_repr = (reprfunc)pyg_pointer_repr;
+ PyGPointer_Type.tp_hash = (hashfunc)pyg_pointer_hash;
+ PyGPointer_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+ PyGPointer_Type.tp_init = (initproc)pyg_pointer_init;
+ PyGPointer_Type.tp_free = (freefunc)pyg_pointer_free;
+ PYGOBJECT_REGISTER_GTYPE(d, PyGPointer_Type, "GPointer", G_TYPE_POINTER);
+}
diff --git a/gobject/pygpointer.h b/gobject/pygpointer.h
new file mode 100644
index 0000000..f2923da
--- /dev/null
+++ b/gobject/pygpointer.h
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_POINTER_H__
+#define __PYGOBJECT_POINTER_H__
+
+void pygobject_pointer_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_POINTER_H__ */
diff --git a/gobject/pygtype.c b/gobject/pygtype.c
new file mode 100644
index 0000000..5550ce8
--- /dev/null
+++ b/gobject/pygtype.c
@@ -0,0 +1,1779 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ *
+ * pygtype.c: glue code to wrap the GType code.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <pyglib.h>
+
+#include "pygobject-private.h"
+#include "pygparamspec.h"
+#include "pygtype.h"
+
+/* -------------- __gtype__ objects ---------------------------- */
+
+typedef struct {
+ PyObject_HEAD
+ GType type;
+} PyGTypeWrapper;
+
+PYGLIB_DEFINE_TYPE("gobject.GType", PyGTypeWrapper_Type, PyGTypeWrapper);
+
+static int
+pyg_type_wrapper_compare(PyGTypeWrapper *self, PyGTypeWrapper *v)
+{
+ if (self->type == v->type) return 0;
+ if (self->type > v->type) return -1;
+ return 1;
+}
+
+static long
+pyg_type_wrapper_hash(PyGTypeWrapper *self)
+{
+ return (long)self->type;
+}
+
+static PyObject *
+pyg_type_wrapper_repr(PyGTypeWrapper *self)
+{
+ char buf[80];
+ const gchar *name = g_type_name(self->type);
+
+ g_snprintf(buf, sizeof(buf), "<GType %s (%lu)>",
+ name?name:"invalid", (unsigned long int) self->type);
+ return _PyUnicode_FromString(buf);
+}
+
+static void
+pyg_type_wrapper_dealloc(PyGTypeWrapper *self)
+{
+ PyObject_DEL(self);
+}
+
+static GQuark
+_pyg_type_key(GType type) {
+ GQuark key;
+
+ if (g_type_is_a(type, G_TYPE_INTERFACE)) {
+ key = pyginterface_type_key;
+ } else if (g_type_is_a(type, G_TYPE_ENUM)) {
+ key = pygenum_class_key;
+ } else if (g_type_is_a(type, G_TYPE_FLAGS)) {
+ key = pygflags_class_key;
+ } else if (g_type_is_a(type, G_TYPE_POINTER)) {
+ key = pygpointer_class_key;
+ } else if (g_type_is_a(type, G_TYPE_BOXED)) {
+ key = pygboxed_type_key;
+ } else {
+ key = pygobject_class_key;
+ }
+
+ return key;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_pytype(PyGTypeWrapper *self, void *closure)
+{
+ GQuark key;
+ PyObject *py_type;
+
+ key = _pyg_type_key(self->type);
+
+ py_type = g_type_get_qdata(self->type, key);
+ if (!py_type)
+ py_type = Py_None;
+
+ Py_INCREF(py_type);
+ return py_type;
+}
+
+static int
+_wrap_g_type_wrapper__set_pytype(PyGTypeWrapper *self, PyObject* value, void *closure)
+{
+ GQuark key;
+ PyObject *py_type;
+
+ key = _pyg_type_key(self->type);
+
+ py_type = g_type_get_qdata(self->type, key);
+ Py_CLEAR(py_type);
+ if (value == Py_None)
+ g_type_set_qdata(self->type, key, NULL);
+ else if (PyType_Check(value)) {
+ Py_INCREF(value);
+ g_type_set_qdata(self->type, key, value);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "Value must be None or a type object");
+ return -1;
+ }
+
+ return 0;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_name(PyGTypeWrapper *self, void *closure)
+{
+ const char *name = g_type_name(self->type);
+ return _PyUnicode_FromString(name ? name : "invalid");
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_parent(PyGTypeWrapper *self, void *closure)
+{
+ return pyg_type_wrapper_new(g_type_parent(self->type));
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_fundamental(PyGTypeWrapper *self, void *closure)
+{
+ return pyg_type_wrapper_new(g_type_fundamental(self->type));
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_children(PyGTypeWrapper *self, void *closure)
+{
+ guint n_children, i;
+ GType *children;
+ PyObject *retval;
+
+ children = g_type_children(self->type, &n_children);
+
+ retval = PyList_New(n_children);
+ for (i = 0; i < n_children; i++)
+ PyList_SetItem(retval, i, pyg_type_wrapper_new(children[i]));
+ g_free(children);
+
+ return retval;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_interfaces(PyGTypeWrapper *self, void *closure)
+{
+ guint n_interfaces, i;
+ GType *interfaces;
+ PyObject *retval;
+
+ interfaces = g_type_interfaces(self->type, &n_interfaces);
+
+ retval = PyList_New(n_interfaces);
+ for (i = 0; i < n_interfaces; i++)
+ PyList_SetItem(retval, i, pyg_type_wrapper_new(interfaces[i]));
+ g_free(interfaces);
+
+ return retval;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_depth(PyGTypeWrapper *self, void *closure)
+{
+ return _PyLong_FromLong(g_type_depth(self->type));
+}
+
+static PyGetSetDef _PyGTypeWrapper_getsets[] = {
+ { "pytype", (getter)_wrap_g_type_wrapper__get_pytype, (setter)_wrap_g_type_wrapper__set_pytype },
+ { "name", (getter)_wrap_g_type_wrapper__get_name, (setter)0 },
+ { "fundamental", (getter)_wrap_g_type_wrapper__get_fundamental, (setter)0 },
+ { "parent", (getter)_wrap_g_type_wrapper__get_parent, (setter)0 },
+ { "children", (getter)_wrap_g_type_wrapper__get_children, (setter)0 },
+ { "interfaces", (getter)_wrap_g_type_wrapper__get_interfaces, (setter)0 },
+ { "depth", (getter)_wrap_g_type_wrapper__get_depth, (setter)0 },
+ { NULL, (getter)0, (setter)0 }
+};
+
+static PyObject*
+_wrap_g_type_is_interface(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_INTERFACE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_classed(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_CLASSED(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_instantiatable(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_INSTANTIATABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_derivable(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_DERIVABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_deep_derivable(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_DEEP_DERIVABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_abstract(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_ABSTRACT(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_value_abstract(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_VALUE_ABSTRACT(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_value_type(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_IS_VALUE_TYPE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_has_value_table(PyGTypeWrapper *self)
+{
+ return PyBool_FromLong(G_TYPE_HAS_VALUE_TABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_from_name(PyGTypeWrapper *_, PyObject *args)
+{
+ char *type_name;
+ GType type;
+
+ if (!PyArg_ParseTuple(args, "s:GType.from_name", &type_name))
+ return NULL;
+
+ type = _pyg_type_from_name(type_name);
+ if (type == 0) {
+ PyErr_SetString(PyExc_RuntimeError, "unknown type name");
+ return NULL;
+ }
+
+ return pyg_type_wrapper_new(type);
+}
+
+static PyObject*
+_wrap_g_type_is_a(PyGTypeWrapper *self, PyObject *args)
+{
+ PyObject *gparent;
+ GType parent;
+
+ if (!PyArg_ParseTuple(args, "O:GType.is_a", &gparent))
+ return NULL;
+ else if ((parent = pyg_type_from_object(gparent)) == 0)
+ return NULL;
+
+ return PyBool_FromLong(g_type_is_a(self->type, parent));
+}
+
+static PyMethodDef _PyGTypeWrapper_methods[] = {
+ { "is_interface", (PyCFunction)_wrap_g_type_is_interface, METH_NOARGS },
+ { "is_classed", (PyCFunction)_wrap_g_type_is_classed, METH_NOARGS },
+ { "is_instantiatable", (PyCFunction)_wrap_g_type_is_instantiatable, METH_NOARGS },
+ { "is_derivable", (PyCFunction)_wrap_g_type_is_derivable, METH_NOARGS },
+ { "is_deep_derivable", (PyCFunction)_wrap_g_type_is_deep_derivable, METH_NOARGS },
+ { "is_abstract", (PyCFunction)_wrap_g_type_is_abstract, METH_NOARGS },
+ { "is_value_abstract", (PyCFunction)_wrap_g_type_is_value_abstract, METH_NOARGS },
+ { "is_value_type", (PyCFunction)_wrap_g_type_is_value_type, METH_NOARGS },
+ { "has_value_table", (PyCFunction)_wrap_g_type_has_value_table, METH_NOARGS },
+ { "from_name", (PyCFunction)_wrap_g_type_from_name, METH_VARARGS | METH_STATIC },
+ { "is_a", (PyCFunction)_wrap_g_type_is_a, METH_VARARGS },
+ { NULL, 0, 0 }
+};
+
+static int
+pyg_type_wrapper_init(PyGTypeWrapper *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "object", NULL };
+ PyObject *py_object;
+ GType type;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:GType.__init__",
+ kwlist, &py_object))
+ return -1;
+
+ if (!(type = pyg_type_from_object(py_object)))
+ return -1;
+
+ self->type = type;
+
+ return 0;
+}
+
+/**
+ * pyg_type_wrapper_new:
+ * type: a GType
+ *
+ * Creates a Python wrapper for a GType.
+ *
+ * Returns: the Python wrapper.
+ */
+PyObject *
+pyg_type_wrapper_new(GType type)
+{
+ PyGTypeWrapper *self;
+
+ self = (PyGTypeWrapper *)PyObject_NEW(PyGTypeWrapper,
+ &PyGTypeWrapper_Type);
+ if (self == NULL)
+ return NULL;
+
+ self->type = type;
+ return (PyObject *)self;
+}
+
+/**
+ * pyg_type_from_object:
+ * obj: a Python object
+ *
+ * converts a python object to a GType. Raises an exception if it
+ * can't perform the conversion.
+ *
+ * Returns: the corresponding GType, or 0 on error.
+ */
+GType
+pyg_type_from_object(PyObject *obj)
+{
+ PyObject *gtype;
+ GType type;
+
+ /* NULL check */
+ if (!obj) {
+ PyErr_SetString(PyExc_TypeError, "can't get type from NULL object");
+ return 0;
+ }
+
+ /* map some standard types to primitive GTypes ... */
+ if (obj == Py_None)
+ return G_TYPE_NONE;
+ if (PyType_Check(obj)) {
+ PyTypeObject *tp = (PyTypeObject *)obj;
+
+ if (tp == &_PyLong_Type)
+ return G_TYPE_INT;
+ else if (tp == &PyBool_Type)
+ return G_TYPE_BOOLEAN;
+ else if (tp == &PyLong_Type)
+ return G_TYPE_LONG;
+ else if (tp == &PyFloat_Type)
+ return G_TYPE_DOUBLE;
+ else if (tp == &_PyUnicode_Type)
+ return G_TYPE_STRING;
+ else if (tp == &PyBaseObject_Type)
+ return PY_TYPE_OBJECT;
+ }
+
+ if (Py_TYPE(obj) == &PyGTypeWrapper_Type) {
+ return ((PyGTypeWrapper *)obj)->type;
+ }
+
+ /* handle strings */
+ if (_PyUnicode_Check(obj)) {
+ gchar *name = _PyUnicode_AsString(obj);
+
+ type = _pyg_type_from_name(name);
+ if (type != 0) {
+ return type;
+ }
+ }
+
+ /* finally, look for a __gtype__ attribute on the object */
+ gtype = PyObject_GetAttrString(obj, "__gtype__");
+
+ if (gtype) {
+ if (Py_TYPE(gtype) == &PyGTypeWrapper_Type) {
+ type = ((PyGTypeWrapper *)gtype)->type;
+ Py_DECREF(gtype);
+ return type;
+ }
+ Py_DECREF(gtype);
+ }
+
+ PyErr_Clear();
+ PyErr_SetString(PyExc_TypeError, "could not get typecode from object");
+ return 0;
+}
+
+/* -------------- GValue marshalling ------------------ */
+
+/**
+ * pyg_enum_get_value:
+ * @enum_type: the GType of the flag.
+ * @obj: a Python object representing the flag value
+ * @val: a pointer to the location to store the integer representation of the flag.
+ *
+ * Converts a Python object to the integer equivalent. The conversion
+ * will depend on the type of the Python object. If the object is an
+ * integer, it is passed through directly. If it is a string, it will
+ * be treated as a full or short enum name as defined in the GType.
+ *
+ * Returns: 0 on success or -1 on failure
+ */
+gint
+pyg_enum_get_value(GType enum_type, PyObject *obj, gint *val)
+{
+ GEnumClass *eclass = NULL;
+ gint res = -1;
+
+ g_return_val_if_fail(val != NULL, -1);
+ if (!obj) {
+ *val = 0;
+ res = 0;
+ } else if (_PyLong_Check(obj)) {
+ *val = _PyLong_AsLong(obj);
+ res = 0;
+
+ if (PyObject_TypeCheck(obj, &PyGEnum_Type) && ((PyGEnum *) obj)->gtype != enum_type) {
+ g_warning("expected enumeration type %s, but got %s instead",
+ g_type_name(enum_type),
+ g_type_name(((PyGEnum *) obj)->gtype));
+ }
+ /* Dumb code duplication, but probably not worth it to have yet another macro. */
+ } else if (PyLong_Check(obj)) {
+ *val = PyLong_AsLong(obj);
+ res = 0;
+
+ if (PyObject_TypeCheck(obj, &PyGEnum_Type) && ((PyGEnum *) obj)->gtype != enum_type) {
+ g_warning("expected enumeration type %s, but got %s instead",
+ g_type_name(enum_type),
+ g_type_name(((PyGEnum *) obj)->gtype));
+ }
+ } else if (_PyUnicode_Check(obj)) {
+ GEnumValue *info;
+ char *str = _PyUnicode_AsString(obj);
+
+ if (enum_type != G_TYPE_NONE)
+ eclass = G_ENUM_CLASS(g_type_class_ref(enum_type));
+ else {
+ PyErr_SetString(PyExc_TypeError, "could not convert string to enum because there is no GType associated to look up the value");
+ res = -1;
+ }
+ info = g_enum_get_value_by_name(eclass, str);
+ g_type_class_unref(eclass);
+
+ if (!info)
+ info = g_enum_get_value_by_nick(eclass, str);
+ if (info) {
+ *val = info->value;
+ res = 0;
+ } else {
+ PyErr_SetString(PyExc_TypeError, "could not convert string");
+ res = -1;
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,"enum values must be strings or ints");
+ res = -1;
+ }
+ return res;
+}
+
+/**
+ * pyg_flags_get_value:
+ * @flag_type: the GType of the flag.
+ * @obj: a Python object representing the flag value
+ * @val: a pointer to the location to store the integer representation of the flag.
+ *
+ * Converts a Python object to the integer equivalent. The conversion
+ * will depend on the type of the Python object. If the object is an
+ * integer, it is passed through directly. If it is a string, it will
+ * be treated as a full or short flag name as defined in the GType.
+ * If it is a tuple, then the items are treated as strings and ORed
+ * together.
+ *
+ * Returns: 0 on success or -1 on failure
+ */
+gint
+pyg_flags_get_value(GType flag_type, PyObject *obj, gint *val)
+{
+ GFlagsClass *fclass = NULL;
+ gint res = -1;
+
+ g_return_val_if_fail(val != NULL, -1);
+ if (!obj) {
+ *val = 0;
+ res = 0;
+ } else if (_PyLong_Check(obj)) {
+ *val = _PyLong_AsLong(obj);
+ res = 0;
+ } else if (PyLong_Check(obj)) {
+ *val = PyLong_AsLongLong(obj);
+ res = 0;
+ } else if (_PyUnicode_Check(obj)) {
+ GFlagsValue *info;
+ char *str = _PyUnicode_AsString(obj);
+
+ if (flag_type != G_TYPE_NONE)
+ fclass = G_FLAGS_CLASS(g_type_class_ref(flag_type));
+ else {
+ PyErr_SetString(PyExc_TypeError, "could not convert string to flag because there is no GType associated to look up the value");
+ res = -1;
+ }
+ info = g_flags_get_value_by_name(fclass, str);
+ g_type_class_unref(fclass);
+
+ if (!info)
+ info = g_flags_get_value_by_nick(fclass, str);
+ if (info) {
+ *val = info->value;
+ res = 0;
+ } else {
+ PyErr_SetString(PyExc_TypeError, "could not convert string");
+ res = -1;
+ }
+ } else if (PyTuple_Check(obj)) {
+ int i, len;
+
+ len = PyTuple_Size(obj);
+ *val = 0;
+ res = 0;
+
+ if (flag_type != G_TYPE_NONE)
+ fclass = G_FLAGS_CLASS(g_type_class_ref(flag_type));
+ else {
+ PyErr_SetString(PyExc_TypeError, "could not convert string to flag because there is no GType associated to look up the value");
+ res = -1;
+ }
+
+ for (i = 0; i < len; i++) {
+ PyObject *item = PyTuple_GetItem(obj, i);
+ char *str = _PyUnicode_AsString(item);
+ GFlagsValue *info = g_flags_get_value_by_name(fclass, str);
+
+ if (!info)
+ info = g_flags_get_value_by_nick(fclass, str);
+ if (info) {
+ *val |= info->value;
+ } else {
+ PyErr_SetString(PyExc_TypeError, "could not convert string");
+ res = -1;
+ break;
+ }
+ }
+ g_type_class_unref(fclass);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "flag values must be strings, ints, longs, or tuples");
+ res = -1;
+ }
+ return res;
+}
+
+typedef struct {
+ fromvaluefunc fromvalue;
+ tovaluefunc tovalue;
+} PyGTypeMarshal;
+static GQuark pyg_type_marshal_key = 0;
+
+static PyGTypeMarshal *
+pyg_type_lookup(GType type)
+{
+ GType ptype = type;
+ PyGTypeMarshal *tm = NULL;
+
+ /* recursively lookup types */
+ while (ptype) {
+ if ((tm = g_type_get_qdata(ptype, pyg_type_marshal_key)) != NULL)
+ break;
+ ptype = g_type_parent(ptype);
+ }
+ return tm;
+}
+
+/**
+ * pyg_register_gtype_custom:
+ * @gtype: the GType for the new type
+ * @from_func: a function to convert GValues to Python objects
+ * @to_func: a function to convert Python objects to GValues
+ *
+ * In order to handle specific conversion of gboxed types or new
+ * fundamental types, you may use this function to register conversion
+ * handlers.
+ */
+
+void
+pyg_register_gtype_custom(GType gtype,
+ fromvaluefunc from_func,
+ tovaluefunc to_func)
+{
+ PyGTypeMarshal *tm;
+
+ if (!pyg_type_marshal_key)
+ pyg_type_marshal_key = g_quark_from_static_string("PyGType::marshal");
+
+ tm = g_new(PyGTypeMarshal, 1);
+ tm->fromvalue = from_func;
+ tm->tovalue = to_func;
+ g_type_set_qdata(gtype, pyg_type_marshal_key, tm);
+}
+
+static int
+pyg_value_array_from_pyobject(GValue *value,
+ PyObject *obj,
+ const GParamSpecValueArray *pspec)
+{
+ int len;
+ GValueArray *value_array;
+ int i;
+
+ len = PySequence_Length(obj);
+ if (len == -1) {
+ PyErr_Clear();
+ return -1;
+ }
+
+ if (pspec && pspec->fixed_n_elements > 0 && len != pspec->fixed_n_elements)
+ return -1;
+
+ value_array = g_value_array_new(len);
+
+ for (i = 0; i < len; ++i) {
+ PyObject *item = PySequence_GetItem(obj, i);
+ GType type;
+ GValue item_value = { 0, };
+ int status;
+
+ if (! item) {
+ PyErr_Clear();
+ g_value_array_free(value_array);
+ return -1;
+ }
+
+ if (pspec && pspec->element_spec)
+ type = G_PARAM_SPEC_VALUE_TYPE(pspec->element_spec);
+ else if (item == Py_None)
+ type = G_TYPE_POINTER; /* store None as NULL */
+ else {
+ type = pyg_type_from_object((PyObject*)Py_TYPE(item));
+ if (! type) {
+ PyErr_Clear();
+ g_value_array_free(value_array);
+ Py_DECREF(item);
+ return -1;
+ }
+ }
+
+ g_value_init(&item_value, type);
+ status = (pspec && pspec->element_spec)
+ ? pyg_param_gvalue_from_pyobject(&item_value, item, pspec->element_spec)
+ : pyg_value_from_pyobject(&item_value, item);
+ Py_DECREF(item);
+
+ if (status == -1) {
+ g_value_array_free(value_array);
+ g_value_unset(&item_value);
+ return -1;
+ }
+
+ g_value_array_append(value_array, &item_value);
+ g_value_unset(&item_value);
+ }
+
+ g_value_take_boxed(value, value_array);
+ return 0;
+}
+
+/**
+ * pyg_value_from_pyobject:
+ * @value: the GValue object to store the converted value in.
+ * @obj: the Python object to convert.
+ *
+ * This function converts a Python object and stores the result in a
+ * GValue. The GValue must be initialised in advance with
+ * g_value_init(). If the Python object can't be converted to the
+ * type of the GValue, then an error is returned.
+ *
+ * Returns: 0 on success, -1 on error.
+ */
+int
+pyg_value_from_pyobject(GValue *value, PyObject *obj)
+{
+ PyObject *tmp;
+
+ switch (G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value))) {
+ case G_TYPE_INTERFACE:
+ /* we only handle interface types that have a GObject prereq */
+ if (g_type_is_a(G_VALUE_TYPE(value), G_TYPE_OBJECT)) {
+ if (obj == Py_None)
+ g_value_set_object(value, NULL);
+ else {
+ if (!PyObject_TypeCheck(obj, &PyGObject_Type)) {
+ return -1;
+ }
+ if (!G_TYPE_CHECK_INSTANCE_TYPE(pygobject_get(obj),
+ G_VALUE_TYPE(value))) {
+ return -1;
+ }
+ g_value_set_object(value, pygobject_get(obj));
+ }
+ } else {
+ return -1;
+ }
+ break;
+ case G_TYPE_CHAR:
+ if ((tmp = PyObject_Str(obj)))
+ g_value_set_char(value, _PyUnicode_AsString(tmp)[0]);
+ else {
+ PyErr_Clear();
+ return -1;
+ }
+ Py_DECREF(tmp);
+ break;
+ case G_TYPE_UCHAR:
+ if (_PyLong_Check(obj)) {
+ glong val;
+ val = _PyLong_AsLong(obj);
+ if (val >= 0 && val <= 255)
+ g_value_set_uchar(value, (guchar)_PyLong_AsLong (obj));
+ else
+ return -1;
+ } else if ((tmp = PyObject_Str(obj))) {
+ g_value_set_uchar(value, _PyUnicode_AsString(tmp)[0]);
+ Py_DECREF(tmp);
+ } else {
+ PyErr_Clear();
+ return -1;
+ }
+ break;
+ case G_TYPE_BOOLEAN:
+ g_value_set_boolean(value, PyObject_IsTrue(obj));
+ break;
+ case G_TYPE_INT:
+ g_value_set_int(value, _PyLong_AsLong(obj));
+ break;
+ case G_TYPE_UINT:
+ {
+ if (_PyLong_Check(obj)) {
+ glong val;
+
+ val = _PyLong_AsLong(obj);
+ if (val >= 0 && val <= G_MAXUINT)
+ g_value_set_uint(value, (guint)val);
+ else
+ return -1;
+ } else {
+ g_value_set_uint(value, PyLong_AsUnsignedLong(obj));
+ }
+ }
+ break;
+ case G_TYPE_LONG:
+ g_value_set_long(value, _PyLong_AsLong(obj));
+ break;
+ case G_TYPE_ULONG:
+ {
+ if (_PyLong_Check(obj)) {
+ glong val;
+
+ val = _PyLong_AsLong(obj);
+ if (val >= 0)
+ g_value_set_ulong(value, (gulong)val);
+ else
+ return -1;
+ } else {
+ g_value_set_ulong(value, PyLong_AsUnsignedLong(obj));
+ }
+ }
+ break;
+ case G_TYPE_INT64:
+ g_value_set_int64(value, PyLong_AsLongLong(obj));
+ break;
+ case G_TYPE_UINT64:
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check(obj)) {
+ long v = PyInt_AsLong(obj);
+ if (v < 0) {
+ PyErr_SetString(PyExc_OverflowError, "negative value not allowed for uint64 property");
+ return -1;
+ }
+ g_value_set_uint64(value, v);
+ } else
+#endif
+ if (PyLong_Check(obj))
+ g_value_set_uint64(value, PyLong_AsUnsignedLongLong(obj));
+ else
+ return -1;
+ break;
+ case G_TYPE_ENUM:
+ {
+ gint val = 0;
+ if (pyg_enum_get_value(G_VALUE_TYPE(value), obj, &val) < 0) {
+ PyErr_Clear();
+ return -1;
+ }
+ g_value_set_enum(value, val);
+ }
+ break;
+ case G_TYPE_FLAGS:
+ {
+ gint val = 0;
+ if (pyg_flags_get_value(G_VALUE_TYPE(value), obj, &val) < 0) {
+ PyErr_Clear();
+ return -1;
+ }
+ g_value_set_flags(value, val);
+ }
+ break;
+ case G_TYPE_FLOAT:
+ g_value_set_float(value, PyFloat_AsDouble(obj));
+ break;
+ case G_TYPE_DOUBLE:
+ g_value_set_double(value, PyFloat_AsDouble(obj));
+ break;
+ case G_TYPE_STRING:
+ if (obj == Py_None)
+ g_value_set_string(value, NULL);
+ else if ((tmp = PyObject_Str(obj))) {
+ g_value_set_string(value, _PyUnicode_AsString(tmp));
+ Py_DECREF(tmp);
+ } else {
+ PyErr_Clear();
+ return -1;
+ }
+ break;
+ case G_TYPE_POINTER:
+ if (obj == Py_None)
+ g_value_set_pointer(value, NULL);
+ else if (PyObject_TypeCheck(obj, &PyGPointer_Type) &&
+ G_VALUE_HOLDS(value, ((PyGPointer *)obj)->gtype))
+ g_value_set_pointer(value, pyg_pointer_get(obj, gpointer));
+ else if (PyCObject_Check(obj))
+ g_value_set_pointer(value, PyCObject_AsVoidPtr(obj));
+ else
+ return -1;
+ break;
+ case G_TYPE_BOXED: {
+ PyGTypeMarshal *bm;
+
+ if (obj == Py_None)
+ g_value_set_boxed(value, NULL);
+ else if (G_VALUE_HOLDS(value, PY_TYPE_OBJECT))
+ g_value_set_boxed(value, obj);
+ else if (PyObject_TypeCheck(obj, &PyGBoxed_Type) &&
+ G_VALUE_HOLDS(value, ((PyGBoxed *)obj)->gtype))
+ g_value_set_boxed(value, pyg_boxed_get(obj, gpointer));
+ else if (G_VALUE_HOLDS(value, G_TYPE_VALUE)) {
+ GType type;
+ GValue *n_value;
+
+ type = pyg_type_from_object((PyObject*)Py_TYPE(obj));
+ if (G_UNLIKELY (! type)) {
+ PyErr_Clear();
+ return -1;
+ }
+ n_value = g_new0 (GValue, 1);
+ g_value_init (n_value, type);
+ g_value_take_boxed (value, n_value);
+ return pyg_value_from_pyobject (n_value, obj);
+ }
+ else if (PySequence_Check(obj) &&
+ G_VALUE_HOLDS(value, G_TYPE_VALUE_ARRAY))
+ return pyg_value_array_from_pyobject(value, obj, NULL);
+ else if (_PyUnicode_Check(obj) &&
+ G_VALUE_HOLDS(value, G_TYPE_GSTRING)) {
+ GString *string;
+ char *buffer;
+ Py_ssize_t len;
+ if (_PyUnicode_AsStringAndSize(obj, &buffer, &len))
+ return -1;
+ string = g_string_new_len(buffer, len);
+ g_value_set_boxed(value, string);
+ g_string_free (string, TRUE);
+ break;
+ }
+ else if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))) != NULL)
+ return bm->tovalue(value, obj);
+ else if (PyCObject_Check(obj))
+ g_value_set_boxed(value, PyCObject_AsVoidPtr(obj));
+ else
+ return -1;
+ break;
+ }
+ case G_TYPE_PARAM:
+ if (PyGParamSpec_Check(obj))
+ g_value_set_param(value, PyCObject_AsVoidPtr(obj));
+ else
+ return -1;
+ break;
+ case G_TYPE_OBJECT:
+ if (obj == Py_None) {
+ g_value_set_object(value, NULL);
+ } else if (PyObject_TypeCheck(obj, &PyGObject_Type) &&
+ G_TYPE_CHECK_INSTANCE_TYPE(pygobject_get(obj),
+ G_VALUE_TYPE(value))) {
+ g_value_set_object(value, pygobject_get(obj));
+ } else
+ return -1;
+ break;
+ default:
+ {
+ PyGTypeMarshal *bm;
+ if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))) != NULL)
+ return bm->tovalue(value, obj);
+ break;
+ }
+ }
+ if (PyErr_Occurred()) {
+ g_value_unset(value);
+ PyErr_Clear();
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * pyg_value_as_pyobject:
+ * @value: the GValue object.
+ * @copy_boxed: true if boxed values should be copied.
+ *
+ * This function creates/returns a Python wrapper object that
+ * represents the GValue passed as an argument.
+ *
+ * Returns: a PyObject representing the value.
+ */
+PyObject *
+pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
+{
+ gchar buf[128];
+
+ switch (G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value))) {
+ case G_TYPE_INTERFACE:
+ if (g_type_is_a(G_VALUE_TYPE(value), G_TYPE_OBJECT))
+ return pygobject_new(g_value_get_object(value));
+ else
+ break;
+ case G_TYPE_CHAR: {
+ gint8 val = g_value_get_char(value);
+ return _PyUnicode_FromStringAndSize((char *)&val, 1);
+ }
+ case G_TYPE_UCHAR: {
+ guint8 val = g_value_get_uchar(value);
+ return _PyUnicode_FromStringAndSize((char *)&val, 1);
+ }
+ case G_TYPE_BOOLEAN: {
+ return PyBool_FromLong(g_value_get_boolean(value));
+ }
+ case G_TYPE_INT:
+ return _PyLong_FromLong(g_value_get_int(value));
+ case G_TYPE_UINT:
+ {
+ /* in Python, the Int object is backed by a long. If a
+ long can hold the whole value of an unsigned int, use
+ an Int. Otherwise, use a Long object to avoid overflow.
+ This matches the ULongArg behavior in codegen/argtypes.h */
+#if (G_MAXUINT <= G_MAXLONG)
+ return _PyLong_FromLong((glong) g_value_get_uint(value));
+#else
+ return PyLong_FromUnsignedLong((gulong) g_value_get_uint(value));
+#endif
+ }
+ case G_TYPE_LONG:
+ return _PyLong_FromLong(g_value_get_long(value));
+ case G_TYPE_ULONG:
+ {
+ gulong val = g_value_get_ulong(value);
+
+ if (val <= G_MAXLONG)
+ return _PyLong_FromLong((glong) val);
+ else
+ return PyLong_FromUnsignedLong(val);
+ }
+ case G_TYPE_INT64:
+ {
+ gint64 val = g_value_get_int64(value);
+
+ if (G_MINLONG <= val && val <= G_MAXLONG)
+ return _PyLong_FromLong((glong) val);
+ else
+ return PyLong_FromLongLong(val);
+ }
+ case G_TYPE_UINT64:
+ {
+ guint64 val = g_value_get_uint64(value);
+
+ if (val <= G_MAXLONG)
+ return _PyLong_FromLong((glong) val);
+ else
+ return PyLong_FromUnsignedLongLong(val);
+ }
+ case G_TYPE_ENUM:
+ return pyg_enum_from_gtype(G_VALUE_TYPE(value), g_value_get_enum(value));
+ case G_TYPE_FLAGS:
+ return pyg_flags_from_gtype(G_VALUE_TYPE(value), g_value_get_flags(value));
+ case G_TYPE_FLOAT:
+ return PyFloat_FromDouble(g_value_get_float(value));
+ case G_TYPE_DOUBLE:
+ return PyFloat_FromDouble(g_value_get_double(value));
+ case G_TYPE_STRING:
+ {
+ const gchar *str = g_value_get_string(value);
+
+ if (str)
+ return _PyUnicode_FromString(str);
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ case G_TYPE_POINTER:
+ return pyg_pointer_new(G_VALUE_TYPE(value),
+ g_value_get_pointer(value));
+ case G_TYPE_BOXED: {
+ PyGTypeMarshal *bm;
+
+ if (G_VALUE_HOLDS(value, PY_TYPE_OBJECT)) {
+ PyObject *ret = (PyObject *)g_value_dup_boxed(value);
+ if (ret == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return ret;
+ } else if (G_VALUE_HOLDS(value, G_TYPE_VALUE)) {
+ GValue *n_value = g_value_get_boxed (value);
+ return pyg_value_as_pyobject(n_value, copy_boxed);
+ } else if (G_VALUE_HOLDS(value, G_TYPE_VALUE_ARRAY)) {
+ GValueArray *array = (GValueArray *) g_value_get_boxed(value);
+ PyObject *ret = PyList_New(array->n_values);
+ int i;
+ for (i = 0; i < array->n_values; ++i)
+ PyList_SET_ITEM(ret, i, pyg_value_as_pyobject
+ (array->values + i, copy_boxed));
+ return ret;
+ } else if (G_VALUE_HOLDS(value, G_TYPE_GSTRING)) {
+ GString *string = (GString *) g_value_get_boxed(value);
+ PyObject *ret = _PyUnicode_FromStringAndSize(string->str, string->len);
+ return ret;
+ }
+ bm = pyg_type_lookup(G_VALUE_TYPE(value));
+ if (bm) {
+ return bm->fromvalue(value);
+ } else {
+ if (copy_boxed)
+ return pyg_boxed_new(G_VALUE_TYPE(value),
+ g_value_get_boxed(value), TRUE, TRUE);
+ else
+ return pyg_boxed_new(G_VALUE_TYPE(value),
+ g_value_get_boxed(value),FALSE,FALSE);
+ }
+ }
+ case G_TYPE_PARAM:
+ return pyg_param_spec_new(g_value_get_param(value));
+ case G_TYPE_OBJECT:
+ return pygobject_new(g_value_get_object(value));
+ default:
+ {
+ PyGTypeMarshal *bm;
+ if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))))
+ return bm->fromvalue(value);
+ break;
+ }
+ }
+ g_snprintf(buf, sizeof(buf), "unknown type %s",
+ g_type_name(G_VALUE_TYPE(value)));
+ PyErr_SetString(PyExc_TypeError, buf);
+ return NULL;
+}
+
+/* -------------- PyGClosure ----------------- */
+
+static void
+pyg_closure_invalidate(gpointer data, GClosure *closure)
+{
+ PyGClosure *pc = (PyGClosure *)closure;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+ Py_XDECREF(pc->callback);
+ Py_XDECREF(pc->extra_args);
+ Py_XDECREF(pc->swap_data);
+ pyglib_gil_state_release(state);
+
+ pc->callback = NULL;
+ pc->extra_args = NULL;
+ pc->swap_data = NULL;
+}
+
+static void
+pyg_closure_marshal(GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ PyGILState_STATE state;
+ PyGClosure *pc = (PyGClosure *)closure;
+ PyObject *params, *ret;
+ guint i;
+
+ state = pyglib_gil_state_ensure();
+
+ /* construct Python tuple for the parameter values */
+ params = PyTuple_New(n_param_values);
+ for (i = 0; i < n_param_values; i++) {
+ /* swap in a different initial data for connect_object() */
+ if (i == 0 && G_CCLOSURE_SWAP_DATA(closure)) {
+ g_return_if_fail(pc->swap_data != NULL);
+ Py_INCREF(pc->swap_data);
+ PyTuple_SetItem(params, 0, pc->swap_data);
+ } else {
+ PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+ /* error condition */
+ if (!item) {
+ goto out;
+ }
+ PyTuple_SetItem(params, i, item);
+ }
+ }
+ /* params passed to function may have extra arguments */
+ if (pc->extra_args) {
+ PyObject *tuple = params;
+ params = PySequence_Concat(tuple, pc->extra_args);
+ Py_DECREF(tuple);
+ }
+ ret = PyObject_CallObject(pc->callback, params);
+ if (ret == NULL) {
+ if (pc->exception_handler)
+ pc->exception_handler(return_value, n_param_values, param_values);
+ else
+ PyErr_Print();
+ goto out;
+ }
+
+ if (return_value && pyg_value_from_pyobject(return_value, ret) != 0) {
+ PyErr_SetString(PyExc_TypeError,
+ "can't convert return value to desired type");
+
+ if (pc->exception_handler)
+ pc->exception_handler(return_value, n_param_values, param_values);
+ else
+ PyErr_Print();
+ }
+ Py_DECREF(ret);
+
+ out:
+ Py_DECREF(params);
+ pyglib_gil_state_release(state);
+}
+
+/**
+ * pyg_closure_new:
+ * callback: a Python callable object
+ * extra_args: a tuple of extra arguments, or None/NULL.
+ * swap_data: an alternative python object to pass first.
+ *
+ * Creates a GClosure wrapping a Python callable and optionally a set
+ * of additional function arguments. This is needed to attach python
+ * handlers to signals, for instance.
+ *
+ * Returns: the new closure.
+ */
+GClosure *
+pyg_closure_new(PyObject *callback, PyObject *extra_args, PyObject *swap_data)
+{
+ GClosure *closure;
+
+ g_return_val_if_fail(callback != NULL, NULL);
+ closure = g_closure_new_simple(sizeof(PyGClosure), NULL);
+ g_closure_add_invalidate_notifier(closure, NULL, pyg_closure_invalidate);
+ g_closure_set_marshal(closure, pyg_closure_marshal);
+ Py_INCREF(callback);
+ ((PyGClosure *)closure)->callback = callback;
+ if (extra_args && extra_args != Py_None) {
+ Py_INCREF(extra_args);
+ if (!PyTuple_Check(extra_args)) {
+ PyObject *tmp = PyTuple_New(1);
+ PyTuple_SetItem(tmp, 0, extra_args);
+ extra_args = tmp;
+ }
+ ((PyGClosure *)closure)->extra_args = extra_args;
+ }
+ if (swap_data) {
+ Py_INCREF(swap_data);
+ ((PyGClosure *)closure)->swap_data = swap_data;
+ closure->derivative_flag = TRUE;
+ }
+ return closure;
+}
+
+/**
+ * pyg_closure_set_exception_handler:
+ * @closure: a closure created with pyg_closure_new()
+ * @handler: the handler to call when an exception occurs or NULL for none
+ *
+ * Sets the handler to call when an exception occurs during closure invocation.
+ * The handler is responsible for providing a proper return value to the
+ * closure invocation. If @handler is %NULL, the default handler will be used.
+ * The default handler prints the exception to stderr and doesn't touch the
+ * closure's return value.
+ */
+void
+pyg_closure_set_exception_handler(GClosure *closure,
+ PyClosureExceptionHandler handler)
+{
+ PyGClosure *pygclosure;
+
+ g_return_if_fail(closure != NULL);
+
+ pygclosure = (PyGClosure *)closure;
+ pygclosure->exception_handler = handler;
+}
+/* -------------- PySignalClassClosure ----------------- */
+/* a closure used for the `class closure' of a signal. As this gets
+ * all the info from the first argument to the closure and the
+ * invocation hint, we can have a single closure that handles all
+ * class closure cases. We call a method by the name of the signal
+ * with "do_" prepended.
+ *
+ * We also remove the first argument from the * param list, as it is
+ * the instance object, which is passed * implicitly to the method
+ * object. */
+
+static void
+pyg_signal_class_closure_marshal(GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ PyGILState_STATE state;
+ GObject *object;
+ PyObject *object_wrapper;
+ GSignalInvocationHint *hint = (GSignalInvocationHint *)invocation_hint;
+ gchar *method_name, *tmp;
+ PyObject *method;
+ PyObject *params, *ret;
+ guint i, len;
+
+ state = pyglib_gil_state_ensure();
+
+ g_return_if_fail(invocation_hint != NULL);
+ /* get the object passed as the first argument to the closure */
+ object = g_value_get_object(&param_values[0]);
+ g_return_if_fail(object != NULL && G_IS_OBJECT(object));
+
+ /* get the wrapper for this object */
+ object_wrapper = pygobject_new(object);
+ g_return_if_fail(object_wrapper != NULL);
+
+ /* construct method name for this class closure */
+ method_name = g_strconcat("do_", g_signal_name(hint->signal_id), NULL);
+
+ /* convert dashes to underscores. For some reason, g_signal_name
+ * seems to convert all the underscores in the signal name to
+ dashes??? */
+ for (tmp = method_name; *tmp != '\0'; tmp++)
+ if (*tmp == '-') *tmp = '_';
+
+ method = PyObject_GetAttrString(object_wrapper, method_name);
+ g_free(method_name);
+
+ if (!method) {
+ PyErr_Clear();
+ Py_DECREF(object_wrapper);
+ pyglib_gil_state_release(state);
+ return;
+ }
+ Py_DECREF(object_wrapper);
+
+ /* construct Python tuple for the parameter values; don't copy boxed values
+ initially because we'll check after the call to see if a copy is needed. */
+ params = PyTuple_New(n_param_values - 1);
+ for (i = 1; i < n_param_values; i++) {
+ PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+ /* error condition */
+ if (!item) {
+ Py_DECREF(params);
+ pyglib_gil_state_release(state);
+ return;
+ }
+ PyTuple_SetItem(params, i - 1, item);
+ }
+
+ ret = PyObject_CallObject(method, params);
+
+ /* Copy boxed values if others ref them, this needs to be done regardless of
+ exception status. */
+ len = PyTuple_Size(params);
+ for (i = 0; i < len; i++) {
+ PyObject *item = PyTuple_GetItem(params, i);
+ if (item != NULL && PyObject_TypeCheck(item, &PyGBoxed_Type)
+ && item->ob_refcnt != 1) {
+ PyGBoxed* boxed_item = (PyGBoxed*)item;
+ if (!boxed_item->free_on_dealloc) {
+ boxed_item->boxed = g_boxed_copy(boxed_item->gtype, boxed_item->boxed);
+ boxed_item->free_on_dealloc = TRUE;
+ }
+ }
+ }
+
+ if (ret == NULL) {
+ PyErr_Print();
+ Py_DECREF(method);
+ Py_DECREF(params);
+ pyglib_gil_state_release(state);
+ return;
+ }
+ Py_DECREF(method);
+ Py_DECREF(params);
+ if (return_value)
+ pyg_value_from_pyobject(return_value, ret);
+ Py_DECREF(ret);
+ pyglib_gil_state_release(state);
+}
+
+/**
+ * pyg_signal_class_closure_get:
+ *
+ * Returns the GClosure used for the class closure of signals. When
+ * called, it will invoke the method do_signalname (for the signal
+ * "signalname").
+ *
+ * Returns: the closure.
+ */
+GClosure *
+pyg_signal_class_closure_get(void)
+{
+ static GClosure *closure;
+
+ if (closure == NULL) {
+ closure = g_closure_new_simple(sizeof(GClosure), NULL);
+ g_closure_set_marshal(closure, pyg_signal_class_closure_marshal);
+
+ g_closure_ref(closure);
+ g_closure_sink(closure);
+ }
+ return closure;
+}
+
+GClosure *
+gclosure_from_pyfunc(PyGObject *object, PyObject *func)
+{
+ GSList *l;
+ PyGObjectData *inst_data;
+ inst_data = pyg_object_peek_inst_data(object->obj);
+ if (inst_data)
+ {
+ for (l = inst_data->closures; l; l = l->next) {
+ PyGClosure *pyclosure = l->data;
+ int res;
+ PyObject_Cmp(pyclosure->callback, func, &res);
+ if (!res) {
+ return (GClosure*)pyclosure;
+ }
+ }
+ }
+ return NULL;
+}
+
+/* ----- __doc__ descriptor for GObject and GInterface ----- */
+
+static void
+object_doc_dealloc(PyObject *self)
+{
+ PyObject_FREE(self);
+}
+
+/* append information about signals of a particular gtype */
+static void
+add_signal_docs(GType gtype, GString *string)
+{
+ GTypeClass *class = NULL;
+ guint *signal_ids, n_ids = 0, i;
+
+ if (G_TYPE_IS_CLASSED(gtype))
+ class = g_type_class_ref(gtype);
+ signal_ids = g_signal_list_ids(gtype, &n_ids);
+
+ if (n_ids > 0) {
+ g_string_append_printf(string, "Signals from %s:\n",
+ g_type_name(gtype));
+
+ for (i = 0; i < n_ids; i++) {
+ GSignalQuery query;
+ guint j;
+
+ g_signal_query(signal_ids[i], &query);
+
+ g_string_append(string, " ");
+ g_string_append(string, query.signal_name);
+ g_string_append(string, " (");
+ for (j = 0; j < query.n_params; j++) {
+ g_string_append(string, g_type_name(query.param_types[j]));
+ if (j != query.n_params - 1)
+ g_string_append(string, ", ");
+ }
+ g_string_append(string, ")");
+ if (query.return_type && query.return_type != G_TYPE_NONE) {
+ g_string_append(string, " -> ");
+ g_string_append(string, g_type_name(query.return_type));
+ }
+ g_string_append(string, "\n");
+ }
+ g_free(signal_ids);
+ g_string_append(string, "\n");
+ }
+ if (class)
+ g_type_class_unref(class);
+}
+
+static void
+add_property_docs(GType gtype, GString *string)
+{
+ GObjectClass *class;
+ GParamSpec **props;
+ guint n_props = 0, i;
+ gboolean has_prop = FALSE;
+ G_CONST_RETURN gchar *blurb=NULL;
+
+ class = g_type_class_ref(gtype);
+ props = g_object_class_list_properties(class, &n_props);
+
+ for (i = 0; i < n_props; i++) {
+ if (props[i]->owner_type != gtype)
+ continue; /* these are from a parent type */
+
+ /* print out the heading first */
+ if (!has_prop) {
+ g_string_append_printf(string, "Properties from %s:\n",
+ g_type_name(gtype));
+ has_prop = TRUE;
+ }
+ g_string_append_printf(string, " %s -> %s: %s\n",
+ g_param_spec_get_name(props[i]),
+ g_type_name(props[i]->value_type),
+ g_param_spec_get_nick(props[i]));
+
+ /* g_string_append_printf crashes on win32 if the third
+ argument is NULL. */
+ blurb=g_param_spec_get_blurb(props[i]);
+ if (blurb)
+ g_string_append_printf(string, " %s\n",blurb);
+ }
+ g_free(props);
+ if (has_prop)
+ g_string_append(string, "\n");
+ g_type_class_unref(class);
+}
+
+static PyObject *
+object_doc_descr_get(PyObject *self, PyObject *obj, PyObject *type)
+{
+ GType gtype = 0;
+ GString *string;
+ PyObject *pystring;
+
+ if (obj && pygobject_check(obj, &PyGObject_Type)) {
+ gtype = G_OBJECT_TYPE(pygobject_get(obj));
+ if (!gtype)
+ PyErr_SetString(PyExc_RuntimeError, "could not get object type");
+ } else {
+ gtype = pyg_type_from_object(type);
+ }
+ if (!gtype)
+ return NULL;
+
+ string = g_string_new_len(NULL, 512);
+
+ if (g_type_is_a(gtype, G_TYPE_INTERFACE))
+ g_string_append_printf(string, "Interface %s\n\n", g_type_name(gtype));
+ else if (g_type_is_a(gtype, G_TYPE_OBJECT))
+ g_string_append_printf(string, "Object %s\n\n", g_type_name(gtype));
+ else
+ g_string_append_printf(string, "%s\n\n", g_type_name(gtype));
+
+ if (((PyTypeObject *) type)->tp_doc)
+ g_string_append_printf(string, "%s\n\n", ((PyTypeObject *) type)->tp_doc);
+
+ if (g_type_is_a(gtype, G_TYPE_OBJECT)) {
+ GType parent = G_TYPE_OBJECT;
+ GArray *parents = g_array_new(FALSE, FALSE, sizeof(GType));
+ int iparent;
+
+ while (parent) {
+ g_array_append_val(parents, parent);
+ parent = g_type_next_base(gtype, parent);
+ }
+
+ for (iparent = parents->len - 1; iparent >= 0; --iparent) {
+ GType *interfaces;
+ guint n_interfaces, i;
+
+ parent = g_array_index(parents, GType, iparent);
+ add_signal_docs(parent, string);
+ add_property_docs(parent, string);
+
+ /* add docs for implemented interfaces */
+ interfaces = g_type_interfaces(parent, &n_interfaces);
+ for (i = 0; i < n_interfaces; i++)
+ add_signal_docs(interfaces[i], string);
+ g_free(interfaces);
+ }
+ g_array_free(parents, TRUE);
+ }
+
+ pystring = _PyUnicode_FromStringAndSize(string->str, string->len);
+ g_string_free(string, TRUE);
+ return pystring;
+}
+
+PYGLIB_DEFINE_TYPE("gobject.GObject.__doc__", PyGObjectDoc_Type, PyObject);
+
+/**
+ * pyg_object_descr_doc_get:
+ *
+ * Returns an object intended to be the __doc__ attribute of GObject
+ * wrappers. When read in the context of the object it will return
+ * some documentation about the signals and properties of the object.
+ *
+ * Returns: the descriptor.
+ */
+PyObject *
+pyg_object_descr_doc_get(void)
+{
+ static PyObject *doc_descr = NULL;
+
+ if (!doc_descr) {
+ Py_TYPE(&PyGObjectDoc_Type) = &PyType_Type;
+ if (PyType_Ready(&PyGObjectDoc_Type))
+ return NULL;
+
+ doc_descr = PyObject_NEW(PyObject, &PyGObjectDoc_Type);
+ if (doc_descr == NULL)
+ return NULL;
+ }
+ return doc_descr;
+}
+
+
+/**
+ * pyg_pyobj_to_unichar_conv:
+ *
+ * Converts PyObject value to a unichar and write result to memory
+ * pointed to by ptr. Follows the calling convention of a ParseArgs
+ * converter (O& format specifier) so it may be used to convert function
+ * arguments.
+ *
+ * Returns: 1 if the conversion succeeds and 0 otherwise. If the conversion
+ * did not succeesd, a Python exception is raised
+ */
+int pyg_pyobj_to_unichar_conv(PyObject* py_obj, void* ptr)
+{
+ gunichar* u = ptr;
+ const Py_UNICODE* uni_buffer;
+ PyObject* tmp_uni = NULL;
+
+ if (PyUnicode_Check(py_obj)) {
+ tmp_uni = py_obj;
+ Py_INCREF(tmp_uni);
+ }
+ else {
+ tmp_uni = PyUnicode_FromObject(py_obj);
+ if (tmp_uni == NULL)
+ goto failure;
+ }
+
+ if ( PyUnicode_GetSize(tmp_uni) != 1) {
+ PyErr_SetString(PyExc_ValueError, "unicode character value must be 1 character uniode string");
+ goto failure;
+ }
+ uni_buffer = PyUnicode_AsUnicode(tmp_uni);
+ if ( uni_buffer == NULL)
+ goto failure;
+ *u = uni_buffer[0];
+
+ Py_DECREF(tmp_uni);
+ return 1;
+
+ failure:
+ Py_XDECREF(tmp_uni);
+ return 0;
+}
+
+
+int
+pyg_param_gvalue_from_pyobject(GValue* value,
+ PyObject* py_obj,
+ const GParamSpec* pspec)
+{
+ if (G_IS_PARAM_SPEC_UNICHAR(pspec)) {
+ gunichar u;
+
+ if (!pyg_pyobj_to_unichar_conv(py_obj, &u)) {
+ PyErr_Clear();
+ return -1;
+ }
+ g_value_set_uint(value, u);
+ return 0;
+ }
+ else if (G_IS_PARAM_SPEC_VALUE_ARRAY(pspec))
+ return pyg_value_array_from_pyobject(value, py_obj,
+ G_PARAM_SPEC_VALUE_ARRAY(pspec));
+ else {
+ return pyg_value_from_pyobject(value, py_obj);
+ }
+}
+
+PyObject*
+pyg_param_gvalue_as_pyobject(const GValue* gvalue,
+ gboolean copy_boxed,
+ const GParamSpec* pspec)
+{
+ if (G_IS_PARAM_SPEC_UNICHAR(pspec)) {
+ gunichar u;
+ Py_UNICODE uni_buffer[2] = { 0, 0 };
+
+ u = g_value_get_uint(gvalue);
+ uni_buffer[0] = u;
+ return PyUnicode_FromUnicode(uni_buffer, 1);
+ }
+ else {
+ return pyg_value_as_pyobject(gvalue, copy_boxed);
+ }
+}
+
+/**
+ * pyg_type_registration_callback
+ * @gtypename: type name
+ * @callback: function to run
+ *
+ */
+typedef struct {
+ PyGTypeRegistrationFunction callback;
+ gpointer data;
+} CustomTypeData;
+
+void
+pyg_type_register_custom_callback(const gchar *typename,
+ PyGTypeRegistrationFunction callback,
+ gpointer user_data)
+{
+ CustomTypeData *data;
+
+ if (!custom_type_registration)
+ custom_type_registration = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, g_free);
+
+ data = g_new (CustomTypeData, 1);
+ data->callback = callback;
+ data->data = user_data;
+
+ g_hash_table_insert(custom_type_registration,
+ g_strdup(typename),
+ data);
+}
+
+PyTypeObject *
+pyg_type_get_custom(const gchar *name)
+{
+ CustomTypeData *data;
+ PyTypeObject *retval;
+
+ if (!custom_type_registration)
+ return NULL;
+
+ data = g_hash_table_lookup(custom_type_registration, name);
+ if (!data)
+ return NULL;
+
+ retval = data->callback(name, data->data);
+
+ g_hash_table_remove(custom_type_registration, name);
+
+ return retval;
+}
+
+GType
+_pyg_type_from_name(const gchar *name)
+{
+ GType type;
+
+ type = g_type_from_name(name);
+ if (type == G_TYPE_INVALID) {
+ pyg_type_get_custom(name);
+ type = g_type_from_name(name);
+ }
+
+ return type;
+}
+
+static PyObject *
+_pyg_strv_from_gvalue(const GValue *value)
+{
+ gchar **argv = (gchar **) g_value_get_boxed(value);
+ int argc = 0, i;
+ PyObject *py_argv;
+
+ if (argv) {
+ while (argv[argc])
+ argc++;
+ }
+ py_argv = PyList_New(argc);
+ for (i = 0; i < argc; ++i)
+ PyList_SET_ITEM(py_argv, i, _PyUnicode_FromString(argv[i]));
+ return py_argv;
+}
+
+static int
+_pyg_strv_to_gvalue(GValue *value, PyObject *obj)
+{
+ Py_ssize_t argc, i;
+ gchar **argv;
+
+ if (!(PyTuple_Check(obj) || PyList_Check(obj)))
+ return -1;
+
+ argc = PySequence_Length(obj);
+ for (i = 0; i < argc; ++i)
+ if (!_PyUnicode_Check(PySequence_Fast_GET_ITEM(obj, i)))
+ return -1;
+ argv = g_new(gchar *, argc + 1);
+ for (i = 0; i < argc; ++i)
+ argv[i] = g_strdup(_PyUnicode_AsString(PySequence_Fast_GET_ITEM(obj, i)));
+ argv[i] = NULL;
+ g_value_take_boxed(value, argv);
+ return 0;
+}
+
+void
+pygobject_type_register_types(PyObject *d)
+{
+ PyGTypeWrapper_Type.tp_dealloc = (destructor)pyg_type_wrapper_dealloc;
+ PyGTypeWrapper_Type.tp_compare = (cmpfunc)pyg_type_wrapper_compare;
+ PyGTypeWrapper_Type.tp_repr = (reprfunc)pyg_type_wrapper_repr;
+ PyGTypeWrapper_Type.tp_hash = (hashfunc)pyg_type_wrapper_hash;
+ PyGTypeWrapper_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGTypeWrapper_Type.tp_methods = _PyGTypeWrapper_methods;
+ PyGTypeWrapper_Type.tp_getset = _PyGTypeWrapper_getsets;
+ PyGTypeWrapper_Type.tp_init = (initproc)pyg_type_wrapper_init;
+ PYGLIB_REGISTER_TYPE(d, PyGTypeWrapper_Type, "GType");
+
+ /* This type lazily registered in pyg_object_descr_doc_get */
+ PyGObjectDoc_Type.tp_dealloc = (destructor)object_doc_dealloc;
+ PyGObjectDoc_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+ PyGObjectDoc_Type.tp_descr_get = (descrgetfunc)object_doc_descr_get;
+
+ pyg_register_gtype_custom(G_TYPE_STRV,
+ _pyg_strv_from_gvalue,
+ _pyg_strv_to_gvalue);
+}
diff --git a/gobject/pygtype.h b/gobject/pygtype.h
new file mode 100644
index 0000000..2f9e7ad
--- /dev/null
+++ b/gobject/pygtype.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003 James Henstridge
+ * 2004-2008 Johan Dahlin
+ * pyginterface.c: wrapper for the gobject library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_TYPE_H__
+#define __PYGOBJECT_TYPE_H__
+
+void pygobject_type_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_TYPE_H__ */
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..6781b98
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755
index 0000000..a72f2fd
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,8406 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 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.
+
+# 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
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long 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.
+# 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.2.6b
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.6b
+TIMESTAMP=""
+package_revision=1.3017
+
+# 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
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+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
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${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_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 "X${1}" | $Xsed -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 "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# 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"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# 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'
+
+# 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${mode+: }$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_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$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 "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e '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 "X$my_tmpdir" | $Xsed
+}
+
+
+# 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 "X$1" | $Xsed -e "$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 "X$1" | $Xsed \
+ -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_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$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 ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ 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
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# 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_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
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # 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
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 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
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ 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_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# 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
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$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
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$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=$mode' for more information."
+}
+
+
+# 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_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# 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_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_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ 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 "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # 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_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # 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}"
+ }
+}
+
+# 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)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$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_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$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_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ 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)
+ 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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e '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
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ 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
+ command="$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
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$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 "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $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 building PIC objects only
+ -prefer-non-pic try to building 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
+
+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 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
+ -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
+
+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 \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# 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 $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # 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
+ dir="$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
+ -*) ;;
+ *)
+ # 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_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ 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 "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ 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" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $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 "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$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.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; 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"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_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 -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.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # 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 "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -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 "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "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_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" && staticlibs="$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 "X$lib" | $Xsed -e '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 "X$relink_command" | $Xsed -e '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 "X$file$stripped_ext" | $Xsed -e "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 "$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
+
+/* 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 "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $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"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ 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;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+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) ;;
+ *) symtab_cflags="$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 "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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.
+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
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $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_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ 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 | $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 | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+ func_emit_wrapper_part1_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part1_arg1=$1
+ fi
+
+ $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.
+Xsed='${SED} -e 1s/^X//'
+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
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+ func_emit_wrapper_part2_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part2_arg1=$1
+ fi
+
+ $ECHO "\
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_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 \"X\$thisdir\" | \$Xsed -e '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"
+
+ # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 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\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# 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=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ # split this up so that func_emit_cwrapperexe_src
+ # can call each part independently.
+ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin. Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+ func_to_host_path_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ case $build in
+ *mingw* ) # actually, msys
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_path_tmp1=`cygpath -w "$1"`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # 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_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ # Allow warning below.
+ func_to_host_path_result=""
+ fi
+ ;;
+ esac
+ if test -z "$func_to_host_path_result" ; then
+ func_error "Could not determine host path corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_path_result="$1"
+ fi
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+#
+# 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.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+ func_to_host_pathlist_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ # 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_to_host_pathlist_tmp2="$1"
+ # Once set for this call, this variable should not be
+ # reassigned. It is used in tha fallback case.
+ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e 's|^:*||' -e 's|:*$||'`
+ case $build in
+ *mingw* ) # Actually, msys.
+ # Awkward: cmd appends spaces to result.
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # unfortunately, winepath doesn't convert pathlists
+ func_to_host_pathlist_result=""
+ func_to_host_pathlist_oldIFS=$IFS
+ IFS=:
+ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+ IFS=$func_to_host_pathlist_oldIFS
+ if test -n "$func_to_host_pathlist_f" ; then
+ func_to_host_path "$func_to_host_pathlist_f"
+ if test -n "$func_to_host_path_result" ; then
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_to_host_pathlist_result="$func_to_host_path_result"
+ else
+ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+ fi
+ fi
+ fi
+ IFS=:
+ done
+ IFS=$func_to_host_pathlist_oldIFS
+ ;;
+ esac
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_error "Could not determine the host path(s) corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This may break if $1 contains DOS-style drive
+ # specifications. The fix is not to complicate the expression
+ # below, but for the user to provide a working wine installation
+ # with winepath so that path translation in the cross-to-mingw
+ # case works properly.
+ lt_replace_pathsep_nix_to_dos="s|:|;|g"
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_replace_pathsep_nix_to_dos"`
+ fi
+ # Now, add the leading and trailing path separators back
+ case "$1" in
+ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+ ;;
+ esac
+ case "$1" in
+ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_pathlist
+
+# 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.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# define HAVE_SETENV
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+# 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>
+
+#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
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#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 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#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)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+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_fatal (const char *message, ...);
+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_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+ func_emit_wrapper_part1 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+ cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+ func_emit_wrapper_part2 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+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_pathlist "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_pathlist "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_pathlist_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-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
+
+static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
+ /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
+ /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
+ /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+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]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ 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"
+ printf ("%s", script_text_part1);
+ printf ("%s", script_text_part2);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 1);
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(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;
+
+ LTWRAPPER_DEBUGPRINTF (("(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 */
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+ {
+ if (argv[i][env_set_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_set_opt_len + 1;
+ lt_opt_process_env_set (p);
+ }
+ else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_set (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_set_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+ {
+ if (argv[i][env_prepend_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_prepend_opt_len + 1;
+ lt_opt_process_env_prepend (p);
+ }
+ else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_prepend_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+ {
+ if (argv[i][env_append_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_append_opt_len + 1;
+ lt_opt_process_env_append (p);
+ }
+ else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_append (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_append_opt);
+ continue;
+ }
+ if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 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 ("Unrecognized option in %s namespace: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+ for (i = 0; i < newargc; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, 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 ("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;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ 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;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ 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;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ 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 ("getcwd failed");
+ 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 ("getcwd failed");
+ 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)
+ {
+ LTWRAPPER_DEBUGPRINTF (("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
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("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;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+ {
+#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;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+ const char *p;
+ int len;
+ if (!arg || !*arg)
+ return 1;
+
+ p = strchr (arg, (int)'=');
+
+ if (!p)
+ return 1;
+
+ *value = xstrdup (++p);
+
+ len = strlen (arg) - strlen (*value);
+ *name = XMALLOC (char, len);
+ strncpy (*name, arg, len-1);
+ (*name)[len - 1] = '\0';
+
+ return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+ }
+
+ lt_setenv (name, value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 1);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ 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)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# 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
+ 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
+ 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
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$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 "*) ;;
+ *) deplibs="$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
+# moreargs="$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
+ dlfiles="$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.
+ dlprefiles="$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 "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$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
+ ;;
+
+ -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"
+ dir=$func_stripname_result
+ if test -z "$dir"; 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
+ # 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 "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$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*)
+ # 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
+ deplibs="$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
+ deplibs="$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)
+ compiler_flags="$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)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$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_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$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"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$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"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$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"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$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
+ dlfiles="$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.
+ dlprefiles="$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.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ 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 \"X\${$shlibpath_var}\" \| \$Xsed -e \'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"
+ # 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_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$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 "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$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=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$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
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$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 "*) ;;
+ * ) new_inherited_linker_flags="$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"
+ newlib_search_path="$newlib_search_path $func_stripname_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"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$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 \"X$deplib\"" 2>/dev/null | $Xsed -e 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.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$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 "X$inherited_linker_flags" | $Xsed -e '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 "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e '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" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$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.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$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_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ 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.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$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 "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$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
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$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
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$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" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ 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
+ newlib_search_path="$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"
+ newlib_search_path="$newlib_search_path $func_stripname_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_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$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:"*) ;;
+ *) temp_rpath="$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 "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$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
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$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 "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$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 "$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
+ [\\/]*)
+ add_dir="$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:"*) ;;
+ *) compile_shlibpath="$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:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$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:"*) ;;
+ *) finalize_shlibpath="$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
+ [\\/]*)
+ add_dir="$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 "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$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"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ 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
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$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 "X $new_inherited_linker_flags" | $Xsed -e '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 "*) ;;
+ *) lib_search_path="$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 "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$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
+ tmp_libs="$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"
+ objs="$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!"
+ libobjs="$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|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.
+ verstring="$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"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$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
+ removelist="$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
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "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
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$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 "*) ;;
+ *) dlfiles="$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 "*) ;;
+ *) dlprefiles="$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*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$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
+ deplibs="$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 "*)
+ newdeplibs="$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
+ newdeplibs="$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
+ ;;
+ *)
+ newdeplibs="$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 "*)
+ newdeplibs="$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
+ newdeplibs="$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
+ ;;
+ *)
+ newdeplibs="$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 "*)
+ newdeplibs="$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
+ # 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$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.
+ newdeplibs="$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 "*)
+ newdeplibs="$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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$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.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e '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 "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $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
+ fi
+ ;;
+ 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 "X $newdeplibs" | $Xsed -e '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 "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e '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 "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$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 "$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
+ 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"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$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
+ rpath="$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 "$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
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$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"
+ delfiles="$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 cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ 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 "X$include_expsyms" | $Xsed | $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
+ delfiles="$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 "*) ;;
+ *)
+ tmp_deplibs="$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"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$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\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$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
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # 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
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ 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
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ 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.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$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~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$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 "$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 "X$include_expsyms" | $Xsed | $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
+ delfiles="$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"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$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 "$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 "$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 "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$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 "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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 "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$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 "*) ;;
+ *) finalize_rpath="$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"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$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;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$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"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$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 "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$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
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *cegcc)
+ # Disable wrappers for cegcc, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *)
+ 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 "X$compile_command" | $Xsed -e '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=$?'
+
+ # 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
+ rpath="$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
+ rpath="$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 "X$link_command" | $Xsed -e '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 $?'
+ 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 "X$compile_var$compile_command$compile_rpath" | $Xsed -e '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 "X$link_command" | $Xsed -e '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 $?'
+
+ # 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$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
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$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"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$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"
+ generated="$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"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$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
+ 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 "X$relink_command" | $Xsed -e "$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"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$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"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$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"
+ newdlprefiles="$newdlprefiles $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
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ 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 "$mode" = link || test "$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) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ 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
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${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
+ rmfiles="$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
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$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
+ rmfiles="$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
+ rmfiles="$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
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # 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 "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/m4/as-ac-expand.m4 b/m4/as-ac-expand.m4
new file mode 100644
index 0000000..0c71173
--- /dev/null
+++ b/m4/as-ac-expand.m4
@@ -0,0 +1,40 @@
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+ EXP_VAR=[$1]
+ FROM_VAR=[$2]
+
+ dnl first expand prefix and exec_prefix if necessary
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ dnl if no prefix given, then use /usr/local, the default prefix
+ if test "x$prefix" = "xNONE"; then
+ prefix=$ac_default_prefix
+ fi
+ dnl if no exec_prefix given, then use prefix
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ dnl loop until it doesn't change anymore
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var"="x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ dnl clean up
+ full_var=$new_full_var
+ AC_SUBST([$1], "$full_var")
+
+ dnl restore prefix and exec_prefix
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+])
diff --git a/m4/jhflags.m4 b/m4/jhflags.m4
new file mode 100644
index 0000000..222e4b0
--- /dev/null
+++ b/m4/jhflags.m4
@@ -0,0 +1,21 @@
+dnl
+dnl JH_ADD_CFLAG(FLAG)
+dnl checks whether the C compiler supports the given flag, and if so, adds
+dnl it to $CFLAGS. If the flag is already present in the list, then the
+dnl check is not performed.
+AC_DEFUN([JH_ADD_CFLAG],
+[
+case " $CFLAGS " in
+*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_MSG_CHECKING([whether [$]CC understands $1])
+ AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
+ AC_MSG_RESULT($jh_has_option)
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644
index 0000000..671cde1
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1,7360 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 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 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 56 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_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
+
+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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "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
+_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_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])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
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+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'
+
+# 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_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 "X$][$1" | $Xsed -e "$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 "X$<var>" | $Xsed -e "$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'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$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 "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_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])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+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) 2008 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.
+if test "$no_create" != yes; then
+ 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)
+fi
+])# 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ 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)])
+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], [])
+
+
+# _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"
+ ])
+ 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" != ":"; 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
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _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=echo
+ _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
+# -----------------------
+# 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.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+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 "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _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 __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*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_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+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
+_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_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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -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;
+ ;;
+
+ 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$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 __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ 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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_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
+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
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # 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; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ 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,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+
+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'
+ ;;
+
+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)
+ 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
+ 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],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # 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;/^$/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([], [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
+
+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
+ 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_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [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.
+ if ( 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
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ 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
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+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)
+ 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_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_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.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ 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:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $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:__oline__: 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_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_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
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _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([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
+
+ # 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
+#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. */
+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_save_LIBS="$LIBS"
+ lt_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_save_LIBS"
+ CFLAGS="$lt_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
+
+_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_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)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+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)=
+ ;;
+ 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
+ ;;
+ 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)
+ 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*)
+ # IBM XL 8.0 on PPC
+ _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*)
+ # 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'
+ ;;
+
+ 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
+ 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)
+ 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'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # 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*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _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)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # 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)=''
+ ;;
+ 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*)
+ _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_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# 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])
+
+#
+# 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_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'
+ 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
+ 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")) && ([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*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ 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
+ if test "$with_gnu_ld" = 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
+ *\ [[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.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_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(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/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ 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
+ ;;
+
+ 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)
+ 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=
+ 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # 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; $ECHO \"$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]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ 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; $ECHO \"$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*)
+ # 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 $compiler_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 $compiler_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 $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'
+ 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 $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
+ ;;
+
+ 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 $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
+
+ 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
+ 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")) && ([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
+ _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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
+ _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'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _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.
+ _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 `$ECHO "X$deplibs" | $Xsed -e '\''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(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ 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 -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 -fPIC ${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 -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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 -a "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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'
+ ;;
+ *)
+ _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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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 ${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 ${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_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $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_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _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*
+ AC_MSG_RESULT([$_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([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_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([], [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_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _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],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+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(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_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_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 -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_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 "\-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
+ _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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
+ _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'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _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*)
+ # _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(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
+ ;;
+ 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*)
+ ;;
+
+ 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; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_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; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ 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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_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" && $ECHO "X-set_version $verstring" | $Xsed` -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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -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)
+ 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; $ECHO "X$list" | $Xsed'
+
+ _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 | $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 | $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 | $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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will 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; $ECHO \"$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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # 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; $ECHO \"$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='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_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=echo
+ 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" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 "\-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*)
+ # 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='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_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 -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 -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_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 "\-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(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
+ 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_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
+# 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
+])
+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 $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
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p 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
+ ;;
+
+ *.$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
+
+# 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*)
+ # 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_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _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_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_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(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
+ CC=${F77-"f77"}
+ 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"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _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_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_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(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
+ CC=${FC-"f95"}
+ 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"
+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_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+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
+
+## 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"
+])# _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_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+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"
+])# _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_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"}, \
+ = c,a/b,, \
+ && 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_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# 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 ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# 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 ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# 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_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}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# 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 ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -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 file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# 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 "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644
index 0000000..34151a3
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1,368 @@
+# Helper functions for option handling. -*- 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 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], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [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
index 0000000..9000a05
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -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
index 0000000..f3c5309
--- /dev/null
+++ b/m4/ltversion.m4
@@ -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.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_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
index 0000000..637bb20
--- /dev/null
+++ b/m4/lt~obsolete.m4
@@ -0,0 +1,92 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 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 4 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_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+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])])
diff --git a/m4/python.m4 b/m4/python.m4
new file mode 100644
index 0000000..bdc8ee6
--- /dev/null
+++ b/m4/python.m4
@@ -0,0 +1,257 @@
+## this one is commonly used with AM_PATH_PYTHONDIR ...
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN([AM_CHECK_PYMOD],
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+ import $1
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$3], [],, [$3
+])dnl
+else
+ AC_MSG_RESULT(no)
+ ifelse([$4], [],, [$4
+])dnl
+fi
+])
+
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
+if test -x "$PYTHON-config"; then
+PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+>fi
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+# JD_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent.
+# This is similar to AM_PYTHON_CHECK_VERSION, but without python 1.5.x support
+# and with python 3.0 support.
+AC_DEFUN([JD_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+ AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# JD_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages. To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable. To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([JD_PATH_PYTHON],
+ [
+ dnl Find a Python interpreter. Python versions prior to 2.0 are not
+ dnl supported
+ m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+ [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+ # Find any Python interpreter.
+ if test -z "$PYTHON"; then
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+ fi
+ am_display_PYTHON=python
+ ], [
+ dnl A version check is needed.
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ AC_MSG_CHECKING([whether $PYTHON version >= $1])
+ JD_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_ERROR(too old)])
+ am_display_PYTHON=$PYTHON
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+ [am_cv_pathless_PYTHON],[
+ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ JD_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+ done])
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ if test "$am_cv_pathless_PYTHON" = none; then
+ PYTHON=:
+ else
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+ fi
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+ ])
+
+ if test "$PYTHON" = :; then
+ dnl Run any user-specified action, or abort.
+ m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+ else
+
+ dnl Query Python for its version number. Getting [:3] seems to be
+ dnl the best way to do this; it's what "site.py" does in the standard
+ dnl library.
+
+ AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+ [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+ AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+ dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
+ dnl distinct variables so they can be overridden if need be. However,
+ dnl general consensus is that you shouldn't need this ability.
+
+ AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+ AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+ dnl At times (like when building shared libraries) you may want
+ dnl to know which OS platform Python thinks this is.
+
+ AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+ [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+ AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+ dnl Set up 4 directories:
+
+ dnl pythondir -- where to install python scripts. This is the
+ dnl site-packages directory, not the python standard library
+ dnl directory like in previous automake betas. This behavior
+ dnl is more consistent with lispdir.m4 for example.
+ dnl Query distutils for this directory. distutils does not exist in
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
+ dnl doesn't work.
+ AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+ [am_cv_python_pythondir],
+ [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+ AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+ dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
+ dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
+ dnl more consistent with the rest of automake.
+
+ AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+ dnl pyexecdir -- directory for installing python extension modules
+ dnl (shared libraries)
+ dnl Query distutils for this directory. distutils does not exist in
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
+ dnl doesn't work.
+ AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+ [am_cv_python_pyexecdir],
+ [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+ echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+ AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+ dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+ AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+ dnl Run any user-specified action.
+ $2
+ fi
+
+])
+
+dnl a macro to check for ability to create python extensions
+dnl JD_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([JD_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
+if test -x "$PYTHON-config"; then
+PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
diff --git a/missing b/missing
new file mode 100755
index 0000000..28055d2
--- /dev/null
+++ b/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar*)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/packaging/pygobject-rpmlintrc b/packaging/pygobject-rpmlintrc
new file mode 100644
index 0000000..5e73e43
--- /dev/null
+++ b/packaging/pygobject-rpmlintrc
@@ -0,0 +1,3 @@
+# This line is mandatory to access the configuration functions
+from Config import *
+addFilter("pygobject2.* devel-file-in-non-devel-package")
diff --git a/packaging/pygobject.changes b/packaging/pygobject.changes
new file mode 100644
index 0000000..bfd1a0f
--- /dev/null
+++ b/packaging/pygobject.changes
@@ -0,0 +1,2 @@
+* Wed Jul 25th 2012 Prajwal Mohan <prajwal.karur.mohan@intel.com>
+- renaming pygobject2.spec to pygobject.spec. renamging pygobject2-rpmlintre to pygoject-rpmlintrc
diff --git a/packaging/pygobject.spec b/packaging/pygobject.spec
new file mode 100644
index 0000000..b75e029
--- /dev/null
+++ b/packaging/pygobject.spec
@@ -0,0 +1,119 @@
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+# Last updated for version 2.19.0
+%define glib2_version 2.16.0
+%define python2_version 2.3.5
+
+### Abstract ###
+
+Name: pygobject
+Version: 2.21.3
+Release: 1.1
+License: LGPLv2+
+Group: Development/Languages
+Summary: Python bindings for GObject
+URL: http://www.pygtk.org/
+Source0: %{name}-%{version}.tar.bz2
+Source101: %{name}-rpmlintrc
+
+
+### Build Dependencies ###
+
+BuildRequires: automake
+BuildRequires: glib2-devel >= %{glib2_version}
+BuildRequires: libtool
+BuildRequires: python-devel >= %{python2_version}
+
+%description
+The %{name} package provides a convenient wrapper for the GObject library
+for use in Python programs.
+
+%package codegen
+Summary: The code generation program for PyGObject
+Group: Development/Languages
+
+%description codegen
+The package contains the C code generation program for PyGObject.
+
+%package devel
+Summary: Development files for building add-on libraries
+Group: Development/Languages
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-codegen = %{version}-%{release}
+Requires: %{name}-doc = %{version}-%{release}
+Requires: glib2-devel
+Requires: pkgconfig
+
+%description devel
+This package contains files required to build wrappers for %{name}-based
+libraries such as pygtk2.
+
+%package doc
+Summary: Documentation files for %{name}
+Group: Development/Languages
+
+%description doc
+This package contains documentation files for %{name}.
+
+%prep
+%setup -q
+
+%build
+%configure --enable-thread
+export tagname=CC
+make LIBTOOL=/usr/bin/libtool
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export tagname=CC
+make LIBTOOL=/usr/bin/libtool DESTDIR=$RPM_BUILD_ROOT install
+find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
+
+rm examples/Makefile*
+
+%clean
+rm -fr $RPM_BUILD_ROOT
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644, root, root, 755)
+%doc AUTHORS NEWS README
+
+%{_libdir}/libpyglib-2.0-python.so*
+%dir %{python_sitearch}/gtk-2.0
+%{python_sitearch}/gtk-2.0/dsextras.*
+%{python_sitearch}/pygtk.*
+
+%defattr(755, root, root, 755)
+%{python_sitearch}/gtk-2.0/gio
+#%{python_sitearch}/gtk-2.0/girepository
+%{python_sitearch}/gtk-2.0/glib
+%{python_sitearch}/gtk-2.0/gobject
+
+%files codegen
+%defattr(755, root, root, 755)
+%{_bindir}/pygobject-codegen-2.0
+%defattr(644, root, root, 755)
+%dir %{_datadir}/pygobject/2.0
+%{_datadir}/pygobject/2.0/codegen
+
+%files devel
+%defattr(644, root, root, 755)
+%dir %{_datadir}/pygobject
+%dir %{_includedir}/pygtk-2.0
+%{_datadir}/pygobject/2.0/defs
+#%{_includedir}/pygobject/bank.h
+%{_includedir}/pygtk-2.0/pyglib.h
+%{_includedir}/pygtk-2.0/pygobject.h
+%{_libdir}/pkgconfig/pygobject-2.0.pc
+
+%files doc
+%defattr(644, root, root, 755)
+%doc examples
+%{_datadir}/gtk-doc/html/pygobject
+%{_datadir}/pygobject/xsl
+
diff --git a/py-compile b/py-compile
new file mode 100755
index 0000000..3f9d05b
--- /dev/null
+++ b/py-compile
@@ -0,0 +1,146 @@
+#!/bin/sh
+# py-compile - Compile a Python program
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+if [ -z "$PYTHON" ]; then
+ PYTHON=python
+fi
+
+basedir=
+destdir=
+files=
+while test $# -ne 0; do
+ case "$1" in
+ --basedir)
+ basedir=$2
+ if test -z "$basedir"; then
+ echo "$0: Missing argument to --basedir." 1>&2
+ exit 1
+ fi
+ shift
+ ;;
+ --destdir)
+ destdir=$2
+ if test -z "$destdir"; then
+ echo "$0: Missing argument to --destdir." 1>&2
+ exit 1
+ fi
+ shift
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+
+Byte compile some python scripts FILES. Use --destdir to specify any
+leading directory path to the FILES that you don't want to include in the
+byte compiled file. Specify --basedir for any additional path information you
+do want to be shown in the byte compiled file.
+
+Example:
+ py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v|--v*)
+ echo "py-compile $scriptversion"
+ exit $?
+ ;;
+ *)
+ files="$files $1"
+ ;;
+ esac
+ shift
+done
+
+if test -z "$files"; then
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+fi
+
+# if basedir was given, then it should be prepended to filenames before
+# byte compilation.
+if [ -z "$basedir" ]; then
+ pathtrans="path = file"
+else
+ pathtrans="path = os.path.join('$basedir', file)"
+fi
+
+# if destdir was given, then it needs to be prepended to the filename to
+# byte compile but not go into the compiled file.
+if [ -z "$destdir" ]; then
+ filetrans="filepath = path"
+else
+ filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+fi
+
+$PYTHON -c "
+import sys, os, py_compile
+
+files = '''$files'''
+
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
+ $pathtrans
+ $filetrans
+ if not os.path.exists(filepath) or not (len(filepath) >= 3
+ and filepath[-3:] == '.py'):
+ continue
+ sys.stdout.write(file)
+ sys.stdout.flush()
+ py_compile.compile(filepath, filepath + 'c', path)
+sys.stdout.write('\n')" || exit $?
+
+# this will fail for python < 1.5, but that doesn't matter ...
+$PYTHON -O -c "
+import sys, os, py_compile
+
+files = '''$files'''
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
+ $pathtrans
+ $filetrans
+ if not os.path.exists(filepath) or not (len(filepath) >= 3
+ and filepath[-3:] == '.py'):
+ continue
+ sys.stdout.write(file)
+ sys.stdout.flush()
+ py_compile.compile(filepath, filepath + 'o', path)
+sys.stdout.write('\n')" 2>/dev/null || :
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/pygobject-2.0-uninstalled.pc.in b/pygobject-2.0-uninstalled.pc.in
new file mode 100644
index 0000000..3fb6288
--- /dev/null
+++ b/pygobject-2.0-uninstalled.pc.in
@@ -0,0 +1,19 @@
+Name: PyGObject
+Description: Python bindings for GObject
+Requires: gobject-2.0
+Requires.private: @LIBFFI_PC@
+Version: @VERSION@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/gobject
+
+# you can use the --variable=pygtkincludedir argument to
+# pkg-config to get this value. You might want to use this to
+# install additional headers.
+pygtkincludedir=${pc_top_builddir}/${pcfiledir}/gobject
+xslfiles=${pc_top_builddir}/${pcfiledir}/docs/xsl
+
+# same here. Useful when calling the code generator in addon packages.
+defsdir=${pc_top_builddir}/${pcfiledir}/gio
+fixxref=${pc_top_builddir}/${pcfiledir}/docs/xsl/fixxref.py
+codegendir=${pc_top_builddir}/${pcfiledir}/codegen
+pygdocs=${pc_top_builddir}/${pcfiledir}/docs
+datadir=${pc_top_builddir}/pygobject-@VERSION@
diff --git a/pygobject-2.0.pc.in b/pygobject-2.0.pc.in
new file mode 100644
index 0000000..5188a12
--- /dev/null
+++ b/pygobject-2.0.pc.in
@@ -0,0 +1,22 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+libdir=@libdir@
+
+# you can use the --variable=pygtkincludedir argument to
+# pkg-config to get this value. You might want to use this to
+# install additional headers.
+pygtkincludedir=${includedir}/pygtk-2.0
+fixxref=${datadir}/pygobject/xsl/fixxref.py
+pygdocs=${datadir}/gtk-doc/html/pygobject
+defsdir=${datadir}/pygobject/2.0/defs
+codegendir=${datadir}/pygobject/2.0/codegen
+
+Name: PyGObject
+Description: Python bindings for GObject
+Requires: gobject-2.0
+Requires.private: @LIBFFI_PC@
+Version: @VERSION@
+Cflags: -I${pygtkincludedir}
diff --git a/pygobject_postinstall.py b/pygobject_postinstall.py
new file mode 100644
index 0000000..487828e
--- /dev/null
+++ b/pygobject_postinstall.py
@@ -0,0 +1,72 @@
+
+"""pygobject is now installed on your machine.
+
+Local configuration files were successfully updated."""
+
+import os, re, sys
+
+pkgconfig_file = os.path.normpath(
+ os.path.join(sys.prefix,
+ 'lib/pkgconfig/pygobject-2.0.pc'))
+
+prefix_pattern=re.compile("^prefix=.*")
+version_pattern=re.compile("Version: ([0-9]+\.[0-9]+\.[0-9]+)")
+
+def replace_prefix(s):
+ if prefix_pattern.match(s):
+ s='prefix='+sys.prefix.replace("\\","/")+'\n'
+ s=s.replace("@DATADIR@",
+ os.path.join(sys.prefix,'share').replace("\\","/"))
+
+ return s
+
+def get_doc_url(pkgconfig_file, base_url):
+ try:
+ f = open(pkgconfig_file).read()
+ ver = version_pattern.search(f).groups()[0]
+ majv,minv,micv = ver.split('.')
+ doc_url = "%s/%s.%s/" % (base_url,majv,minv)
+ except:
+ doc_url = base_url + "/stable/"
+ return doc_url
+
+# TODO : Check that shortcuts are created system-wide when the user
+# has admin rights (hint: see pywin32 postinstall)
+def create_shortcuts():
+ progs_folder= get_special_folder_path("CSIDL_COMMON_PROGRAMS")
+ site_packages_dir = os.path.join(sys.prefix , 'lib','site-packages')
+
+ pygtk_shortcuts = os.path.join(progs_folder, 'PyGTK')
+ if not os.path.isdir(pygtk_shortcuts):
+ os.mkdir(pygtk_shortcuts)
+
+ # link to specific documentation version by parsing the
+ # pkgconfig file
+ doc_url = get_doc_url(pkgconfig_file,
+ "http://library.gnome.org/devel/pygobject")
+ pygobject_doc_link=os.path.join(pygtk_shortcuts,
+ 'PyGObject Documentation.lnk')
+ if os.path.isfile(pygobject_doc_link):
+ os.remove(pygobject_doc_link)
+ create_shortcut(doc_url,'PyGObject Documentation',pygobject_doc_link)
+
+def remove_shortcuts():
+ pygtk_shortcuts = os.path.join(
+ get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK')
+ os.remove(os.path.join(pygtk_shortcuts,'PyGObject Documentation.lnk'))
+ try:
+ os.rmdir(pygtk_shortcuts)
+ except OSError, e:
+ # Directory is not empty, so leave it like that !
+ pass
+
+if len(sys.argv) == 2:
+ if sys.argv[1] == "-install":
+ # fixup the pkgconfig file
+ lines=open(pkgconfig_file).readlines()
+ open(pkgconfig_file, 'w').writelines(map(replace_prefix,lines))
+ # TODO: Add an installer option for shortcut creation
+ create_shortcuts()
+ print __doc__
+ elif sys.argv[1] == "-remove":
+ remove_shortcuts()
diff --git a/pygtk.py b/pygtk.py
new file mode 100644
index 0000000..e061b88
--- /dev/null
+++ b/pygtk.py
@@ -0,0 +1,95 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygtk - Python bindings for the GTK+ widget set.
+# Copyright (C) 1998-2002 James Henstridge
+#
+# pygtk.py: pygtk version selection code.
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import fnmatch
+import glob
+import os
+import os.path
+import sys
+
+__all__ = ['require']
+
+_our_dir = os.path.dirname(os.path.abspath(os.path.normpath(__file__)))
+_pygtk_2_0_dir = os.path.normpath('%s/gtk-2.0' % _our_dir)
+
+_pygtk_dir_pat = 'gtk-[0-9].[0-9]'
+
+_pygtk_required_version = None
+
+def _get_available_versions():
+ versions = {}
+ for dir in sys.path:
+ if not dir:
+ dir = os.getcwd()
+
+ if not os.path.isdir(dir):
+ continue
+
+ # if the dir is a pygtk dir, skip it
+ if fnmatch.fnmatchcase(os.path.basename(dir), _pygtk_dir_pat):
+ continue
+
+ for filename in glob.glob(os.path.join(dir, _pygtk_dir_pat)):
+ pathname = os.path.join(dir, filename)
+
+ # skip non directories
+ if not os.path.isdir(pathname):
+ continue
+
+ # skip empty directories
+ if not os.listdir(pathname):
+ continue
+
+ if not versions.has_key(filename[-3:]):
+ versions[filename[-3:]] = pathname
+ return versions
+
+def require20():
+ if _pygtk_2_0_dir not in sys.path:
+ sys.path.insert(0, _pygtk_2_0_dir)
+
+def require(version):
+ if version == '2.0':
+ return require20()
+
+ global _pygtk_required_version
+
+ if _pygtk_required_version != None:
+ assert _pygtk_required_version == version, \
+ "a different version of gtk was already required"
+ return
+
+ assert not sys.modules.has_key('gtk'), \
+ "pygtk.require() must be called before importing gtk"
+
+ versions = _get_available_versions()
+ assert versions.has_key(version), \
+ "required version '%s' not found on system" % version
+
+ # remove any pygtk dirs first ...
+ for dir in sys.path:
+ if fnmatch.fnmatchcase(os.path.basename(dir), _pygtk_dir_pat):
+ sys.path.remove(dir)
+
+ # prepend the pygtk path ...
+ sys.path.insert(0, versions[version])
+
+ _pygtk_required_version = version
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..0999c00
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,272 @@
+#!/usr/bin/env python
+#
+# setup.py - distutils configuration for pygobject
+#
+"""Python Bindings for GObject."""
+
+from distutils.command.build import build
+from distutils.command.build_clib import build_clib
+from distutils.sysconfig import get_python_inc
+from distutils.core import setup
+import glob
+import os
+import sys
+
+from dsextras import get_m4_define, getoutput, have_pkgconfig, \
+ GLOBAL_INC, GLOBAL_MACROS, InstallLib, InstallData, BuildExt, \
+ PkgConfigExtension, TemplateExtension, \
+ pkgc_get_libraries, pkgc_get_library_dirs, pkgc_get_include_dirs
+
+if '--yes-i-know-its-not-supported' in sys.argv:
+ sys.argv.remove('--yes-i-know-its-not-supported')
+else:
+ print '*'*70
+ print 'Building PyGObject using distutils is NOT SUPPORTED.'
+ print "It's mainly included to be able to easily build win32 installers"
+ print "You may continue, but only if you agree to not ask any questions"
+ print "To build PyGObject in a supported way, read the INSTALL file"
+ print
+ print "Build fixes are of course welcome and should be filed in bugzilla"
+ print '*'*70
+ input = raw_input('Not supported, ok [y/N]? ')
+ if not input.startswith('y'):
+ raise SystemExit("Aborted")
+
+MIN_PYTHON_VERSION = (2, 3, 5)
+
+MAJOR_VERSION = int(get_m4_define('pygobject_major_version'))
+MINOR_VERSION = int(get_m4_define('pygobject_minor_version'))
+MICRO_VERSION = int(get_m4_define('pygobject_micro_version'))
+
+VERSION = "%d.%d.%d" % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)
+
+GLIB_REQUIRED = get_m4_define('glib_required_version')
+
+PYGOBJECT_SUFFIX = '2.0'
+PYGOBJECT_SUFFIX_LONG = 'gtk-' + PYGOBJECT_SUFFIX
+
+GLOBAL_INC += ['gobject']
+GLOBAL_MACROS += [('PYGOBJECT_MAJOR_VERSION', MAJOR_VERSION),
+ ('PYGOBJECT_MINOR_VERSION', MINOR_VERSION),
+ ('PYGOBJECT_MICRO_VERSION', MICRO_VERSION)]
+
+if sys.platform == 'win32':
+ GLOBAL_MACROS.append(('VERSION', '"""%s"""' % VERSION))
+else:
+ raise SystemExit("Error: distutils build only supported on windows")
+
+if sys.version_info[:3] < MIN_PYTHON_VERSION:
+ raise SystemExit("Python %s or higher is required, %s found" % (
+ ".".join(map(str,MIN_PYTHON_VERSION)),
+ ".".join(map(str,sys.version_info[:3]))))
+
+if not have_pkgconfig():
+ raise SystemExit("Error, could not find pkg-config")
+
+DEFS_DIR = os.path.join('share', 'pygobject', PYGOBJECT_SUFFIX, 'defs')
+INCLUDE_DIR = os.path.join('include', 'pygtk-%s' % PYGOBJECT_SUFFIX)
+
+class PyGObjectInstallLib(InstallLib):
+ def run(self):
+
+ # Install pygtk.pth, pygtk.py[c] and templates
+ self.install_pth()
+ self.install_pygtk()
+
+ # Modify the base installation dir
+ install_dir = os.path.join(self.install_dir, PYGOBJECT_SUFFIX_LONG)
+ self.set_install_dir(install_dir)
+
+ InstallLib.run(self)
+
+ def install_pth(self):
+ """Write the pygtk.pth file"""
+ file = os.path.join(self.install_dir, 'pygtk.pth')
+ self.mkpath(self.install_dir)
+ open(file, 'w').write(PYGOBJECT_SUFFIX_LONG)
+ self.local_outputs.append(file)
+ self.local_inputs.append('pygtk.pth')
+
+ def install_pygtk(self):
+ """install pygtk.py in the right place."""
+ self.copy_file('pygtk.py', self.install_dir)
+ pygtk = os.path.join(self.install_dir, 'pygtk.py')
+ self.byte_compile([pygtk])
+ self.local_outputs.append(pygtk)
+ self.local_inputs.append('pygtk.py')
+
+class PyGObjectInstallData(InstallData):
+ def run(self):
+ self.add_template_option('VERSION', VERSION)
+ self.add_template_option('FFI_LIBS', '')
+ self.add_template_option('LIBFFI_PC', '')
+ self.prepare()
+
+ # Install templates
+ self.install_templates()
+
+ InstallData.run(self)
+
+ def install_templates(self):
+ self.install_template('pygobject-2.0.pc.in',
+ os.path.join(self.install_dir,
+ 'lib', 'pkgconfig'))
+
+class PyGObjectBuild(build):
+ enable_threading = 1
+PyGObjectBuild.user_options.append(('enable-threading', None,
+ 'enable threading support'))
+
+# glib
+glib = PkgConfigExtension(name='glib._glib',
+ pkc_name='glib-2.0',
+ pkc_version=GLIB_REQUIRED,
+ pygobject_pkc=None,
+ include_dirs=['glib'],
+ libraries=['pyglib'],
+ sources=['glib/glibmodule.c',
+ 'glib/pygiochannel.c',
+ 'glib/pygmaincontext.c',
+ 'glib/pygmainloop.c',
+ 'glib/pygoptioncontext.c',
+ 'glib/pygoptiongroup.c',
+ 'glib/pygsource.c',
+ 'glib/pygspawn.c',
+ ])
+
+# GObject
+gobject = PkgConfigExtension(name='gobject._gobject',
+ pkc_name='gobject-2.0',
+ pkc_version=GLIB_REQUIRED,
+ pygobject_pkc=None,
+ include_dirs=['glib'],
+ libraries=['pyglib'],
+ sources=['gobject/gobjectmodule.c',
+ 'gobject/pygboxed.c',
+ 'gobject/pygenum.c',
+ 'gobject/pygflags.c',
+ 'gobject/pyginterface.c',
+ 'gobject/pygobject.c',
+ 'gobject/pygparamspec.c',
+ 'gobject/pygpointer.c',
+ 'gobject/pygtype.c',
+ ])
+
+# gio
+gio = TemplateExtension(name='gio',
+ pkc_name='gio-2.0',
+ pkc_version=GLIB_REQUIRED,
+ output='gio._gio',
+ defs=('gio/gio.defs', ['gio/gio-types.defs']),
+ include_dirs=['glib'],
+ libraries=['pyglib'],
+ sources=['gio/giomodule.c',
+ 'gio/gio.c',
+ 'gio/pygio-utils.c'],
+ register=[('gio/gio.defs', ['gio/gio-types.defs'])],
+ override='gio/gio.override')
+
+clibs = []
+data_files = []
+ext_modules = []
+
+#Install dsextras and codegen so that the pygtk installer
+#can find them
+py_modules = ['dsextras']
+packages = ['codegen']
+
+if glib.can_build():
+ #It would have been nice to create another class, such as PkgConfigCLib to
+ #encapsulate this dictionary, but it is impossible. build_clib.py does
+ #a dumb check to see if its only arguments are a 2-tuple containing a
+ #string and a Dictionary type - which makes it impossible to hide behind a
+ #subclass
+ #
+ #So we are stuck with this ugly thing
+ clibs.append((
+ 'pyglib',{
+ 'sources':['glib/pyglib.c'],
+ 'macros':GLOBAL_MACROS,
+ 'include_dirs':
+ ['glib', get_python_inc()]+pkgc_get_include_dirs('glib-2.0')}))
+ #this library is not installed, so probbably should not include its header
+ #data_files.append((INCLUDE_DIR, ('glib/pyglib.h',)))
+
+ ext_modules.append(glib)
+ py_modules += ['glib.__init__', 'glib.option']
+else:
+ raise SystemExit("ERROR: Nothing to do, glib could not be found and is essential.")
+
+if gobject.can_build():
+ ext_modules.append(gobject)
+ data_files.append((INCLUDE_DIR, ('gobject/pygobject.h',)))
+ py_modules += ['gobject.__init__', 'gobject.propertyhelper', 'gobject.constants']
+else:
+ raise SystemExit("ERROR: Nothing to do, gobject could not be found and is essential.")
+
+if gio.can_build():
+ ext_modules.append(gio)
+ py_modules += ['gio.__init__']
+ data_files.append((DEFS_DIR,('gio/gio-types.defs',)))
+else:
+ raise SystemExit("ERROR: Nothing to do, gio could not be found and is essential.")
+
+# Threading support
+if '--disable-threading' in sys.argv:
+ sys.argv.remove('--disable-threading')
+ enable_threading = False
+else:
+ if '--enable-threading' in sys.argv:
+ sys.argv.remove('--enable-threading')
+ try:
+ import thread
+ except ImportError:
+ print "Warning: Could not import thread module, disabling threading"
+ enable_threading = False
+ else:
+ enable_threading = True
+
+if enable_threading:
+ name = 'gthread-2.0'
+ for module in ext_modules:
+ raw = getoutput('pkg-config --libs-only-l %s' % name)
+ for arg in raw.split():
+ if arg.startswith('-l'):
+ module.libraries.append(arg[2:])
+ else:
+ module.extra_link_args.append(arg)
+ raw = getoutput('pkg-config --cflags-only-I %s' % name)
+ for arg in raw.split():
+ if arg.startswith('-I'):
+ module.include_dirs.append(arg[2:])
+ else:
+ module.extra_compile_args.append(arg)
+else:
+ GLOBAL_MACROS.append(('DISABLE_THREADING', 1))
+
+
+doclines = __doc__.split("\n")
+
+options = {"bdist_wininst": {"install_script": "pygobject_postinstall.py"}}
+
+setup(name="pygobject",
+ url='http://www.pygtk.org/',
+ version=VERSION,
+ license='LGPL',
+ platforms=['yes'],
+ maintainer="Johan Dahlin",
+ maintainer_email="johan@gnome.org",
+ description = doclines[0],
+ long_description = "\n".join(doclines[2:]),
+ py_modules=py_modules,
+ packages=packages,
+ ext_modules=ext_modules,
+ libraries=clibs,
+ data_files=data_files,
+ scripts = ["pygobject_postinstall.py"],
+ options=options,
+ cmdclass={'install_lib': PyGObjectInstallLib,
+ 'install_data': PyGObjectInstallData,
+ 'build_clib' : build_clib,
+ 'build_ext': BuildExt,
+ 'build': PyGObjectBuild})
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..fcdffe1
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,63 @@
+INCLUDES = \
+ -I$(top_srcdir)/gobject \
+ $(PYTHON_INCLUDES) \
+ $(GLIB_CFLAGS)
+
+EXTRA_DIST = \
+ $(tests) \
+ common.py \
+ runtests.py \
+ testmodule.py \
+ test-floating.h \
+ test-thread.h \
+ test-unknown.h
+
+noinst_LTLIBRARIES = testhelper.la
+linked_LIBS = testhelper.la
+
+testhelper_la_LDFLAGS = -module -avoid-version
+testhelper_la_LIBADD = $(GLIB_LIBS)
+testhelper_la_SOURCES = \
+ testhelpermodule.c \
+ test-floating.c \
+ test-thread.c \
+ test-unknown.c
+
+tests = \
+ test_gicon.py \
+ test_gio.py \
+ test_gobject.py \
+ test_interface.py \
+ test_mainloop.py \
+ test_properties.py \
+ test_signal.py \
+ test_subprocess.py \
+ test_unknown.py \
+ test_source.py
+
+# This is a hack to make sure a shared library is built
+testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
+ $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
+
+check-local: $(top_srcdir)/glib/__init__.py $(top_srcdir)/gobject/__init__.py $(top_srcdir)/gio/__init__.py
+ @if test "$(top_builddir)" != "$(top_srcdir)"; then \
+ cp $(top_srcdir)/glib/*.py $(top_builddir)/glib; \
+ cp $(top_srcdir)/gobject/*.py $(top_builddir)/gobject; \
+ cp $(top_srcdir)/gio/*.py $(top_builddir)/gio; \
+ fi
+ @$(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(top_srcdir)
+ @if test "$(top_builddir)" != "$(top_srcdir)"; then \
+ rm -f $(top_builddir)/glib/*.py; \
+ rm -f $(top_builddir)/gobject/*.py; \
+ rm -f $(top_builddir)/gio/*.py; \
+ fi
+ @rm -fr $(top_builddir)/glib/*.pyc
+ @rm -fr $(top_builddir)/gobject/*.pyc
+ @rm -fr $(top_builddir)/gio/*.pyc
+
+
+all: $(LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..7e77581
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,569 @@
+# 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 = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+testhelper_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_testhelper_la_OBJECTS = testhelpermodule.lo test-floating.lo \
+ test-thread.lo test-unknown.lo
+testhelper_la_OBJECTS = $(am_testhelper_la_OBJECTS)
+testhelper_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testhelper_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(testhelper_la_SOURCES)
+DIST_SOURCES = $(testhelper_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = \
+ -I$(top_srcdir)/gobject \
+ $(PYTHON_INCLUDES) \
+ $(GLIB_CFLAGS)
+
+EXTRA_DIST = \
+ $(tests) \
+ common.py \
+ runtests.py \
+ testmodule.py \
+ test-floating.h \
+ test-thread.h \
+ test-unknown.h
+
+noinst_LTLIBRARIES = testhelper.la
+linked_LIBS = testhelper.la
+testhelper_la_LDFLAGS = -module -avoid-version
+testhelper_la_LIBADD = $(GLIB_LIBS)
+testhelper_la_SOURCES = \
+ testhelpermodule.c \
+ test-floating.c \
+ test-thread.c \
+ test-unknown.c
+
+tests = \
+ test_gicon.py \
+ test_gio.py \
+ test_gobject.py \
+ test_interface.py \
+ test_mainloop.py \
+ test_properties.py \
+ test_signal.py \
+ test_subprocess.py \
+ test_unknown.py \
+ test_source.py
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-floating.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unknown.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelpermodule.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@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
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+ clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+# This is a hack to make sure a shared library is built
+testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
+ $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
+
+check-local: $(top_srcdir)/glib/__init__.py $(top_srcdir)/gobject/__init__.py $(top_srcdir)/gio/__init__.py
+ @if test "$(top_builddir)" != "$(top_srcdir)"; then \
+ cp $(top_srcdir)/glib/*.py $(top_builddir)/glib; \
+ cp $(top_srcdir)/gobject/*.py $(top_builddir)/gobject; \
+ cp $(top_srcdir)/gio/*.py $(top_builddir)/gio; \
+ fi
+ @$(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(top_srcdir)
+ @if test "$(top_builddir)" != "$(top_srcdir)"; then \
+ rm -f $(top_builddir)/glib/*.py; \
+ rm -f $(top_builddir)/gobject/*.py; \
+ rm -f $(top_builddir)/gio/*.py; \
+ fi
+ @rm -fr $(top_builddir)/glib/*.pyc
+ @rm -fr $(top_builddir)/gobject/*.pyc
+ @rm -fr $(top_builddir)/gio/*.pyc
+
+all: $(LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/common.py b/tests/common.py
new file mode 100644
index 0000000..a6fa73d
--- /dev/null
+++ b/tests/common.py
@@ -0,0 +1,48 @@
+import os
+import sys
+
+def importModules(buildDir, srcDir):
+ # Be very careful when you change this code, it's
+ # fragile and the order is really significant
+
+ sys.path.insert(0, srcDir)
+ sys.path.insert(0, buildDir)
+ sys.path.insert(0, os.path.join(buildDir, 'glib'))
+ sys.path.insert(0, os.path.join(buildDir, 'gobject'))
+ sys.path.insert(0, os.path.join(buildDir, 'gio'))
+
+ # testhelper
+ sys.path.insert(0, os.path.join(buildDir, 'tests'))
+ sys.argv.append('--g-fatal-warnings')
+
+ testhelper = importModule('testhelper', '.')
+ glib = importModule('glib', buildDir, 'glib')
+ gobject = importModule('gobject', buildDir, 'gobject')
+ gio = importModule('gio', buildDir, 'gio')
+
+ globals().update(locals())
+
+ os.environ['PYGTK_USE_GIL_STATE_API'] = ''
+ gobject.threads_init()
+
+def importModule(module, directory, name=None):
+ global isDistCheck
+
+ origName = module
+ if not name:
+ name = module + '.la'
+
+ try:
+ obj = __import__(module, {}, {}, '')
+ except ImportError, e:
+ raise SystemExit('%s could not be imported: %s' % (origName, e))
+
+ location = obj.__file__
+
+ current = os.getcwd()
+ expected = os.path.abspath(os.path.join(current, location))
+ current = os.path.abspath(location)
+ if current != expected:
+ raise AssertionError('module %s imported from wrong location. Expected %s, got %s' % (
+ module, expected, current))
+ return obj
diff --git a/tests/runtests.py b/tests/runtests.py
new file mode 100644
index 0000000..da5ade0
--- /dev/null
+++ b/tests/runtests.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+import glob
+import os
+import sys
+import unittest
+
+import common
+
+program = None
+if len(sys.argv) == 3:
+ buildDir = sys.argv[1]
+ srcDir = sys.argv[2]
+else:
+ if len(sys.argv) == 2:
+ program = sys.argv[1]
+ if program.endswith('.py'):
+ program = program[:-3]
+ buildDir = '..'
+ srcDir = '.'
+
+common.importModules(buildDir=buildDir,
+ srcDir=srcDir)
+
+SKIP_FILES = ['common', 'runtests']
+
+dir = os.path.split(os.path.abspath(__file__))[0]
+os.chdir(dir)
+
+def gettestnames():
+ files = glob.glob('*.py')
+ names = map(lambda x: x[:-3], files)
+ map(names.remove, SKIP_FILES)
+ return names
+
+suite = unittest.TestSuite()
+loader = unittest.TestLoader()
+
+for name in gettestnames():
+ if program and program not in name:
+ continue
+ suite.addTest(loader.loadTestsFromName(name))
+
+testRunner = unittest.TextTestRunner()
+testRunner.run(suite)
diff --git a/tests/test-floating.c b/tests/test-floating.c
new file mode 100644
index 0000000..918a42d
--- /dev/null
+++ b/tests/test-floating.c
@@ -0,0 +1,95 @@
+/*
+ * test-floating.c - Source for TestFloatingWithSinkFunc and TestFloatingWithoutSinkFunc
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "test-floating.h"
+
+/* TestFloatingWithSinkFunc */
+
+G_DEFINE_TYPE(TestFloatingWithSinkFunc, test_floating_with_sink_func, G_TYPE_INITIALLY_UNOWNED)
+
+static void
+test_floating_with_sink_func_finalize (GObject *gobject)
+{
+ TestFloatingWithSinkFunc *object = TEST_FLOATING_WITH_SINK_FUNC (gobject);
+
+ if (g_object_is_floating (object))
+ {
+ g_warning ("A floating object was finalized. This means that someone\n"
+ "called g_object_unref() on an object that had only a floating\n"
+ "reference; the initial floating reference is not owned by anyone\n"
+ "and must be removed with g_object_ref_sink().");
+ }
+
+ G_OBJECT_CLASS (test_floating_with_sink_func_parent_class)->finalize (gobject);
+}
+
+static void
+test_floating_with_sink_func_class_init (TestFloatingWithSinkFuncClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = test_floating_with_sink_func_finalize;
+}
+
+static void
+test_floating_with_sink_func_init (TestFloatingWithSinkFunc *self)
+{
+}
+
+void
+sink_test_floating_with_sink_func (GObject *object)
+{
+ if (g_object_is_floating(object)) {
+ g_object_ref_sink(object);
+ }
+}
+
+/* TestFloatingWithoutSinkFunc */
+
+G_DEFINE_TYPE(TestFloatingWithoutSinkFunc, test_floating_without_sink_func, G_TYPE_INITIALLY_UNOWNED)
+
+static void
+test_floating_without_sink_func_finalize (GObject *gobject)
+{
+ TestFloatingWithoutSinkFunc *object = TEST_FLOATING_WITHOUT_SINK_FUNC (gobject);
+
+ if (g_object_is_floating (object))
+ {
+ g_warning ("A floating object was finalized. This means that someone\n"
+ "called g_object_unref() on an object that had only a floating\n"
+ "reference; the initial floating reference is not owned by anyone\n"
+ "and must be removed without g_object_ref_sink().");
+ }
+
+ G_OBJECT_CLASS (test_floating_without_sink_func_parent_class)->finalize (gobject);
+}
+
+static void
+test_floating_without_sink_func_class_init (TestFloatingWithoutSinkFuncClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = test_floating_without_sink_func_finalize;
+}
+
+static void
+test_floating_without_sink_func_init (TestFloatingWithoutSinkFunc *self)
+{
+}
+
diff --git a/tests/test-floating.h b/tests/test-floating.h
new file mode 100644
index 0000000..e53df32
--- /dev/null
+++ b/tests/test-floating.h
@@ -0,0 +1,60 @@
+/*
+ * test-floating.h - Header for TestFloatingWithSinkFunc and TestFloatingWithoutSinkFunc
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <glib-object.h>
+
+/* TestFloatingWithSinkFunc */
+
+typedef struct {
+ GInitiallyUnowned parent;
+} TestFloatingWithSinkFunc;
+
+typedef struct {
+ GInitiallyUnownedClass parent_class;
+} TestFloatingWithSinkFuncClass;
+
+#define TEST_TYPE_FLOATING_WITH_SINK_FUNC (test_floating_with_sink_func_get_type())
+#define TEST_FLOATING_WITH_SINK_FUNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC, TestFloatingWithSinkFunc))
+#define TEST_FLOATING_WITH_SINK_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_FLOATING_WITH_SINK_FUNC, TestFloatingWithSinkFuncClass))
+#define TEST_IS_FLOATING_WITH_SINK_FUNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC))
+#define TEST_IS_FLOATING_WITH_SINK_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC))
+#define TEST_FLOATING_WITH_SINK_FUNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC, TestFloatingWithSinkFuncClass))
+
+GType test_floating_with_sink_func_get_type (void);
+void sink_test_floating_with_sink_func (GObject *object);
+
+/* TestFloatingWithoutSinkFunc */
+
+typedef struct {
+ GInitiallyUnowned parent;
+} TestFloatingWithoutSinkFunc;
+
+typedef struct {
+ GInitiallyUnownedClass parent_class;
+} TestFloatingWithoutSinkFuncClass;
+
+#define TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC (test_floating_without_sink_func_get_type())
+#define TEST_FLOATING_WITHOUT_SINK_FUNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC, TestFloatingWithoutSinkFunc))
+#define TEST_FLOATING_WITHOUT_SINK_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC, TestFloatingWithoutSinkFuncClass))
+#define TEST_IS_FLOATING_WITHOUT_SINK_FUNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC))
+#define TEST_IS_FLOATING_WITHOUT_SINK_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC))
+#define TEST_FLOATING_WITHOUT_SINK_FUNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC, TestFloatingWithoutSinkFuncClass))
+
+GType test_floating_without_sink_func_get_type (void);
+
diff --git a/tests/test-thread.c b/tests/test-thread.c
new file mode 100644
index 0000000..0f5b909
--- /dev/null
+++ b/tests/test-thread.c
@@ -0,0 +1,64 @@
+#include "test-thread.h"
+
+enum
+{
+ /* methods */
+ SIGNAL_EMIT_SIGNAL,
+ SIGNAL_FROM_THREAD,
+ LAST_SIGNAL
+};
+
+static guint test_thread_signals[LAST_SIGNAL] = { 0 };
+
+typedef enum {
+ TEST_THREAD_A,
+ TEST_THREAD_B
+} ThreadEnumType;
+
+static GType
+test_thread_enum_get_type (void)
+{
+ static GType enum_type = 0;
+ static GEnumValue enum_values[] = {
+ {TEST_THREAD_A, "TEST_THREAD_A", "a as in apple"},
+ {0, NULL, NULL},
+ };
+
+ if (!enum_type) {
+ enum_type =
+ g_enum_register_static ("TestThreadEnum", enum_values);
+ }
+ return enum_type;
+}
+
+G_DEFINE_TYPE(TestThread, test_thread, G_TYPE_OBJECT);
+
+static void
+other_thread_cb (TestThread *self)
+{
+ g_signal_emit_by_name (self, "from-thread", 0, NULL);
+ g_thread_exit (0);
+}
+
+static void
+test_thread_emit_signal (TestThread *self)
+{
+ self->thread = g_thread_create ((GThreadFunc)other_thread_cb,
+ self, TRUE, NULL);
+}
+
+static void test_thread_init (TestThread *self) {}
+static void test_thread_class_init (TestThreadClass *klass)
+{
+ test_thread_signals[SIGNAL_EMIT_SIGNAL] =
+ g_signal_new ("emit-signal", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (TestThreadClass, emit_signal),
+ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ test_thread_signals[SIGNAL_FROM_THREAD] =
+ g_signal_new ("from-thread", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (TestThreadClass, from_thread),
+ NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1,
+ test_thread_enum_get_type ());
+
+ klass->emit_signal = test_thread_emit_signal;
+}
diff --git a/tests/test-thread.h b/tests/test-thread.h
new file mode 100644
index 0000000..db12fe4
--- /dev/null
+++ b/tests/test-thread.h
@@ -0,0 +1,22 @@
+#include <glib-object.h>
+
+typedef struct {
+ GObject parent;
+ GThread *thread;
+} TestThread;
+
+typedef struct {
+ GObjectClass parent_class;
+ void (*emit_signal) (TestThread *sink);
+ void (*from_thread) (TestThread *sink);
+} TestThreadClass;
+
+GType test_thread_get_type (void);
+
+#define TEST_TYPE_THREAD (test_thread_get_type())
+#define TEST_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_THREAD, TestTHREAD))
+#define TEST_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_THREAD, TestTHREADClass))
+#define TEST_IS_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_THREAD))
+#define TEST_IS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_THREAD))
+#define TEST_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_THREAD, TestTHREADClass))
+
diff --git a/tests/test-unknown.c b/tests/test-unknown.c
new file mode 100644
index 0000000..85aba73
--- /dev/null
+++ b/tests/test-unknown.c
@@ -0,0 +1,113 @@
+#include "test-unknown.h"
+
+enum {
+ PROP_SOME_PROPERTY = 1,
+};
+
+
+static void
+test_interface_base_init (gpointer g_iface)
+{
+ static gboolean initialized = FALSE;
+
+ if (!initialized)
+ {
+ g_object_interface_install_property (g_iface,
+ g_param_spec_string ("some-property",
+ "some-property",
+ "A simple test property",
+ NULL,
+ G_PARAM_READWRITE));
+ initialized = TRUE;
+ }
+}
+
+
+GType
+test_interface_get_type (void)
+{
+ static GType gtype = 0;
+
+ if (!gtype)
+ {
+ static const GTypeInfo info =
+ {
+ sizeof (TestInterfaceIface), /* class_size */
+ test_interface_base_init, /* base_init */
+ NULL, /* base_finalize */
+ NULL,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ 0,
+ 0, /* n_preallocs */
+ NULL
+ };
+
+ gtype =
+ g_type_register_static (G_TYPE_INTERFACE, "TestInterface",
+ &info, 0);
+
+ g_type_interface_add_prerequisite (gtype, G_TYPE_OBJECT);
+ }
+
+ return gtype;
+}
+
+void test_unknown_iface_method (TestInterface *iface)
+{
+}
+
+static void
+test_unknown_test_interface_init (TestInterfaceIface *iface)
+{
+ iface->iface_method = test_unknown_iface_method;
+}
+
+G_DEFINE_TYPE_WITH_CODE (TestUnknown, test_unknown, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (TEST_TYPE_INTERFACE,
+ test_unknown_test_interface_init));
+
+static void test_unknown_init (TestUnknown *self) {}
+
+
+static void
+test_unknown_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+
+}
+
+static void
+test_unknown_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+
+}
+
+static void test_unknown_class_init (TestUnknownClass *klass)
+{
+ GObjectClass *gobject_class = (GObjectClass*) klass;
+
+ gobject_class->get_property = test_unknown_get_property;
+ gobject_class->set_property = test_unknown_set_property;
+
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass),
+ PROP_SOME_PROPERTY,
+ g_param_spec_string ("some-property",
+ "some-property",
+ "A simple test property",
+ NULL,
+ G_PARAM_READWRITE));
+}
+
+void test_interface_iface_method (TestInterface *instance)
+{
+ TestInterfaceIface *iface = TEST_INTERFACE_GET_IFACE (instance);
+
+ (* iface->iface_method) (instance);
+}
diff --git a/tests/test-unknown.h b/tests/test-unknown.h
new file mode 100644
index 0000000..e0f51a2
--- /dev/null
+++ b/tests/test-unknown.h
@@ -0,0 +1,40 @@
+#include <glib-object.h>
+
+/* TestUnknown */
+
+typedef struct {
+ GObject parent;
+} TestUnknown;
+
+typedef struct {
+ GObjectClass parent_class;
+} TestUnknownClass;
+
+#define TEST_TYPE_UNKNOWN (test_unknown_get_type())
+#define TEST_UNKNOWN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_UNKNOWN, TestUnknown))
+#define TEST_UNKNOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_UNKNOWN, TestUnknownClass))
+#define TEST_IS_UNKNOWN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_UNKNOWN))
+#define TEST_IS_UNKNOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_UNKNOWN))
+#define TEST_UNKNOWN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_UNKNOWN, TestUnknownClass))
+
+GType test_unknown_get_type (void);
+
+/* TestInterface */
+typedef struct _TestInterface TestInterface;
+typedef struct _TestInterfaceIface TestInterfaceIface;
+
+struct _TestInterfaceIface
+{
+ GTypeInterface g_iface;
+ /* VTable */
+ void (* iface_method) (TestInterface *iface);
+};
+
+#define TEST_TYPE_INTERFACE (test_interface_get_type ())
+#define TEST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_INTERFACE, TestInterface))
+#define TEST_IS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_INTERFACE))
+#define TEST_INTERFACE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TEST_TYPE_INTERFACE, TestInterfaceIface))
+
+GType test_interface_get_type (void);
+
+void test_interface_iface_method (TestInterface *iface);
diff --git a/tests/test_gicon.py b/tests/test_gicon.py
new file mode 100644
index 0000000..5ce7ece
--- /dev/null
+++ b/tests/test_gicon.py
@@ -0,0 +1,111 @@
+# -*- Mode: Python -*-
+
+import os
+import unittest
+
+from common import gio, glib
+
+
+class TestIcon(unittest.TestCase):
+ def test_eq(self):
+ self.assertEquals(gio.FileIcon(gio.File('foo.png')),
+ gio.FileIcon(gio.File('foo.png')))
+ self.assertEquals(gio.ThemedIcon('foo'),
+ gio.ThemedIcon('foo'))
+
+ self.assertNotEqual(gio.FileIcon(gio.File('foo.png')),
+ gio.FileIcon(gio.File('bar.png')))
+ self.assertNotEquals(gio.ThemedIcon('foo'),
+ gio.ThemedIcon('bar'))
+ self.assertNotEquals(gio.FileIcon(gio.File('foo.png')),
+ gio.ThemedIcon('foo'))
+
+ def test_hash(self):
+ self.assertEquals(hash(gio.FileIcon(gio.File('foo.png'))),
+ hash(gio.FileIcon(gio.File('foo.png'))))
+ self.assertEquals(hash(gio.ThemedIcon('foo')),
+ hash(gio.ThemedIcon('foo')))
+
+class TestLoadableIcon(unittest.TestCase):
+ def setUp(self):
+ self.file = open('temp.svg', 'w')
+ self.svg = ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
+ '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" '
+ '"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">'
+ '<svg width="32" height="32"/>')
+ self.file.write(self.svg)
+ self.file.close()
+ self.icon = gio.FileIcon(gio.File('temp.svg'))
+
+ def tearDown(self):
+ if os.path.exists('temp.svg'):
+ os.unlink('temp.svg')
+
+ def test_load(self):
+ stream, type = self.icon.load()
+ try:
+ self.assert_(isinstance(stream, gio.InputStream))
+ self.assertEquals(self.svg, stream.read())
+ finally:
+ stream.close()
+
+ def test_load_async(self):
+ def callback(icon, result):
+ try:
+ stream, type = icon.load_finish(result)
+ self.assert_(isinstance(stream, gio.InputStream))
+ self.assertEquals(self.svg, stream.read())
+ finally:
+ loop.quit()
+ stream.close()
+
+ self.icon.load_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+class TestFileIcon(unittest.TestCase):
+ def test_constructor(self):
+ file = gio.File('foo.png')
+ self.assert_(file is gio.FileIcon(file).get_file())
+
+class TestThemedIcon(unittest.TestCase):
+ def setUp(self):
+ self.icon = gio.ThemedIcon("open")
+
+ def test_constructor(self):
+ have_use_default_fallbacks = ('use_default_fallbacks'
+ in gio.ThemedIcon.props.__members__)
+ icon = gio.ThemedIcon('foo')
+ self.assertEquals(['foo'], icon.props.names)
+ self.assert_(not have_use_default_fallbacks
+ or not icon.props.use_default_fallbacks)
+
+ icon = gio.ThemedIcon(['foo', 'bar', 'baz'])
+ self.assertEquals(['foo', 'bar', 'baz'], icon.props.names)
+ self.assert_(not have_use_default_fallbacks
+ or not icon.props.use_default_fallbacks)
+
+ icon = gio.ThemedIcon('xxx-yyy-zzz', True)
+ self.assertEquals(['xxx-yyy-zzz', 'xxx-yyy', 'xxx'], icon.props.names)
+ self.assert_(not have_use_default_fallbacks
+ or icon.props.use_default_fallbacks)
+
+ def test_constructor_illegals(self):
+ self.assertRaises(TypeError, lambda: gio.ThemedIcon(42))
+ self.assertRaises(TypeError, lambda: gio.ThemedIcon(['foo', 42, 'bar']))
+
+ def test_get_names(self):
+ self.assertEquals(self.icon.get_names(), ['open'])
+
+ def test_append_name(self):
+ self.assertEquals(self.icon.get_names(), ['open'])
+ self.icon.append_name('close')
+ self.assertEquals(self.icon.get_names(), ['open', 'close'])
+
+class TestEmblemedIcon(unittest.TestCase):
+ def test_emblemed_icon(self):
+ icon = gio.FileIcon(gio.File('foo.png'))
+ emblem = gio.Emblem(icon)
+ emblemed = gio.EmblemedIcon(icon, emblem)
+ self.assertEquals(emblemed.get_emblems()[0], emblem)
diff --git a/tests/test_gio.py b/tests/test_gio.py
new file mode 100644
index 0000000..feafc70
--- /dev/null
+++ b/tests/test_gio.py
@@ -0,0 +1,1137 @@
+# -*- Mode: Python -*-
+
+import os
+import unittest
+
+from common import gio, glib
+
+
+class TestFile(unittest.TestCase):
+ def setUp(self):
+ self._f = open("file.txt", "w+")
+ self.file = gio.File("file.txt")
+
+ def tearDown(self):
+ self._f.close()
+ if os.path.exists('file.txt'):
+ os.unlink("file.txt")
+
+ def testReadAsync(self):
+ self._f.write("testing")
+ self._f.seek(0)
+
+ def callback(file, result):
+ try:
+ stream = file.read_finish(result)
+ self.failUnless(isinstance(stream, gio.InputStream))
+ self.assertEquals(stream.read(), "testing")
+ finally:
+ loop.quit()
+
+ self.file.read_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testAppendToAsync(self):
+ self._f.write("append_to ")
+ self._f.close()
+
+ def callback(file, result):
+ try:
+ stream = file.append_to_finish(result)
+ self.failUnless(isinstance(stream, gio.OutputStream))
+ w = stream.write("testing")
+ cont, leng, etag = self.file.load_contents()
+ self.assertEqual(cont, "append_to testing")
+ finally:
+ loop.quit()
+
+ self.file.append_to_async(callback, gio.FILE_CREATE_NONE,
+ glib.PRIORITY_HIGH)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testAppendToAsyncNoargs(self):
+ self._f.write("append_to ")
+ self._f.close()
+
+ def callback(file, result):
+ try:
+ stream = file.append_to_finish(result)
+ self.failUnless(isinstance(stream, gio.OutputStream))
+ w = stream.write("testing")
+ cont, leng, etag = self.file.load_contents()
+ self.assertEqual(cont, "append_to testing")
+ finally:
+ loop.quit()
+
+ self.file.append_to_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testCreateAsync(self):
+ def callback(file, result):
+ try:
+ stream = file.create_finish(result)
+ self.failUnless(isinstance(stream, gio.OutputStream))
+ w = stream.write("testing")
+ cont, leng, etag = file.load_contents()
+ self.assertEqual(cont, "testing")
+ finally:
+ if os.path.exists('temp.txt'):
+ os.unlink("temp.txt")
+ loop.quit()
+
+ gfile = gio.File("temp.txt")
+ gfile.create_async(callback, gio.FILE_CREATE_NONE,
+ glib.PRIORITY_HIGH)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testCreateReadWriteAsync(self):
+ def callback(file, result):
+ try:
+ iostream = file.create_readwrite_finish(result)
+ self.failUnless(isinstance(iostream, gio.FileIOStream))
+
+ ostream = iostream.get_output_stream()
+ self.failUnless(isinstance(ostream, gio.OutputStream))
+
+ w = ostream.write("testing")
+ cont, leng, etag = file.load_contents()
+ self.assertEqual(cont, "testing")
+ finally:
+ if os.path.exists('temp.txt'):
+ os.unlink("temp.txt")
+ loop.quit()
+
+ gfile = gio.File("temp.txt")
+ gfile.create_readwrite_async(callback, gio.FILE_CREATE_NONE,
+ glib.PRIORITY_HIGH)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testCreateAsyncNoargs(self):
+ def callback(file, result):
+ try:
+ stream = file.create_finish(result)
+ self.failUnless(isinstance(stream, gio.OutputStream))
+ w = stream.write("testing")
+ cont, leng, etag = file.load_contents()
+ self.assertEqual(cont, "testing")
+ finally:
+ if os.path.exists('temp.txt'):
+ os.unlink("temp.txt")
+ loop.quit()
+
+ gfile = gio.File("temp.txt")
+ gfile.create_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testReplaceAsync(self):
+ self._f.write("testing")
+ self._f.close()
+
+ def callback(file, result):
+ try:
+ stream = file.replace_finish(result)
+ self.failUnless(isinstance(stream, gio.OutputStream))
+ stream.write("some new string")
+ stream.close()
+ cont, leng, etag = file.load_contents()
+ self.assertEqual(cont, "some new string")
+ finally:
+ loop.quit()
+
+
+ self.file.replace_async(callback, None, True, gio.FILE_CREATE_NONE,
+ glib.PRIORITY_HIGH)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testReplaceAsyncNoargs(self):
+ self._f.write("testing")
+ self._f.close()
+
+ def callback(file, result):
+ try:
+ stream = file.replace_finish(result)
+ self.failUnless(isinstance(stream, gio.OutputStream))
+ stream.write("some new string")
+ stream.close()
+ cont, leng, etag = file.load_contents()
+ self.assertEqual(cont, "some new string")
+ finally:
+ loop.quit()
+
+
+ self.file.replace_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testReadAsyncError(self):
+ self.assertRaises(TypeError, self.file.read_async)
+ self.assertRaises(TypeError, self.file.read_async, "foo", "bar")
+ self.assertRaises(TypeError, self.file.read_async, "foo",
+ priority="bar")
+ self.assertRaises(TypeError, self.file.read_async, "foo",
+ priority="bar")
+ self.assertRaises(TypeError, self.file.read_async, "foo",
+ priority=1, cancellable="bar")
+ self.assertRaises(TypeError, self.file.read_async, "foo", 1, "bar")
+
+ def testConstructor(self):
+ for gfile in [gio.File("/"),
+ gio.File("file:///"),
+ gio.File(uri="file:///"),
+ gio.File(path="/"),
+ gio.File(u"/"),
+ gio.File(path=u"/")]:
+ self.failUnless(isinstance(gfile, gio.File))
+ self.assertEquals(gfile.get_path(), "/")
+ self.assertEquals(gfile.get_uri(), "file:///")
+
+ def testConstructorError(self):
+ self.assertRaises(TypeError, gio.File)
+ self.assertRaises(TypeError, gio.File, 1)
+ self.assertRaises(TypeError, gio.File, "foo", "bar")
+ self.assertRaises(TypeError, gio.File, foo="bar")
+ self.assertRaises(TypeError, gio.File, uri=1)
+ self.assertRaises(TypeError, gio.File, path=1)
+
+ def testLoadContents(self):
+ self._f.write("testing load_contents")
+ self._f.seek(0)
+ c = gio.Cancellable()
+ cont, leng, etag = self.file.load_contents(cancellable=c)
+ self.assertEqual(cont, "testing load_contents")
+ self.assertEqual(leng, 21)
+ self.assertNotEqual(etag, '')
+
+ def testLoadContentsAsync(self):
+ self._f.write("testing load_contents_async")
+ self._f.seek(0)
+
+ def callback(contents, result):
+ try:
+ cont, leng, etag = contents.load_contents_finish(result)
+ self.assertEqual(cont, "testing load_contents_async")
+ self.assertEqual(leng, 27)
+ self.assertNotEqual(etag, '')
+ finally:
+ loop.quit()
+
+ canc = gio.Cancellable()
+ self.file.load_contents_async(callback, cancellable=canc)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testQueryInfoAsync(self):
+ def callback(file, result):
+ try:
+ info = file.query_info_finish(result)
+ self.failUnless(isinstance(info, gio.FileInfo))
+ self.failUnless(info.get_name(), "file.txt")
+ finally:
+ loop.quit()
+
+ self.file.query_info_async("standard", callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testMountMountable(self):
+ gfile = gio.File('localtest:')
+ def unmount_done(mount, result):
+ try:
+ retval = mount.unmount_finish(result)
+ self.failUnless(retval)
+ finally:
+ loop.quit()
+
+ def mount_enclosing_volume_done(gfile, result):
+ try:
+ try:
+ retval = gfile.mount_enclosing_volume_finish(result)
+ except gio.Error, e:
+ # If we run the tests too fast
+ if e.code == gio.ERROR_ALREADY_MOUNTED:
+ print ('WARNING: testfile is already mounted, '
+ 'skipping test')
+ loop.quit()
+ return
+ raise
+ self.failUnless(retval)
+ finally:
+ try:
+ mount = gfile.find_enclosing_mount()
+ except gio.Error:
+ loop.quit()
+ return
+ mount.unmount(unmount_done)
+
+ mount_operation = gio.MountOperation()
+ gfile.mount_enclosing_volume(mount_operation,
+ mount_enclosing_volume_done)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testCopy(self):
+ if os.path.exists('copy.txt'):
+ os.unlink("copy.txt")
+
+ source = gio.File('file.txt')
+ destination = gio.File('copy.txt')
+ try:
+ retval = source.copy(destination)
+ self.failUnless(retval)
+
+ self.failUnless(os.path.exists('copy.txt'))
+ self.assertEqual(open('file.txt').read(),
+ open('copy.txt').read())
+ finally:
+ os.unlink("copy.txt")
+
+ self.called = False
+ def callback(current, total):
+ self.called = True
+ source = gio.File('file.txt')
+ destination = gio.File('copy.txt')
+ try:
+ retval = source.copy(destination, callback)
+ self.failUnless(retval)
+
+ self.failUnless(os.path.exists('copy.txt'))
+ self.assertEqual(open('file.txt').read(),
+ open('copy.txt').read())
+ self.failUnless(self.called)
+ finally:
+ os.unlink("copy.txt")
+
+ def test_copy_async(self):
+ if os.path.exists('copy.txt'):
+ os.unlink("copy.txt")
+
+ source = gio.File('file.txt')
+ destination = gio.File('copy.txt')
+
+ def copied(source_, result):
+ try:
+ self.assert_(source_ is source)
+ self.failUnless(source_.copy_finish(result))
+ finally:
+ loop.quit()
+
+ def progress(current, total):
+ self.assert_(isinstance(current, long))
+ self.assert_(isinstance(total, long))
+ self.assert_(0 <= current <= total)
+
+ try:
+ loop = glib.MainLoop()
+ source.copy_async(destination, copied, progress_callback = progress)
+ loop.run()
+
+ self.failUnless(os.path.exists('copy.txt'))
+ self.assertEqual(open('file.txt').read(),
+ open('copy.txt').read())
+ finally:
+ os.unlink("copy.txt")
+
+ # See bug 546591.
+ def test_copy_progress(self):
+ source = gio.File('file.txt')
+ destination = gio.File('copy.txt')
+
+ def progress(current, total):
+ self.assert_(isinstance(current, long))
+ self.assert_(isinstance(total, long))
+ self.assert_(0 <= current <= total)
+
+ try:
+ retval = source.copy(destination,
+ flags=gio.FILE_COPY_OVERWRITE,
+ progress_callback=progress)
+ self.failUnless(retval)
+
+ self.failUnless(os.path.exists('copy.txt'))
+ self.assertEqual(open('file.txt').read(),
+ open('copy.txt').read())
+ finally:
+ os.unlink("copy.txt")
+
+ def testMove(self):
+ if os.path.exists('move.txt'):
+ os.unlink("move.txt")
+
+ source = gio.File('file.txt')
+ destination = gio.File('move.txt')
+ retval = source.move(destination)
+ self.failUnless(retval)
+
+ self.failIf(os.path.exists('file.txt'))
+ self.failUnless(os.path.exists('move.txt'))
+
+ self.called = False
+ def callback(current, total):
+ self.called = True
+ source = gio.File('move.txt')
+ destination = gio.File('move-2.txt')
+ try:
+ retval = source.move(destination, callback)
+ self.failUnless(retval)
+
+ self.failIf(os.path.exists('move.txt'))
+ self.failUnless(os.path.exists('move-2.txt'))
+ self.failUnless(self.called)
+ finally:
+ os.unlink("move-2.txt")
+
+ def testInfoList(self):
+ infolist = self.file.query_settable_attributes()
+ for info in infolist:
+ if info.name == "time::modified":
+ self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_UINT64)
+ self.assertEqual(info.name, "time::modified")
+ self.assertEqual(info.flags,
+ gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED |
+ gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE)
+
+ def testQueryWritableNamespaces(self):
+ infolist = self.file.query_writable_namespaces()
+ for info in infolist:
+ if info.name == "xattr":
+ self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
+
+ def testSetAttribute(self):
+ self._f.write("testing attributes")
+ self._f.seek(0)
+ infolist = self.file.query_settable_attributes()
+
+ self.assertNotEqual(len(infolist), 0)
+
+ for info in infolist:
+ if info.name == "time::modified-usec":
+ ret = self.file.set_attribute("time::modified-usec",
+ gio.FILE_ATTRIBUTE_TYPE_UINT32,
+ 10, gio.FILE_QUERY_INFO_NONE)
+ self.assertEqual(ret, True)
+
+ def testSetAttributesAsync(self):
+ def callback(gfile, result):
+ try:
+ info = gfile.set_attributes_finish(result)
+ usec = info.get_attribute_uint32("time::modified-usec")
+ self.assertEqual(usec, 10)
+ finally:
+ loop.quit()
+
+ info = gio.FileInfo()
+ info.set_attribute_uint32("time::modified-usec", 10)
+
+ canc = gio.Cancellable()
+ self.file.set_attributes_async(info, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testReplaceContents(self):
+ self.file.replace_contents("testing replace_contents")
+ cont, leng, etag = self.file.load_contents()
+ self.assertEqual(cont, "testing replace_contents")
+
+ caught = False
+ try:
+ self.file.replace_contents("this won't work", etag="wrong")
+ except gio.Error, e:
+ self.assertEqual(e.code, gio.ERROR_WRONG_ETAG)
+ caught = True
+ self.failUnless(caught)
+
+ self.file.replace_contents("testing replace_contents again", etag=etag)
+ cont, leng, etag = self.file.load_contents()
+ self.assertEqual(cont, "testing replace_contents again")
+
+ self.file.replace_contents("testing replace_contents yet again", etag=None)
+ cont, leng, etag = self.file.load_contents()
+ self.assertEqual(cont, "testing replace_contents yet again")
+
+ def testReplaceContentsAsync(self):
+
+ def callback(contents, result):
+ try:
+ newetag = contents.replace_contents_finish(result)
+ cont, leng, etag = self.file.load_contents()
+ self.assertEqual(cont, "testing replace_contents_async")
+ self.assertEqual(leng, 30)
+ self.assertEqual(etag, newetag)
+ self.assertNotEqual(newetag, '')
+ finally:
+ loop.quit()
+
+ canc = gio.Cancellable()
+ self.file.replace_contents_async("testing replace_contents_async", callback, cancellable=canc)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def test_eq(self):
+ self.assertEqual(gio.File('foo'),
+ gio.File('foo'))
+ self.assertNotEqual(gio.File('foo'),
+ gio.File('bar'))
+
+ def test_hash(self):
+ self.assertEquals(hash(gio.File('foo')),
+ hash(gio.File('foo')))
+
+ def testSetDisplayNameAsync(self):
+ def callback(gfile, result):
+ try:
+ new_gfile = gfile.set_display_name_finish(result)
+ new_name = new_gfile.get_basename()
+ self.assertEqual(new_name, "new.txt")
+ deleted = new_gfile.delete()
+ self.assertEqual(deleted, True)
+ finally:
+ loop.quit()
+
+ canc = gio.Cancellable()
+ self.file.set_display_name_async("new.txt", callback, cancellable=canc)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+class TestGFileEnumerator(unittest.TestCase):
+ def setUp(self):
+ self.file = gio.File(".")
+
+ def testEnumerateChildren(self):
+ enumerator = self.file.enumerate_children(
+ "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
+ for file_info in enumerator:
+ if file_info.get_name() == 'test_gio.py':
+ break
+ else:
+ raise AssertionError
+
+ def testEnumerateChildrenAsync(self):
+ def callback(gfile, result):
+ try:
+ for file_info in gfile.enumerate_children_finish(result):
+ if file_info.get_name() == 'test_gio.py':
+ break
+ else:
+ raise AssertionError
+ finally:
+ loop.quit()
+
+ self.file.enumerate_children_async(
+ "standard::*", callback)
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testNextFilesAsync(self):
+ def callback(enumerator, result):
+ try:
+ for file_info in enumerator.next_files_finish(result):
+ if file_info.get_name() == 'test_gio.py':
+ break
+ else:
+ raise AssertionError
+ finally:
+ loop.quit()
+
+ enumerator = self.file.enumerate_children(
+ "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
+ enumerator.next_files_async(1000, callback)
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testCloseFilesAsync(self):
+ def callback(enumerator, result):
+ try:
+ enumerator.close_finish(result)
+ finally:
+ loop.quit()
+
+ enumerator = self.file.enumerate_children(
+ "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
+
+ enumerator.close_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+
+class TestInputStream(unittest.TestCase):
+ def setUp(self):
+ self._f = open("inputstream.txt", "w+")
+ self._f.write("testing")
+ self._f.seek(0)
+ self.stream = gio.unix.InputStream(self._f.fileno(), False)
+
+ def tearDown(self):
+ self._f.close()
+ os.unlink("inputstream.txt")
+
+ def testRead(self):
+ self.assertEquals(self.stream.read(), "testing")
+
+ self.stream = gio.MemoryInputStream()
+ self.assertEquals(self.stream.read(), '')
+
+ self.stream = gio.MemoryInputStream()
+ some_data = open("test_gio.py", "rb").read()
+ self.stream.add_data(some_data)
+ self.assertEquals(self.stream.read(), some_data)
+
+ stream = gio.MemoryInputStream()
+ stream.add_data(some_data)
+ self.assertEquals(self._read_in_loop(stream,
+ lambda: stream.read(50),
+ 50),
+ some_data)
+
+ def testSkip(self):
+ self.stream.skip(2)
+ res = self.stream.read()
+ self.assertEqual(res, "sting")
+
+ def testSkipAsync(self):
+ def callback(stream, result):
+ try:
+ size = stream.skip_finish(result)
+ self.assertEqual(size, 2)
+ res = stream.read()
+ self.assertEqual(res, "sting")
+ finally:
+ loop.quit()
+
+ self.stream.skip_async(2, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def test_read_part(self):
+ self.assertEquals(self._read_in_loop(self.stream,
+ lambda: self.stream.read_part()),
+ 'testing')
+
+ stream = gio.MemoryInputStream()
+ some_data = open('test_gio.py', 'rb').read()
+ stream.add_data(some_data)
+ self.assertEquals(self._read_in_loop(stream,
+ lambda: stream.read_part(50),
+ 50),
+ some_data)
+
+ def _read_in_loop(self, stream, reader, size_limit=0):
+ read_data = ''
+ while True:
+ read_part = reader()
+ if read_part:
+ read_data += read_part
+ if size_limit > 0:
+ self.assert_(len(read_part) <= size_limit,
+ '%d <= %d' % (len(read_part), size_limit))
+ else:
+ return read_data
+
+ def testReadAsync(self):
+ def callback(stream, result):
+ self.assertEquals(result.get_op_res_gssize(), 7)
+ try:
+ data = stream.read_finish(result)
+ self.assertEquals(data, "testing")
+ stream.close()
+ finally:
+ loop.quit()
+
+ self.stream.read_async(7, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testReadAsyncError(self):
+ self.count = 0
+ def callback(stream, result):
+ try:
+ self.count += 1
+ if self.count == 1:
+ return
+ self.assertRaises(gio.Error, stream.read_finish, result)
+ finally:
+ loop.quit()
+
+ self.stream.read_async(10240, callback)
+ self.stream.read_async(10240, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ self.assertEquals(self.count, 2)
+
+ self.assertRaises(TypeError, self.stream.read_async)
+ self.assertRaises(TypeError, self.stream.read_async, "foo")
+ self.assertRaises(TypeError, self.stream.read_async, 1024, "bar")
+ self.assertRaises(TypeError, self.stream.read_async, 1024,
+ priority="bar")
+ self.assertRaises(TypeError, self.stream.read_async, 1024,
+ priority="bar")
+ self.assertRaises(TypeError, self.stream.read_async, 1024,
+ priority=1, cancellable="bar")
+ self.assertRaises(TypeError, self.stream.read_async, 1024, 1, "bar")
+
+
+ # FIXME: this makes 'make check' freeze
+ def _testCloseAsync(self):
+ def callback(stream, result):
+ try:
+ self.failUnless(stream.close_finish(result))
+ finally:
+ loop.quit()
+
+ self.stream.close_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+
+class TestDataInputStream(unittest.TestCase):
+ def setUp(self):
+ self.base_stream = gio.MemoryInputStream()
+ self.data_stream = gio.DataInputStream(self.base_stream)
+
+ def test_read_line(self):
+ self.base_stream.add_data('foo\nbar\n\nbaz')
+ self.assertEquals('foo', self.data_stream.read_line())
+ self.assertEquals('bar', self.data_stream.read_line())
+ self.assertEquals('', self.data_stream.read_line())
+ self.assertEquals('baz', self.data_stream.read_line())
+
+ def test_read_line_async(self):
+ def do_read_line_async():
+ loop = glib.MainLoop()
+ line = []
+
+ def callback(stream, result):
+ try:
+ line.append(stream.read_line_finish(result))
+ finally:
+ loop.quit()
+
+ self.data_stream.read_line_async(callback)
+ loop.run()
+ return line[0]
+
+ self.base_stream.add_data('foo\nbar\n\nbaz')
+ self.assertEquals('foo', do_read_line_async())
+ self.assertEquals('bar', do_read_line_async())
+ self.assertEquals('', do_read_line_async())
+ self.assertEquals('baz', do_read_line_async())
+
+ def test_read_until(self):
+ self.base_stream.add_data('sentence.end of line\nthe rest')
+ self.assertEquals('sentence', self.data_stream.read_until('.!?'))
+ self.assertEquals('end of line', self.data_stream.read_until('\n\r'))
+ self.assertEquals('the rest', self.data_stream.read_until('#$%^&'))
+
+ def test_read_until_async(self):
+ def do_read_until_async(stop_chars):
+ loop = glib.MainLoop()
+ data = []
+
+ def callback(stream, result):
+ try:
+ data.append(stream.read_until_finish(result))
+ finally:
+ loop.quit()
+
+ self.data_stream.read_until_async(stop_chars, callback)
+ loop.run()
+ return data[0]
+
+ # Note the weird difference between synchronous and
+ # asynchronous version. See bug #584284.
+ self.base_stream.add_data('sentence.end of line\nthe rest')
+ self.assertEquals('sentence', do_read_until_async('.!?'))
+ self.assertEquals('.end of line', do_read_until_async('\n\r'))
+ self.assertEquals('\nthe rest', do_read_until_async('#$%^&'))
+
+
+class TestMemoryInputStream(unittest.TestCase):
+ def setUp(self):
+ self.stream = gio.MemoryInputStream()
+
+ def test_add_data(self):
+ self.stream.add_data('foobar')
+ self.assertEquals('foobar', self.stream.read())
+
+ self.stream.add_data('ham ')
+ self.stream.add_data(None)
+ self.stream.add_data('spam')
+ self.assertEquals('ham spam', self.stream.read())
+
+ def test_new_from_data(self):
+ stream = gio.memory_input_stream_new_from_data('spam')
+ self.assertEquals('spam', stream.read())
+
+
+class TestOutputStream(unittest.TestCase):
+ def setUp(self):
+ self._f = open("outputstream.txt", "w")
+ self.stream = gio.unix.OutputStream(self._f.fileno(), False)
+
+ def tearDown(self):
+ self._f.close()
+ os.unlink("outputstream.txt")
+
+ def testWrite(self):
+ self.stream.write("testing")
+ self.stream.close()
+ self.failUnless(os.path.exists("outputstream.txt"))
+ self.assertEquals(open("outputstream.txt").read(), "testing")
+
+ def test_write_part(self):
+ stream = gio.MemoryOutputStream()
+ some_data = open('test_gio.py', 'rb').read()
+ buffer = some_data
+
+ # In fact this makes only one looping (memory stream is fast,
+ # write_part behaves just like write), but let's still be
+ # complete.
+ while buffer:
+ written = stream.write_part(buffer)
+ if written == len(buffer):
+ break
+ else:
+ buffer = buffer[written:]
+
+ self.assertEquals(stream.get_contents(), some_data)
+
+ def testWriteAsync(self):
+ def callback(stream, result):
+ self.assertEquals(result.get_op_res_gssize(), 7)
+ try:
+ self.assertEquals(stream.write_finish(result), 7)
+ self.failUnless(os.path.exists("outputstream.txt"))
+ self.assertEquals(open("outputstream.txt").read(), "testing")
+ finally:
+ loop.quit()
+
+ self.stream.write_async("testing", callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testWriteAsyncError(self):
+ def callback(stream, result):
+ self.assertEquals(result.get_op_res_gssize(), 0)
+ try:
+ self.assertRaises(gio.Error, stream.write_finish, result)
+ finally:
+ loop.quit()
+
+ self.stream.close()
+ self.stream.write_async("testing", callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ self.assertRaises(TypeError, self.stream.write_async)
+ self.assertRaises(TypeError, self.stream.write_async, 1138)
+ self.assertRaises(TypeError, self.stream.write_async, "foo", "bar")
+ self.assertRaises(TypeError, self.stream.write_async, "foo",
+ priority="bar")
+ self.assertRaises(TypeError, self.stream.write_async, "foo",
+ priority="bar")
+ self.assertRaises(TypeError, self.stream.write_async, "foo",
+ priority=1, cancellable="bar")
+ self.assertRaises(TypeError, self.stream.write_async, "foo", 1, "bar")
+
+ # FIXME: this makes 'make check' freeze
+ def _testCloseAsync(self):
+ def callback(stream, result):
+ try:
+ self.failUnless(stream.close_finish(result))
+ finally:
+ loop.quit()
+
+ self.stream.close_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testFlushAsync(self):
+ def callback(stream, result):
+ try:
+ self.failUnless(stream.flush_finish(result))
+ finally:
+ loop.quit()
+
+ self.stream.flush_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+ def testSpliceAsync(self):
+ _f = open("stream.txt", "w+")
+ _f.write("testing")
+ _f.seek(0)
+ instream = gio.unix.InputStream(_f.fileno(), False)
+
+ def callback(stream, result):
+ try:
+ size = stream.splice_finish(result)
+ self.assertEqual(size, 7)
+
+ finally:
+ os.unlink("stream.txt")
+ loop.quit()
+
+ self.stream.splice_async(instream, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+class TestMemoryOutputStream(unittest.TestCase):
+ def setUp(self):
+ self.stream = gio.MemoryOutputStream()
+
+ def test_get_contents(self):
+ self.stream.write('foobar')
+ self.assertEquals('foobar', self.stream.get_contents())
+
+ self.stream.write('baz')
+ self.assertEquals('foobarbaz', self.stream.get_contents())
+
+
+class TestVolumeMonitor(unittest.TestCase):
+ def setUp(self):
+ self.monitor = gio.volume_monitor_get()
+
+ def testGetConnectedDrives(self):
+ drives = self.monitor.get_connected_drives()
+ self.failUnless(isinstance(drives, list))
+
+ def testGetVolumes(self):
+ volumes = self.monitor.get_volumes()
+ self.failUnless(isinstance(volumes, list))
+
+ def testGetMounts(self):
+ mounts = self.monitor.get_mounts()
+ self.failUnless(isinstance(mounts, list))
+ if not mounts:
+ return
+
+ self.failUnless(isinstance(mounts[0], gio.Mount))
+ # Bug 538601
+ icon = mounts[0].get_icon()
+ if not icon:
+ return
+ self.failUnless(isinstance(icon, gio.Icon))
+
+
+class TestContentTypeGuess(unittest.TestCase):
+ def testFromName(self):
+ mime_type = gio.content_type_guess('diagram.svg')
+ self.assertEquals('image/svg+xml', mime_type)
+
+ def testFromContents(self):
+ mime_type = gio.content_type_guess(data='<html></html>')
+ self.assertEquals('text/html', mime_type)
+
+ def testFromContentsUncertain(self):
+ mime_type, result_uncertain = gio.content_type_guess(
+ data='<html></html>', want_uncertain=True)
+ self.assertEquals('text/html', mime_type)
+ self.assertEquals(bool, type(result_uncertain))
+
+
+class TestFileInfo(unittest.TestCase):
+ def setUp(self):
+ self.fileinfo = gio.File("test_gio.py").query_info("*")
+
+ def testListAttributes(self):
+ attributes = self.fileinfo.list_attributes("standard")
+ self.failUnless(attributes)
+ self.failUnless('standard::name' in attributes)
+
+ def testGetModificationTime(self):
+ mtime = self.fileinfo.get_modification_time()
+ self.assertEqual(type(mtime), float)
+
+ def testSetModificationTime(self):
+ self.fileinfo.set_modification_time(1000)
+ mtime = self.fileinfo.get_modification_time()
+ self.assertEqual(mtime, 1000)
+
+
+class TestAppInfo(unittest.TestCase):
+ def setUp(self):
+ self.appinfo = gio.AppInfo("does-not-exist")
+
+ def testSimple(self):
+ self.assertEquals(self.appinfo.get_description(),
+ "Custom definition for does-not-exist")
+
+ def test_eq(self):
+ info1 = gio.app_info_get_all()[0]
+ info2 = info1.dup()
+ self.assert_(info1 is not info2)
+ self.assertEquals(info1, info2)
+
+ self.assertNotEqual(gio.app_info_get_all()[0], gio.app_info_get_all()[1])
+
+class TestVfs(unittest.TestCase):
+ def setUp(self):
+ self.vfs = gio.vfs_get_default()
+
+ def testGetSupportedURISchemes(self):
+ result = self.vfs.get_supported_uri_schemes()
+ self.failUnless(type(result), [])
+
+class TestVolume(unittest.TestCase):
+ def setUp(self):
+ self.monitor = gio.volume_monitor_get()
+
+ def testVolumeEnumerate(self):
+ volumes = self.monitor.get_volumes()
+ self.failUnless(isinstance(volumes, list))
+ for v in volumes:
+ if v is not None:
+ ids = v.enumerate_identifiers()
+ self.failUnless(isinstance(ids, list))
+ for id in ids:
+ if id is not None:
+ self.failUnless(isinstance(id, str))
+
+class TestFileInputStream(unittest.TestCase):
+ def setUp(self):
+ self._f = open("file.txt", "w+")
+ self._f.write("testing")
+ self._f.seek(0)
+ self.file = gio.File("file.txt")
+
+ def tearDown(self):
+ self._f.close()
+ if os.path.exists('file.txt'):
+ os.unlink("file.txt")
+
+ def testQueryInfoAsync(self):
+ def callback(stream, result):
+ try:
+ info = stream.query_info_finish(result)
+ self.failUnless(isinstance(info, gio.FileInfo))
+ self.failUnless(info.get_attribute_uint64("standard::size"), 7)
+ finally:
+ loop.quit()
+
+ inputstream = self.file.read()
+ inputstream.query_info_async("standard", callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+class TestFileOutputStream(unittest.TestCase):
+ def setUp(self):
+ self._f = open("file.txt", "w+")
+ self._f.write("testing")
+ self._f.seek(0)
+ self.file = gio.File("file.txt")
+
+ def tearDown(self):
+ self._f.close()
+ if os.path.exists('file.txt'):
+ os.unlink("file.txt")
+
+ def testQueryInfoAsync(self):
+ def callback(stream, result):
+ try:
+ info = stream.query_info_finish(result)
+ self.failUnless(isinstance(info, gio.FileInfo))
+ self.failUnless(info.get_attribute_uint64("standard::size"), 7)
+ finally:
+ loop.quit()
+
+ outputstream = self.file.append_to()
+ outputstream.query_info_async("standard", callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+class TestBufferedInputStream(unittest.TestCase):
+ def setUp(self):
+ self._f = open("buffer.txt", "w+")
+ self._f.write("testing")
+ self._f.seek(0)
+ stream = gio.unix.InputStream(self._f.fileno(), False)
+ self.buffered = gio.BufferedInputStream(stream)
+
+ def tearDown(self):
+ self._f.close()
+ os.unlink("buffer.txt")
+
+ def test_fill_async(self):
+ def callback(stream, result):
+ try:
+ size = stream.fill_finish(result)
+ self.failUnlessEqual(size, 4)
+ finally:
+ loop.quit()
+
+ self.buffered.fill_async(4, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+class TestIOStream(unittest.TestCase):
+ def setUp(self):
+ self.file = gio.File("file.txt")
+ self.iofile = self.file.create_readwrite(gio.FILE_CREATE_NONE)
+
+ def tearDown(self):
+ if os.path.exists('file.txt'):
+ os.unlink("file.txt")
+
+ def testIOStreamCloseAsync(self):
+ def callback(stream, result):
+ try:
+ self.failUnless(stream.close_finish(result))
+ finally:
+ loop.quit()
+
+ self.iofile.close_async(callback)
+
+ loop = glib.MainLoop()
+ loop.run()
+
+
+ def testQueryInfoAsync(self):
+ def callback(stream, result):
+ try:
+ info = stream.query_info_finish(result)
+ self.failUnless(isinstance(info, gio.FileInfo))
+ self.failUnless(info.get_attribute_uint64("standard::size"), 7)
+ finally:
+ loop.quit()
+
+ ostream = self.iofile.get_output_stream()
+ ostream.write("testing")
+
+ self.iofile.query_info_async("standard", callback)
+
+ loop = glib.MainLoop()
+ loop.run()
diff --git a/tests/test_gobject.py b/tests/test_gobject.py
new file mode 100644
index 0000000..d91f3ad
--- /dev/null
+++ b/tests/test_gobject.py
@@ -0,0 +1,29 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+from common import gobject, testhelper
+
+
+class TestGObjectAPI(unittest.TestCase):
+ def testGObjectModule(self):
+ obj = gobject.GObject()
+ self.assertEquals(obj.__module__,
+ 'gobject._gobject')
+ self.assertEquals(obj.__grefcount__, 1)
+
+
+class TestFloating(unittest.TestCase):
+ def testFloatingWithSinkFunc(self):
+ obj = testhelper.FloatingWithSinkFunc()
+ self.assertEquals(obj.__grefcount__, 1)
+
+ obj = gobject.new(testhelper.FloatingWithSinkFunc)
+ self.assertEquals(obj.__grefcount__, 1)
+
+ def testFloatingWithoutSinkFunc(self):
+ obj = testhelper.FloatingWithoutSinkFunc()
+ self.assertEquals(obj.__grefcount__, 1)
+
+ obj = gobject.new(testhelper.FloatingWithoutSinkFunc)
+ self.assertEquals(obj.__grefcount__, 1)
diff --git a/tests/test_interface.py b/tests/test_interface.py
new file mode 100644
index 0000000..d959791
--- /dev/null
+++ b/tests/test_interface.py
@@ -0,0 +1,45 @@
+import unittest
+
+from common import gobject, testhelper
+
+GUnknown = gobject.type_from_name("TestUnknown")
+Unknown = GUnknown.pytype
+
+
+class MyUnknown(Unknown, testhelper.Interface):
+ some_property = gobject.property(type=str)
+
+ def __init__(self):
+ Unknown.__init__(self)
+ self.called = False
+
+ def do_iface_method(self):
+ self.called = True
+ Unknown.do_iface_method(self)
+gobject.type_register(MyUnknown)
+
+
+class MyObject(gobject.GObject, testhelper.Interface):
+ some_property = gobject.property(type=str)
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+ self.called = False
+
+ def do_iface_method(self):
+ self.called = True
+gobject.type_register(MyObject)
+
+
+class TestIfaceImpl(unittest.TestCase):
+
+ def testReImplementInterface(self):
+ m = MyUnknown()
+ m.iface_method()
+ self.assertEqual(m.called, True)
+
+ def testImplementInterface(self):
+ m = MyObject()
+ m.iface_method()
+ self.assertEqual(m.called, True)
+
diff --git a/tests/test_mainloop.py b/tests/test_mainloop.py
new file mode 100644
index 0000000..95e5f78
--- /dev/null
+++ b/tests/test_mainloop.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+
+import exceptions
+import os
+import sys
+import select
+import unittest
+
+from common import glib
+
+class TestMainLoop(unittest.TestCase):
+ def testExceptionHandling(self):
+ pipe_r, pipe_w = os.pipe()
+
+ pid = os.fork()
+ if pid == 0:
+ os.close(pipe_w)
+ select.select([pipe_r], [], [])
+ os.close(pipe_r)
+ os._exit(1)
+
+ def child_died(pid, status, loop):
+ loop.quit()
+ raise Exception("deadbabe")
+
+ loop = glib.MainLoop()
+ glib.child_watch_add(pid, child_died, loop)
+
+ os.close(pipe_r)
+ os.write(pipe_w, "Y")
+ os.close(pipe_w)
+
+ def excepthook(type, value, traceback):
+ assert type is exceptions.Exception
+ assert value.args[0] == "deadbabe"
+ sys.excepthook = excepthook
+
+ got_exception = False
+ try:
+ loop.run()
+ except:
+ got_exception = True
+
+ #
+ # The exception should be handled (by printing it)
+ # immediately on return from child_died() rather
+ # than here. See bug #303573
+ #
+ sys.excepthook = sys.__excepthook__
+ assert not got_exception
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_properties.py b/tests/test_properties.py
new file mode 100644
index 0000000..ccfcb34
--- /dev/null
+++ b/tests/test_properties.py
@@ -0,0 +1,376 @@
+
+import struct
+import unittest
+
+import gobject
+from gobject import GObject, GType, GEnum, new, PARAM_READWRITE, \
+ PARAM_CONSTRUCT, PARAM_READABLE, PARAM_WRITABLE, PARAM_CONSTRUCT_ONLY
+from gobject.constants import \
+ TYPE_INT, TYPE_UINT, TYPE_LONG, \
+ TYPE_ULONG, TYPE_INT64, TYPE_UINT64
+from gobject.constants import \
+ G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
+ G_MAXULONG
+
+class PropertyObject(GObject):
+ normal = gobject.property(type=str)
+ construct = gobject.property(
+ type=str,
+ flags=PARAM_READWRITE|PARAM_CONSTRUCT, default='default')
+ construct_only = gobject.property(
+ type=str,
+ flags=PARAM_READWRITE|PARAM_CONSTRUCT_ONLY)
+ uint64 = gobject.property(
+ type=TYPE_UINT64, flags=PARAM_READWRITE|PARAM_CONSTRUCT)
+
+class TestProperties(unittest.TestCase):
+ def testGetSet(self):
+ obj = PropertyObject()
+ obj.props.normal = "value"
+ self.assertEqual(obj.props.normal, "value")
+
+ def testListWithInstance(self):
+ obj = PropertyObject()
+ self.failUnless(hasattr(obj.props, "normal"))
+
+ def testListWithoutInstance(self):
+ self.failUnless(hasattr(PropertyObject.props, "normal"))
+
+ def testSetNoInstance(self):
+ def set(obj):
+ obj.props.normal = "foobar"
+
+ self.assertRaises(TypeError, set, PropertyObject)
+
+ def testIterator(self):
+ for obj in (PropertyObject.props, PropertyObject().props):
+ for pspec in obj:
+ gtype = GType(pspec)
+ self.assertEqual(gtype.parent.name, 'GParam')
+ self.failUnless(pspec.name in ['normal',
+ 'construct',
+ 'construct-only',
+ 'uint64'])
+ self.assertEqual(len(obj), 4)
+
+ def testNormal(self):
+ obj = new(PropertyObject, normal="123")
+ self.assertEqual(obj.props.normal, "123")
+ obj.set_property('normal', '456')
+ self.assertEqual(obj.props.normal, "456")
+ obj.props.normal = '789'
+ self.assertEqual(obj.props.normal, "789")
+
+ def testConstruct(self):
+ obj = new(PropertyObject, construct="123")
+ self.assertEqual(obj.props.construct, "123")
+ obj.set_property('construct', '456')
+ self.assertEqual(obj.props.construct, "456")
+ obj.props.construct = '789'
+ self.assertEqual(obj.props.construct, "789")
+
+ def testConstructOnly(self):
+ obj = new(PropertyObject, construct_only="123")
+ self.assertEqual(obj.props.construct_only, "123")
+ self.assertRaises(TypeError,
+ setattr, obj.props, 'construct_only', '456')
+ self.assertRaises(TypeError,
+ obj.set_property, 'construct-only', '456')
+
+ def testUint64(self):
+ obj = new(PropertyObject)
+ self.assertEqual(obj.props.uint64, 0)
+ obj.props.uint64 = 1L
+ self.assertEqual(obj.props.uint64, 1L)
+ obj.props.uint64 = 1
+ self.assertEqual(obj.props.uint64, 1L)
+
+ self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", -1L)
+ self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", -1)
+
+ def testUInt64DefaultValue(self):
+ try:
+ class TimeControl(GObject):
+ __gproperties__ = {
+ 'time': (TYPE_UINT64, 'Time', 'Time',
+ 0L, (1<<64) - 1, 0L,
+ PARAM_READABLE)
+ }
+ except OverflowError, ex:
+ self.fail(str(ex))
+
+ def testRange(self):
+ # kiwi code
+ def max(c):
+ return 2 ** ((8 * struct.calcsize(c)) - 1) - 1
+ def umax(c):
+ return 2 ** (8 * struct.calcsize(c)) - 1
+
+ maxint = max('i')
+ minint = -maxint - 1
+ maxuint = umax('I')
+ maxlong = max('l')
+ minlong = -maxlong - 1
+ maxulong = umax('L')
+ maxint64 = max('q')
+ minint64 = -maxint64 - 1
+ maxuint64 = umax('Q')
+
+ types = dict(int=(TYPE_INT, minint, maxint),
+ uint=(TYPE_UINT, 0, maxuint),
+ long=(TYPE_LONG, minlong, maxlong),
+ ulong=(TYPE_ULONG, 0, maxulong),
+ int64=(TYPE_INT64, minint64, maxint64),
+ uint64=(TYPE_UINT64, 0, maxuint64))
+
+ def build_gproperties(types):
+ d = {}
+ for key, (gtype, min, max) in types.items():
+ d[key] = (gtype, 'blurb', 'desc', min, max, 0,
+ PARAM_READABLE | PARAM_WRITABLE)
+ return d
+
+ class RangeCheck(GObject):
+ __gproperties__ = build_gproperties(types)
+
+ def __init__(self):
+ self.values = {}
+ GObject.__init__(self)
+
+ def do_set_property(self, pspec, value):
+ self.values[pspec.name] = value
+
+ def do_get_property(self, pspec):
+ return self.values.get(pspec.name, pspec.default_value)
+
+ self.assertEqual(RangeCheck.props.int.minimum, minint)
+ self.assertEqual(RangeCheck.props.int.maximum, maxint)
+ self.assertEqual(RangeCheck.props.uint.minimum, 0)
+ self.assertEqual(RangeCheck.props.uint.maximum, maxuint)
+ self.assertEqual(RangeCheck.props.long.minimum, minlong)
+ self.assertEqual(RangeCheck.props.long.maximum, maxlong)
+ self.assertEqual(RangeCheck.props.ulong.minimum, 0)
+ self.assertEqual(RangeCheck.props.ulong.maximum, maxulong)
+ self.assertEqual(RangeCheck.props.int64.minimum, minint64)
+ self.assertEqual(RangeCheck.props.int64.maximum, maxint64)
+ self.assertEqual(RangeCheck.props.uint64.minimum, 0)
+ self.assertEqual(RangeCheck.props.uint64.maximum, maxuint64)
+
+ obj = RangeCheck()
+ for key, (gtype, min, max) in types.items():
+ self.assertEqual(obj.get_property(key),
+ getattr(RangeCheck.props, key).default_value)
+
+ obj.set_property(key, min)
+ self.assertEqual(obj.get_property(key), min)
+
+ obj.set_property(key, max)
+ self.assertEqual(obj.get_property(key), max)
+
+
+ def testMulti(self):
+ obj = PropertyObject()
+ obj.set_properties(normal="foo",
+ uint64=7)
+ normal, uint64 = obj.get_properties("normal", "uint64")
+ self.assertEqual(normal, "foo")
+ self.assertEqual(uint64, 7)
+
+class TestProperty(unittest.TestCase):
+ def testSimple(self):
+ class C(gobject.GObject):
+ str = gobject.property(type=str)
+ int = gobject.property(type=int)
+ float = gobject.property(type=float)
+ long = gobject.property(type=long)
+
+ self.failUnless(hasattr(C.props, 'str'))
+ self.failUnless(hasattr(C.props, 'int'))
+ self.failUnless(hasattr(C.props, 'float'))
+ self.failUnless(hasattr(C.props, 'long'))
+
+ o = C()
+ self.assertEqual(o.str, '')
+ o.str = 'str'
+ self.assertEqual(o.str, 'str')
+
+ self.assertEqual(o.int, 0)
+ o.int = 1138
+ self.assertEqual(o.int, 1138)
+
+ self.assertEqual(o.float, 0.0)
+ o.float = 3.14
+ self.assertEqual(o.float, 3.14)
+
+ self.assertEqual(o.long, 0L)
+ o.long = 100L
+ self.assertEqual(o.long, 100L)
+
+ def testCustomGetter(self):
+ class C(gobject.GObject):
+ def get_prop(self):
+ return 'value'
+ prop = gobject.property(getter=get_prop)
+
+ o = C()
+ self.assertEqual(o.prop, 'value')
+ self.assertRaises(TypeError, setattr, o, 'prop', 'xxx')
+
+ def testCustomSetter(self):
+ class C(gobject.GObject):
+ def set_prop(self, value):
+ self._value = value
+ prop = gobject.property(setter=set_prop)
+
+ def __init__(self):
+ self._value = None
+ gobject.GObject.__init__(self)
+
+ o = C()
+ self.assertEquals(o._value, None)
+ o.prop = 'bar'
+ self.assertEquals(o._value, 'bar')
+ self.assertRaises(TypeError, getattr, o, 'prop')
+
+ def testErrors(self):
+ self.assertRaises(TypeError, gobject.property, type='str')
+ self.assertRaises(TypeError, gobject.property, nick=False)
+ self.assertRaises(TypeError, gobject.property, blurb=False)
+ # this never fail while bool is a subclass of int
+ # >>> bool.__bases__
+ # (<type 'int'>,)
+ # self.assertRaises(TypeError, gobject.property, type=bool, default=0)
+ self.assertRaises(TypeError, gobject.property, type=bool, default='ciao mamma')
+ self.assertRaises(TypeError, gobject.property, type=bool)
+ self.assertRaises(TypeError, gobject.property, type=GEnum)
+ self.assertRaises(TypeError, gobject.property, type=GEnum, default=0)
+ self.assertRaises(TypeError, gobject.property, type=object, default=0)
+ self.assertRaises(TypeError, gobject.property, type=complex)
+ self.assertRaises(TypeError, gobject.property, flags=-10)
+
+ def testDefaults(self):
+ p1 = gobject.property(type=bool, default=True)
+ p2 = gobject.property(type=bool, default=False)
+
+ def testNameWithUnderscore(self):
+ class C(gobject.GObject):
+ prop_name = gobject.property(type=int)
+ o = C()
+ o.prop_name = 10
+ self.assertEqual(o.prop_name, 10)
+
+ def testRange(self):
+ maxint64 = 2 ** 62 - 1
+ minint64 = -2 ** 62 - 1
+ maxuint64 = 2 ** 63 - 1
+
+ types = [
+ (TYPE_INT, G_MININT, G_MAXINT),
+ (TYPE_UINT, 0, G_MAXUINT),
+ (TYPE_LONG, G_MINLONG, G_MAXLONG),
+ (TYPE_ULONG, 0, G_MAXULONG),
+ (TYPE_INT64, minint64, maxint64),
+ (TYPE_UINT64, 0, maxuint64),
+ ]
+
+ for gtype, min, max in types:
+ # Normal, everything is alright
+ prop = gobject.property(type=gtype, minimum=min, maximum=max)
+ subtype = type('', (gobject.GObject,),
+ dict(prop=prop))
+ self.assertEqual(subtype.props.prop.minimum, min)
+ self.assertEqual(subtype.props.prop.maximum, max)
+
+ # Lower than minimum
+ self.assertRaises(TypeError,
+ gobject.property, type=gtype, minimum=min-1,
+ maximum=max)
+
+ # Higher than maximum
+ self.assertRaises(TypeError,
+ gobject.property, type=gtype, minimum=min,
+ maximum=max+1)
+
+ def testMultipleInstances(self):
+ class C(gobject.GObject):
+ prop = gobject.property(type=str, default='default')
+
+ o1 = C()
+ o2 = C()
+ self.assertEqual(o1.prop, 'default')
+ self.assertEqual(o2.prop, 'default')
+ o1.prop = 'value'
+ self.assertEqual(o1.prop, 'value')
+ self.assertEqual(o2.prop, 'default')
+
+ def testObjectProperty(self):
+ class PropertyObject(GObject):
+ obj = gobject.property(type=GObject)
+
+ pobj1 = PropertyObject()
+ obj1_hash = hash(pobj1)
+ pobj2 = PropertyObject()
+
+ pobj2.obj = pobj1
+ del pobj1
+ pobj1 = pobj2.obj
+ self.assertEqual(hash(pobj1), obj1_hash)
+
+ def testPropertySubclass(self):
+ # test for #470718
+ class A(GObject):
+ prop1 = gobject.property(type=int)
+
+ class B(A):
+ prop2 = gobject.property(type=int)
+
+ b = B()
+ b.prop2 = 10
+ self.assertEquals(b.prop2, 10)
+ b.prop1 = 20
+ self.assertEquals(b.prop1, 20)
+
+ def testPropertySubclassCustomSetter(self):
+ # test for #523352
+ class A(GObject):
+ def get_first(self):
+ return 'first'
+ first = gobject.property(type=str, getter=get_first)
+
+ class B(A):
+ def get_second(self):
+ return 'second'
+ second = gobject.property(type=str, getter=get_second)
+
+ a = A()
+ self.assertEquals(a.first, 'first')
+ self.assertRaises(TypeError, setattr, a, 'first', 'foo')
+
+ b = B()
+ self.assertEquals(b.first, 'first')
+ self.assertRaises(TypeError, setattr, b, 'first', 'foo')
+ self.assertEquals(b.second, 'second')
+ self.assertRaises(TypeError, setattr, b, 'second', 'foo')
+
+ def testPropertySubclassCustomSetterError(self):
+ try:
+ class A(GObject):
+ def get_first(self):
+ return 'first'
+ first = gobject.property(type=str, getter=get_first)
+
+ def do_get_property(self, pspec):
+ pass
+ except TypeError:
+ pass
+ else:
+ raise AssertionError
+
+ # Bug 587637.
+ def test_float_min(self):
+ gobject.property(type=float, minimum=-1)
+ gobject.property(type=gobject.TYPE_FLOAT, minimum=-1)
+ gobject.property(type=gobject.TYPE_DOUBLE, minimum=-1)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_signal.py b/tests/test_signal.py
new file mode 100644
index 0000000..96e0731
--- /dev/null
+++ b/tests/test_signal.py
@@ -0,0 +1,393 @@
+# -*- Mode: Python -*-
+
+import gc
+import unittest
+import sys
+
+from common import gobject, testhelper
+
+class C(gobject.GObject):
+ __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ (gobject.TYPE_INT,)) }
+ def do_my_signal(self, arg):
+ self.arg = arg
+
+class D(C):
+ def do_my_signal(self, arg2):
+ self.arg2 = arg2
+ C.do_my_signal(self, arg2)
+
+class TestSignalCreation(unittest.TestCase):
+ # Bug 540376.
+ def test_illegals(self):
+ self.assertRaises(TypeError, lambda: gobject.signal_new('test',
+ None,
+ 0,
+ gobject.TYPE_NONE,
+ (gobject.TYPE_LONG,)))
+
+
+class TestChaining(unittest.TestCase):
+ def setUp(self):
+ self.inst = C()
+ self.inst.connect("my_signal", self.my_signal_handler_cb, 1, 2, 3)
+
+ def my_signal_handler_cb(self, *args):
+ assert len(args) == 5
+ assert isinstance(args[0], C)
+ assert args[0] == self.inst
+
+ assert isinstance(args[1], int)
+ assert args[1] == 42
+
+ assert args[2:] == (1, 2, 3)
+
+ def testChaining(self):
+ self.inst.emit("my_signal", 42)
+ assert self.inst.arg == 42
+
+ def testChaining(self):
+ inst2 = D()
+ inst2.emit("my_signal", 44)
+ assert inst2.arg == 44
+ assert inst2.arg2 == 44
+
+# This is for bug 153718
+class TestGSignalsError(unittest.TestCase):
+ def testInvalidType(self, *args):
+ def foo():
+ class Foo(gobject.GObject):
+ __gsignals__ = None
+ self.assertRaises(TypeError, foo)
+ gc.collect()
+
+ def testInvalidName(self, *args):
+ def foo():
+ class Foo(gobject.GObject):
+ __gsignals__ = {'not-exists' : 'override'}
+ self.assertRaises(TypeError, foo)
+ gc.collect()
+
+class TestGPropertyError(unittest.TestCase):
+ def testInvalidType(self, *args):
+ def foo():
+ class Foo(gobject.GObject):
+ __gproperties__ = None
+ self.assertRaises(TypeError, foo)
+ gc.collect()
+
+ def testInvalidName(self, *args):
+ def foo():
+ class Foo(gobject.GObject):
+ __gproperties__ = { None: None }
+
+ self.assertRaises(TypeError, foo)
+ gc.collect()
+
+class TestList(unittest.TestCase):
+ def testListObject(self):
+ self.assertEqual(gobject.signal_list_names(C), ('my-signal',))
+
+
+def my_accumulator(ihint, return_accu, handler_return, user_data):
+ """An accumulator that stops emission when the sum of handler
+ returned values reaches 3"""
+ assert user_data == "accum data"
+ if return_accu >= 3:
+ return False, return_accu
+ return True, return_accu + handler_return
+
+class Foo(gobject.GObject):
+ __gsignals__ = {
+ 'my-acc-signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_INT,
+ (), my_accumulator, "accum data"),
+ 'my-other-acc-signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN,
+ (), gobject.signal_accumulator_true_handled)
+ }
+
+class TestAccumulator(unittest.TestCase):
+
+ def testAccumulator(self):
+ inst = Foo()
+ inst.connect("my-acc-signal", lambda obj: 1)
+ inst.connect("my-acc-signal", lambda obj: 2)
+ ## the value returned in the following handler will not be
+ ## considered, because at this point the accumulator already
+ ## reached its limit.
+ inst.connect("my-acc-signal", lambda obj: 3)
+ retval = inst.emit("my-acc-signal")
+ self.assertEqual(retval, 3)
+
+ def testAccumulatorTrueHandled(self):
+ inst = Foo()
+ inst.connect("my-other-acc-signal", self._true_handler1)
+ inst.connect("my-other-acc-signal", self._true_handler2)
+ ## the following handler will not be called because handler2
+ ## returns True, so it should stop the emission.
+ inst.connect("my-other-acc-signal", self._true_handler3)
+ self.__true_val = None
+ inst.emit("my-other-acc-signal")
+ self.assertEqual(self.__true_val, 2)
+
+ def _true_handler1(self, obj):
+ self.__true_val = 1
+ return False
+ def _true_handler2(self, obj):
+ self.__true_val = 2
+ return True
+ def _true_handler3(self, obj):
+ self.__true_val = 3
+ return False
+
+class E(gobject.GObject):
+ __gsignals__ = { 'signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ()) }
+ def __init__(self):
+ gobject.GObject.__init__(self)
+ self.status = 0
+
+ def do_signal(self):
+ assert self.status == 0
+ self.status = 1
+
+class F(gobject.GObject):
+ __gsignals__ = { 'signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ()) }
+ def __init__(self):
+ gobject.GObject.__init__(self)
+ self.status = 0
+
+ def do_signal(self):
+ self.status += 1
+
+class TestEmissionHook(unittest.TestCase):
+ def testAdd(self):
+ self.hook = True
+ e = E()
+ e.connect('signal', self._callback)
+ gobject.add_emission_hook(E, "signal", self._emission_hook)
+ e.emit('signal')
+ self.assertEqual(e.status, 3)
+
+ def testRemove(self):
+ self.hook = False
+ e = E()
+ e.connect('signal', self._callback)
+ hook_id = gobject.add_emission_hook(E, "signal", self._emission_hook)
+ gobject.remove_emission_hook(E, "signal", hook_id)
+ e.emit('signal')
+ self.assertEqual(e.status, 3)
+
+ def _emission_hook(self, e):
+ self.assertEqual(e.status, 1)
+ e.status = 2
+
+ def _callback(self, e):
+ if self.hook:
+ self.assertEqual(e.status, 2)
+ else:
+ self.assertEqual(e.status, 1)
+ e.status = 3
+
+ def testCallbackReturnFalse(self):
+ self.hook = False
+ obj = F()
+ def _emission_hook(obj):
+ obj.status += 1
+ return False
+ hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+ obj.emit('signal')
+ obj.emit('signal')
+ self.assertEqual(obj.status, 3)
+
+ def testCallbackReturnTrue(self):
+ self.hook = False
+ obj = F()
+ def _emission_hook(obj):
+ obj.status += 1
+ return True
+ hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+ obj.emit('signal')
+ obj.emit('signal')
+ gobject.remove_emission_hook(obj, "signal", hook_id)
+ self.assertEqual(obj.status, 4)
+
+ def testCallbackReturnTrueButRemove(self):
+ self.hook = False
+ obj = F()
+ def _emission_hook(obj):
+ obj.status += 1
+ return True
+ hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+ obj.emit('signal')
+ gobject.remove_emission_hook(obj, "signal", hook_id)
+ obj.emit('signal')
+ self.assertEqual(obj.status, 3)
+
+class TestClosures(unittest.TestCase):
+ def setUp(self):
+ self.count = 0
+
+ def _callback(self, e):
+ self.count += 1
+
+ def testDisconnect(self):
+ e = E()
+ e.connect('signal', self._callback)
+ e.disconnect_by_func(self._callback)
+ e.emit('signal')
+ self.assertEqual(self.count, 0)
+
+ def testHandlerBlock(self):
+ e = E()
+ e.connect('signal', self._callback)
+ e.handler_block_by_func(self._callback)
+ e.emit('signal')
+ self.assertEqual(self.count, 0)
+
+ def testHandlerUnBlock(self):
+ e = E()
+ signal_id = e.connect('signal', self._callback)
+ e.handler_block(signal_id)
+ e.handler_unblock_by_func(self._callback)
+ e.emit('signal')
+ self.assertEqual(self.count, 1)
+
+ def testHandlerBlockMethod(self):
+ # Filed as #375589
+ class A:
+ def __init__(self):
+ self.a = 0
+
+ def callback(self, o):
+ self.a = 1
+ o.handler_block_by_func(self.callback)
+
+ inst = A()
+ e = E()
+ e.connect("signal", inst.callback)
+ e.emit('signal')
+ self.assertEqual(inst.a, 1)
+ gc.collect()
+
+ def testGString(self):
+ class C(gobject.GObject):
+ __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_GSTRING,
+ (gobject.TYPE_GSTRING,)) }
+ def __init__(self, test):
+ gobject.GObject.__init__(self)
+ self.test = test
+ def do_my_signal(self, data):
+ self.data = data
+ self.test.assertEqual(len(data), 3)
+ return ''.join([data[2], data[1], data[0]])
+ c = C(self)
+ data = c.emit("my_signal", "\01\00\02")
+ self.assertEqual(data, "\02\00\01")
+
+class SigPropClass(gobject.GObject):
+ __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ (gobject.TYPE_INT,)) }
+
+ __gproperties__ = {
+ 'foo': (str, None, None, '', gobject.PARAM_WRITABLE|gobject.PARAM_CONSTRUCT),
+ }
+
+ signal_emission_failed = False
+
+ def do_my_signal(self, arg):
+ self.arg = arg
+
+ def do_set_property(self, pspec, value):
+ if pspec.name == 'foo':
+ self._foo = value
+ else:
+ raise AttributeError, 'unknown property %s' % pspec.name
+ try:
+ self.emit("my-signal", 1)
+ except TypeError:
+ self.signal_emission_failed = True
+
+
+class TestSigProp(unittest.TestCase):
+ def testEmitInPropertySetter(self):
+ obj = SigPropClass()
+ self.failIf(obj.signal_emission_failed)
+
+f = gobject.SIGNAL_RUN_FIRST
+l = gobject.SIGNAL_RUN_LAST
+float = gobject.TYPE_FLOAT
+double = gobject.TYPE_DOUBLE
+uint = gobject.TYPE_UINT
+ulong = gobject.TYPE_ULONG
+
+class CM(gobject.GObject):
+ __gsignals__ = dict(
+ test1=(f, None, ()),
+ test2=(l, None, (str,)),
+ test3=(l, int, (double,)),
+ test4=(f, None, (bool, long, float, double, int, uint, ulong)),
+ test_float=(l, float, (float,)),
+ test_double=(l, double, (double, )),
+ test_string=(l, str, (str, )),
+ test_object=(l, object, (object, )),
+ )
+
+class _TestCMarshaller:
+ def setUp(self):
+ self.obj = CM()
+ testhelper.connectcallbacks(self.obj)
+
+ def testTest1(self):
+ self.obj.emit("test1")
+
+ def testTest2(self):
+ self.obj.emit("test2", "string")
+
+ def testTest3(self):
+ rv = self.obj.emit("test3", 42.0)
+ self.assertEqual(rv, 20)
+
+ def testTest4(self):
+ self.obj.emit("test4", True, 10L, 3.14, 1.78, 20, 30L, 31L)
+
+ def testTestReturnFloat(self):
+ rv = self.obj.emit("test-float", 1.234)
+ self.failUnless(rv >= 1.233999 and rv <= 1.2400001, rv)
+
+ def testTestReturnDouble(self):
+ rv = self.obj.emit("test-double", 1.234)
+ self.assertEqual(rv, 1.234)
+
+ def testTestReturnString(self):
+ rv = self.obj.emit("test-string", "str")
+ self.assertEqual(rv, "str")
+
+ def testTestReturnObject(self):
+ rv = self.obj.emit("test-object", self)
+ self.assertEqual(rv, self)
+
+if 'generic-c-marshaller' in gobject.features:
+ class TestCMarshaller(_TestCMarshaller, unittest.TestCase):
+ pass
+else:
+ print
+ print '** WARNING: LIBFFI disabled, not testing'
+ print
+
+# Test for 374653
+class TestPyGValue(unittest.TestCase):
+ def testNoneNULLBoxedConversion(self):
+ class C(gobject.GObject):
+ __gsignals__ = dict(my_boxed_signal=(
+ gobject.SIGNAL_RUN_LAST,
+ gobject.type_from_name('GStrv'), ()))
+
+ obj = C()
+ obj.connect('my-boxed-signal', lambda obj: None)
+ sys.last_type = None
+ obj.emit('my-boxed-signal')
+ assert not sys.last_type
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_source.py b/tests/test_source.py
new file mode 100644
index 0000000..abe2f69
--- /dev/null
+++ b/tests/test_source.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+
+import unittest
+
+from common import glib
+
+
+class Idle(glib.Idle):
+ def __init__(self, loop):
+ glib.Idle.__init__(self)
+ self.count = 0
+ self.set_callback(self.callback, loop)
+
+ def callback(self, loop):
+ self.count += 1
+ return True
+
+
+class MySource(glib.Source):
+ def __init__(self):
+ glib.Source.__init__(self)
+
+ def prepare(self):
+ return True, 0
+
+ def check(self):
+ return True
+
+ def dispatch(self, callback, args):
+ return callback(*args)
+
+
+class TestSource(unittest.TestCase):
+ def timeout_callback(self, loop):
+ loop.quit()
+
+ def my_callback(self, loop):
+ self.pos += 1
+ return True
+
+ def setup_timeout(self, loop):
+ timeout = glib.Timeout(500)
+ timeout.set_callback(self.timeout_callback, loop)
+ timeout.attach()
+
+ def testSources(self):
+ loop = glib.MainLoop()
+
+ self.setup_timeout(loop)
+
+ idle = Idle(loop)
+ idle.attach()
+
+ self.pos = 0
+
+ m = MySource()
+ m.set_callback(self.my_callback, loop)
+ m.attach()
+
+ loop.run()
+
+ assert self.pos >= 0 and idle.count >= 0
+
+ def testSourcePrepare(self):
+ # this test may not terminate if prepare() is wrapped incorrectly
+ dispatched = [False]
+ loop = glib.MainLoop()
+
+ class CustomTimeout(glib.Source):
+ def prepare(self):
+ return (False, 10)
+
+ def check(self):
+ return True
+
+ def dispatch(self, callback, args):
+ dispatched[0] = True
+
+ loop.quit()
+
+ return False
+
+ source = CustomTimeout()
+
+ source.attach()
+ source.set_callback(dir)
+
+ loop.run()
+
+ assert dispatched[0]
+
+
+class TestTimeout(unittest.TestCase):
+ def test504337(self):
+ timeout_source = glib.Timeout(20)
+ idle_source = glib.Idle()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py
new file mode 100644
index 0000000..1522edb
--- /dev/null
+++ b/tests/test_subprocess.py
@@ -0,0 +1,27 @@
+# -*- Mode: Python -*-
+
+import sys
+import unittest
+
+from common import glib
+
+
+class TestProcess(unittest.TestCase):
+
+ def _child_watch_cb(self, pid, condition, data):
+ self.data = data
+ self.loop.quit()
+
+ def testChildWatch(self):
+ self.data = None
+ self.loop = glib.MainLoop()
+ argv = [sys.executable, '-c', 'import sys']
+ pid, stdin, stdout, stderr = glib.spawn_async(
+ argv, flags=glib.SPAWN_DO_NOT_REAP_CHILD)
+ pid.close()
+ glib.child_watch_add(pid, self._child_watch_cb, 12345)
+ self.loop.run()
+ self.assertEqual(self.data, 12345)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_unknown.py b/tests/test_unknown.py
new file mode 100644
index 0000000..d65bb89
--- /dev/null
+++ b/tests/test_unknown.py
@@ -0,0 +1,15 @@
+
+import unittest
+
+from common import gobject, testhelper
+
+TestInterface = gobject.GType.from_name('TestInterface')
+
+
+class TestUnknown(unittest.TestCase):
+ def testFoo(self):
+ obj = testhelper.get_unknown()
+ TestUnknownGType = gobject.GType.from_name('TestUnknown')
+ TestUnknown = gobject.new(TestUnknownGType).__class__
+ assert isinstance(obj, testhelper.Interface)
+ assert isinstance(obj, TestUnknown)
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
new file mode 100644
index 0000000..21679bc
--- /dev/null
+++ b/tests/testhelpermodule.c
@@ -0,0 +1,679 @@
+#include "pygobject.h"
+#include <gobject/gmarshal.h>
+
+#include "test-thread.h"
+#include "test-unknown.h"
+#include "test-floating.h"
+
+static PyTypeObject *_PyGObject_Type;
+#define PyGObject_Type (*_PyGObject_Type)
+
+static PyObject * _wrap_TestInterface__do_iface_method(PyObject *cls,
+ PyObject *args,
+ PyObject *kwargs);
+
+GType
+test_type_get_type(void)
+{
+ static GType gtype = 0;
+ GType parent_type;
+
+ if (gtype == 0)
+ {
+ GTypeInfo *type_info;
+ GTypeQuery query;
+
+ parent_type = g_type_from_name("PyGObject");
+ if (parent_type == 0)
+ g_error("could not get PyGObject from testmodule");
+
+ type_info = (GTypeInfo *)g_new0(GTypeInfo, 1);
+
+ g_type_query(parent_type, &query);
+ type_info->class_size = query.class_size;
+ type_info->instance_size = query.instance_size;
+
+ gtype = g_type_register_static(parent_type,
+ "TestType", type_info, 0);
+ if (!gtype)
+ g_error("Could not register TestType");
+ }
+
+ return gtype;
+}
+
+#define TYPE_TEST (test_type_get_type())
+
+static PyObject *
+_wrap_get_test_thread (PyObject * self)
+{
+ GObject *obj;
+
+ test_thread_get_type();
+ g_assert (g_type_is_a (TEST_TYPE_THREAD, G_TYPE_OBJECT));
+ obj = g_object_new (TEST_TYPE_THREAD, NULL);
+ g_assert (obj != NULL);
+
+ return pygobject_new(obj);
+}
+
+static PyObject *
+_wrap_get_unknown (PyObject * self)
+{
+ GObject *obj;
+ obj = g_object_new (TEST_TYPE_UNKNOWN, NULL);
+ return pygobject_new(obj);
+}
+
+static PyObject *
+_wrap_create_test_type (PyObject * self)
+{
+ GObject *obj;
+ PyObject *rv;
+ obj = g_object_new(TYPE_TEST, NULL);
+ rv = pygobject_new(obj);
+ g_object_unref(obj);
+ return rv;
+}
+
+static PyObject *
+_wrap_test_g_object_new (PyObject * self)
+{
+ GObject *obj;
+ PyObject *rv;
+
+ obj = g_object_new(g_type_from_name("PyGObject"), NULL);
+ rv = PyInt_FromLong(obj->ref_count); /* should be == 2 at this point */
+ g_object_unref(obj);
+ return rv;
+}
+
+/* TestUnknown */
+static PyObject *
+_wrap_test_interface_iface_method(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { NULL };
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,":", kwlist))
+ return NULL;
+
+ test_interface_iface_method(TEST_INTERFACE(self->obj));
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static const PyMethodDef _PyTestInterface_methods[] = {
+ { "iface_method", (PyCFunction)_wrap_test_interface_iface_method, METH_VARARGS|METH_KEYWORDS,
+ NULL },
+ { "do_iface_method", (PyCFunction)_wrap_TestInterface__do_iface_method, METH_VARARGS|METH_KEYWORDS|METH_CLASS,
+ NULL },
+ { NULL, NULL, 0, NULL }
+};
+
+/* TestInterface */
+PyTypeObject PyTestInterface_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "test.Interface", /* tp_name */
+ sizeof(PyObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)0, /* tp_dealloc */
+ (printfunc)0, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+ (cmpfunc)0, /* tp_compare */
+ (reprfunc)0, /* tp_repr */
+ (PyNumberMethods*)0, /* tp_as_number */
+ (PySequenceMethods*)0, /* tp_as_sequence */
+ (PyMappingMethods*)0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)0, /* tp_str */
+ (getattrofunc)0, /* tp_getattro */
+ (setattrofunc)0, /* tp_setattro */
+ (PyBufferProcs*)0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ NULL, /* Documentation string */
+ (traverseproc)0, /* tp_traverse */
+ (inquiry)0, /* tp_clear */
+ (richcmpfunc)0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)0, /* tp_iter */
+ (iternextfunc)0, /* tp_iternext */
+ (struct PyMethodDef*)_PyTestInterface_methods, /* tp_methods */
+ (struct PyMemberDef*)0, /* tp_members */
+ (struct PyGetSetDef*)0, /* tp_getset */
+ NULL, /* tp_base */
+ NULL, /* tp_dict */
+ (descrgetfunc)0, /* tp_descr_get */
+ (descrsetfunc)0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)0, /* tp_init */
+ (allocfunc)0, /* tp_alloc */
+ (newfunc)0, /* tp_new */
+ (freefunc)0, /* tp_free */
+ (inquiry)0 /* tp_is_gc */
+
+
+
+};
+
+static PyObject *
+_wrap_TestInterface__do_iface_method(PyObject *cls, PyObject *args, PyObject *kwargs)
+{
+ TestInterfaceIface *iface;
+ static char *kwlist[] = { "self", NULL };
+ PyGObject *self;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:TestInterface.iface_method", kwlist, &PyTestInterface_Type, &self))
+ return NULL;
+
+ iface = g_type_interface_peek(g_type_class_peek(pyg_type_from_object(cls)),
+ TEST_TYPE_INTERFACE);
+ if (iface->iface_method)
+ iface->iface_method(TEST_INTERFACE(self->obj));
+ else {
+ PyErr_SetString(PyExc_NotImplementedError,
+ "interface method TestInterface.iface_method not implemented");
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+PyTypeObject PyTestUnknown_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "testhelper.Unknown", /* tp_name */
+ sizeof(PyGObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)0, /* tp_dealloc */
+ (printfunc)0, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+ (cmpfunc)0, /* tp_compare */
+ (reprfunc)0, /* tp_repr */
+ (PyNumberMethods*)0, /* tp_as_number */
+ (PySequenceMethods*)0, /* tp_as_sequence */
+ (PyMappingMethods*)0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)0, /* tp_str */
+ (getattrofunc)0, /* tp_getattro */
+ (setattrofunc)0, /* tp_setattro */
+ (PyBufferProcs*)0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ NULL, /* Documentation string */
+ (traverseproc)0, /* tp_traverse */
+ (inquiry)0, /* tp_clear */
+ (richcmpfunc)0, /* tp_richcompare */
+ offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
+ (getiterfunc)0, /* tp_iter */
+ (iternextfunc)0, /* tp_iternext */
+ (struct PyMethodDef*)0, /* tp_methods */
+ (struct PyMemberDef*)0, /* tp_members */
+ (struct PyGetSetDef*)0, /* tp_getset */
+ NULL, /* tp_base */
+ NULL, /* tp_dict */
+ (descrgetfunc)0, /* tp_descr_get */
+ (descrsetfunc)0, /* tp_descr_set */
+ offsetof(PyGObject, inst_dict), /* tp_dictoffset */
+ (initproc)0, /* tp_init */
+ (allocfunc)0, /* tp_alloc */
+ (newfunc)0, /* tp_new */
+ (freefunc)0, /* tp_free */
+ (inquiry)0 /* tp_is_gc */
+};
+
+
+static void
+_wrap_TestInterface__proxy_do_iface_method(TestInterface *self)
+{
+ PyGILState_STATE __py_state;
+ PyObject *py_self;
+ PyObject *py_retval;
+ PyObject *py_args;
+ PyObject *py_method;
+
+ __py_state = pyg_gil_state_ensure();
+ py_self = pygobject_new((GObject *) self);
+ if (!py_self) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ pyg_gil_state_release(__py_state);
+ return;
+ }
+ py_args = PyTuple_New(0);
+ py_method = PyObject_GetAttrString(py_self, "do_iface_method");
+ if (!py_method) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_DECREF(py_args);
+ Py_DECREF(py_self);
+ pyg_gil_state_release(__py_state);
+ return;
+ }
+ py_retval = PyObject_CallObject(py_method, py_args);
+ if (!py_retval) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_DECREF(py_method);
+ Py_DECREF(py_args);
+ Py_DECREF(py_self);
+ pyg_gil_state_release(__py_state);
+ return;
+ }
+ if (py_retval != Py_None) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ PyErr_SetString(PyExc_TypeError, "retval should be None");
+ Py_DECREF(py_retval);
+ Py_DECREF(py_method);
+ Py_DECREF(py_args);
+ Py_DECREF(py_self);
+ pyg_gil_state_release(__py_state);
+ return;
+ }
+
+ Py_DECREF(py_retval);
+ Py_DECREF(py_method);
+ Py_DECREF(py_args);
+ Py_DECREF(py_self);
+ pyg_gil_state_release(__py_state);
+}
+
+static void
+__TestInterface__interface_init(TestInterfaceIface *iface,
+ PyTypeObject *pytype)
+{
+ TestInterfaceIface *parent_iface = g_type_interface_peek_parent(iface);
+ PyObject *py_method;
+
+ py_method = pytype ? PyObject_GetAttrString((PyObject *) pytype,
+ "do_iface_method") : NULL;
+
+ if (py_method && !PyObject_TypeCheck(py_method, &PyCFunction_Type)) {
+ iface->iface_method = _wrap_TestInterface__proxy_do_iface_method;
+ } else {
+ PyErr_Clear();
+ if (parent_iface) {
+ iface->iface_method = parent_iface->iface_method;
+ }
+ Py_XDECREF(py_method);
+ }
+}
+
+static const GInterfaceInfo __TestInterface__iinfo = {
+ (GInterfaceInitFunc) __TestInterface__interface_init,
+ NULL,
+ NULL
+};
+
+/* TestFloatingWithSinkFunc */
+
+PyTypeObject PyTestFloatingWithSinkFunc_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "testhelper.FloatingWithSinkFunc", /* tp_name */
+ sizeof(PyGObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)0, /* tp_dealloc */
+ (printfunc)0, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+ (cmpfunc)0, /* tp_compare */
+ (reprfunc)0, /* tp_repr */
+ (PyNumberMethods*)0, /* tp_as_number */
+ (PySequenceMethods*)0, /* tp_as_sequence */
+ (PyMappingMethods*)0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)0, /* tp_str */
+ (getattrofunc)0, /* tp_getattro */
+ (setattrofunc)0, /* tp_setattro */
+ (PyBufferProcs*)0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ NULL, /* Documentation string */
+ (traverseproc)0, /* tp_traverse */
+ (inquiry)0, /* tp_clear */
+ (richcmpfunc)0, /* tp_richcompare */
+ offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
+ (getiterfunc)0, /* tp_iter */
+ (iternextfunc)0, /* tp_iternext */
+ (struct PyMethodDef*)0, /* tp_methods */
+ (struct PyMemberDef*)0, /* tp_members */
+ (struct PyGetSetDef*)0, /* tp_getset */
+ NULL, /* tp_base */
+ NULL, /* tp_dict */
+ (descrgetfunc)0, /* tp_descr_get */
+ (descrsetfunc)0, /* tp_descr_set */
+ offsetof(PyGObject, inst_dict), /* tp_dictoffset */
+ (initproc)0, /* tp_init */
+ (allocfunc)0, /* tp_alloc */
+ (newfunc)0, /* tp_new */
+ (freefunc)0, /* tp_free */
+ (inquiry)0 /* tp_is_gc */
+};
+
+/* TestFloatingWithoutSinkFunc */
+
+PyTypeObject PyTestFloatingWithoutSinkFunc_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "testhelper.FloatingWithoutSinkFunc", /* tp_name */
+ sizeof(PyGObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)0, /* tp_dealloc */
+ (printfunc)0, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+ (cmpfunc)0, /* tp_compare */
+ (reprfunc)0, /* tp_repr */
+ (PyNumberMethods*)0, /* tp_as_number */
+ (PySequenceMethods*)0, /* tp_as_sequence */
+ (PyMappingMethods*)0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)0, /* tp_str */
+ (getattrofunc)0, /* tp_getattro */
+ (setattrofunc)0, /* tp_setattro */
+ (PyBufferProcs*)0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ NULL, /* Documentation string */
+ (traverseproc)0, /* tp_traverse */
+ (inquiry)0, /* tp_clear */
+ (richcmpfunc)0, /* tp_richcompare */
+ offsetof(PyGObject, weakreflist), /* tp_weaklistoffset */
+ (getiterfunc)0, /* tp_iter */
+ (iternextfunc)0, /* tp_iternext */
+ (struct PyMethodDef*)0, /* tp_methods */
+ (struct PyMemberDef*)0, /* tp_members */
+ (struct PyGetSetDef*)0, /* tp_getset */
+ NULL, /* tp_base */
+ NULL, /* tp_dict */
+ (descrgetfunc)0, /* tp_descr_get */
+ (descrsetfunc)0, /* tp_descr_set */
+ offsetof(PyGObject, inst_dict), /* tp_dictoffset */
+ (initproc)0, /* tp_init */
+ (allocfunc)0, /* tp_alloc */
+ (newfunc)0, /* tp_new */
+ (freefunc)0, /* tp_free */
+ (inquiry)0 /* tp_is_gc */
+};
+
+#include <string.h>
+#include <glib-object.h>
+
+static void
+test1_callback (GObject *object, char *data)
+{
+ g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (!strcmp (data, "user-data"));
+}
+
+static void
+test1_callback_swapped (char *data, GObject *object)
+{
+ g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (!strcmp (data, "user-data"));
+}
+
+static void
+test2_callback (GObject *object, char *string)
+{
+ g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (!strcmp (string, "string"));
+}
+
+static int
+test3_callback (GObject *object, double d)
+{
+ g_return_val_if_fail (G_IS_OBJECT (object), -1);
+ g_return_val_if_fail (d == 42.0, -1);
+
+ return 20;
+}
+
+static void
+test4_callback (GObject *object,
+ gboolean b, long l, float f, double d, guint uint, gulong ulong,
+ gpointer user_data)
+{
+ g_return_if_fail (b == TRUE);
+ g_return_if_fail (l == 10L);
+ g_return_if_fail (f <= 3.14001 && f >= 3.13999);
+ g_return_if_fail (d == 1.78);
+ g_return_if_fail (uint == 20);
+ g_return_if_fail (ulong == 30L);
+}
+
+static float
+test_float_callback (GObject *object, float f)
+{
+ g_return_val_if_fail (G_IS_OBJECT (object), -1);
+ g_return_val_if_fail (f <= 1.234001 && f >= 1.123999, -1);
+
+ return f;
+}
+
+static double
+test_double_callback (GObject *object, double d)
+{
+ g_return_val_if_fail (G_IS_OBJECT (object), -1);
+ g_return_val_if_fail (d <= 1.234001 && d >= 1.123999, -1);
+
+ return d;
+}
+
+static char *
+test_string_callback (GObject *object, char *s)
+{
+ g_return_val_if_fail (G_IS_OBJECT (object), NULL);
+ g_return_val_if_fail (!strcmp(s, "str"), NULL);
+
+ return g_strdup (s);
+}
+
+static GObject *
+test_object_callback (GObject *object, GObject *o)
+{
+ g_return_val_if_fail (G_IS_OBJECT (object), NULL);
+
+ return o;
+}
+
+void
+connectcallbacks (GObject *object)
+{
+
+ gchar *data = "user-data";
+
+ g_signal_connect (G_OBJECT (object),
+ "test1",
+ G_CALLBACK (test1_callback),
+ data);
+ g_signal_connect_swapped (G_OBJECT (object),
+ "test1",
+ G_CALLBACK (test1_callback_swapped),
+ data);
+ g_signal_connect (G_OBJECT (object),
+ "test2",
+ G_CALLBACK (test2_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (object),
+ "test3",
+ G_CALLBACK (test3_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (object),
+ "test4",
+ G_CALLBACK (test4_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (object),
+ "test_float",
+ G_CALLBACK (test_float_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (object),
+ "test_double",
+ G_CALLBACK (test_double_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (object),
+ "test_string",
+ G_CALLBACK (test_string_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (object),
+ "test_object",
+ G_CALLBACK (test_object_callback),
+ NULL);
+}
+
+static PyObject *
+_wrap_connectcallbacks(PyObject * self, PyObject *args)
+{
+ PyGObject *obj;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+
+ connectcallbacks (G_OBJECT (obj->obj));
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+_wrap_test_value(PyObject *self, PyObject *args)
+{
+ GValue tvalue = {0,}, *value = &tvalue;
+ PyObject *obj;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+
+ g_value_init(value, G_TYPE_VALUE);
+ if (pyg_value_from_pyobject(value, obj)) {
+ PyErr_SetString(PyExc_TypeError, "Could not convert to GValue");
+ return NULL;
+ }
+
+ return pyg_value_as_pyobject(value, FALSE);
+}
+
+static PyObject *
+_wrap_test_value_array(PyObject *self, PyObject *args)
+{
+ GValue tvalue = {0,}, *value = &tvalue;
+ PyObject *obj;
+
+ if (!PyArg_ParseTuple(args, "O", &obj))
+ return NULL;
+
+ g_value_init(value, G_TYPE_VALUE_ARRAY);
+ if (pyg_value_from_pyobject(value, obj)) {
+ PyErr_SetString(PyExc_TypeError, "Could not convert to GValueArray");
+ return NULL;
+ }
+
+ return pyg_value_as_pyobject(value, FALSE);
+}
+
+static PyObject *
+_wrap_test_gerror_exception(PyObject *self, PyObject *args)
+{
+ PyObject *py_method;
+ PyObject *py_args;
+ PyObject *py_ret;
+ GError *err = NULL;
+
+ if (!PyArg_ParseTuple(args, "O", &py_method))
+ return NULL;
+
+ py_args = PyTuple_New(0);
+ py_ret = PyObject_CallObject(py_method, py_args);
+ if (pyg_gerror_exception_check(&err)) {
+ pyg_error_check(&err);
+ return NULL;
+ }
+
+ Py_DECREF(py_method);
+ Py_DECREF(py_args);
+ Py_DECREF(py_ret);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef testhelper_functions[] = {
+ { "get_test_thread", (PyCFunction)_wrap_get_test_thread, METH_NOARGS },
+ { "get_unknown", (PyCFunction)_wrap_get_unknown, METH_NOARGS },
+ { "create_test_type", (PyCFunction)_wrap_create_test_type, METH_NOARGS },
+ { "test_g_object_new", (PyCFunction)_wrap_test_g_object_new, METH_NOARGS },
+ { "connectcallbacks", (PyCFunction)_wrap_connectcallbacks, METH_VARARGS },
+ { "test_value", (PyCFunction)_wrap_test_value, METH_VARARGS },
+ { "test_value_array", (PyCFunction)_wrap_test_value_array, METH_VARARGS },
+ { "test_gerror_exception", (PyCFunction)_wrap_test_gerror_exception, METH_VARARGS },
+ { NULL, NULL }
+};
+
+void
+inittesthelper ()
+{
+ PyObject *m, *d;
+ PyObject *module;
+
+ g_thread_init(NULL);
+ init_pygobject();
+ m = Py_InitModule ("testhelper", testhelper_functions);
+
+ d = PyModule_GetDict(m);
+
+ if ((module = PyImport_ImportModule("gobject")) != NULL) {
+ PyObject *moddict = PyModule_GetDict(module);
+
+ _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+ if (_PyGObject_Type == NULL) {
+ PyErr_SetString(PyExc_ImportError,
+ "cannot import name GObject from gobject");
+ return ;
+ }
+ } else {
+ PyErr_SetString(PyExc_ImportError,
+ "could not import gobject");
+ return ;
+ }
+
+ /* TestInterface */
+ pyg_register_interface(d, "Interface", TEST_TYPE_INTERFACE,
+ &PyTestInterface_Type);
+ pyg_register_interface_info(TEST_TYPE_INTERFACE, &__TestInterface__iinfo);
+
+
+ /* TestUnknown */
+ pygobject_register_class(d, "Unknown", TEST_TYPE_UNKNOWN,
+ &PyTestUnknown_Type,
+ Py_BuildValue("(O)",
+ &PyGObject_Type,
+ &PyTestInterface_Type));
+ pyg_set_object_has_new_constructor(TEST_TYPE_UNKNOWN);
+ //pyg_register_class_init(TEST_TYPE_UNKNOWN, __GtkUIManager_class_init);
+
+ /* TestFloatingWithSinkFunc */
+ pygobject_register_class(d, "FloatingWithSinkFunc", TEST_TYPE_FLOATING_WITH_SINK_FUNC,
+ &PyTestFloatingWithSinkFunc_Type,
+ Py_BuildValue("(O)",
+ &PyGObject_Type));
+ pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_WITH_SINK_FUNC);
+ pygobject_register_sinkfunc(TEST_TYPE_FLOATING_WITH_SINK_FUNC, sink_test_floating_with_sink_func);
+
+ /* TestFloatingWithoutSinkFunc */
+ pygobject_register_class(d, "FloatingWithoutSinkFunc", TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC,
+ &PyTestFloatingWithoutSinkFunc_Type,
+ Py_BuildValue("(O)",
+ &PyGObject_Type));
+ pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC);
+}
+
diff --git a/tests/testmodule.py b/tests/testmodule.py
new file mode 100644
index 0000000..5fc29b3
--- /dev/null
+++ b/tests/testmodule.py
@@ -0,0 +1,21 @@
+import gobject
+
+class PyGObject(gobject.GObject):
+ __gtype_name__ = 'PyGObject'
+ __gproperties__ = {
+ 'label': (gobject.TYPE_STRING,
+ 'label property',
+ 'the label of the object',
+ 'default', gobject.PARAM_READWRITE),
+ }
+
+ def __init__(self):
+ self._props = {}
+ gobject.GObject.__init__(self)
+ self.set_property('label', 'hello')
+
+ def do_set_property(self, name, value):
+ self._props[name] = value
+
+ def do_get_property(self, name):
+ return self._props[name]