Imported Upstream version 2.26.0 27/138227/1 upstream/2.26.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 11 Jul 2017 23:35:07 +0000 (08:35 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 11 Jul 2017 23:35:08 +0000 (08:35 +0900)
Change-Id: I616aeca320e366d54dd6e188c260b64639305c49
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
159 files changed:
ChangeLog
MANIFEST.in
Makefile.am
Makefile.in
NEWS
PKG-INFO
aclocal.m4
codegen/Makefile.in
configure
configure.ac
docs/Makefile.in
docs/html/class-gioappinfo.html
docs/html/class-gioapplaunchcontext.html
docs/html/class-gioasyncresult.html
docs/html/class-giobufferedinputstream.html
docs/html/class-giobufferedoutputstream.html
docs/html/class-giocancellable.html
docs/html/class-giodatainputstream.html
docs/html/class-giodataoutputstream.html
docs/html/class-giodrive.html
docs/html/class-gioemblem.html
docs/html/class-gioemblemedicon.html
docs/html/class-giofile.html
docs/html/class-giofileattributeinfo.html
docs/html/class-giofileenumerator.html
docs/html/class-giofileicon.html
docs/html/class-giofileinfo.html
docs/html/class-giofileinputstream.html
docs/html/class-giofilemonitor.html
docs/html/class-giofileoutputstream.html
docs/html/class-giofilterinputstream.html
docs/html/class-giofilteroutputstream.html
docs/html/class-gioicon.html
docs/html/class-gioinputstream.html
docs/html/class-gioloadableicon.html
docs/html/class-giomemoryinputstream.html
docs/html/class-giomemoryoutputstream.html
docs/html/class-giomount.html
docs/html/class-giomountoperation.html
docs/html/class-giooutputstream.html
docs/html/class-gioseekable.html
docs/html/class-giosimpleasyncresult.html
docs/html/class-giothemedicon.html
docs/html/class-giounixinputstream.html
docs/html/class-giounixoutputstream.html
docs/html/class-giovolume.html
docs/html/class-giovolumemonitor.html
docs/html/class-glibmaincontext.html
docs/html/class-glibmainloop.html
docs/html/class-gobject.html
docs/html/class-gobjectgboxed.html
docs/html/class-gobjectginterface.html
docs/html/class-gobjectgpointer.html
docs/html/gio-constants.html
docs/html/gio-functions.html
docs/html/glib-constants.html
docs/html/glib-functions.html
docs/html/gobject-constants.html
docs/html/gobject-functions.html
docs/html/index.html
docs/reference/pygio-mount.xml
docs/reference/pyglib-functions.xml
docs/reference/pyglib-maincontext.xml
docs/reference/pyglib-mainloop.xml
docs/reference/pygobject-functions.xml
docs/reference/pygobject.xml
examples/Makefile.in
examples/cairo-demo.py
gi/Makefile.am
gi/Makefile.in
gi/gimodule.c
gi/importer.py
gi/module.py
gi/overrides/GIMarshallingTests.py
gi/overrides/GLib.py [new file with mode: 0644]
gi/overrides/Gdk.py
gi/overrides/Gtk.py
gi/overrides/Makefile.am
gi/overrides/Makefile.in
gi/pygi-argument.c
gi/pygi-argument.h
gi/pygi-boxed.c
gi/pygi-boxed.h
gi/pygi-callbacks.c
gi/pygi-closure.c
gi/pygi-foreign-cairo.c
gi/pygi-foreign-gvariant.c [new file with mode: 0644]
gi/pygi-foreign-gvariant.h [new file with mode: 0644]
gi/pygi-foreign.c
gi/pygi-foreign.h
gi/pygi-info.c
gi/pygi-invoke.c
gi/pygi-private.h
gi/pygi-property.c [new file with mode: 0644]
gi/pygi-property.h [new file with mode: 0644]
gi/pygi-repository.c
gi/pygi-struct.c
gi/pygi-type.c
gi/pygi-type.h
gi/pygi.h
gi/repository/Makefile.in
gi/types.py
gio/Makefile.in
gio/gappinfo.override
gio/gfile.override
gio/gio.override
gio/giomodule.c
gio/pygio-utils.c
glib/Makefile.in
glib/glibmodule.c
glib/option.py
glib/pygiochannel.c
glib/pyglib-python-compat.h
glib/pyglib.c
glib/pyglib.h
glib/pygmaincontext.c
glib/pygmainloop.c
glib/pygoptioncontext.c
glib/pygoptiongroup.c
glib/pygsource.c
glib/pygspawn.c
gobject/Makefile.in
gobject/__init__.py
gobject/gobjectmodule.c
gobject/propertyhelper.py
gobject/pygboxed.c
gobject/pygenum.c
gobject/pygflags.c
gobject/pygobject-private.h
gobject/pygobject.c
gobject/pygobject.h
gobject/pygparamspec.c
gobject/pygpointer.c
gobject/pygtype.c
tests/Makefile.am
tests/Makefile.in
tests/common.py [deleted file]
tests/compathelper.py [new file with mode: 0644]
tests/runtests.py
tests/test_everything.py
tests/test_gcancellable.py [new file with mode: 0644]
tests/test_gi.py
tests/test_gicon.py
tests/test_gio.py
tests/test_gobject.py
tests/test_gresolver.py [new file with mode: 0644]
tests/test_gsocket.py [new file with mode: 0644]
tests/test_interface.py
tests/test_mainloop.py
tests/test_option.py [new file with mode: 0644]
tests/test_overrides.py
tests/test_properties.py
tests/test_signal.py
tests/test_source.py
tests/test_subprocess.py
tests/test_thread.py [new file with mode: 0644]
tests/test_unknown.py [deleted file]
tests/test_uris.py [new file with mode: 0644]
tests/testhelpermodule.c

index c2dca8072c84579ab0e9c6a97adc7c23eb0eeb3c..fcc73b495ce96d9137a50514219a67896607c890 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+commit fd38010101411e6bc1ca9314657f418de660fa13
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Sep 27 12:03:10 2010 -0400
+
+    update NEWS for release
+
+ NEWS |   93
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 93 insertions(+), 0 deletions(-)
+
+commit 7072d56b6cba13da97a052c75d1ae0c2cc417fd1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Sun Sep 26 08:37:31 2010 +0200
+
+    Pre-release version bump 2.26.0
+
+ configure.ac |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a549f429d2ced7a78d5baa5e2f28f6750b4788f2
+Author: John Stowers <john.stowers@gmail.com>
+Date:   Fri Sep 24 22:44:03 2010 +1200
+
+    Wrap g_get_system_{config,data}_dirs ()
+
+       * Also tidy up g_get_{cache,config,data}_dir
+         to share common code
+
+ glib/glibmodule.c |   68
+ +++++++++++++++++++++++++++++++++++++++--------------
+ 1 files changed, 50 insertions(+), 18 deletions(-)
+
+commit 328aca600714bdca89dfdb531c222ee561ede27e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Sep 24 12:16:22 2010 -0400
+
+    fixed make check and make dist
+
+ tests/Makefile.am |   31 ++++++++++++++++++-------------
+ 1 files changed, 18 insertions(+), 13 deletions(-)
+
+commit 27023fd56148dd17b5576c1e81e0fe851d9b8727
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Sep 24 21:20:53 2010 +1200
+
+    Disable GI tests when introspection disabled
+
+ tests/Makefile.am |   2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 7fe831081cdd2e26f5d948326b9f89ea0694e752
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Jul 18 19:35:08 2009 +0200
+
+    Wrap g_uri_list_extract_uris. Fixes bug #584431
+
+ glib/glibmodule.c   |  38 ++++++++++++++++++++++++++++++++++++++
+ gobject/__init__.py |   2 +-
+ tests/Makefile.am   |   3 ++-
+ tests/test_uris.py  |  15 +++++++++++++++
+ 4 files changed, 56 insertions(+), 2 deletions(-)
+
+commit d6721a59c294f2471142b8c32de2f647b7084bca
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Thu Sep 23 15:38:40 2010 -0400
+
+    Fix a few uses of TRUE and FALSE in the docs
+
+ docs/reference/pygio-mount.xml                |    5 +++--
+ docs/reference/pyglib-functions.xml   |   18 +++++++++---------
+ docs/reference/pyglib-maincontext.xml |   12 ++++++------
+ docs/reference/pyglib-mainloop.xml    |    6 +++---
+ docs/reference/pygobject-functions.xml |    6 +++---
+ docs/reference/pygobject.xml          |    4 ++--
+ 6 files changed, 26 insertions(+), 25 deletions(-)
+
+commit a08c9fffb4262ae678e17f90bbfb2d5f880cfad0
+Author: Damien Caliste <damien.caliste@cea.fr>
+Date:  Tue Sep 21 17:52:14 2010 +0200
+
+    pygi: always free the invocation_state struct
+
+    In pygi-invoke.c, the invocation_state struct is never freed
+    in case of success. Thus, always call _free_invocation_state()
+    before leaving.
+    Modify _free_invocation_state to avoid double free in case of
+    caller-allocated GValue, once as a released argument in the
+    _process routine and another time in the _free as the special
+    case. So move all argument releasing code from the _process
+    routine to the _free one.
+    Modify the tests for the callback routines to return an integer
+    value as specified in the GIR file.
+
+    Make check is as successful as before (already existing error
+    related to GVariant is still there).
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=630271
+
+ gi/pygi-invoke.c        |   83
+ ++++++++++++++++++++-------------------------
+ tests/test_everything.py |    4 ++-
+ 2 files changed, 40 insertions(+), 47 deletions(-)
+
+commit 9714d765a34e246899f11b6792eea3aecce0b7ec
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Sep 13 16:36:47 2010 +0200
+
+    Start implementing something equivalent to g_variant_new
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629367
+
+ gi/gimodule.c             |   20 +++++++
+ gi/overrides/GLib.py      |  131
+ +++++++++++++++++++++++++++++++++++++++++--
+ gi/pygi-foreign-gvariant.c |   2 +-
+ tests/test_everything.py   |  16 -----
+ tests/test_overrides.py    |  25 ++++++++
+ 5 files changed, 170 insertions(+), 24 deletions(-)
+
+commit fc45abdd9b55ab63556798ab0f04715be79dba08
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 23 10:49:36 2010 -0400
+
+    fixed typo - missing comma in glib.option module
+
+    * https://bugzilla.gnome.org/show_bug.cgi?id=627449
+
+ glib/option.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4ed100f3183c6325dd04461484e877bb7d4131b1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Sep 17 12:08:09 2010 -0400
+
+    add checks so we can compile under python 3 by setting PYTHON=python3
+
+    * compile for python 3
+    * disables gio if compiling under python 3.x
+    * runs only pertinant tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ configure.ac     |   32 +++++++++++++++++++++++++++++---
+ tests/Makefile.am |   35 ++++++++++++++++++++---------------
+ tests/runtests.py |   4 ++++
+ 3 files changed, 53 insertions(+), 18 deletions(-)
+
+commit 269ff8564eeb597dc06c27e293354b7ff7a71a82
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Sep 17 15:50:47 2010 +0200
+
+    Rename static methods as functions
+
+    In recent gobject-introspection releases, static methods have been
+    removed and placed as functions in the namespace level. In a future
+    releases it's planned to become static methods again but for now
+    let's fix the tests.
+
+ tests/test_gi.py |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 2da8da589644d6125101210712defb1272a8abb1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 13:52:14 2010 -0400
+
+    fix a couple of compiler warnings
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629199
+
+ gi/pygi-argument.c     |    4 ++--
+ gi/pygi-struct.c       |    2 +-
+ gobject/gobjectmodule.c |    2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 6769a4704f0876ac3baacd4da03ff16d9f0906be
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 13:55:17 2010 -0400
+
+    remove unused code
+
+    * we use richcompare now
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629198
+
+ gobject/pygtype.c |   9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 98f54f9d33996baeaa8c8c1240310f5396d03a1d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Sep 14 14:10:49 2010 -0400
+
+    Check the type of the instance object
+
+    * in python 2 methods were added to classes as unbound methods and
+    they would
+      check the instance type to make sure it was correct
+    * in python 3 for perfomance reasons methods are added to classes
+    as simple
+      functions which treat the instance as an untyped argument so
+      no checks
+      are made.
+    * this patch adds a type check so that the correct errors are
+    thrown in
+      python 3 (python 2 this just adds another layer of redundancy should
+      something change with type checking in the future)
+    * since GI handles regular args and the instance arg slightly
+    differently
+      we had to split out the interface checks in
+      _pygi_g_type_info_check_object
+      in order to not duplicate code
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  182
+ +++++++++++++++++++++++++++------------------------
+ gi/pygi-argument.h |   2 +
+ gi/pygi-invoke.c   |  14 ++++
+ 3 files changed, 112 insertions(+), 86 deletions(-)
+
+commit 5d79498d38b147b66ae72c1481e397160491e8d6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 15 10:26:20 2010 -0400
+
+    include the correct pycairo version
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-foreign-cairo.c |    6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit b855562e5c0019cd7e4982fe00c467ede9e3926d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 22:16:58 2010 -0400
+
+    Use PyMapping_Keys to determine if an object is a dict (py3k fix)
+
+    * in Py3k PyMapping_Check returns true for sequences such as strings
+      and lists.  Since we need to get the keys anyway, and it returns
+      NULL if this is not a dict, this is a much better test, even in
+      Py2
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  10 +++-------
+ 1 files changed, 3 insertions(+), 7 deletions(-)
+
+commit 0e72e28c6c5502c7db5103cf1299c9f0e6689fdd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 18:44:11 2010 -0400
+
+    fix handling of UINT64 and INT64 arguments in py3k
+
+    * decode to the right sized C long
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
+
+commit d5666d99a1c0396b7da0cb14f9f4ff8892da7e2e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 17:35:10 2010 -0400
+
+    properly handle ulongs properties in py3k
+
+    * If this is a PyLong object pull use AsUnsignedLong
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/pygtype.c |   31 +++++++++++++++++--------------
+ 1 files changed, 17 insertions(+), 14 deletions(-)
+
+commit 3d431c7dd0de97db10cb0c00c39d9c1837bed2f2
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Sep 17 12:14:56 2010 +0200
+
+    Specify encoding of tests/test_gi.py
+
+ tests/test_gi.py |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a808bdabb9fa6f4a9b9ce42e1cce05fb37403f0f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 13:24:30 2010 -0400
+
+    use actual unicode in the tests on py3k, not the byte representation
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ tests/test_gi.py |    6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 928f4485041d80d0c36ff2daeae4bcd09bd0bde4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 12:45:21 2010 -0400
+
+    s/METH_KEYWORDS/METH_VARARGS|METH_KEYWORDS/ when defining object
+    methods
+
+    * in Py3k the METH_KEYWORDS flag by itself is invalid.  A method
+    must be defined
+      with both the METH_VARARGS and METH_KEYWORDS flags.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygiochannel.c |  30 +++++++++++++++---------------
+ glib/pygsource.c    |   4 ++--
+ gobject/pygobject.c |   2 +-
+ 3 files changed, 18 insertions(+), 18 deletions(-)
+
+commit b5ee20afa4399c7689fbec8939fa20b927eeb782
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 08:04:40 2010 -0400
+
+    fix subclassing PyLong by calling __new__ correctly
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygspawn.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a499b2f0d622b671bd154544f66b73f1278e66ed
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 07:56:44 2010 -0400
+
+    minor py3k fixups for python modules
+
+    * add _basestring and _bytes and _callable wrappers
+    * use items instead of iteritems and range instead of xrange
+
+    fix py3k modules
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/overrides/Gtk.py |  24 ++++++++++++++++--------
+ glib/option.py      |  16 ++++++++++++----
+ 2 files changed, 28 insertions(+), 12 deletions(-)
+
+commit dec9001d26c97949e7b3578086cb35e98075c047
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 07:36:04 2010 -0400
+
+    minor fixes in tests for py3k compat
+
+    * add a _bytes wrapper for API that expects bytes in py3k but str
+    in py2
+    * fix some more exception handling using sys.exc_info()[:2]
+    * use range instead of xrange, items instead of iteritems since py3k
+      dropped support for the different ways of accessing iterators
+      - this is less efficient in py2 but we plan to target py3k as the
+       primary platform
+    * use list(dict.items()) since py3k only returns iterables which
+    are not
+      indexable
+    * missed some _long wrapping
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ tests/compathelper.py   |   18 ++++++++++++++++++
+ tests/test_everything.py |    5 +++--
+ tests/test_mainloop.py   |    3 ++-
+ tests/test_option.py    |    6 ++++--
+ tests/test_overrides.py  |    4 ++--
+ tests/test_properties.py |    6 +++---
+ 6 files changed, 32 insertions(+), 10 deletions(-)
+
+commit 09a0daeedf49eaf376c1288be5743b57fbc76d51
+Author: Colin Walters <walters@verbum.org>
+Date:  Thu Sep 9 16:25:51 2010 -0400
+
+    compilation: Fix syntax error
+
+ gi/pygi-info.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9f7afd6d5afd8c1a5f36bf1295814757b71c8cbc
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Sep 9 22:17:00 2010 +0200
+
+    Add missing file
+
+ gi/overrides/GLib.py |   48
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 306b792ac97a458ddee59fb86d66453495117f3e
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 22 13:48:51 2010 +0100
+
+    Add override for GLib.Variant.new_tuple
+
+    * gi/gimodule.c: Add _wrap_pyg_variant_new_tuple
+    * gi/overrides/GLib.py: Override Variant.new_tuple and
+    Variant.get_string
+    * gi/pygi-type.[hc]: split _pygi_type_import_by_name out from
+      _pygi_type_import_by_gi_info
+    * gi/types.py: Never override gobject.TYPE_NONE
+    * tests/test_everything.py: Add tests for GVariant tuples
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625050
+
+ gi/gimodule.c           |   38 ++++++++++++++++++++++++++++++++++++++
+ gi/overrides/Makefile.am |    1 +
+ gi/pygi-type.c                  |   15 +++++++++------
+ gi/pygi-type.h                  |    2 ++
+ gi/types.py             |    1 +
+ tests/test_everything.py |    9 +++++++++
+ 6 files changed, 60 insertions(+), 6 deletions(-)
+
+commit 22e53aa2ed9cf6173a877b0af6928d5ab8da2f4f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 8 13:08:48 2010 -0400
+
+    fix for changes in the gi test libraries
+
+ tests/test_everything.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 246877074617b0e9c3b2ba2a5395a73e0ed9cd5d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 8 13:08:07 2010 -0400
+
+    Gtk.DialogFlags.NO_SEPARATOR has been removed in Gtk 3.0
+
+ gi/overrides/Gtk.py |  10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit f92fc48e7e2ec50996e994ccb7d08a61e7374f22
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 8 12:35:09 2010 -0400
+
+    no need to offset arg positions when is_method is true
+
+    * The old GI libraries required we offset arg positions for the
+    missing
+      self argument.  The new library fixes this so we don't have
+      to offset
+      anymore.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629087
+
+ gi/pygi-callbacks.c |   5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+commit 8c517de2d278bdef641c72b8f2919a3924290ec1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Aug 20 14:54:35 2010 +0200
+
+    gi: Add support for more property types
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627494
+
+ gi/pygi-property.c      |  156
+ +++++++++++++++++++++++++++++++++++-----------
+ tests/test_everything.py |   34 ++++++++++
+ 2 files changed, 154 insertions(+), 36 deletions(-)
+
+commit 6d183d1fff55d54569ba3e1f90a10284df74fd40
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Sep 3 12:04:16 2010 -0400
+
+    use PyObject_SetAttrString, not PyDict_SetItemString when setting
+    __gtype__
+
+    * When registering a gtype wrapper we used to set tp_dict
+    directly. This works
+      in python 2 but python 3 seems to handle attributes in a slightly
+      different
+      way where the tp_dict and attr get out of sync.  By setting the attr
+      directly we avoid this issue.
+    * Note that there are many more places where we set __gtype__
+    using tp_dict
+      however for objects which are not instantiated yet we have to
+      set tp_dict
+      directly.
+    * Since this one change fixes a lot of failed tests, for now we
+    ignore the
+      other places where we set __gtype__.  If we run into more issues
+      dealing
+      with __gtype__ we can take a closer look later.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627878
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/gobjectmodule.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b7bf4269682a3335f5e0a52b46fa721af134d09a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Sep 1 11:03:40 2010 +0200
+
+    Rename GArgument to GIArgument
+
+ gi/pygi-argument.c        |   52
+ ++++++++++++++++++++++----------------------
+ gi/pygi-argument.h        |   10 ++++----
+ gi/pygi-closure.c         |   34 ++++++++++++++--------------
+ gi/pygi-foreign-cairo.c    |   8 +++---
+ gi/pygi-foreign-gvariant.c |   4 +-
+ gi/pygi-foreign-gvariant.h |   4 +-
+ gi/pygi-foreign.c         |   12 +++++-----
+ gi/pygi-foreign.h         |    8 +++---
+ gi/pygi-info.c                    |    8 +++---
+ gi/pygi-invoke.c          |   28 +++++++++++-----------
+ gi/pygi-property.c        |    4 +-
+ gi/pygi.h                 |   16 ++++++------
+ 12 files changed, 94 insertions(+), 94 deletions(-)
+
+commit 7197f85c9be2b03636639ac909ca2c3170653509
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 18 10:29:19 2010 -0400
+
+    fix up tests so they run in py3k
+
+    * add a compat helper that should only be used by tests
+    * fix long notation to use the compat helper instead
+    * add parens to print statements
+    * use compatable try/except pattern
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/propertyhelper.py |   16 +++++++++++-----
+ tests/compathelper.py    |   32 ++++++++++++++++++++++++++++++++
+ tests/test_option.py     |    7 ++++++-
+ tests/test_properties.py  |   24 ++++++++++++++----------
+ tests/test_signal.py     |   14 +++++++-------
+ tests/test_source.py     |    4 ++--
+ 6 files changed, 72 insertions(+), 25 deletions(-)
+
+commit 720e614acdbcf734d4bcccc403e639b5a5bcae24
+Author: Colin Walters <walters@verbum.org>
+Date:  Fri Aug 20 10:58:48 2010 -0400
+
+    tests: Port to new introspection tests
+
+    Everything is renamed "Regress", and both it and GIMarshallingTests
+    are now in source form, so we compile them.
+
+    The scanner now adds "static methods" to objects, structs, and unions,
+    so update the test code to use those.
+
+    In the tests, remove broken (inout) cases - the person writing these
+    tests misunderstood the semantics of (inout).  It's not acceptable for
+    a C API to mutate e.g. a GSList* passed in, or unref an object.
+
+    The invocation code needed to be updated for this - remove some
+    broken hacks.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627878
+
+ configure.ac            |    5 +-
+ gi/pygi-argument.c      |    9 +--
+ gi/pygi-invoke.c        |  147
+ +++++----------------------------------------
+ tests/Makefile.am       |   42 ++++++++++++-
+ tests/test_everything.py |    6 +-
+ tests/test_gi.py        |  151
+ +++++++++-------------------------------------
+ 6 files changed, 93 insertions(+), 267 deletions(-)
+
+commit f6c4d9e58c8f05cb2d82e158c9eb8480308565bd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Aug 20 10:43:58 2010 -0400
+
+    we need to specify tp_hash since we overide tp_richcompare
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/pygenum.c  |   1 +
+ gobject/pygflags.c |   1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c03e6b482548aee99362356807c804f8834fad2b
+Author: John Ehresman <jpe@wingware.com>
+Date:  Thu Apr 15 17:11:30 2010 -0400
+
+    working enum/flags/pid subclasses of long
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygspawn.c    |   7 +++--
+ gobject/pygenum.c  |  61 ++++++++++++++++++++++++------------------
+ gobject/pygflags.c |  76
+ ++++++++++++++++++++++------------------------------
+ 3 files changed, 71 insertions(+), 73 deletions(-)
+
+commit 0db676fd2296750a46ba0fb069e472da06ecc53a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 18 11:03:32 2010 -0400
+
+    make vfuncs work in py3k
+
+    * methods now export __func__ instead of im_func for getting the
+    function
+      out of a method closure
+    * however classes no longer return unbound methods in py3k and instead
+      return the actual function
+    * in python 2 we use im_func when getting the function from the
+    vfunc closure
+    * in py3k we simply assign vfunc to the function
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/types.py |  12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 286dcd0c6455961d818ac7f05f80f82435abc1dc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 15:43:42 2010 -0400
+
+    make cairo module compile in py3k
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/Makefile.am                 |    2 +-
+ gi/pygi-foreign-cairo.c |   17 +++++++----------
+ 2 files changed, 8 insertions(+), 11 deletions(-)
+
+commit bda58ec34fc443fe1108afc8532bec50f6fd0b44
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 02:33:45 2010 -0400
+
+    fix exceptions so they work in python 3.x
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/module.py |    2 +-
+ gi/types.py  |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 427a3c8053feca35ccd746575760ac8a0ed50a12
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 02:24:44 2010 -0400
+
+    make the gi module compile under 3.x
+
+    * include the compat macros
+    * use GLIB_MODULE_START/END to define module
+    * add PyInit__gi to the exported symbols
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/Makefile.am |    2 +-
+ gi/gimodule.c |   24 +++++++++---------------
+ 2 files changed, 10 insertions(+), 16 deletions(-)
+
+commit 1dee5dcd2b1747b4a4af438c0443d7930e4802db
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 02:14:14 2010 -0400
+
+    fix up testshelper module so it compiles in python 3.x
+
+    * include the compat header
+    * fix up PyInts to be PYGLIB_Long
+    * Use PYGLIB_DEFINE_TYPE macros to define module objects
+    * Use PYGLIB_MODULE_START/END to define modules
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ tests/Makefile.am       |    2 +-
+ tests/testhelpermodule.c |  221
+ ++++++----------------------------------------
+ 2 files changed, 28 insertions(+), 195 deletions(-)
+
+commit 1ff83a2ccb7301c8f675913f1c4f6118ea50b9c7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 16 21:14:27 2010 -0400
+
+    convert to using PYGLIB_DEFINE_TYPE for module objects
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-boxed.c      |   43 ++-----------
+ gi/pygi-info.c       |  171
+ ++++++++++++++++++++------------------------------
+ gi/pygi-repository.c |   39 ++---------
+ gi/pygi-struct.c     |   45 ++-----------
+ 4 files changed, 88 insertions(+), 210 deletions(-)
+
+commit 1efa2b12913b194d433c17014bc1077271a6ca32
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 16 13:51:05 2010 -0400
+
+    some more p3k PyString and PyInt eradication in GI
+
+    * add the glib dir to the includes list in the build
+    * make sure we include the compat macros
+    * add GLIB_PyBytes_FromString to compat macros
+    * add GLIB_PyNumber_Long to compat macros
+    * use RichCompare instead of Compare
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/Makefile.am                     |    2 +-
+ gi/pygi-argument.c         |   96
+ ++++++++++++++++++++++++++-----------------
+ gi/pygi-boxed.c            |    1 +
+ gi/pygi-info.c                     |   13 ++++--
+ gi/pygi-private.h          |   23 ++++++++++
+ gi/pygi-repository.c       |    8 ++-
+ gi/pygi-struct.c           |    1 +
+ glib/pyglib-python-compat.h |   6 +++
+ 8 files changed, 103 insertions(+), 47 deletions(-)
+
+commit 6b902c66200c1684513a9ef31bdef3f2ff64e4fa
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Aug 20 09:28:57 2010 +0200
+
+    pyglib: Fix typo (Leo Singer)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627408
+
+ glib/option.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 3cefffecc1317b6ad77a5ed936bfb990d16bf9d3
+Author: Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+Date:  Thu Aug 19 18:45:05 2010 -0300
+
+    Add defines for size_t and ssize_t conversion functions
+
+    These missing defines cause the resulting module to have unresolved
+    symbols, rendering it unusable.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627440
+
+ glib/pyglib-python-compat.h |   2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d45c7031876f355e15409f00f3e50e77d18f8f4b
+Author: Colin Walters <walters@verbum.org>
+Date:  Thu Aug 19 17:50:35 2010 -0400
+
+    pyglib: Fix a compiler warning
+
+ glib/pyglib.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0fe6828ddce187ac1897a1f02ca1c5480796d5b9
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Aug 18 20:36:51 2010 +0200
+
+    Don't force gtk 2.0
+
+ pygi-convert.sh |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit ac59c18a4f2bfff47c862b763aaf1d1cf136a4f5
+Author: Steve Frécinaux <code@istique.net>
+Date:  Tue Aug 17 14:49:30 2010 +0200
+
+    Fix some ref leaks in hook_up_vfunc_implementation()
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627143
+
+ gi/gimodule.c |    9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 18ee0db673c2fa42244ab85950bbf4840edb674b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Aug 12 12:16:31 2010 -0400
+
+    handle strings correctly in gio
+
+ gio/gappinfo.override |    5 +++++
+ gio/pygio-utils.c     |   42 +++++++++++++++++++++++++++++++++++-------
+ 2 files changed, 40 insertions(+), 7 deletions(-)
+
+commit 45ab0c03110c911b47519941dfd753326891b5e0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 11 16:13:59 2010 -0400
+
+    make giomodule compile under py3k
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gio/giomodule.c |  153
+ ++++++++++++++++++++++++++++---------------------------
+ 1 files changed, 78 insertions(+), 75 deletions(-)
+
+commit c52f8ed3ae8cb66a03b5695e980770c3f467f755
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 11 16:04:48 2010 -0400
+
+    for py3k we need to do some more processing to get bytes from a
+    unicode string
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  31 +++++++++++++++++++++++++++----
+ 1 files changed, 27 insertions(+), 4 deletions(-)
+
+commit de9eae4dfcce856a42cc5c569a5b9683c28d0eeb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 11 15:03:55 2010 -0400
+
+    use Bytes instead of Unicode when reading io
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygiochannel.c |  30 ++++++++++++++++++++++++------
+ 1 files changed, 24 insertions(+), 6 deletions(-)
+
+commit 5824ff98175b749dbcfa72d24b994230b6e05377
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 9 15:16:51 2010 -0400
+
+    prefix compat macros with PYGLIB
+
+    * refactor from John Ehresman <jpe@wingware.com> py3k branch
+    * fix up some extranious PyString calls
+    * remove duplicate macros from pyglib.h that are in
+    pyglib-python-compat.h
+    * pygobject.h can't import pyglib-python-compat.h so add codepaths
+      for both Py3k and legacy code instead of using macros
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/glibmodule.c          |   48 +++++-----
+ glib/pygiochannel.c        |   46 +++++-----
+ glib/pyglib-python-compat.h | 153 +++++++++++++++++++++++-------
+ glib/pyglib.c              |   22 ++--
+ glib/pyglib.h              |   14 ---
+ glib/pygoptioncontext.c     |   4 +-
+ glib/pygsource.c           |   16 ++--
+ glib/pygspawn.c            |   32 +++---
+ gobject/gobjectmodule.c     | 216
+ +++++++++++++++++++++---------------------
+ gobject/pygboxed.c         |    2 +-
+ gobject/pygenum.c          |   84 +++++++++---------
+ gobject/pygflags.c         |  122 ++++++++++++------------
+ gobject/pygobject-private.h |  12 +-
+ gobject/pygobject.c        |   46 +++++-----
+ gobject/pygobject.h        |   23 +++++
+ gobject/pygparamspec.c      |  24 +++---
+ gobject/pygpointer.c       |    2 +-
+ gobject/pygtype.c          |  170 +++++++++++++++++-----------------
+ 18 files changed, 563 insertions(+), 473 deletions(-)
+
+commit 231e934cc01d061e81bb60d35127a133cd0e1793
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 16 10:14:04 2010 +0200
+
+    Gtk.Button unit tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622606
+
+ tests/test_overrides.py |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit f07cfde377e42686c6b80f56cac62338ee333e61
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Mon Aug 16 10:08:38 2010 +0200
+
+    [Gtk] Add overrides for Button
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622606
+
+ gi/overrides/Gtk.py |  13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 65a06a7216163c7e65b32c5b5f3388faa7fda5d6
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 16:18:58 2010 +0200
+
+    Make Cairo an optional dependency
+
+    Add the --enable-cairo configure argument.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616732
+
+ configure.ac  |   15 ++++++++++++---
+ gi/Makefile.am |   20 ++++++++++++--------
+ 2 files changed, 24 insertions(+), 11 deletions(-)
+
+commit b83507263231d9bf47f6c8450583e3d03f0a3b5b
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Aug 16 09:55:35 2010 +0200
+
+    Don't import again PyGObject (John Ralls)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=626996
+
+ gi/pygi.h |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0dc3656070f496431829c6e8441ca17129c569f8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 9 16:11:55 2010 -0400
+
+    move to using richcompare slot instead of compare
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygiochannel.c    |   18 +++++++---
+ glib/pyglib.c          |   85
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ glib/pyglib.h          |    3 ++
+ glib/pygmaincontext.c  |   17 ++++++---
+ glib/pygmainloop.c     |   17 ++++++---
+ glib/pygoptioncontext.c |   18 ++++++----
+ glib/pygoptiongroup.c  |   22 +++++++-----
+ gobject/pygboxed.c     |   18 +++++++---
+ gobject/pygobject.c    |   44 +++++++++++++++++-------
+ gobject/pygparamspec.c  |   19 +++++++---
+ gobject/pygpointer.c   |   17 ++++++---
+ gobject/pygtype.c      |   26 +++++++++++---
+ 12 files changed, 233 insertions(+), 71 deletions(-)
+
+commit b426e531dc53d4b50e572a2da19733479635e662
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 18:09:33 2010 +0200
+
+    Replace autogen.sh by a newer version
+
+    It pulls automake 1.10 or 1.11.
+    Greatly inspired from GLib's.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625661
+
+ autogen.sh |  506
+ +++++++-----------------------------------------------------
+ 1 files changed, 58 insertions(+), 448 deletions(-)
+
+commit 769645e00d6d055a4cd802454dbfc1bbfcbee691
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 14:11:55 2010 +0200
+
+    Fix some warnings
+
+    pyglib.c: In function â€˜pyglib_gerror_exception_check’:
+    pyglib.c:362: warning: format not a string literal and no format
+    arguments
+    pyglib.c:371: warning: format not a string literal and no format
+    arguments
+
+    gio.override: In function 'pygio_notify_allocate_buffer':
+    gio.override:144:13: warning: format '%d' expects type 'int', but
+    argument 3
+    has type 'gsize'
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625437
+
+ gio/gio.override |    2 +-
+ glib/pyglib.c   |    4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit e4c4cccb588b258dbcd21702e6cddcfe9ebe4ffc
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 11:09:37 2010 +0200
+
+    Fix caller-allocates emergency free.
+
+    In the state, args, args[i], arg_infos[i], and arg_type_infos[i]
+    must not be
+    NULL in order to be able caller-allocates. This patch adds those
+    conditions.
+
+    Moreover, the interface info needs to be freed afterwards.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=626684
+
+ gi/pygi-invoke.c |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 0ab967ca40ddcffc2834d4e656bb2010c6b9bdda
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 10:46:17 2010 +0200
+
+    Remove useless checks.
+
+    No need to check for state->arg_infos, state->arg_type_infos, and
+    state->args_is_auxiliary to be NULL, they are always allocated.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=626684
+
+ gi/pygi-invoke.c |   14 +++-----------
+ 1 files changed, 3 insertions(+), 11 deletions(-)
+
+commit e17be9cd288fee5d7cb174d9d577eb9279044c67
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Aug 10 17:40:16 2010 +0200
+
+    Call valgrind with G_SLICE=always-malloc G_DEBUG=gc-friendly
+
+ tests/Makefile.am |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8be59c37dd57acc51875c7189ca09d728b729013
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:  Wed Aug 4 13:43:17 2010 +0200
+
+    Fix some warnings.
+
+ gi/pygi-argument.c |   2 --
+ gi/pygi-invoke.c   |   2 +-
+ gi/pygi-struct.c   |   1 -
+ 3 files changed, 1 insertions(+), 4 deletions(-)
+
+commit 529eca6054e9a7e2267f1529e317c2373932762f
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Fri Jul 30 22:39:40 2010 +0200
+
+    Add myself as a maintainer
+
+ MAINTAINERS |   4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit caac75a6ed6f671b37e38a78e71b87906a00ac1b
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jul 30 14:14:16 2010 +0200
+
+    Properly allocate boxed structs that are (caller-allocates)
+
+    * gi/pygi-boxed.[hc]: Refactor out the allocation of boxed structs
+    * gi/pygi-invoke.c: Don't use g_malloc0 for boxed structs that
+      are (caller-allocates)
+    * tests/test_overrides.py: Split the TreeView tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625653
+
+ gi/pygi-boxed.c        |   50
+ +++++++++++++++++++++++++++++++----------------
+ gi/pygi-boxed.h        |   10 +++++---
+ gi/pygi-invoke.c       |   16 +++++---------
+ tests/test_overrides.py |   39 +++++++++++++++++------------------
+ 4 files changed, 64 insertions(+), 51 deletions(-)
+
+commit 99c7322898c00a576c7319ea0a7c808446253133
+Author: Toms Baugis <toms.baugis@gmail.com>
+Date:  Fri Jul 30 15:44:21 2010 +0200
+
+    override gdk.Event to return attribute from the proper event object
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620593
+
+ gi/overrides/Gdk.py    |   48
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-invoke.c       |    4 ---
+ tests/test_overrides.py |   10 +++++++++
+ 3 files changed, 58 insertions(+), 4 deletions(-)
+
+commit 55814e722c2ae11310f346790c9221e4fad92b50
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jul 30 06:30:48 2010 -0400
+
+    check if z# needs an int or Py_ssize_t
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625438
+
+ gio/gio.override |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 477315465d0a6d84b51e146e86e254873bc564ff
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jul 30 06:43:06 2010 -0400
+
+    make sure we parse parameters to python object vars not glib vars
+
+    * py_flags was already set up but due to a typo &flags was being
+    passed
+      instead
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625438
+
+ gio/gfile.override |   8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit faa7d4eece7ddb698725098970c2478a3b45c4d5
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Fri Jul 30 10:56:01 2010 +0200
+
+    Make an example and a demo work out of the box
+
+    cairo-demo.py and gtk-demo.py need the two (kind of) magic lines
+    regarding pygtk to work out of the box. So add those.
+
+    Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625638
+
+ demos/gtk-demo/gtk-demo.py |   2 ++
+ examples/cairo-demo.py     |   2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit c9da5782e6c633d9af43ee85075e9ee65db09780
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jul 9 13:14:42 2010 -0400
+
+    make sure caller allocated structs are freed when they go out of scope
+
+    * Move struct transfer checks from pygi-arguments to pygi-invoke
+    * add better warning if an unknown struct is fully transfered
+    * only free GValues we create in the invoke cleanup.  All other
+    structs
+      get cleaned up when they go out of scope in python
+    * Fixes issues with caller allocated treeiters getting freed to early
+    * this is a fix to crashes in the current test suite when API's
+    returning
+      TreeIters were annotated as out caller-allocates so no new tests
+      are needed
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=623969
+
+ gi/pygi-argument.c |  13 +++++--------
+ gi/pygi-invoke.c   |  46 ++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 45 insertions(+), 14 deletions(-)
+
+commit e0a85305cd107aae5902e524afd074cd8c329927
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jul 30 10:35:33 2010 +0200
+
+    Revert "override gdk.Event to return attribute from the proper
+    event object."
+
+    Pushed by mistake, we still need testcases
+
+    This reverts commit e7bb3954880568884ca66e7751ede689dc2f24f6.
+
+ gi/overrides/Gdk.py |  44 --------------------------------------------
+ 1 files changed, 0 insertions(+), 44 deletions(-)
+
+commit 61ffb8d6d08fcfe638f71ea97ceac3a366e5536d
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Thu Jul 29 22:55:28 2010 +0200
+
+    PyGI: properly quit cairo-demo
+
+    Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625619
+
+ examples/cairo-demo.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e7bb3954880568884ca66e7751ede689dc2f24f6
+Author: Toms Baugis <toms.baugis@gmail.com>
+Date:  Tue Jul 27 21:37:16 2010 +0200
+
+    override gdk.Event to return attribute from the proper event object.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620593
+
+ gi/overrides/Gdk.py |  44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 44 insertions(+), 0 deletions(-)
+
+commit 0a9f1da052fd33dcef81d0e267fc7972f02c7888
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Wed Jul 28 14:56:00 2010 +0200
+
+    Clean and improve the test infrastructure
+
+    To run select tests, use for instance:
+    % make check TEST_NAMES='test_everything test_gi.TestConstant'
+
+    It works with check.gdb and check.valgrind too.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625488
+
+ Makefile.am               |    5 ---
+ tests/Makefile.am         |   65
+ ++++++++++++++++++++-----------------------
+ tests/common.py           |   47 -------------------------------
+ tests/runtests.py         |   43 +++++++++++------------------
+ tests/test_gcancellable.py |   4 +-
+ tests/test_gi.py          |    3 --
+ tests/test_gicon.py       |    3 +-
+ tests/test_gio.py         |    3 +-
+ tests/test_gobject.py     |    3 +-
+ tests/test_gresolver.py    |   4 +-
+ tests/test_gsocket.py     |    4 ++-
+ tests/test_interface.py    |   6 +++-
+ tests/test_mainloop.py     |  11 +++-----
+ tests/test_signal.py      |    4 ++-
+ tests/test_source.py      |    4 +-
+ tests/test_subprocess.py   |   5 +---
+ tests/test_thread.py      |    5 +++-
+ tests/test_unknown.py     |    5 +++-
+ 18 files changed, 82 insertions(+), 142 deletions(-)
+
+commit 82f4cb5ebf5d992493b7a2f74cfd5f175e19eb76
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 29 12:34:19 2010 +0200
+
+    Add some more transformations to pygi-convert.sh
+
+ pygi-convert.sh |   37 +++++++++++++++++++++++++++++--------
+ 1 files changed, 29 insertions(+), 8 deletions(-)
+
+commit de519adcd21947a0aef7932cdecb78cef200c85e
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 14:42:36 2010 +0200
+
+    Adapt to API changes: g_irepository_enumerate_versions
+
+ gi/importer.py       |    2 +-
+ gi/pygi-repository.c |   12 ++++++------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 01cd9abb43f93f9a57a5a05b6dc9560614e666e3
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 12:26:48 2010 +0200
+
+    Add GValue<->GArgument marshalling for some more types
+
+ gi/pygi-property.c |  37 ++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 36 insertions(+), 1 deletions(-)
+
+commit ddffa70c3ee0e837070f390632bc692430f79171
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 11:10:42 2010 +0200
+
+    Chain up with the non-introspection implementation for properties
+    if needed
+
+ gobject/pygobject.c |   7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 045433a1f8167205dc8eae613dcb8835d02c8916
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 10:59:49 2010 +0200
+
+    Improve error reporting for missing attributes in introspection
+    modules
+
+ gi/module.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6655a79b2f13fe417aefdf6aebab0f2d6162ba00
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jul 27 21:52:49 2010 +0200
+
+    Implement getting and setting properties using introspection
+    information.
+
+    This allows us to use information not present in GObject such as
+    transfer and element types.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620808
+
+ gi/Makefile.am                  |    2 +
+ gi/gimodule.c           |    2 +
+ gi/pygi-argument.c      |    2 +
+ gi/pygi-private.h       |    1 +
+ gi/pygi-property.c      |  226
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-property.h      |   39 ++++++++
+ gi/pygi.h               |   41 +++++++++
+ gobject/pygobject.c     |    9 ++
+ tests/test_everything.py |   19 ++++
+ 9 files changed, 341 insertions(+), 0 deletions(-)
+
+commit 85f4572b3ffbfa364ebb2e470eab759edc557b36
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jul 27 21:32:41 2010 +0200
+
+    Readd Gdk.Rectangle override for Gtk-2.0
+
+ gi/overrides/Gdk.py |  19 +++++++++++++++++++
+ 1 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 2082ee35e2a33f52bf1e8ec49cb4a43398e91989
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jul 27 18:25:27 2010 +0200
+
+    Allow specifying a version when loading a typelib
+
+    * gi/importer.py: Defer loading the typelib until first usage.
+    * gi/module.py: Load the typelib in IntrospectionModule().
+    * gi/overrides/*.py: Adapt to API change.
+    * gi/pygi-repository.c: Add wrappers for g_irepository_enumerate and
+      g_irepository_get_version.
+
+ gi/importer.py                            |   26 +++++----------
+ gi/module.py                      |   58
+ +++++++++++++++++++++++------------
+ gi/overrides/GIMarshallingTests.py |   2 +-
+ gi/overrides/Gdk.py               |    2 +-
+ gi/overrides/Gtk.py               |    2 +-
+ gi/pygi-repository.c              |   56
+ ++++++++++++++++++++++++++++++++++-
+ 6 files changed, 105 insertions(+), 41 deletions(-)
+
+commit 6d7ed6c322234c240b1063a1dfaadd17157432a9
+Author: Jonathan Matthew <jonathan@d14n.org>
+Date:  Tue Jul 13 20:27:28 2010 +1000
+
+    treat GFreeFunc as equivalent to GDestroyNotify when scanning
+    callbacks
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=624232
+
+ gi/pygi-callbacks.c |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 7e9cbd5601ad548b78d106bac1a1576d33b91c65
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Mon Jul 26 17:00:23 2010 +0200
+
+    Don't use == to compare doubles, use <= and =>.
+
+    This avoids inequality due to small precisions difference.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625326
+
+ tests/testhelpermodule.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5ca2a41f16f4a5fcc3ab4d00bec46b077c7eb384
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 8 11:36:12 2010 +0200
+
+    Allow passing ints as enum args
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622584
+
+ gi/pygi-argument.c |  23 +++++++++++++++++++++--
+ tests/test_gi.py   |   6 ++++--
+ 2 files changed, 25 insertions(+), 4 deletions(-)
+
+commit 890c3233f8a9f884b045a294bf0122bb3afcd54a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Sun Jul 25 17:30:40 2010 +0100
+
+    Make error message less ambiguous
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625095
+
+ gi/pygi-callbacks.c |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1162e436273ff8e9e4e24bd8ba74615fd4624753
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jun 24 10:07:12 2010 -0400
+
+    fix passing in type names as a GType and add gtype unit tests
+
+    * a simple call to pyg_type_from_object covers all the bases
+    * added unit tests to check for correct GType value passing
+    * fixed up tree override tests to also check different ways of
+    passing GTypes
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622605
+
+ gi/pygi-argument.c      |    8 +-------
+ tests/test_everything.py |   27 +++++++++++++++++++++++++++
+ tests/test_overrides.py  |    6 ++----
+ 3 files changed, 30 insertions(+), 11 deletions(-)
+
+commit 8becd32fc042445d62b885bac12dac326b2dc1fa
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 26 11:54:47 2010 +0200
+
+    Increase a bit verbosity of tests so people know which test failed
+
+ tests/runtests.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3b3c63514f311592e6769a373d37a2bde7ea6b38
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 15 15:17:53 2010 +0200
+
+    Actually add the files for GVariant foreign structs
+
+ gi/pygi-foreign-gvariant.c |  63
+ ++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-foreign-gvariant.h |  41 ++++++++++++++++++++++++++++
+ 2 files changed, 104 insertions(+), 0 deletions(-)
+
+commit e65275bc57f345c111eb12a6b4476ff1ddc3bc24
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 15 13:31:33 2010 +0200
+
+    Add foreign struct support for GVariant
+
+     * gi/pygi-invoke.c: Wrap foreign structs returned by constructors
+     * gi/pygi-foreign.c: Register foreign support for GVariant
+     * gi/pygi-struct.c: properly release foreign structs
+     * gi/pygi-argument.c, gi/pygi-foreign-cairo.c, gi/pygi.h: Adapt to
+     API changes
+     * tests/test_everything.py: Add basic tests for GVariant
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619501
+
+ gi/Makefile.am                  |    2 +
+ gi/pygi-argument.c      |    2 +-
+ gi/pygi-foreign-cairo.c  |   16 +++---
+ gi/pygi-foreign.c       |  107
+ ++++++++++++++++++++++++++++-----------------
+ gi/pygi-foreign.h       |    7 +--
+ gi/pygi-invoke.c        |   18 ++++----
+ gi/pygi-struct.c        |   10 ++++-
+ gi/pygi.h               |    9 ++--
+ tests/test_everything.py |    8 +++
+ 9 files changed, 110 insertions(+), 69 deletions(-)
+
+commit 3b3bd4da3fbc993fa7f7cfb46ed4e67671c94cc0
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:19:06 2010 +0200
+
+    Add HACKING to MANIFEST.in
+
+ MANIFEST.in |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 40bf08ff001b119c7daf709197005ef6480216c5
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:18:04 2010 +0200
+
+    Add HACKING file with instructions for releasing
+
+ HACKING |   14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 3b9dffe7cc3820dfb84fd968fc604899601c5dc4
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:09:58 2010 +0200
+
+    Post release version bump to 2.21.6
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
 commit 42a5a0897b38156ae010c396ea254abf502f35de
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Mon Jul 12 11:00:29 2010 +0200
+Date:  Mon Jul 12 11:00:29 2010 +0200
 
     Update NEWS and release PyGObject-2.21.5
 
@@ -9,7 +1433,7 @@ Date:   Mon Jul 12 11:00:29 2010 +0200
 
 commit 5857f25c1c6e25b79e6134558bd7151bc6c30ef7
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Mon Jul 12 11:00:20 2010 +0200
+Date:  Mon Jul 12 11:00:20 2010 +0200
 
     Pre-release version bump to 2.21.5
 
@@ -18,7 +1442,7 @@ Date:   Mon Jul 12 11:00:20 2010 +0200
 
 commit e500adc3ac19ef6f436809e5a8828ac7e8db28f6
 Author: Florian Müllner <florian.muellner@gmail.com>
-Date:   Sat Jul 10 22:35:13 2010 +0200
+Date:  Sat Jul 10 22:35:13 2010 +0200
 
     Shut up some compiler warnings
 
@@ -26,14 +1450,14 @@ Date:   Sat Jul 10 22:35:13 2010 +0200
 
     https://bugzilla.gnome.org/show_bug.cgi?id=624066
 
- gi/pygi-callbacks.c |    1 -
- gi/pygi-closure.c   |    2 +-
- gi/pygi-invoke.c    |    1 -
+ gi/pygi-callbacks.c |   1 -
+ gi/pygi-closure.c   |   2 +-
+ gi/pygi-invoke.c    |   1 -
  3 files changed, 1 insertions(+), 3 deletions(-)
 
 commit 2efa18afbcc2fac1c90958535b2f80e6e730ee56
 Author: =?UTF-8?q?Florian=20M=C3=BCllner?= <florian.muellner@gmail.com>
-Date:   Mon Jul 12 10:31:42 2010 +0200
+Date:  Mon Jul 12 10:31:42 2010 +0200
 
     Adjust to API break in GObject-Introspection
 
@@ -49,39 +1473,39 @@ Date:   Mon Jul 12 10:31:42 2010 +0200
 
     https://bugzilla.gnome.org/show_bug.cgi?id=624065
 
- configure.ac       |    2 +-
- gi/importer.py     |    7 ++-
+ configure.ac      |    2 +-
+ gi/importer.py     |   7 ++-
  gi/pygi-argument.c |  146
  ----------------------------------------------------
- gi/pygi-closure.c  |   10 ----
- gi/pygi-info.c     |   37 -------------
- tests/test_gi.py   |   21 --------
+ gi/pygi-closure.c  |  10 ----
+ gi/pygi-info.c     |  37 -------------
+ tests/test_gi.py   |  21 --------
  6 files changed, 5 insertions(+), 218 deletions(-)
 
 commit 27a417c71f8c122e46c7472663bb25c17413f103
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Thu Jul 8 16:01:25 2010 -0400
+Date:  Thu Jul 8 16:01:25 2010 -0400
 
     pass in the demo app so demos can use utility methods like requesting
     file paths
 
- demos/gtk-demo/demos/Entry/entry_buffer.py     |    2 +-
+ demos/gtk-demo/demos/Entry/entry_buffer.py    |    2 +-
  demos/gtk-demo/demos/Entry/entry_completion.py |    2 +-
- demos/gtk-demo/demos/appwindow.py              |   13 +++++++++++--
- demos/gtk-demo/demos/assistant.py              |    2 +-
- demos/gtk-demo/demos/builder.py                |   14 ++++++++++----
- demos/gtk-demo/demos/button_box.py             |    2 +-
- demos/gtk-demo/demos/clipboard.py              |    8 +-------
- demos/gtk-demo/demos/colorselector.py          |    2 +-
- demos/gtk-demo/demos/combobox.py               |    8 +++++---
- demos/gtk-demo/demos/drawingarea.py            |    2 +-
- demos/gtk-demo/demos/test.py                   |    2 +-
- demos/gtk-demo/gtk-demo.py                     |    6 +++---
+ demos/gtk-demo/demos/appwindow.py             |   13 +++++++++++--
+ demos/gtk-demo/demos/assistant.py             |    2 +-
+ demos/gtk-demo/demos/builder.py               |   14 ++++++++++----
+ demos/gtk-demo/demos/button_box.py            |    2 +-
+ demos/gtk-demo/demos/clipboard.py             |    8 +-------
+ demos/gtk-demo/demos/colorselector.py         |    2 +-
+ demos/gtk-demo/demos/combobox.py              |    8 +++++---
+ demos/gtk-demo/demos/drawingarea.py           |    2 +-
+ demos/gtk-demo/demos/test.py                  |    2 +-
+ demos/gtk-demo/gtk-demo.py                    |    6 +++---
  12 files changed, 37 insertions(+), 26 deletions(-)
 
 commit e7daae919c2c6ae35d3927f0006252aacd49ea86
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Thu Jul 8 15:38:07 2010 -0400
+Date:  Thu Jul 8 15:38:07 2010 -0400
 
     demo fixes to keep up with Gtk+
 
@@ -91,12 +1515,12 @@ Date:   Thu Jul 8 15:38:07 2010 -0400
 
  demos/gtk-demo/demos/appwindow.py |   10 +++++++---
  demos/gtk-demo/demos/combobox.py  |   24 ++++++++++++------------
- demos/gtk-demo/gtk-demo.py        |   13 +++++--------
+ demos/gtk-demo/gtk-demo.py       |   13 +++++--------
  3 files changed, 24 insertions(+), 23 deletions(-)
 
 commit 3d9fd6391710cc33058394d6821e4d4e11f09b22
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Thu Jul 8 12:54:43 2010 -0400
+Date:  Thu Jul 8 12:54:43 2010 -0400
 
     override test fixes for new GTK+ annotations
 
@@ -105,16 +1529,16 @@ Date:   Thu Jul 8 12:54:43 2010 -0400
 
 commit 7a400f8139b70ddfe7c949035e0851689951c647
 Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date:   Thu Jul 8 12:42:25 2010 +0200
+Date:  Thu Jul 8 12:42:25 2010 +0200
 
     Fix warning.
 
- gi/pygi-argument.c |    4 ++--
+ gi/pygi-argument.c |   4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 commit 39fd0a85a3de06b1b877d1125f91036409886373
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Wed Jul 7 15:48:36 2010 -0400
+Date:  Wed Jul 7 15:48:36 2010 -0400
 
     fix up treeiter usage due to caller-allocates annotations in gtk+
 
@@ -123,13 +1547,13 @@ Date:   Wed Jul 7 15:48:36 2010 -0400
       handle the case where the parameter is followed by a regular
       in parameter
 
- gi/overrides/Gtk.py     |    7 +++----
+ gi/overrides/Gtk.py    |    7 +++----
  tests/test_overrides.py |   21 +++++++++++----------
  2 files changed, 14 insertions(+), 14 deletions(-)
 
 commit 4d970b75dc5c75c1bec04cb2954c9985b476070c
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Tue Jul 6 17:50:10 2010 -0400
+Date:  Tue Jul 6 17:50:10 2010 -0400
 
     add entry completion demo
 
@@ -139,45 +1563,45 @@ Date:   Tue Jul 6 17:50:10 2010 -0400
 
 commit f3531eaa1bfa4e01651d35cd587384d30a398ba8
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Tue Jul 6 17:49:18 2010 -0400
+Date:  Tue Jul 6 17:49:18 2010 -0400
 
     string changes
 
- demos/gtk-demo/demos/Entry/entry_buffer.py |    4 ++--
+ demos/gtk-demo/demos/Entry/entry_buffer.py |   4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 commit baf1e9bb550c7bf45e2ac0b70ba29c434ef1ccc6
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Tue Jul 6 17:27:04 2010 -0400
+Date:  Tue Jul 6 17:27:04 2010 -0400
 
     add the Entry demo directory and the entry_buffer demo
 
- demos/gtk-demo/demos/Entry/entry_buffer.py |   73
+ demos/gtk-demo/demos/Entry/entry_buffer.py |  73
  ++++++++++++++++++++++++++++
  1 files changed, 73 insertions(+), 0 deletions(-)
 
 commit f2b1d222120f055bec9339cca55c9cc90f538c00
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Tue Jul 6 17:26:03 2010 -0400
+Date:  Tue Jul 6 17:26:03 2010 -0400
 
     fix loading of demo modules to support sub modules
 
- demos/gtk-demo/gtk-demo.py |    9 +++++++--
+ demos/gtk-demo/gtk-demo.py |   9 +++++++--
  1 files changed, 7 insertions(+), 2 deletions(-)
 
 commit 4f9390fb1892b13ab2ea00ed66c5000a40f09029
 Author: John (J5) Palmieri <johnp@redhat.com>
-Date:   Tue Jul 6 15:56:34 2010 -0400
+Date:  Tue Jul 6 15:56:34 2010 -0400
 
     add the ability to have demos in sub catagories
 
- demos/gtk-demo/gtk-demo.py |   76
+ demos/gtk-demo/gtk-demo.py |  76
  +++++++++++++++++++++++++++++++-------------
  1 files changed, 54 insertions(+), 22 deletions(-)
 
 commit dc2249a3ecf339008351316217191d0551ccc588
 Author: Jose Aliste <jaliste@src.gnome.org>
-Date:   Mon Jul 5 14:36:59 2010 -0400
+Date:  Mon Jul 5 14:36:59 2010 -0400
 
     Add  __name__ to DynamicModule class.
 
@@ -188,7 +1612,7 @@ Date:   Mon Jul 5 14:36:59 2010 -0400
 
 commit 2357bca8d14539894b6bd0acfdc18d30b4bb4db6
 Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date:   Mon Jul 5 16:11:07 2010 +0200
+Date:  Mon Jul 5 16:11:07 2010 +0200
 
     Do not override GdkRectangle.
 
@@ -196,24 +1620,24 @@ Date:   Mon Jul 5 16:11:07 2010 +0200
     to override
     it anymore.
 
- gi/overrides/Gdk.py |   19 -------------------
+ gi/overrides/Gdk.py |  19 -------------------
  1 files changed, 0 insertions(+), 19 deletions(-)
 
 commit daca09dc2c2306d4fa82a68bbdd147d4b170a1e7
 Author: Philip Withnall <philip.withnall@collabora.co.uk>
-Date:   Tue Jun 29 16:37:36 2010 +0100
+Date:  Tue Jun 29 16:37:36 2010 +0100
 
     Add override for TreeModel implementing __len__()
 
     Closes: bgo#622882
 
- gi/overrides/Gtk.py     |   11 +++++++++--
+ gi/overrides/Gtk.py    |   11 +++++++++--
  tests/test_overrides.py |    5 +++++
  2 files changed, 14 insertions(+), 2 deletions(-)
 
 commit bb8adb7f02f0c5494df2cb6e535e44d23902e8f5
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Tue Jun 29 11:27:13 2010 +0200
+Date:  Tue Jun 29 11:27:13 2010 +0200
 
     Update NEWS and release PyGObject-2.21.4
 
@@ -222,60 +1646,60 @@ Date:   Tue Jun 29 11:27:13 2010 +0200
 
 commit 2d473ee17be4671244bb4a2a0953a21ccf2a0df6
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Tue Jun 29 10:55:03 2010 +0200
+Date:  Tue Jun 29 10:55:03 2010 +0200
 
     Remove files from the makefiles
 
- gi/Makefile.am      |    4 +---
- gobject/Makefile.am |    3 +--
+ gi/Makefile.am      |   4 +---
+ gobject/Makefile.am |   3 +--
  2 files changed, 2 insertions(+), 5 deletions(-)
 
 commit 89827314fd183eac07443c8e9d275ca9d4ce59df
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Tue Jun 29 10:27:39 2010 +0200
+Date:  Tue Jun 29 10:27:39 2010 +0200
 
     Build the cairo shim as a python module so the _gi module stops
     linking to it
 
     https://bugzilla.gnome.org/show_bug.cgi?id=623021
 
- configure.ac            |    2 +
- gi/Makefile.am          |   38 +++++++++-----
- gi/gimodule.c           |    8 +---
- gi/pygi-argument.c      |   10 +---
+ configure.ac           |    2 +
+ gi/Makefile.am                 |   38 +++++++++-----
+ gi/gimodule.c          |    8 +---
+ gi/pygi-argument.c     |   10 +---
  gi/pygi-foreign-cairo.c |   56 ++++++++++++++++-----
  gi/pygi-foreign-cairo.h |   55 ---------------------
- gi/pygi-foreign.c       |  125
+ gi/pygi-foreign.c      |  125
  ++++++++++++++++++++++++++++-------------------
- gi/pygi-foreign.h       |   31 +++++------
- gi/pygi.h               |   40 +++++++++++++--
+ gi/pygi-foreign.h      |   31 +++++------
+ gi/pygi.h              |   40 +++++++++++++--
  9 files changed, 196 insertions(+), 169 deletions(-)
 
 commit a6a90551311bc64f037cbd442e13f70c30060871
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Mon Jun 28 14:20:43 2010 +0200
+Date:  Mon Jun 28 14:20:43 2010 +0200
 
     Remove pygi-external.h
 
     https://bugzilla.gnome.org/show_bug.cgi?id=623021
 
- gi/gimodule.c           |    8 +++---
- gi/pygi-type.c          |    4 +-
- gi/pygi-type.h          |    2 +-
- gi/pygi.h               |   54 +++++++++++++++----------------------
- gobject/Makefile.am     |    6 ++++
- gobject/pygboxed.c      |    2 +-
- gobject/pygenum.c       |    2 +-
- gobject/pygflags.c      |    2 +-
+ gi/gimodule.c          |    8 +++---
+ gi/pygi-type.c                 |    4 +-
+ gi/pygi-type.h                 |    2 +-
+ gi/pygi.h              |   54 +++++++++++++++----------------------
+ gobject/Makefile.am    |    6 ++++
+ gobject/pygboxed.c     |    2 +-
+ gobject/pygenum.c      |    2 +-
+ gobject/pygflags.c     |    2 +-
  gobject/pygi-external.h |   67
  -----------------------------------------------
- gobject/pygobject.c     |    2 +-
- gobject/pygpointer.c    |    2 +-
+ gobject/pygobject.c    |    2 +-
+ gobject/pygpointer.c   |    2 +-
  11 files changed, 40 insertions(+), 111 deletions(-)
 
 commit 8b3a3baacb45cb3f9112f7597607602fa89c6634
 Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date:   Fri Jun 25 13:54:57 2010 +0200
+Date:  Fri Jun 25 13:54:57 2010 +0200
 
     Revert "correctly handle floating objects in gtk"
 
index 002138a54c859ab84fcd0900e60f4f0f4836c9a3..3781c83e8e7968c1721c5eb523d1792935f0c682 100644 (file)
@@ -1,4 +1,4 @@
-include ChangeLog AUTHORS COPYING NEWS README
+include ChangeLog AUTHORS COPYING NEWS README HACKING
 include MANIFEST.in
 include gobject/pygobject.h gobject/pygobject-private.h
 include pygtk.py pygobject-2.0.pc.in
index 94bcf8e152005bf051e44c273dd6a2b11e57cf05..6fe43c60a8f189ca22c8f802e894cc6d12862267 100644 (file)
@@ -128,11 +128,6 @@ dist-hook: $(BUILT_EXTRA_DIST)
 check.gdb:
        cd tests && $(MAKE) check.gdb
 
-%.gdb:
-       cd tests && $(MAKE) $*.gdb
-
 check.valgrind:
        cd tests && $(MAKE) check.valgrind
 
-%.valgrind:
-       cd tests && $(MAKE) $*.valgrind
index ecd83fd3c1e190582031bff9793b1a5cfe7600a0..06924614d03cab18d19dad2cd7cdeb9798365ec8 100644 (file)
@@ -183,6 +183,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
@@ -1096,15 +1097,9 @@ dist-hook: $(BUILT_EXTRA_DIST)
 check.gdb:
        cd tests && $(MAKE) check.gdb
 
-%.gdb:
-       cd tests && $(MAKE) $*.gdb
-
 check.valgrind:
        cd tests && $(MAKE) check.valgrind
 
-%.valgrind:
-       cd tests && $(MAKE) $*.valgrind
-
 # 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
index c6a8b410eeadff2f4d73faa74c737088f49c48d5..fc43753d7ddf38d0fd908b86881efda5577f70c2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,96 @@
+2.26.0 24-Sep-2010
+        - Wrap g_get_system_{config,data}_dirs () (John Strowers)
+       - fixed make check and make dist (John (J5) Palmieri)
+        - Disable GI tests when introspection disabled (John Stowers)
+        - Wrap g_uri_list_extract_uris. Fixes bug #584431 (Tomeu Vizoso)
+        - Fix a few uses of TRUE and FALSE in the docs (Paul Bolle)
+        - pygi: always free the invocation_state struct (Damien Caliste)
+        - Start implementing something equivalent to g_variant_new (Tomeu Vizoso)
+        - fixed typo - missing comma in glib.option module (John (J5) Palmieri)
+        - add checks so we can compile under python 3 by setting PYTHON=python3 (John (J5) Palmieri)
+        - Rename static methods as functions (Tomeu Vizoso)
+        - fix a couple of compiler warnings (John (J5) Palmieri)
+        - remove unused code (John (J5) Palmieri)
+        - Check the type of the instance object (John (J5) Palmieri)
+        - include the correct pycairo version (John (J5) Palmieri)
+        - Use PyMapping_Keys to determine if an object is a dict (py3k fix) (John (J5) Palmieri)
+        - fix handling of UINT64 and INT64 arguments in py3k (John (J5) Palmieri)
+        - properly handle ulongs properties in py3k (John (J5) Palmieri)
+        - Specify encoding of tests/test_gi.py (Tomeu Vizoso)
+        - use actual unicode in the tests on py3k, not the byte representation (John (J5) Palmieri)
+        - s/METH_KEYWORDS/METH_VARARGS|METH_KEYWORDS/ when defining object methods (John (J5) Palmieri)
+        - fix subclassing PyLong by calling __new__ correctly (John (J5) Palmieri)
+        - minor py3k fixups for python modules (John (J5) Palmieri)
+        - minor fixes in tests for py3k compat (John (J5) Palmieri)
+        - compilation: Fix syntax error (Colin Walters)
+        - Add missing file (Tomeu Vizoso)
+        - Add override for GLib.Variant.new_tuple (Tomeu Vizoso)
+        - fix for changes in the gi test libraries (John (J5) Palmieri)
+        - Gtk.DialogFlags.NO_SEPARATOR has been removed in Gtk 3.0 (John (J5) Palmieri)
+        - no need to offset arg positions when is_method is true (John (J5) Palmieri)
+        - gi: Add support for more property types (Tomeu Vizoso)
+        - use PyObject_SetAttrString, not PyDict_SetItemString when setting __gtype__ (John (J5) Palmieri)
+        - Rename GArgument to GIArgument (Tomeu Vizoso)
+        - fix up tests so they run in py3k (John (J5) Palmieri)
+        - tests: Port to new introspection tests (Colin Walters)
+        - we need to specify tp_hash since we overide tp_richcompare (John (J5) Palmieri)
+        - working enum/flags/pid subclasses of long (John Ehresman)
+        - make vfuncs work in py3k (John (J5) Palmieri)
+        - make cairo module compile in py3k (John (J5) Palmieri)
+        - fix exceptions so they work in python 3.x (John (J5) Palmieri)
+        - make the gi module compile under 3.x (John (J5) Palmieri)
+        - fix up testshelper module so it compiles in python 3.x (John (J5) Palmieri)
+        - convert to using PYGLIB_DEFINE_TYPE for module objects (John (J5) Palmieri)
+        - some more p3k PyString and PyInt eradication in GI (John (J5) Palmieri)
+        - pyglib: Fix typo (Leo Singer) (Tomeu Vizoso)
+        - Add defines for size_t and ssize_t conversion functions (Gustavo Noronha Silva)
+        - pyglib: Fix a compiler warning (Colin Walters)
+        - Don't force gtk 2.0 (Tomeu Vizoso)
+        - Fix some ref leaks in hook_up_vfunc_implementation() (Steve Frécinaux)
+        - handle strings correctly in gio (John (J5) Palmieri)
+        - make giomodule compile under py3k (John (J5) Palmieri)
+        - for py3k we need to do some more processing to get bytes from a unicode string (John (J5) Palmieri)
+        - use Bytes instead of Unicode when reading io (John (J5) Palmieri)
+        - prefix compat macros with PYGLIB (John (J5) Palmieri)
+        - Gtk.Button unit tests (John (J5) Palmieri)
+        - [Gtk] Add overrides for Button (Johan Dahlin)
+        - Make Cairo an optional dependency (Simon van der Linden)
+        - Don't import again PyGObject (John Ralls) (Tomeu Vizoso)
+        - move to using richcompare slot instead of compare (John (J5) Palmieri)
+        - Replace autogen.sh by a newer version (Simon van der Linden)
+        - Fix some warnings (Simon van der Linden)
+        - Fix caller-allocates emergency free. (Simon van der Linden)
+        - Remove useless checks. (Simon van der Linden)
+        - Call valgrind with G_SLICE=always-malloc G_DEBUG=gc-friendly (Tomeu Vizoso)
+        - Fix some warnings. (Ignacio Casal Quinteiro)
+        - Add myself as a maintainer (Simon van der Linden)
+        - Properly allocate boxed structs that are (caller-allocates) (Tomeu Vizoso)
+        - override gdk.Event to return attribute from the proper event object (Toms Baugis)
+        - check if z# needs an int or Py_ssize_t (John (J5) Palmieri)
+        - make sure we parse parameters to python object vars not glib vars (John (J5) Palmieri)
+        - Make an example and a demo work out of the box (Paul Bolle)
+        - make sure caller allocated structs are freed when they go out of scope (John (J5) Palmieri)
+        - Revert "override gdk.Event to return attribute from the proper event object." (Tomeu Vizoso)
+        - PyGI: properly quit cairo-demo (Paul Bolle)
+        - override gdk.Event to return attribute from the proper event object. (Toms Baugis)
+        - Clean and improve the test infrastructure (Simon van der Linden)
+        - Add some more transformations to pygi-convert.sh (Tomeu Vizoso)
+        - Adapt to API changes: g_irepository_enumerate_versions (Tomeu Vizoso)
+        - Add GValue<->GArgument marshalling for some more types (Tomeu Vizoso)
+        - Chain up with the non-introspection implementation for properties if needed (Tomeu Vizoso)
+        - Improve error reporting for missing attributes in introspection modules (Tomeu Vizoso)
+        - Implement getting and setting properties using introspection information. (Tomeu Vizoso)
+        - Readd Gdk.Rectangle override for Gtk-2.0 (Tomeu Vizoso)
+        - Allow specifying a version when loading a typelib (Tomeu Vizoso)
+        - treat GFreeFunc as equivalent to GDestroyNotify when scanning callbacks (Jonathan Matthew)
+        - Don't use == to compare doubles, use <= and =>. (Simon van der Linden)
+        - Allow passing ints as enum args (Tomeu Vizoso)
+        - Make error message less ambiguous (Tomeu Vizoso)
+        - fix passing in type names as a GType and add gtype unit tests (John (J5) Palmieri)
+        - Increase a bit verbosity of tests so people know which test failed (Tomeu Vizoso)
+        - Actually add the files for GVariant foreign structs (Tomeu Vizoso)
+        - Add foreign struct support for GVariant (Tomeu Vizoso)
+
 2.21.5 12-Jul-2010
         - Shut up some compiler warnings (Florian Müllner)
         - Adjust to API break in GObject-Introspection (Florian Müllner)
index db437e1c6a7cfb8b359a603a4192b85053dfd81a..14b46bbb1af717635cc90efd02a7e04810c20e3b 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: PyGObject
-Version: 2.21.5
+Version: 2.26.0
 Summary: Python bindings for GObject
 Home-page: http://www.pygtk.org/
 Author: James Henstridge
@@ -8,7 +8,7 @@ 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.5.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.26/pygobject-2.26.0.tar.gz
 Description: Python bindings for GLib, GObject and GIO
 Platform: POSIX, Windows
 Classifier: Development Status :: 5 - Production/Stable
index cd9551e1d24e947fff094e29ee1c0efa1c2deb22..4a87bab37070b9677bc19ae451d2fd43abe0c699 100644 (file)
@@ -19,1662 +19,1662 @@ 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`
-])
+# 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)
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+  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
 
-# serial 4
+  PKG_PROG_PKG_CONFIG([0.16])
 
-# This was merged into AC_PROG_CC in Autoconf.
+  no_glib=""
 
-AU_DEFUN([AM_PROG_CC_STDC],
-[AC_PROG_CC
-AC_DIAGNOSE([obsolete], [$0:
-       your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
-       `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
-       you adjust the code.  You can also remove the above call to
-       AC_PROG_CC if you already called it elsewhere.])
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
-])
-AU_DEFUN([fp_PROG_CC_STDC])
+  if test "x$PKG_CONFIG" = x ; then
+    no_glib=yes
+    PKG_CONFIG=no
+  fi
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+  min_glib_version=ifelse([$1], ,2.0.0,$1)
+  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
 
-# 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.
+  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
 
-# serial 9
+    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+         :
+    else
+         no_glib=yes
+    fi
+  fi
 
-# 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])])
+  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`
 
-# 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.
+    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>
 
-# serial 10
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
 
-# 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...
+  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);
+   }
 
-# _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
+  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
+])
 
-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=])
+# 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.
 
-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
+# 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
 
-  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])
+# 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])
 
-  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
+# _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
 
-  cd ..
-  rm -rf conftest.dir
+# _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
-  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])
-])
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
 
-# 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
-])
+# 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.])
 
-# 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
-])
+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
 
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-# 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.
+$$1_PKG_ERRORS
 
-#serial 5
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-# _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
+_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
 
-# 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"])
-])
+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
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# 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.
 
-# serial 8
+# 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_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+# _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], [])
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+# 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]))])
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# 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.
 
-# 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])
+# 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.
 
-# 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
+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_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
-])
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-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])])
+# serial 4
 
+# This was merged into AC_PROG_CC in Autoconf.
 
-# 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.
+AU_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+AC_DIAGNOSE([obsolete], [$0:
+       your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
+       `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
+       you adjust the code.  You can also remove the above call to
+       AC_PROG_CC if you already called it elsewhere.])
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+])
+AU_DEFUN([fp_PROG_CC_STDC])
 
-# 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])
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# 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.
 
-# 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
+# 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_SUBST(install_sh)])
+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) 2003, 2005  Free Software Foundation, Inc.
+# 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 2
+# 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
 
-# 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=.
+  cd ..
+  rm -rf conftest.dir
 else
-  am__leading_dot=_
+  am_cv_$1_dependencies_compiler_type=none
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+])
+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])
+])
 
-# 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
+# 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
 ])
 
-# 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"
+# 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
-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])])
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 ])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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 6
+#serial 5
 
-# AM_MISSING_PROG(NAME, PROGRAM)
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
-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" ;;
+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
-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
+  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) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 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.
 
-# 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
-])
+# serial 8
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# 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 4
+# serial 16
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+# 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_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_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
 
-# _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)])])
+# 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])
 
-# _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])])
+# 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
 
-# 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_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-# 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])
+# 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
+])
 
-  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
-  ])
+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])])
 
-  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.
+# 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.
 
-  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])
+# 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])
 
-  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.
+# 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.
 
-  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
-  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+# 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)])
 
-  dnl At times (like when building shared libraries) you may want
-  dnl to know which OS platform Python thinks this is.
+# 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.
 
-  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])
+# 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])])
 
-  dnl Set up 4 directories:
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-  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])
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-  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.
+# serial 5
 
-  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
 
-  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])
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
-  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+# 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.
 
-  dnl Run any user-specified action.
-  $2
-  fi
+# 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
 ])
 
-
-# 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.
+# 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.
 
-# 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); }])
+# 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])])
+])
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# 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 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
+# serial 6
 
-# 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
+# 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)])
 
-      # 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.
-   :
+# 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
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-AC_MSG_RESULT(yes)])
+])
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# 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.
 
-# serial 1
-
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+# 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
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# 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.
 
-# 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])])
+# serial 4
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# _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.
 
-# serial 2
+# 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])
 
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
+  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
+  ])
 
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+  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.
 
-# 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.
+  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])
 
-# serial 2
+  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.
 
-# _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
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
 
-  # 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
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
 
-  # 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_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])
 
-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.
+  dnl Set up 4 directories:
 
-# 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
+  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])
 
-# 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])
+  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])
 
-# _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
+  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])
 
-# _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
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
 
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
 
-# 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
+  dnl Run any user-specified action.
+  $2
+  fi
 
-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.])
+# 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])])
 
-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
+# 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.
 
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
+# 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); }])
 
-$$1_PKG_ERRORS
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# 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.
 
-_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.
+# serial 5
 
-_PKG_TEXT
+# 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
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-               [$4])
+# 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
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
 
-# Configure paths for GLIB
-# Owen Taylor     1997-2001
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-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)
+# serial 1
 
-  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
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-  PKG_PROG_PKG_CONFIG([0.16])
+# 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.
 
-  no_glib=""
+# 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])])
 
-  if test "x$PKG_CONFIG" = x ; then
-    no_glib=yes
-    PKG_CONFIG=no
-  fi
+# 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.
 
-  min_glib_version=ifelse([$1], ,2.0.0,$1)
-  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+# serial 2
 
-  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
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
 
-    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
-         :
-    else
-         no_glib=yes
-    fi
-  fi
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
-  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`
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-    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>
+# 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.
 
-int 
-main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
+# serial 2
 
-  fclose (fopen ("conf.glibtest", "w"));
+# _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
 
-  /* 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 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
 
-  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])
+  # 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
-  AC_SUBST(GLIB_CFLAGS)
-  AC_SUBST(GLIB_LIBS)
-  AC_SUBST(GLIB_GENMARSHAL)
-  AC_SUBST(GOBJECT_QUERY)
-  AC_SUBST(GLIB_MKENUMS)
-  rm -f conf.glibtest
-])
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
 m4_include([m4/as-ac-expand.m4])
 m4_include([m4/jhflags.m4])
index 41778e6fd587d52739ccd6120f87f13691e654f4..c6672eee9e11a592da2a8caec93b7f67fda093c5 100644 (file)
@@ -118,6 +118,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index eeffcf88c3b1a0f14e733266cac5a3d3044ca988..839e8807d9cf8b6d7b382ebba25cd8bcb2791a4e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for pygobject 2.21.5.
+# Generated by GNU Autoconf 2.65 for pygobject 2.26.0.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
 #
@@ -702,8 +702,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pygobject'
 PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='2.21.5'
-PACKAGE_STRING='pygobject 2.21.5'
+PACKAGE_VERSION='2.26.0'
+PACKAGE_STRING='pygobject 2.26.0'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
 PACKAGE_URL=''
 
@@ -750,10 +750,13 @@ LTLIBOBJS
 LIBOBJS
 INTROSPECTION_COMPILER
 INTROSPECTION_SCANNER
+ENABLE_CAIRO_FALSE
+ENABLE_CAIRO_TRUE
 ENABLE_INTROSPECTION_FALSE
 ENABLE_INTROSPECTION_TRUE
 PYCAIRO_LIBS
 PYCAIRO_CFLAGS
+GI_DATADIR
 GI_LIBS
 GI_CFLAGS
 BUILD_GIOUNIX_FALSE
@@ -929,6 +932,7 @@ enable_thread
 enable_docs
 enable_glibtest
 with_ffi
+enable_cairo
 enable_introspection
 '
       ac_precious_vars='build_alias
@@ -1492,7 +1496,7 @@ 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.5 to adapt to many kinds of systems.
+\`configure' configures pygobject 2.26.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1562,7 +1566,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pygobject 2.21.5:";;
+     short | recursive ) echo "Configuration of pygobject 2.26.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1584,6 +1588,8 @@ Optional Features:
   --disable-thread        Disable pygobject threading support
   --enable-docs           Enable documentation building
   --disable-glibtest      do not try to compile and run a test GLIB program
+  --enable-cairo          Enable Cairo bindings using introspection
+                          information
   --enable-introspection  Use introspection information
 
 Optional Packages:
@@ -1685,7 +1691,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pygobject configure 2.21.5
+pygobject configure 2.26.0
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1963,7 +1969,7 @@ 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.5, which was
+It was created by pygobject $as_me 2.26.0, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -2321,14 +2327,14 @@ $as_echo "#define PYGOBJECT_MAJOR_VERSION 2" >>confdefs.h
 PYGOBJECT_MAJOR_VERSION=2
 
 
-$as_echo "#define PYGOBJECT_MINOR_VERSION 21" >>confdefs.h
+$as_echo "#define PYGOBJECT_MINOR_VERSION 26" >>confdefs.h
 
-PYGOBJECT_MINOR_VERSION=21
+PYGOBJECT_MINOR_VERSION=26
 
 
-$as_echo "#define PYGOBJECT_MICRO_VERSION 5" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 0" >>confdefs.h
 
-PYGOBJECT_MICRO_VERSION=5
+PYGOBJECT_MICRO_VERSION=0
 
 
 ac_config_headers="$ac_config_headers config.h"
@@ -2806,7 +2812,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pygobject'
- VERSION='2.21.5'
+ VERSION='2.26.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4911,13 +4917,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4914: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4920: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4917: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4923: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4920: output\"" >&5)
+  (eval echo "\"\$as_me:4926: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6120,7 +6126,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6123 "configure"' > conftest.$ac_ext
+  echo '#line 6129 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7618,11 +7624,11 @@ else
    -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:7621: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7627: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7625: \$? = $ac_status" >&5
+   echo "$as_me:7631: \$? = $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.
@@ -7957,11 +7963,11 @@ else
    -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:7960: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7966: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7964: \$? = $ac_status" >&5
+   echo "$as_me:7970: \$? = $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.
@@ -8062,11 +8068,11 @@ else
    -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:8065: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8071: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8069: \$? = $ac_status" >&5
+   echo "$as_me:8075: \$? = $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
@@ -8117,11 +8123,11 @@ else
    -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:8120: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8126: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8124: \$? = $ac_status" >&5
+   echo "$as_me:8130: \$? = $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
@@ -10487,7 +10493,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10490 "configure"
+#line 10496 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10583,7 +10589,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10586 "configure"
+#line 10592 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11222,7 +11228,7 @@ Usage: $0 [OPTIONS]
 Report bugs to <bug-libtool@gnu.org>."
 
 lt_cl_version="\
-pygobject config.lt 2.21.5
+pygobject config.lt 2.26.0
 configured by $0, generated by GNU Autoconf 2.65.
 
 Copyright (C) 2008 Free Software Foundation, Inc.
@@ -13696,6 +13702,7 @@ fi
 
 
 
+# check that we have the minimum version of python necisary to build
 
 
 
@@ -13881,6 +13888,51 @@ $as_echo "$am_cv_python_pyexecdir" >&6; }
 
 
 
+# check if we are building for python 3
+prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '3.0'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  build_py3k=true
+else
+  build_py3k=false
+fi
+
+# if building for python 3 make sure we have the minimum version supported
+if test $build_py3k = true ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON >= 3.1" >&5
+$as_echo_n "checking for $PYTHON >= 3.1... " >&6; }
+  prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '3.1'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  as_fn_error "too old" "$LINENO" 5
+fi
+fi
+
 
 
 
@@ -14811,7 +14863,10 @@ $as_echo "yes" >&6; }
 fi
 
 
- if $have_gio; then
+
+# Do not build GIO if the python version >= 3.0
+# We use GI to access GIO in python 3
+ if test $have_gio = true -a $build_py3k = false; then
   BUILD_GIO_TRUE=
   BUILD_GIO_FALSE='#'
 else
@@ -14819,6 +14874,7 @@ else
   BUILD_GIO_FALSE=
 fi
 
+
 if test -n "$export_dynamic"; then
   GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
 fi
@@ -14892,7 +14948,7 @@ $as_echo "yes" >&6; }
 fi
 
 
- if $have_giounix; then
+ if test $have_giounix = true -a $build_py3k = false; then
   BUILD_GIOUNIX_TRUE=
   BUILD_GIOUNIX_FALSE='#'
 else
@@ -14904,6 +14960,14 @@ if test -n "$export_dynamic"; then
   GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
+# Check whether --enable-cairo was given.
+if test "${enable_cairo+set}" = set; then :
+  enableval=$enable_cairo; enable_cairo=$enableval
+else
+  enable_cairo=yes
+fi
+
+
 # Check whether --enable-introspection was given.
 if test "${enable_introspection+set}" = set; then :
   enableval=$enable_introspection; enable_introspection=$enableval
@@ -14925,16 +14989,16 @@ if test -n "$GI_CFLAGS"; then
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     \""; } >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     " 2>/dev/null`
 else
   pkg_failed=yes
@@ -14947,16 +15011,16 @@ if test -n "$GI_LIBS"; then
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     \""; } >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     " 2>/dev/null`
 else
   pkg_failed=yes
@@ -14976,18 +15040,18 @@ else
 fi
         if test $_pkg_short_errors_supported = yes; then
                GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     " 2>&1`
         else
                GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     " 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$GI_PKG_ERRORS" >&5
 
        as_fn_error "Package requirements (glib-2.0 >= 2.22.4
-        gobject-introspection-1.0 >= 0.9.1
+        gobject-introspection-1.0 >= 0.9.5
     ) were not met:
 
 $GI_PKG_ERRORS
@@ -15020,6 +15084,11 @@ $as_echo "yes" >&6; }
        :
 fi
 
+    GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+
+
+    if test "$enable_cairo" != no; then
+
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYCAIRO" >&5
 $as_echo_n "checking for PYCAIRO... " >&6; }
@@ -15029,14 +15098,14 @@ if test -n "$PYCAIRO_CFLAGS"; then
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pycairo >= 1.0.2
-    \""; } >&5
+        \""; } >&5
   ($PKG_CONFIG --exists --print-errors "pycairo >= 1.0.2
-    ") 2>&5
+        ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_PYCAIRO_CFLAGS=`$PKG_CONFIG --cflags "pycairo >= 1.0.2
-    " 2>/dev/null`
+        " 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -15048,14 +15117,14 @@ if test -n "$PYCAIRO_LIBS"; then
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pycairo >= 1.0.2
-    \""; } >&5
+        \""; } >&5
   ($PKG_CONFIG --exists --print-errors "pycairo >= 1.0.2
-    ") 2>&5
+        ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   pkg_cv_PYCAIRO_LIBS=`$PKG_CONFIG --libs "pycairo >= 1.0.2
-    " 2>/dev/null`
+        " 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -15074,16 +15143,16 @@ else
 fi
         if test $_pkg_short_errors_supported = yes; then
                PYCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pycairo >= 1.0.2
-    " 2>&1`
+        " 2>&1`
         else
                PYCAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors "pycairo >= 1.0.2
-    " 2>&1`
+        " 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$PYCAIRO_PKG_ERRORS" >&5
 
        as_fn_error "Package requirements (pycairo >= 1.0.2
-    ) were not met:
+        ) were not met:
 
 $PYCAIRO_PKG_ERRORS
 
@@ -15114,6 +15183,7 @@ else
 $as_echo "yes" >&6; }
        :
 fi
+    fi
 fi
  if test "$enable_introspection" = "yes"; then
   ENABLE_INTROSPECTION_TRUE=
@@ -15123,6 +15193,14 @@ else
   ENABLE_INTROSPECTION_FALSE=
 fi
 
+ if test "$enable_cairo" = "yes"; then
+  ENABLE_CAIRO_TRUE=
+  ENABLE_CAIRO_FALSE='#'
+else
+  ENABLE_CAIRO_TRUE='#'
+  ENABLE_CAIRO_FALSE=
+fi
+
 
 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
@@ -15395,6 +15473,10 @@ if test -z "${ENABLE_INTROSPECTION_TRUE}" && test -z "${ENABLE_INTROSPECTION_FAL
   as_fn_error "conditional \"ENABLE_INTROSPECTION\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_CAIRO_TRUE}" && test -z "${ENABLE_CAIRO_FALSE}"; then
+  as_fn_error "conditional \"ENABLE_CAIRO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -15803,7 +15885,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # 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.5, which was
+This file was extended by pygobject $as_me 2.26.0, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15869,7 +15951,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pygobject config.status 2.21.5
+pygobject config.status 2.26.0
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
index c2328af82c86b84419e048592bc2c3fa2bd59a9c..290c4de90cd40df67bb6d2112c699a200f23419e 100644 (file)
@@ -1,14 +1,22 @@
 -*- mode: m4 -*-
 AC_PREREQ(2.52)
 
+# The version of python used is determined by the executable pointed to by
+# the PYTHON environment variable.  For instance if your system installs
+# Python 3 as python3 to configure to compile pygobject under Python 3
+# you would do this:
+# $> PYTHON=python3 ./configure
+m4_define(python_min_ver, 2.5.2)
+m4_define(python3_min_ver, 3.1)
+
 dnl the pygobject version number
 m4_define(pygobject_major_version, 2)
-m4_define(pygobject_minor_version, 21)
-m4_define(pygobject_micro_version, 5)
+m4_define(pygobject_minor_version, 26)
+m4_define(pygobject_micro_version, 0)
 m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
 
 dnl versions of packages we require ...
-m4_define(introspection_required_version, 0.9.1)
+m4_define(introspection_required_version, 0.9.5)
 m4_define(pycairo_required_version, 1.0.2)
 m4_define(glib_required_version, 2.22.4)
 m4_define(gio_required_version, 2.22.4)
@@ -77,7 +85,21 @@ AC_PROG_CC
 AM_PROG_CC_STDC
 AM_PROG_CC_C_O
 
-JD_PATH_PYTHON(2.5.2)
+# check that we have the minimum version of python necisary to build
+JD_PATH_PYTHON(python_min_ver)
+
+# check if we are building for python 3
+JD_PYTHON_CHECK_VERSION([$PYTHON], [3.0],
+                        build_py3k=true,
+                        build_py3k=false)
+
+# if building for python 3 make sure we have the minimum version supported
+if test $build_py3k = true ; then
+  AC_MSG_CHECKING([for $PYTHON >=] python3_min_ver)
+  JD_PYTHON_CHECK_VERSION([$PYTHON], python3_min_ver,
+                         [AC_MSG_RESULT(yes)],
+                         [AC_MSG_ERROR(too old)])
+fi
 
 JD_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
 
@@ -189,7 +211,11 @@ 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)
+
+# Do not build GIO if the python version >= 3.0
+# We use GI to access GIO in python 3
+AM_CONDITIONAL(BUILD_GIO, test $have_gio = true -a $build_py3k = false)
+
 if test -n "$export_dynamic"; then
   GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
 fi
@@ -199,11 +225,16 @@ 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)
+AM_CONDITIONAL(BUILD_GIOUNIX, test $have_giounix = true -a $build_py3k = false)
 if test -n "$export_dynamic"; then
   GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
+AC_ARG_ENABLE(cairo,
+    AC_HELP_STRING([--enable-cairo], [Enable Cairo bindings using introspection information]),
+    enable_cairo=$enableval,
+    enable_cairo=yes)
+
 AC_ARG_ENABLE(introspection,
   AC_HELP_STRING([--enable-introspection], [Use introspection information]),
   enable_introspection=$enableval,
@@ -214,11 +245,18 @@ if test "$enable_introspection" != no; then
         glib-2.0 >= glib_required_version
         gobject-introspection-1.0 >= introspection_required_version
     )
-    PKG_CHECK_MODULES(PYCAIRO,
-        pycairo >= pycairo_required_version
-    )
+
+    GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+    AC_SUBST(GI_DATADIR)
+
+    if test "$enable_cairo" != no; then
+        PKG_CHECK_MODULES(PYCAIRO,
+            pycairo >= pycairo_required_version
+        )
+    fi
 fi
 AM_CONDITIONAL(ENABLE_INTROSPECTION, test "$enable_introspection" = "yes")
+AM_CONDITIONAL(ENABLE_CAIRO, test "$enable_cairo" = "yes")
 
 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
index 27d1c6166aea3ebf2397533a5fa2901a492a7673..b9a3bcb6e202ef5150bc5046b777f9e2d8054c54 100644 (file)
@@ -115,6 +115,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index 7942ff935ed886aef894f9c8c1c609d4f47142e0..7ae75194f1cd67b6e9c08df80ce1843cd1effe32 100644 (file)
@@ -1,13 +1,13 @@
-<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>):
+<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="id701123"></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>
+<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="id700590"></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>
+</pre></div><div class="refsect1" title="Known Implementation"><a name="id700571"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id700550"></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.
@@ -43,7 +43,7 @@
                 </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>
+        </p></div><div class="refsect1" title="Methods"><a name="id700337"></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.
                     </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.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id690547"></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. 
index 32c735f7744149f5054c3fe14065c90785de0d8f..ba533cf90bcb99616bef05e77163a544a36b4e4c 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id695414"></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="id695294"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id695273"></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.
@@ -11,7 +11,7 @@
             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
+        </p></div><div class="refsect1" title="Methods"><a name="id695199"></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>
index 39f491f2fff35312bfe28dfac393fec7f43fffa3..e897bd6db2009bb571ecee8082dbdc634f266af0 100644 (file)
@@ -1,13 +1,13 @@
-<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>
+<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="id687167"></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="id687124"></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>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id687301"></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>
+        </p></div><div class="refsect1" title="Known Implementation"><a name="id687264"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id687259"></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>
@@ -37,7 +37,7 @@
             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.                        
+        </p></div><div class="refsect1" title="Methods"><a name="id544776"></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>
index 2f2f5d6b4816e514329508404da654c8237bafc8..f825c5eb61cf0fa4b344358450962a66c9014759 100644 (file)
@@ -1,12 +1,12 @@
-<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>):
+<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="id565598"></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>
+<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="id543959"></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>
+</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="id583876"></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.
@@ -33,7 +33,7 @@
                 </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.
+        </p></div><div class="refsect1" title="Methods"><a name="id640664"></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.
                 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.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id587003"></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>
index 400e153ec8c47d56fb08f48669b4be3dfb3e65a4..860d82ae9113ebb94386e01e2a15c0d6a2be696c 100644 (file)
@@ -1,12 +1,12 @@
-<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>):
+<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="id579684"></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>
+<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="id640362"></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>
+</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="id585092"></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.
@@ -32,7 +32,7 @@
                 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
+        </p></div><div class="refsect1" title="Methods"><a name="id570858"></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
@@ -51,7 +51,7 @@
                   </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.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id627243"></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..
index 67de0878776d0cad109e2479b5b8324000f1d4c3..3947a8c6f4a74b89a73d8cc97efd4bebc78122aa 100644 (file)
@@ -1,10 +1,10 @@
-<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>):
+<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="id588632"></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>
+<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="id582923"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id640347"></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.
@@ -19,7 +19,7 @@
         </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>
+        </p></div><div class="refsect1" title="Methods"><a name="id568642"></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.) 
@@ -55,7 +55,7 @@
                     <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>
+            </p></div></div><div class="refsect1" title="Functions"><a name="id608158"></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>
index c88c2cb5f4fb91a4a27f169515c9d17b26642c81..7e32d26c3ca57db02f614d6e9a5ebaf27e6c4fc8 100644 (file)
@@ -1,10 +1,10 @@
-<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>
+<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="id628569"></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="id622016"></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>
+</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="id617998"></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.
@@ -15,7 +15,7 @@
                 </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
+        </p></div><div class="refsect1" title="Methods"><a name="id580451"></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
index f6f99802061a3b53411ee3105e3b41fb2fe2bc76..b544099ed50441fcc5f724e44de0cd85f51088b3 100644 (file)
@@ -1,12 +1,12 @@
-<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>
+<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="id588052"></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="id657677"></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>
+                           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="id550044"></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.
@@ -17,7 +17,7 @@
                 </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
+        </p></div><div class="refsect1" title="Methods"><a name="id629571"></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
index dba9dcf7bc9cfe8c2694c8533bafc18cfcbedb1a..d618c05261ced055e7646113ce3744a641f78cdd 100644 (file)
@@ -1,10 +1,10 @@
-<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>
+<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="id593504"></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="id603408"></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>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id605880"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id574118"></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. 
@@ -24,7 +24,7 @@
             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,
+        </p></div><div class="refsect1" title="Methods"><a name="id587343"></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.
index 0834b0f1f58b0fa96e95e2843a1a93ad9c200bbf..68fa143c43e2445432596804a5382dd874dd04d9 100644 (file)
@@ -1,14 +1,14 @@
-<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>):
+<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="id545319"></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>
+<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="id639588"></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>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id657812"></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>
+        </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="id660606"></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.
           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
+        </p></div><div class="refsect1" title="Methods"><a name="id570886"></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>
+            </p></div></div><div class="refsect1" title="Functions"><a name="id582811"></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>
index 5c474f546aca02911292f2ef9da55ff9676f11c0..8defb35503c1f7bd0e6c57fefe1f9e2eb03297a4 100644 (file)
@@ -1,11 +1,11 @@
-<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>
+<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="id605834"></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="id609713"></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>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id627184"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id660996"></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
@@ -25,7 +25,7 @@
                 </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
+        </p></div><div class="refsect1" title="Methods"><a name="id639570"></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
index f18df5e8672df5784c87a442adc8d872b2020e33..bf3dc0e22a952d3607ce67019e6572843fb0ddc1 100644 (file)
@@ -1,12 +1,12 @@
-<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>):
+<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="id587268"></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>
+<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="id609471"></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>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id640156"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id561920"></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,
@@ -91,7 +91,7 @@
                 </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
+        </p></div><div class="refsect1" title="Methods"><a name="id584280"></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>
@@ -1425,7 +1425,7 @@ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
                 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.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id587234"></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
index d46cd575cee4df62abba2fc171612b628ede66ad..106175091d498160271ed079810d27e00b6cdd12 100644 (file)
@@ -1,7 +1,7 @@
-<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
+<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="id627594"></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="id571473"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id544514"></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
index 8d276df8d1a603f8463a4e5338616455e4546611..23f7edc51e8ba778394583182b946d3a0ec84f2b 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id683026"></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="id584731"></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>
+</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="id634482"></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
@@ -27,7 +27,7 @@
             <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
+        </p></div><div class="refsect1" title="Methods"><a name="id651463"></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
index e5cdaa6b477efdf55c289b51af65ce2545c03d0a..d211e245cfc176863ca877a1d2818f868b1782a0 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id698559"></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="id698651"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id698676"></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
@@ -11,7 +11,7 @@
                 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
+        </p></div><div class="refsect1" title="Methods"><a name="id698791"></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>
index 49d5d7b2726e5a09de0a18c5aa662d3e48540041..e8885576b6249099c86cfc5305988dfc3531ba30 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id698897"></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="id702993"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id703015"></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,
@@ -39,4 +39,4 @@
                 <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>
+        </p></div><div class="refsect1" title="Methods"><a name="id703203"></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>
index e9fe9268f3599304065d5665c185c14a6a71be00..fe7718edb20dd97a4c759da7525da280bc3336e1 100644 (file)
@@ -1,12 +1,12 @@
-<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>
+<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="id703233"></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="id703399"></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>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id703426"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id703448"></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>
@@ -21,7 +21,7 @@
             <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.
+        </p></div><div class="refsect1" title="Methods"><a name="id703508"></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.
index 523cc9ee45ebc1035851ab723e0d99c84fb811aa..0ee0fa84f71f8662ddb01d0bf5ce0f90a3ee48e6 100644 (file)
@@ -1,12 +1,12 @@
-<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>
+<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="id703983"></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="id704116"></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>
+                            </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="id704322"></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>
@@ -18,4 +18,4 @@
         </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>
+        </p></div><div class="refsect1" title="Methods"><a name="id704371"></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>
index 7ef0ad5311779670db4864fc061f2b3d9193ee4f..26603fd9514f999a04859e52eb834ce679effe5f 100644 (file)
@@ -1,12 +1,12 @@
-<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>
+<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="id704400"></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="id704584"></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>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id704611"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id704634"></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>
@@ -26,7 +26,7 @@
             <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.
+        </p></div><div class="refsect1" title="Methods"><a name="id704707"></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
index ebdfb0dbbadd13e3e906d29b159c1fbd50f76da1..2c667de58bb47940a41a215e12a66b7009db7baf 100644 (file)
@@ -1,11 +1,11 @@
-<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>
+<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="id705255"></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="id705339"></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>
+                            Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id705450"></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
+        </p></div><div class="refsect1" title="Methods"><a name="id705460"></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
index 8653c9e9dc973d1a0f6e7dd552e3d95e57b11d6b..a6373677861b8a637602f669104ac28d7abe5b36 100644 (file)
@@ -1,11 +1,11 @@
-<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>
+<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="id705657"></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="id705741"></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>
+                            Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id705852"></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
+        </p></div><div class="refsect1" title="Methods"><a name="id705861"></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
index aed715709459a1832669203850227a279c541699..27dcb229f33db6ec91675c09cdb47ba6c37e957d 100644 (file)
@@ -1,19 +1,19 @@
-<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>):
+<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="id706059"></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>
+<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="id706152"></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>
+</pre></div><div class="refsect1" title="Known Derived Interfaces"><a name="id706174"></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>
+        </p></div><div class="refsect1" title="Known Implementation"><a name="id706196"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id706237"></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. 
@@ -39,7 +39,7 @@
             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
+        </p></div><div class="refsect1" title="Methods"><a name="id706337"></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.
@@ -63,7 +63,7 @@
            </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
+           </p></div></div><div class="refsect1" title="Functions"><a name="id706506"></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>
index bb06b9b4ddec635435a34359cebdf9e0285ce358..a2f84bdbfe0963d0ce41da0cec0c62eafd849e34 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id706642"></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="id707179"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id707201"></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>()
@@ -16,7 +16,7 @@
             <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>
+        </p></div><div class="refsect1" title="Methods"><a name="id707250"></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>
index b8943026053c106b5b949496ad3553ec61d92511..29cf29d89436f3e74f6ea6aad37217bc0e2c8043 100644 (file)
@@ -1,18 +1,18 @@
-<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>
+<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="id708968"></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="id709134"></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>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id709156"></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>
+        </p></div><div class="refsect1" title="Known Implementation"><a name="id709184"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id709206"></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
+        </p></div><div class="refsect1" title="Methods"><a name="id709228"></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.
index b9276a9724cae5f7d7612d728c2cf558e646a469..1029352bacd605f8da5df5319d87b0ce3c62e641 100644 (file)
@@ -1,15 +1,15 @@
-<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>):
+<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="id709655"></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>
+<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="id709755"></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>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id709782"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id709804"></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
                 </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.
+        </p></div><div class="refsect1" title="Methods"><a name="id709885"></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.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id709951"></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
index cebe8e3118bf7348b0c9419e0c53f725ddbca97c..78c847b3784182bb88e85efd9c193a947f1a79f6 100644 (file)
@@ -1,12 +1,12 @@
-<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>
+<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="id710058"></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="id710153"></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>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id710181"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id710203"></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
@@ -14,7 +14,7 @@
                 </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
+        </p></div><div class="refsect1" title="Methods"><a name="id710277"></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.
index 54863111bd0bdbf950b3197cbda00784ecbe57d2..9788353ef8620f883b520f134a516480e20584be 100644 (file)
@@ -1,10 +1,10 @@
-<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>
+<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="id710476"></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="id711147"></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>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id711169"></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>
+        </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="id711362"></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>
@@ -28,7 +28,7 @@
             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,
+        </p></div><div class="refsect1" title="Methods"><a name="id711413"></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.
                     </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
+                contain the errors and <code class="literal">False</code> will be returned. In particular, you may get an
                 gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
             </p></div><div class="refsect2" title="gio.Mount.guess_content_type_sync"><a name="method-giomount--guess-content-type-sync"></a><h3>gio.Mount.guess_content_type_sync</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">guess_content_type_sync</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
                   </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
                 <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
+            </p></div></div><div class="refsect1" title="Signals"><a name="id713590"></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
index 19cc014147b91422819c6978b1a62bd55a25701f..491f6bb80ba24516a25e43e38704255d0ffc46b6 100644 (file)
@@ -1,5 +1,5 @@
-<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>
+<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="id714017"></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="id714377"></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.
@@ -19,7 +19,7 @@
                             </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>
+                            </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="id714935"></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.
@@ -37,7 +37,7 @@
                 <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.
+        </p></div><div class="refsect1" title="Methods"><a name="id715042"></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
@@ -92,7 +92,7 @@
                     </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
+            </p></div></div><div class="refsect1" title="Signals"><a name="id715902"></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.
index 10b06d9277b13df7b069f63f4fa6283bb36ac88b..ac1c69150d288d6e2067f218a53b3198372d51a2 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id716679"></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="id717392"></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>
+</pre></div><div class="refsect1" title="Description"><a name="id717418"></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>()
@@ -16,4 +16,4 @@
             <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>
+        </p></div><div class="refsect1" title="Methods"><a name="id717475"></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>
index 8e98b6707ae6eae84d9a1dd038256f2732ca7638..3a746f5856c305fdd212d9be65ecc21b8dbf0e27 100644 (file)
@@ -1,19 +1,19 @@
-<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>
+<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="id717510"></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="id717688"></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>
+</pre></div><div class="refsect1" title="Known Implementation"><a name="id717713"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id717760"></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>
+        </p></div><div class="refsect1" title="Methods"><a name="id717793"></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.
index a9a07fef247ed8ef1c85ec5a934253b678354440..fc10409e7ace2331d9ef480a82bf6f0f103ad799 100644 (file)
@@ -1,10 +1,10 @@
-<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>
+<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="id718409"></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="id718620"></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>
+</pre></div><div class="refsect1" title="Implemented Interface"><a name="id718646"></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>
+        </p></div><div class="refsect1" title="Description"><a name="id718671"></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.            
@@ -49,7 +49,7 @@
             <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>
+        </p></div><div class="refsect1" title="Methods"><a name="id718834"></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
index 6c2991d96308953afbbb298abb967da99e31e10c..819fe6446544f15aff2988ea506d427ca3eca85c 100644 (file)
@@ -1,5 +1,5 @@
-<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>
+<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="id719381"></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="id719490"></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>
@@ -9,7 +9,7 @@
                                 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>
+                            </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id719634"></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
@@ -27,7 +27,7 @@
             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.
+        </p></div><div class="refsect1" title="Methods"><a name="id719789"></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.
index dce3d2fa6542afe1abfd84e38a214359e70f3e76..d8afe3ab1402f05c73a66b2916a16c58205c42be 100644 (file)
@@ -1,9 +1,9 @@
-<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>
+<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="id650253"></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="id650129"></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>
+                           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="id650005"></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.
@@ -22,7 +22,7 @@
             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.
+       </p></div><div class="refsect1" title="Methods"><a name="id592864"></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.
index 4093d8f72e6a82ebe5cf4700472ace566baf88e2..9ad1c3fb9ada4f2973bc01a871a92381828fa16b 100644 (file)
@@ -1,9 +1,9 @@
-<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>
+<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="id562051"></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="id635228"></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>
+                           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="id634516"></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.
@@ -22,7 +22,7 @@
             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.
+       </p></div><div class="refsect1" title="Methods"><a name="id634849"></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.
index 957cbad68087c0f399fa05337b19b7f9e77441ed..8ddd73abc9ca7ec997b0a3253157909efa2aa240 100644 (file)
@@ -1,10 +1,10 @@
-<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>
+<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="id719994"></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="id720484"></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>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id720509"></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>
+        </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="id720674"></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>
@@ -39,7 +39,7 @@
             "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,
+        </p></div><div class="refsect1" title="Methods"><a name="id720790"></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.
@@ -162,7 +162,7 @@ volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mo
                     </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
+            </p></div></div><div class="refsect1" title="Signals"><a name="id722348"></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.
index 697d14fa54ce56fa9a61b0a0a3e3c9b2e27d50d9..2d0eafa9092fbf40f7e66f4bc8b68d658e018a80 100644 (file)
@@ -1,13 +1,13 @@
-<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>):
+<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="id722638"></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>
+<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="id722832"></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>
+</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="id723650"></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
+        </p></div><div class="refsect1" title="Methods"><a name="id723670"></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
@@ -40,7 +40,7 @@
                     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>
+            </p></div></div><div class="refsect1" title="Functions"><a name="id724099"></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>
@@ -88,7 +88,7 @@
                     </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
+            </p></div></div><div class="refsect1" title="Signals"><a name="id724380"></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.
index 071c9925c9931a70d90e8b4cc150a89ea62ec462..d362f609eb1fe45518d01ca5746c930c04ca6331 100644 (file)
@@ -1,7 +1,7 @@
 <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>
+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="id618822"></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="id618754"></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="id618737"></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
@@ -13,17 +13,17 @@ events from lower priority sources. Single iterations of a <a class="link" href=
 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
+object.</p></div><div class="refsect1" title="Methods"><a name="id618644"></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
+<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>,
+<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
+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>
index d0894dc0a77d6d85a02b83055ced7402be54d52d..808da104ec2acd0c5fd881d80f8e63c45d0e541e 100644 (file)
@@ -1,7 +1,7 @@
 <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>
+    application.</p></div><div class="refsect1" title="Synopsis"><a name="id604807"></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="id616280"></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="id616264"></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>
@@ -19,15 +19,15 @@ functions, e.g. the <PYGTKDOCLINK HREF="function-gtk--main"><code class="functio
 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
+       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>
+       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>
+object.</p></div><div class="refsect1" title="Methods"><a name="id574741"></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
+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
index 4c1e07c3e7d5e9877754034f38709e1cfd3b6472..b95b7f0d4d8986c284b27296c6dd92ad54c8da79 100644 (file)
@@ -1,6 +1,6 @@
-<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">
+<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="id629817"></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="id629637"></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="id629642"></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>
@@ -17,12 +17,12 @@ 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>
+             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="id602792"></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
+    methods and the object data management methods.</p></div><div class="refsect1" title="Methods"><a name="id563044"></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
@@ -130,9 +130,9 @@ list of signal handlers for the object.</p></div><div class="refsect2" title="go
 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
+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
+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
@@ -161,7 +161,7 @@ still to be run will not be invoked.</p></div><div class="refsect2" title="gobje
 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
+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="id607796"></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>
index ead5e11889ca6b3f50e5ad91e4efba41deee515b..c9aa6f0e424486ba281026d3637ea813358b5883 100644 (file)
@@ -1,9 +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>
+<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="id611783"></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="id615077"></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="id614152"></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>
+structure - this allows PyGTK to encapsulate these as Python objects.</p></div><div class="refsect1" title="Methods"><a name="id558398"></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>
index b15ef7ec0ec1123aca1b7c63799dc504843b6aaf..a288214a053d51a2d67aa93ca13a64235a3cf837 100644 (file)
@@ -1,4 +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>
+<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="id604644"></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="id549389"></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="id572556"></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>
index 4b86cd976b71dc1b15c0a3cdc6bd17f765469ffa..ced526aa30b5c56fecf3c2fa166d9e85c72bc356 100644 (file)
@@ -1,7 +1,7 @@
 <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>
+    data</p></div><div class="refsect1" title="Synopsis"><a name="id621351"></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="id616547"></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="id589473"></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
index b1c8bb2ff2a8b59df7f94909904fc16d2cfa5649..660e93ad96630ae4c4c6180c511df5ec1b52d9d1 100644 (file)
@@ -1,4 +1,4 @@
-<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">
+<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="id727601"></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>
index 80287e6435536d92baca450c70b8b3c09f401848..f610a98c8ae77ac756995e9b2c38e4271dfea149 100644 (file)
@@ -1,7 +1,7 @@
-<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>
+<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="id726110"></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="id726456"></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.
+        </p></div><div class="refsect1" title="Functions"><a name="id726474"></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>
index fd86c996963539e3ce7640c775eb8a9abb2f44a8..9a8519abac914cb27397804a4852cd9ef64a2c1d 100644 (file)
@@ -1,4 +1,4 @@
-<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">
+<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="id605894"></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>
index b1f8138dffd68bc0e11a1d37334273ac75e80af3..68fcabb3d8ffd541592dd6f725db1d03fecd0a07 100644 (file)
@@ -1,6 +1,6 @@
-<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
+<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="id583215"></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="id606086"></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="id601396"></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
@@ -10,7 +10,7 @@ loop. The function is given the default idle priority,
 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
+<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
@@ -22,7 +22,7 @@ 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
+<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
@@ -67,10 +67,10 @@ signature of the callback function is:</p><pre class="programlisting">
 <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
+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
+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>() 
@@ -102,9 +102,9 @@ of the child process</td></tr><tr><td><p><span class="term"><strong class="param
 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
+<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
@@ -121,7 +121,7 @@ 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="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>
index 969e25f90b630a3337cf5a475a86118c680af962..66eada9d2e54b49440c031c83c56ef7bee6063dd 100644 (file)
@@ -1,4 +1,4 @@
-<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">
+<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="id543550"></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>
index 1f76f552a48edcb5477f4559bb136de3132e92a0..eb53411fc561850fc240a31a73ee84bed5c4a2f4 100644 (file)
@@ -1,12 +1,12 @@
-<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">
+<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="id606584"></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
+    </pre></div><div class="refsect1" title="Description"><a name="id619949"></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
+      </p></div></div><div class="refsect1" title="Functions"><a name="id581684"></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
@@ -24,12 +24,12 @@ the direct parent type ID of the specified <em class="parameter"><code>type</cod
 <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
+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
+<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
+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
index fe8c44cdfaa71fe269302d93d32640810143efb4..f16d04d54c88df5ea0e73b370fc2ac4d1dfd88bb 100644 (file)
@@ -1,4 +1,4 @@
-<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
+<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.26.0</p></div><div><p class="pubdate">2010-09-27
 </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
index aa635d4e3ea789fc82e6b680814fe915e836d4fd..f01b155203120f3a218ad0be88f0e774724722f0 100644 (file)
                     </simpara></listitem>
                 </varlistentry>
             </variablelist>
-    
+
+            <!-- XXX This description must be incorrect! -->
             <para>
                 The <methodname>guess_content_type_finish</methodname>() method finishes guessing content
                 types of mount. If any errors occured during the operation, error will be set to
-                contain the errors and FALSE will be returned. In particular, you may get an
+                contain the errors and <literal>False</literal> will be returned. In particular, you may get an
                 gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
             </para>
         </refsect2>
index 358fa83287303aafae262cd4afb59c167b8c1fec..3e11251d08605b046ae0e164e0eb4a6d98305ef2 100644 (file)
@@ -148,7 +148,7 @@ loop. The function is given the default idle priority,
 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
+<parameter>callback</parameter> returns <literal>False</literal> it is
 automatically removed from the list of event sources and will not be called
 again.</para>
 
@@ -194,7 +194,7 @@ arguments to pass to <parameter>callback</parameter> can be specified after
 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
+<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
@@ -355,9 +355,9 @@ 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
+      <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
+called again. If it returns <literal>True</literal> it will be called again
 when the condition is matched.</para>
 
     </refsect2>
@@ -376,7 +376,7 @@ when the condition is matched.</para>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
-         <listitem><simpara><literal>TRUE</literal> if the event source was
+         <listitem><simpara><literal>True</literal> if the event source was
 removed</simpara></listitem>
        </varlistentry>
       </variablelist>
@@ -553,17 +553,17 @@ calling <function>exec</function>()</simpara></listitem>
         </varlistentry>
         <varlistentry>
           <term><parameter role="keyword">standard_input</parameter>&nbsp;:</term>
-          <listitem><simpara>if <literal>TRUE</literal> return the file
+          <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
+          <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
+          <listitem><simpara>if <literal>True</literal> return the file
 descriptor for the child's stderr</simpara></listitem>
         </varlistentry>
         <varlistentry>
@@ -591,7 +591,7 @@ 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>
+<literal>True</literal>.</para>
 
       <para>On Windows, the low-level child process creation API
 (<function>CreateProcess</function>()) doesn't use argument vectors, but a
index ccb91bb7d656c7b81315d2fe9b64cf9fd1c91d09..ee1e98548501aa3561d377ff10af553c5a63b80d 100644 (file)
@@ -91,12 +91,12 @@ object.</para>
       <variablelist>
        <varlistentry>
          <term><parameter>may_block</parameter>&nbsp;:</term>
-         <listitem><simpara>if <literal>TRUE</literal> the call may block
+         <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
+         <listitem><simpara><literal>True</literal> if events were
          dispatched.</simpara></listitem>
        </varlistentry>
       </variablelist>
@@ -111,7 +111,7 @@ 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
+<parameter>may_block</parameter> is <literal>True</literal>, waiting for a
 source to become ready;</simpara>
       </listitem>
       <listitem>
@@ -121,8 +121,8 @@ sources that are ready</simpara>
    </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>,
+<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>
 
@@ -137,7 +137,7 @@ becoming ready.</para>
       <variablelist>
        <varlistentry>
        <term><emphasis>Returns</emphasis>&nbsp;:</term>
-         <listitem><simpara><literal>TRUE</literal> if events are
+         <listitem><simpara><literal>True</literal> if events are
          pending.</simpara></listitem>
        </varlistentry>
       </variablelist>
index bd12fca11d64c774cde3a12fcbb267f59f88eb65..913e74386a0f2531057c422f3a3ed53586acc2a4 100644 (file)
@@ -101,10 +101,10 @@ functions.</para>
       </varlistentry>
       <varlistentry>
        <term><parameter>is_running</parameter>&nbsp;:</term>
-       <listitem><simpara>if <literal>TRUE</literal> indicates that the
+       <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>
+       method will set this to <literal>True</literal>
        anyway.</simpara></listitem>
       </varlistentry>
       <varlistentry>
@@ -155,7 +155,7 @@ that the mainloop was created with.</para>
       <variablelist>
        <varlistentry>
        <term><emphasis>Returns</emphasis>&nbsp;:</term>
-         <listitem><simpara><literal>TRUE</literal> if the mainloop is
+         <listitem><simpara><literal>True</literal> if the mainloop is
          currently being run.</simpara></listitem>
        </varlistentry>
       </variablelist>
index 7ca391803117d49232031c35578a0450d97463f9..1f50fbe0356339c0f615ba10363969178d806a74 100644 (file)
@@ -233,16 +233,16 @@ instance</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
-         <listitem><simpara><literal>TRUE</literal> if
+         <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
+<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
+function also returns <literal>True</literal> if
 <parameter>parent_type</parameter> is an interface and
 <parameter>type</parameter> conforms to it.</para>
 
index ac41e47606869c1464cb8928777ac9bfcdca39d9..42cd37baa9869ce01ab25690a3268cac49ae2d6d 100644 (file)
@@ -760,13 +760,13 @@ identifier</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
-         <listitem><simpara><literal>TRUE</literal> if the signal handler
+         <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
+returns <literal>True</literal> if the signal handler with the specified
 <parameter>handler_id</parameter> is connected to the object.</para>
 
     </refsect2>
index 1d73750b9a0b609ac62f4f70b170e2639e45b9fa..e749490ad41777e4d1dee852316ed5a15b2e3364 100644 (file)
@@ -91,6 +91,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index 8420c2fb29a50f8923c68b9603dc885250e72c4e..72a05333a98be871ff0df5ab89cdda85fc49efb5 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 """Based on cairo-demo/X11/cairo-demo.c
 """
+import pygtk
+pygtk.require('2.0')
 import cairo
 from gi.repository import Gdk, Gtk
 
@@ -107,7 +109,7 @@ def expose (da, event):
 
 def main():
     win = Gtk.Window()
-    win.connect('destroy', Gtk.main_quit)
+    win.connect('destroy', lambda w: Gtk.main_quit())
     win.set_default_size(450, 550)
 
     drawingarea = Gtk.DrawingArea()
index c651c977362f9cacb5ac422c126b36575dc39472..2fbb4ac0dd8f1b6ce0410248910b431c65e9b767 100644 (file)
@@ -7,7 +7,7 @@ SUBDIRS = \
        repository \
        overrides
 
-INCLUDES = -I$(top_srcdir)/gobject
+INCLUDES = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib
 
 pygidir = $(pkgpyexecdir)/gi
 pygi_PYTHON = \
@@ -22,7 +22,7 @@ _gi_la_CFLAGS = \
 _gi_la_LDFLAGS = \
        -module \
        -avoid-version \
-       -export-symbols-regex init_gi
+       -export-symbols-regex "init_gi|PyInit__gi"
 _gi_la_LIBADD = \
        $(GI_LIBS)
 _gi_la_SOURCES = \
@@ -34,6 +34,8 @@ _gi_la_SOURCES = \
        pygi-invoke.h \
        pygi-foreign.c \
        pygi-foreign.h \
+       pygi-foreign-gvariant.c \
+       pygi-foreign-gvariant.h \
        pygi-struct.c \
        pygi-struct.h \
        pygi-argument.c \
@@ -48,6 +50,8 @@ _gi_la_SOURCES = \
        pygi-callbacks.h \
        pygi.h \
        pygi-private.h \
+       pygi-property.c \
+       pygi-property.h \
        pygobject-external.h \
        gimodule.c
 
@@ -58,24 +62,28 @@ _gi_cairo_la_CFLAGS = \
 _gi_cairo_la_LDFLAGS = \
        -module \
        -avoid-version \
-       -export-symbols-regex init_gi_cairo
+       -export-symbols-regex "init_gi_cairo|PyInit__gi_cairo"
 _gi_cairo_la_LIBADD = \
        $(GI_LIBS) \
        $(PYCAIRO_LIBS)
 _gi_cairo_la_SOURCES = pygi-foreign-cairo.c
 
-pygi_LTLIBRARIES = _gi.la _gi_cairo.la
+
+pygi_LTLIBRARIES = _gi.la
+
+if ENABLE_CAIRO
+pygi_LTLIBRARIES += _gi_cairo.la
+endif
+
 
 # This is to ensure we have a symlink to the .so in the
 # build directory, which the Python interpreter can load
 # directly without having to know how to parse .la files.
-_gi.so: _gi.la
-       rm -f $@ && $(LN_S) .libs/$@ $@
-_gi_cairo.so: _gi_cairo.la
-       rm -f $@ && $(LN_S) .libs/$@ $@
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
 
-all-local: _gi.so _gi_cairo.so
-check-local: _gi.so _gi_cairo.so
+all-local: $(LTLIBRARIES:.la=.so)
+check-local: $(LTLIBRARIES:.la=.so)
 clean-local:
-       rm -f _gi.so _gi_cairo.so
+       rm -f $(LTLIBRARIES:.la=.so)
 
index 6fb0b9afa434e9981ef7827fea0499a6ede983a7..1aecd0a543fc6e3504ff13562366167ed28ca1ed 100644 (file)
@@ -33,6 +33,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+@ENABLE_CAIRO_TRUE@am__append_1 = _gi_cairo.la
 subdir = gi
 DIST_COMMON = $(pygi_PYTHON) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in
@@ -75,9 +76,10 @@ am__DEPENDENCIES_1 =
 _gi_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am__gi_la_OBJECTS = _gi_la-pygi-repository.lo _gi_la-pygi-info.lo \
        _gi_la-pygi-invoke.lo _gi_la-pygi-foreign.lo \
-       _gi_la-pygi-struct.lo _gi_la-pygi-argument.lo \
-       _gi_la-pygi-type.lo _gi_la-pygi-boxed.lo \
-       _gi_la-pygi-closure.lo _gi_la-pygi-callbacks.lo \
+       _gi_la-pygi-foreign-gvariant.lo _gi_la-pygi-struct.lo \
+       _gi_la-pygi-argument.lo _gi_la-pygi-type.lo \
+       _gi_la-pygi-boxed.lo _gi_la-pygi-closure.lo \
+       _gi_la-pygi-callbacks.lo _gi_la-pygi-property.lo \
        _gi_la-gimodule.lo
 _gi_la_OBJECTS = $(am__gi_la_OBJECTS)
 AM_V_lt = $(am__v_lt_$(V))
@@ -93,6 +95,7 @@ _gi_cairo_la_OBJECTS = $(am__gi_cairo_la_OBJECTS)
 _gi_cairo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gi_cairo_la_CFLAGS) \
        $(CFLAGS) $(_gi_cairo_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_CAIRO_TRUE@am__gi_cairo_la_rpath = -rpath $(pygidir)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -199,6 +202,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
@@ -323,7 +327,7 @@ SUBDIRS = \
        repository \
        overrides
 
-INCLUDES = -I$(top_srcdir)/gobject
+INCLUDES = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib
 pygidir = $(pkgpyexecdir)/gi
 pygi_PYTHON = \
        types.py \
@@ -338,7 +342,7 @@ _gi_la_CFLAGS = \
 _gi_la_LDFLAGS = \
        -module \
        -avoid-version \
-       -export-symbols-regex init_gi
+       -export-symbols-regex "init_gi|PyInit__gi"
 
 _gi_la_LIBADD = \
        $(GI_LIBS)
@@ -352,6 +356,8 @@ _gi_la_SOURCES = \
        pygi-invoke.h \
        pygi-foreign.c \
        pygi-foreign.h \
+       pygi-foreign-gvariant.c \
+       pygi-foreign-gvariant.h \
        pygi-struct.c \
        pygi-struct.h \
        pygi-argument.c \
@@ -366,6 +372,8 @@ _gi_la_SOURCES = \
        pygi-callbacks.h \
        pygi.h \
        pygi-private.h \
+       pygi-property.c \
+       pygi-property.h \
        pygobject-external.h \
        gimodule.c
 
@@ -377,18 +385,18 @@ _gi_cairo_la_CFLAGS = \
 _gi_cairo_la_LDFLAGS = \
        -module \
        -avoid-version \
-       -export-symbols-regex init_gi_cairo
+       -export-symbols-regex "init_gi_cairo|PyInit__gi_cairo"
 
 _gi_cairo_la_LIBADD = \
        $(GI_LIBS) \
        $(PYCAIRO_LIBS)
 
 _gi_cairo_la_SOURCES = pygi-foreign-cairo.c
-pygi_LTLIBRARIES = _gi.la _gi_cairo.la
+pygi_LTLIBRARIES = _gi.la $(am__append_1)
 all: all-recursive
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .la .lo .o .obj .so
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -453,7 +461,7 @@ clean-pygiLTLIBRARIES:
 _gi.la: $(_gi_la_OBJECTS) $(_gi_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(_gi_la_LINK) -rpath $(pygidir) $(_gi_la_OBJECTS) $(_gi_la_LIBADD) $(LIBS)
 _gi_cairo.la: $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(_gi_cairo_la_LINK) -rpath $(pygidir) $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(_gi_cairo_la_LINK) $(am__gi_cairo_la_rpath) $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -467,9 +475,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-boxed.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-callbacks.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-closure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-foreign-gvariant.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-foreign.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-info.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-invoke.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-repository.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-struct.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-type.Plo@am__quote@
@@ -530,6 +540,14 @@ _gi_la-pygi-foreign.lo: pygi-foreign.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-foreign.lo `test -f 'pygi-foreign.c' || echo '$(srcdir)/'`pygi-foreign.c
 
+_gi_la-pygi-foreign-gvariant.lo: pygi-foreign-gvariant.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-foreign-gvariant.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-foreign-gvariant.Tpo -c -o _gi_la-pygi-foreign-gvariant.lo `test -f 'pygi-foreign-gvariant.c' || echo '$(srcdir)/'`pygi-foreign-gvariant.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-foreign-gvariant.Tpo $(DEPDIR)/_gi_la-pygi-foreign-gvariant.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-foreign-gvariant.c' object='_gi_la-pygi-foreign-gvariant.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-foreign-gvariant.lo `test -f 'pygi-foreign-gvariant.c' || echo '$(srcdir)/'`pygi-foreign-gvariant.c
+
 _gi_la-pygi-struct.lo: pygi-struct.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-struct.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-struct.Tpo -c -o _gi_la-pygi-struct.lo `test -f 'pygi-struct.c' || echo '$(srcdir)/'`pygi-struct.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-struct.Tpo $(DEPDIR)/_gi_la-pygi-struct.Plo
@@ -578,6 +596,14 @@ _gi_la-pygi-callbacks.lo: pygi-callbacks.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-callbacks.lo `test -f 'pygi-callbacks.c' || echo '$(srcdir)/'`pygi-callbacks.c
 
+_gi_la-pygi-property.lo: pygi-property.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-property.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-property.Tpo -c -o _gi_la-pygi-property.lo `test -f 'pygi-property.c' || echo '$(srcdir)/'`pygi-property.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-property.Tpo $(DEPDIR)/_gi_la-pygi-property.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-property.c' object='_gi_la-pygi-property.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-property.lo `test -f 'pygi-property.c' || echo '$(srcdir)/'`pygi-property.c
+
 _gi_la-gimodule.lo: gimodule.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-gimodule.lo -MD -MP -MF $(DEPDIR)/_gi_la-gimodule.Tpo -c -o _gi_la-gimodule.lo `test -f 'gimodule.c' || echo '$(srcdir)/'`gimodule.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-gimodule.Tpo $(DEPDIR)/_gi_la-gimodule.Plo
@@ -960,15 +986,13 @@ uninstall-am: uninstall-pygiLTLIBRARIES uninstall-pygiPYTHON
 # This is to ensure we have a symlink to the .so in the
 # build directory, which the Python interpreter can load
 # directly without having to know how to parse .la files.
-_gi.so: _gi.la
-       rm -f $@ && $(LN_S) .libs/$@ $@
-_gi_cairo.so: _gi_cairo.la
-       rm -f $@ && $(LN_S) .libs/$@ $@
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
 
-all-local: _gi.so _gi_cairo.so
-check-local: _gi.so _gi_cairo.so
+all-local: $(LTLIBRARIES:.la=.so)
+check-local: $(LTLIBRARIES:.la=.so)
 clean-local:
-       rm -f _gi.so _gi_cairo.so
+       rm -f $(LTLIBRARIES:.la=.so)
 
 # 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.
index df0db7abea817580870407cc42896f0a31d4905d..89caf4ea11bf2b1bcc4cd29aa51e6412761b4b86 100644 (file)
@@ -25,6 +25,7 @@
 #include "pygi.h"
 
 #include <pygobject.h>
+#include <pyglib-python-compat.h>
 
 static PyObject *
 _wrap_pyg_enum_add (PyObject *self,
@@ -195,12 +196,17 @@ _wrap_pyg_hook_up_vfunc_implementation (PyObject *self, PyObject *args)
         field_info = g_struct_info_get_field (struct_info, i);
 
         if (strcmp (g_base_info_get_name ( (GIBaseInfo*) field_info),
-                    g_base_info_get_name ( (GIBaseInfo*) vfunc_info)) != 0)
+                    g_base_info_get_name ( (GIBaseInfo*) vfunc_info)) != 0) {
+            g_base_info_unref (field_info);
             continue;
+        }
 
         type_info = g_field_info_get_type (field_info);
-        if (g_type_info_get_tag (type_info) != GI_TYPE_TAG_INTERFACE)
+        if (g_type_info_get_tag (type_info) != GI_TYPE_TAG_INTERFACE) {
+            g_base_info_unref (type_info);
+            g_base_info_unref (field_info);
             continue;
+        }
 
         interface_info = g_type_info_get_interface (type_info);
         g_assert (g_base_info_get_type (interface_info) == GI_INFO_TYPE_CALLBACK);
@@ -229,32 +235,85 @@ _wrap_pyg_hook_up_vfunc_implementation (PyObject *self, PyObject *args)
     Py_RETURN_NONE;
 }
 
-static PyMethodDef _pygi_functions[] = {
+static PyObject *
+_wrap_pyg_variant_new_tuple (PyObject *self, PyObject *args)
+{
+    PyObject *py_values;
+    GVariant **values = NULL;
+    GVariant *variant = NULL;
+    PyObject *py_variant = NULL;
+    PyObject *py_type;
+    gssize i;
+
+    if (!PyArg_ParseTuple (args, "O!:variant_new_tuple",
+                           &PyTuple_Type, &py_values)) {
+        return NULL;
+    }
+
+    py_type = _pygi_type_import_by_name ("GLib", "Variant");
+
+    values = g_newa (GVariant*, PyTuple_Size (py_values));
+
+    for (i = 0; i < PyTuple_Size (py_values); i++) {
+        PyObject *value = PyTuple_GET_ITEM (py_values, i);
+
+        if (!PyObject_IsInstance (value, py_type)) {
+            PyErr_Format (PyExc_TypeError, "argument %d is not a GLib.Variant", i);
+            return NULL;
+        }
+
+        values[i] = (GVariant *) ( (PyGPointer *) value)->pointer;
+    }
+
+    variant = g_variant_new_tuple (values, PyTuple_Size (py_values));
+
+    py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, variant, FALSE);
+
+    return py_variant;
+}
+
+static PyObject *
+_wrap_pyg_variant_type_from_string (PyObject *self, PyObject *args)
+{
+    char *type_string;
+    PyObject *py_type;
+    PyObject *py_variant = NULL;
+
+    if (!PyArg_ParseTuple (args, "s:variant_type_from_string",
+                           &type_string)) {
+        return NULL;
+    }
+
+    py_type = _pygi_type_import_by_name ("GLib", "VariantType");
+
+    py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE);
+
+    return py_variant;
+}
+
+static PyMethodDef _gi_functions[] = {
     { "enum_add", (PyCFunction) _wrap_pyg_enum_add, METH_VARARGS | METH_KEYWORDS },
     { "flags_add", (PyCFunction) _wrap_pyg_flags_add, METH_VARARGS | METH_KEYWORDS },
 
     { "set_object_has_new_constructor", (PyCFunction) _wrap_pyg_set_object_has_new_constructor, METH_VARARGS | METH_KEYWORDS },
     { "register_interface_info", (PyCFunction) _wrap_pyg_register_interface_info, METH_VARARGS },
     { "hook_up_vfunc_implementation", (PyCFunction) _wrap_pyg_hook_up_vfunc_implementation, METH_VARARGS },
+    { "variant_new_tuple", (PyCFunction) _wrap_pyg_variant_new_tuple, METH_VARARGS },
+    { "variant_type_from_string", (PyCFunction) _wrap_pyg_variant_type_from_string, METH_VARARGS },
     { NULL, NULL, 0 }
 };
 
 static struct PyGI_API CAPI = {
   pygi_type_import_by_g_type_real,
+  pygi_get_property_value_real,
+  pygi_set_property_value_real,
   pygi_register_foreign_struct_real,
 };
 
-PyMODINIT_FUNC
-init_gi (void)
+PYGLIB_MODULE_START(_gi, "_gi")
 {
-    PyObject *m;
     PyObject *api;
 
-    m = Py_InitModule ("_gi", _pygi_functions);
-    if (m == NULL) {
-        return;
-    }
-
     if (pygobject_init (-1, -1, -1) == NULL) {
         return;
     }
@@ -263,16 +322,16 @@ init_gi (void)
         return;
     }
 
-    _pygi_repository_register_types (m);
-    _pygi_info_register_types (m);
-    _pygi_struct_register_types (m);
-    _pygi_boxed_register_types (m);
+    _pygi_repository_register_types (module);
+    _pygi_info_register_types (module);
+    _pygi_struct_register_types (module);
+    _pygi_boxed_register_types (module);
     _pygi_argument_init();
 
     api = PyCObject_FromVoidPtr ( (void *) &CAPI, NULL);
     if (api == NULL) {
         return;
     }
-    PyModule_AddObject (m, "_API", api);
+    PyModule_AddObject (module, "_API", api);
 }
-
+PYGLIB_MODULE_END
index 6076692058511861f6b1307b494ec2633a73b2d6..1cb9b921e2a1af89233858c1c1be3c109acaac6f 100644 (file)
@@ -27,7 +27,7 @@ import sys
 import gobject
 
 from ._gi import Repository, RepositoryError
-from .module import DynamicModule, DynamicGObjectModule, ModuleProxy
+from .module import DynamicModule, DynamicGObjectModule
 
 
 repository = Repository.get_default()
@@ -48,10 +48,10 @@ class DynamicImporter(object):
         path, namespace = fullname.rsplit('.', 1)
         if path != self.path:
             return
-        try:
-            repository.require(namespace)
-        except RepositoryError, e:
-            logging.exception(e)
+
+        if not repository.enumerate_versions(namespace):
+            logging.error('Could not find any typelib for %s', namespace)
+            return None
         else:
             return self
 
@@ -69,18 +69,10 @@ class DynamicImporter(object):
         dynamic_module = DynamicModule(namespace)
         modules[namespace] = dynamic_module
 
-        overrides_modules = __import__('gi.overrides', fromlist=[namespace])
-        overrides_module = getattr(overrides_modules, namespace, None)
-
-        if overrides_module is not None:
-            module = ModuleProxy(fullname, namespace, dynamic_module, overrides_module)
-        else:
-            module = dynamic_module
-
-        module.__file__ = '<%s>' % fullname
-        module.__loader__ = self
+        dynamic_module.__file__ = '<%s>' % fullname
+        dynamic_module.__loader__ = self
 
-        sys.modules[fullname] = module
+        sys.modules[fullname] = dynamic_module
 
-        return module
+        return dynamic_module
 
index e149986822378c0419a1d7b16e61f3d57a6e230c..819fcc61911f167e35414b3be5394b352d889cb3 100644 (file)
@@ -64,6 +64,7 @@ def get_parent_for_object(object_info):
     module = __import__('gi.repository.%s' % namespace, fromlist=[name])
     return getattr(module, name)
 
+
 def get_interfaces_for_object(object_info):
     interfaces = []
     for interface_info in object_info.get_interfaces():
@@ -75,17 +76,24 @@ def get_interfaces_for_object(object_info):
     return interfaces
 
 
-class DynamicModule(object):
+class IntrospectionModule(object):
 
-    def __init__(self, namespace):
+    def __init__(self, namespace, version=None):
+        repository.require(namespace, version)
         self._namespace = namespace
+        self.version = version
         self.__name__ = 'gi.repository.' + namespace
 
+        repository.require(self._namespace, self.version)
+
+        if self.version is None:
+            self.version = repository.get_version(self._namespace)
+
     def __getattr__(self, name):
         info = repository.find_by_name(self._namespace, name)
         if not info:
             raise AttributeError("%r object has no attribute %r" % (
-                    self.__class__.__name__, name))
+                    self.__name__, name))
 
         if isinstance(info, EnumInfo):
             g_type = info.get_g_type()
@@ -133,7 +141,7 @@ class DynamicModule(object):
                 elif g_type.is_a(gobject.TYPE_POINTER) or g_type == gobject.TYPE_NONE:
                     bases = (Struct,)
                 else:
-                    raise TypeError, "unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name())
+                    raise TypeError("unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name()))
                 metaclass = StructMeta
             else:
                 raise NotImplementedError(info)
@@ -162,10 +170,10 @@ class DynamicModule(object):
 
     def __repr__(self):
         path = repository.get_typelib_path(self._namespace)
-        return "<DynamicModule %r from %r>" % (self._namespace, path)
+        return "<IntrospectionModule %r from %r>" % (self._namespace, path)
 
 
-class DynamicGObjectModule(DynamicModule):
+class DynamicGObjectModule(IntrospectionModule):
     """Wrapper for the GObject module
 
     This class allows us to access both the static PyGObject module and the GI GObject module
@@ -182,12 +190,11 @@ class DynamicGObjectModule(DynamicModule):
     """
 
     def __init__(self):
-        self._namespace = 'GObject'
-        self._module = gobject
+        IntrospectionModule.__init__(self, namespace='GObject')
 
     def __getattr__(self, name):
         # first see if this attr is in the gobject module
-        attr = getattr(self._module, name, None)
+        attr = getattr(gobject, name, None)
 
         # if not in module assume request for an attr exported through GI
         if attr is None:
@@ -195,23 +202,34 @@ class DynamicGObjectModule(DynamicModule):
 
         return attr
 
-class ModuleProxy(object):
-
-    def __init__(self, name, namespace, dynamic_module, overrides_module):
-        self.__name__ = name
 
+class DynamicModule(object):
+    def __init__(self, namespace):
         self._namespace = namespace
-        self._dynamic_module = dynamic_module
-        self._overrides_module = overrides_module
+        self.introspection_module = None
+        self._version = None
+        self._overrides_module = None
+
+    def require_version(self, version):
+        if self.introspection_module is not None and \
+                self.introspection_module.version != version:
+            raise RuntimeError('Module has been already loaded ')
+        self._version = version
+
+    def _import(self):
+        self.introspection_module = IntrospectionModule(self._namespace,
+                                                        self._version)
+
+        overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
+        self._overrides_module = getattr(overrides_modules, self._namespace, None)
 
     def __getattr__(self, name):
-        override_exports = getattr(self._overrides_module, '__all__', ())
-        if (name in override_exports):
-            attribute = getattr(self._overrides_module, name, None)
-        else:
-            attribute = getattr(self._dynamic_module, name)
-        return attribute
+        if self.introspection_module is None:
+            self._import()
 
-    def __str__(self):
-        return "<ModuleProxy %r>" % self.__name__
+        if self._overrides_module is not None:
+            override_exports = getattr(self._overrides_module, '__all__', ())
+            if name in override_exports:
+                return getattr(self._overrides_module, name, None)
 
+        return getattr(self.introspection_module, name)
index 768efd7b8797043e67ed54a17b612db3e007b18c..ee01495cc196c70091ddbd139da1850d09963d21 100644 (file)
@@ -21,7 +21,7 @@
 from ..types import override
 from ..importer import modules
 
-GIMarshallingTests = modules['GIMarshallingTests']
+GIMarshallingTests = modules['GIMarshallingTests'].introspection_module
 
 __all__ = []
 
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
new file mode 100644 (file)
index 0000000..78d8c35
--- /dev/null
@@ -0,0 +1,165 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2010 Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from ..importer import modules
+from .._gi import variant_new_tuple, variant_type_from_string
+
+GLib = modules['GLib'].introspection_module
+
+__all__ = []
+
+class _VariantCreator(object):
+
+    _LEAF_CONSTRUCTORS = {
+        'b': GLib.Variant.new_boolean,
+        'y': GLib.Variant.new_byte,
+        'n': GLib.Variant.new_int16,
+        'q': GLib.Variant.new_uint16,
+        'i': GLib.Variant.new_int32,
+        'u': GLib.Variant.new_uint32,
+        'x': GLib.Variant.new_int64,
+        't': GLib.Variant.new_uint64,
+        'h': GLib.Variant.new_handle,
+        'd': GLib.Variant.new_double,
+        's': GLib.Variant.new_string,
+        'o': GLib.Variant.new_object_path,
+        'g': GLib.Variant.new_signature,
+        'v': GLib.Variant.new_variant,
+    }
+
+    def __init__(self, format_string, args):
+        self._format_string = format_string
+        self._args = args
+
+    def create(self):
+        if self._format_string_is_leaf():
+            return self._new_variant_leaf()
+
+        format_char = self._pop_format_char()
+        arg = self._pop_arg()
+
+        if format_char == 'm':
+            raise NotImplementedError()
+        else:
+            builder = GLib.VariantBuilder()
+            if format_char == '(':
+                builder.init(variant_type_from_string('r'))
+            elif format_char == '{':
+                builder.init(variant_type_from_string('{?*}'))
+            else:
+                raise NotImplementedError()
+            format_char = self._pop_format_char()
+            while format_char not in [')', '}']:
+                builder.add_value(Variant(format_char, arg))
+                format_char = self._pop_format_char()
+                if self._args:
+                    arg = self._pop_arg()
+            return builder.end()
+
+    def _format_string_is_leaf(self):
+        format_char = self._format_string[0]
+        return not format_char in ['m', '(', '{']
+
+    def _format_string_is_nnp(self):
+        format_char = self._format_string[0]
+        return format_char in ['a', 's', 'o', 'g', '^', '@', '*', '?', 'r',
+                               'v', '&']
+
+    def _new_variant_leaf(self):
+        if self._format_string_is_nnp():
+            return self._new_variant_nnp()
+
+        format_char = self._pop_format_char()
+        arg = self._pop_arg()
+
+        return _VariantCreator._LEAF_CONSTRUCTORS[format_char](arg)
+
+    def _new_variant_nnp(self):
+        format_char = self._pop_format_char()
+        arg = self._pop_arg()
+
+        if format_char == '&':
+            format_char = self._pop_format_char()
+
+        if format_char == 'a':
+            builder = GLib.VariantBuilder()
+            builder.init(variant_type_from_string('a*'))
+
+            element_format_string = self._pop_leaf_format_string()
+
+            if isinstance(arg, dict):
+                for element in arg.items():
+                    value = Variant(element_format_string, *element)
+                    builder.add_value(value)
+            else:
+                for element in arg:
+                    value = Variant(element_format_string, element)
+                    builder.add_value(value)
+            return builder.end()
+        elif format_char == '^':
+            raise NotImplementedError()
+        elif format_char == '@':
+            raise NotImplementedError()
+        elif format_char == '*':
+            raise NotImplementedError()
+        elif format_char == 'r':
+            raise NotImplementedError()
+        elif format_char == '?':
+            raise NotImplementedError()
+        else:
+            return _VariantCreator._LEAF_CONSTRUCTORS[format_char](arg)
+
+    def _pop_format_char(self):
+        format_char = self._format_string[0]
+        self._format_string = self._format_string[1:]
+        return format_char
+
+    def _pop_leaf_format_string(self):
+        # FIXME: This will break when the leaf is inside a tuple or dict entry
+        format_string = self._format_string
+        self._format_string = ''
+        return format_string
+
+    def _pop_arg(self):
+        arg = self._args[0]
+        self._args = self._args[1:]
+        return arg
+
+class Variant(GLib.Variant):
+    def __new__(cls, format_string, *args):
+        creator = _VariantCreator(format_string, args)
+        return creator.create()
+
+    def __repr__(self):
+        return '<GLib.Variant(%s)>' % getattr(self, 'print')(True)
+
+@classmethod
+def new_tuple(cls, *elements):
+    return variant_new_tuple(elements)
+
+def get_string(self):
+    value, length = GLib.Variant.get_string(self)
+    return value
+
+setattr(Variant, 'new_tuple', new_tuple)
+setattr(Variant, 'get_string', get_string)
+
+__all__.append('Variant')
+
index 4eaff081d6452d8583e975fff09e262d057b585a..23a9d8e864fdd991287a5d2e70b35067a0ab05b9 100644 (file)
@@ -22,7 +22,7 @@
 from ..types import override
 from ..importer import modules
 
-Gdk = modules['Gdk']
+Gdk = modules['Gdk'].introspection_module
 
 __all__ = []
 
@@ -43,6 +43,25 @@ class Color(Gdk.Color):
 Color = override(Color)
 __all__.append('Color')
 
+if Gdk.version == '2.0':
+    class Rectangle(Gdk.Rectangle):
+
+        def __init__(self, x, y, width, height):
+            Gdk.Rectangle.__init__(self)
+            self.x = x
+            self.y = y
+            self.width = width
+            self.height = height
+
+        def __new__(cls, *args, **kwargs):
+            return Gdk.Rectangle.__new__(cls)
+
+        def __repr__(self):
+            return '<Gdk.Rectangle(x=%d, y=%d, width=%d, height=%d)>' % (self.x, self.y, self.height, self.width)
+
+    Rectangle = override(Rectangle)
+    __all__.append('Rectangle')
+
 class Drawable(Gdk.Drawable):
     def cairo_create(self):
         return Gdk.cairo_create(self)
@@ -50,6 +69,54 @@ class Drawable(Gdk.Drawable):
 Drawable = override(Drawable)
 __all__.append('Drawable')
 
+class Event(Gdk.Event):
+    _UNION_MEMBERS = {
+        Gdk.EventType.DELETE: 'any',
+        Gdk.EventType.DESTROY: 'any',
+        Gdk.EventType.EXPOSE: 'expose',
+        Gdk.EventType.MOTION_NOTIFY: 'motion',
+        Gdk.EventType.BUTTON_PRESS: 'button',
+        #Gdk.EventType.2BUTTON_PRESS: 'button',
+        #Gdk.EventType.3BUTTON_PRESS: 'button',
+        Gdk.EventType.BUTTON_RELEASE: 'button',
+        Gdk.EventType.KEY_PRESS: 'key',
+        Gdk.EventType.KEY_RELEASE: 'key',
+        Gdk.EventType.ENTER_NOTIFY: 'crossing',
+        Gdk.EventType.LEAVE_NOTIFY: 'crossing',
+        Gdk.EventType.FOCUS_CHANGE: 'focus_change',
+        Gdk.EventType.CONFIGURE: 'configure',
+        Gdk.EventType.MAP: 'any',
+        Gdk.EventType.UNMAP: 'any',
+        Gdk.EventType.PROPERTY_NOTIFY: 'property',
+        Gdk.EventType.SELECTION_CLEAR: 'selection',
+        Gdk.EventType.SELECTION_REQUEST: 'selection',
+        Gdk.EventType.SELECTION_NOTIFY: 'selection',
+        Gdk.EventType.PROXIMITY_IN: 'proximity',
+        Gdk.EventType.PROXIMITY_OUT: 'proximity',
+        Gdk.EventType.DRAG_ENTER: 'dnd',
+        Gdk.EventType.DRAG_LEAVE: 'dnd',
+        Gdk.EventType.DRAG_MOTION: 'dnd',
+        Gdk.EventType.DRAG_STATUS: 'dnd',
+        Gdk.EventType.DROP_START: 'dnd',
+        Gdk.EventType.DROP_FINISHED: 'dnd',
+        Gdk.EventType.CLIENT_EVENT: 'client',
+        Gdk.EventType.VISIBILITY_NOTIFY: 'visibility',
+        Gdk.EventType.NO_EXPOSE: 'no_expose'
+    }
+
+    def __new__(cls, *args, **kwargs):
+        return Gdk.Event.__new__(cls)
+
+    def __getattr__(self, name):
+        real_event = getattr(self, '_UNION_MEMBERS').get(self.type)
+        if real_event:
+            return getattr(getattr(self, real_event), name)
+        else:
+            return getattr(self, name)
+
+Event = override(Event)
+__all__.append('Event')
+
 
 import sys
 
index 38a90b35d99a5a1d9e0a484e72ff8adde77c0099..1f6901c5cbe11daee7521e9223f5c4c9b1fb6688 100644 (file)
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 # USA
 
+import sys
 import gobject
 from gi.repository import Gdk
 from gi.repository import GObject
 from ..types import override
 from ..importer import modules
 
-Gtk = modules['Gtk']
+if sys.version_info >= (3, 0):
+    _basestring = str
+    _callable = lambda c: hasattr(c, '__call__')
+else:
+    _basestring = basestring
+    _callable = callable
+
+Gtk = modules['Gtk'].introspection_module
 __all__ = []
 
 class ActionGroup(Gtk.ActionGroup):
@@ -184,7 +192,7 @@ __all__.append('ActionGroup')
 
 class UIManager(Gtk.UIManager):
     def add_ui_from_string(self, buffer):
-        if not isinstance(buffer, basestring):
+        if not isinstance(buffer, _basestring):
             raise TypeError('buffer must be a string')
 
         length = len(buffer)
@@ -207,7 +215,7 @@ class Builder(Gtk.Builder):
             if handler is None:
                 raise AttributeError('Handler %s not found' % handler_name)
 
-            if not callable(handler):
+            if not _callable(handler):
                 raise TypeError('Handler %s is not a method or function' % handler_name)
 
             after = flags or GObject.ConnectFlags.AFTER
@@ -226,7 +234,7 @@ class Builder(Gtk.Builder):
                                   obj_or_map);
 
     def add_from_string(self, buffer):
-        if not isinstance(buffer, basestring):
+        if not isinstance(buffer, _basestring):
             raise TypeError('buffer must be a string')
 
         length = len(buffer)
@@ -234,7 +242,7 @@ class Builder(Gtk.Builder):
         return Gtk.Builder.add_from_string(self, buffer, length)
 
     def add_objects_from_string(self, buffer, object_ids):
-        if not isinstance(buffer, basestring):
+        if not isinstance(buffer, _basestring):
             raise TypeError('buffer must be a string')
 
         length = len(buffer)
@@ -256,8 +264,14 @@ class Dialog(Gtk.Dialog):
             self.set_modal(True)
         if flags & Gtk.DialogFlags.DESTROY_WITH_PARENT:
             self.set_destroy_with_parent(True)
-        if flags & Gtk.DialogFlags.NO_SEPARATOR:
-            self.set_has_separator(False)
+
+        # NO_SEPARATOR has been removed from Gtk 3
+        try:
+            if flags & Gtk.DialogFlags.NO_SEPARATOR:
+                self.set_has_separator(False)
+        except AttributeError:
+            pass
+
         if buttons:
             self.add_buttons(*buttons)
 
@@ -324,14 +338,14 @@ class TextBuffer(Gtk.TextBuffer):
         return tag
 
     def insert(self, iter, text):
-        if not isinstance(text , basestring):
+        if not isinstance(text , _basestring):
             raise TypeError('text must be a string, not %s' % type(text))
 
         length = len(text)
         Gtk.TextBuffer.insert(self, iter, text, length)
 
     def insert_at_cursor(self, text):
-        if not isinstance(text , basestring):
+        if not isinstance(text , _basestring):
             raise TypeError('text must be a string, not %s' % type(text))
 
         length = len(text)
@@ -382,7 +396,7 @@ class TreeStore(Gtk.TreeStore, TreeModel):
         if len(row) != n_columns:
             raise ValueError('row sequence has the incorrect number of elements')
 
-        for i in xrange(n_columns):
+        for i in range(n_columns):
             if row[i] is not None:
                 self.set_value(treeiter, i, row[i])
 
@@ -399,12 +413,25 @@ class TreeViewColumn(Gtk.TreeViewColumn):
         if cell_renderer:
             self.pack_start(cell_renderer, True)
 
-        for (name, value) in attributes.iteritems():
+        for (name, value) in attributes.items():
             self.add_attribute(cell_renderer, name, value)
 
 TreeViewColumn = override(TreeViewColumn)
 __all__.append('TreeViewColumn')
 
+class Button(Gtk.Button):
+    def __init__(self, label=None, stock=None, use_underline=False):
+        if stock:
+            label = stock
+            use_stock = True
+            use_underline = True
+        else:
+            use_stock = False
+        Gtk.Button.__init__(self, label=label, use_stock=use_stock,
+                            use_underline=use_underline)
+Button = override(Button)
+__all__.append('Button')
+
 import sys
 
 initialized, argv = Gtk.init_check(sys.argv)
index 62f6457f97b8388ac0bb8443b8fe81ff760b1470..b36c7a5e031e62ff3b120764f75f72c24d3954cc 100644 (file)
@@ -4,6 +4,7 @@ pkgpyexecdir = $(pyexecdir)/gtk-2.0/gi
 
 pygioverridesdir = $(pkgpyexecdir)/overrides
 pygioverrides_PYTHON = \
+       GLib.py \
        Gtk.py \
        Gdk.py \
        GIMarshallingTests.py \
index b0a8c0123c5eaa6d6f4cb444245e6ed63985e08e..630735c3ce49ea58d575c01b8ea8cb9c02e54817 100644 (file)
@@ -115,6 +115,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
@@ -237,6 +238,7 @@ top_srcdir = @top_srcdir@
 PLATFORM_VERSION = 2.0
 pygioverridesdir = $(pkgpyexecdir)/overrides
 pygioverrides_PYTHON = \
+       GLib.py \
        Gtk.py \
        Gdk.py \
        GIMarshallingTests.py \
index 9ace5d212bacfc643bac9cd57d1feda847acd1fc..e3dd8c3810e5c4e31fc32e2cb520ba73069eaf44 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
  *
- *   pygi-argument.c: GArgument - PyObject conversion functions.
+ *   pygi-argument.c: GIArgument - PyObject conversion functions.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,7 +28,7 @@
 
 #include <datetime.h>
 #include <pygobject.h>
-
+#include <pyglib-python-compat.h>
 
 static void
 _pygi_g_type_tag_py_bounds (GITypeTag   type_tag,
@@ -37,29 +37,29 @@ _pygi_g_type_tag_py_bounds (GITypeTag   type_tag,
 {
     switch (type_tag) {
         case GI_TYPE_TAG_INT8:
-            *lower = PyInt_FromLong (-128);
-            *upper = PyInt_FromLong (127);
+            *lower = PYGLIB_PyLong_FromLong (-128);
+            *upper = PYGLIB_PyLong_FromLong (127);
             break;
         case GI_TYPE_TAG_UINT8:
-            *upper = PyInt_FromLong (255);
-            *lower = PyInt_FromLong (0);
+            *upper = PYGLIB_PyLong_FromLong (255);
+            *lower = PYGLIB_PyLong_FromLong (0);
             break;
         case GI_TYPE_TAG_INT16:
-            *lower = PyInt_FromLong (-32768);
-            *upper = PyInt_FromLong (32767);
+            *lower = PYGLIB_PyLong_FromLong (-32768);
+            *upper = PYGLIB_PyLong_FromLong (32767);
             break;
         case GI_TYPE_TAG_UINT16:
-            *upper = PyInt_FromLong (65535);
-            *lower = PyInt_FromLong (0);
+            *upper = PYGLIB_PyLong_FromLong (65535);
+            *lower = PYGLIB_PyLong_FromLong (0);
             break;
         case GI_TYPE_TAG_INT32:
-            *lower = PyInt_FromLong (G_MININT32);
-            *upper = PyInt_FromLong (G_MAXINT32);
+            *lower = PYGLIB_PyLong_FromLong (G_MININT32);
+            *upper = PYGLIB_PyLong_FromLong (G_MAXINT32);
             break;
         case GI_TYPE_TAG_UINT32:
             /* Note: On 32-bit archs, this number doesn't fit in a long. */
             *upper = PyLong_FromLongLong (G_MAXUINT32);
-            *lower = PyInt_FromLong (0);
+            *lower = PYGLIB_PyLong_FromLong (0);
             break;
         case GI_TYPE_TAG_INT64:
             /* Note: On 32-bit archs, these numbers don't fit in a long. */
@@ -68,7 +68,7 @@ _pygi_g_type_tag_py_bounds (GITypeTag   type_tag,
             break;
         case GI_TYPE_TAG_UINT64:
             *upper = PyLong_FromUnsignedLongLong (G_MAXUINT64);
-            *lower = PyInt_FromLong (0);
+            *lower = PYGLIB_PyLong_FromLong (0);
             break;
         case GI_TYPE_TAG_FLOAT:
             *upper = PyFloat_FromDouble (G_MAXFLOAT);
@@ -160,6 +160,101 @@ _pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info,
     return retval;
 }
 
+gint
+_pygi_g_type_interface_check_object (GIBaseInfo *info,
+                                     PyObject   *object)
+{
+    gint retval = 1;
+    GIInfoType info_type;
+
+    info_type = g_base_info_get_type (info);
+    switch (info_type) {
+        case GI_INFO_TYPE_CALLBACK:
+            if (!PyCallable_Check (object)) {
+                PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+            }
+            break;
+        case GI_INFO_TYPE_ENUM:
+            retval = 0;
+            if (PyNumber_Check (object)) {
+                PyObject *number = PYGLIB_PyNumber_Long (object);
+                if (number == NULL)
+                    PyErr_Clear();
+                else {
+                    glong value = PYGLIB_PyLong_AsLong (number);
+                    int i;
+                    for (i = 0; i < g_enum_info_get_n_values (info); i++) {
+                        GIValueInfo *value_info = g_enum_info_get_value (info, i);
+                        glong enum_value = g_value_info_get_value (value_info);
+                        if (value == enum_value) {
+                            retval = 1;
+                            break;
+                        }
+                    }
+                }
+            }
+            if (retval < 1)
+                retval = _pygi_g_registered_type_info_check_object (
+                             (GIRegisteredTypeInfo *) info, TRUE, object);
+            break;
+        case GI_INFO_TYPE_FLAGS:
+            if (PyNumber_Check (object)) {
+                /* Accept 0 as a valid flag value */
+                PyObject *number = PYGLIB_PyNumber_Long (object);
+                if (number == NULL)
+                    PyErr_Clear();
+                else {
+                    long value = PYGLIB_PyLong_AsLong (number);
+                    if (value == 0)
+                        break;
+                    else if (value == -1)
+                        PyErr_Clear();
+                }
+            }
+            retval = _pygi_g_registered_type_info_check_object (
+                         (GIRegisteredTypeInfo *) info, TRUE, object);
+            break;
+        case GI_INFO_TYPE_STRUCT:
+        {
+            GType type;
+
+            /* Handle special cases. */
+            type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+            if (g_type_is_a (type, G_TYPE_VALUE)) {
+                GType object_type;
+                object_type = pyg_type_from_object ( (PyObject *) object->ob_type);
+                if (object_type == G_TYPE_INVALID) {
+                    PyErr_Format (PyExc_TypeError, "Must be of a known GType, not %s",
+                                  object->ob_type->tp_name);
+                    retval = 0;
+                }
+                break;
+            } else if (g_type_is_a (type, G_TYPE_CLOSURE)) {
+                if (!PyCallable_Check (object)) {
+                    PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
+                                  object->ob_type->tp_name);
+                    retval = 0;
+                }
+                break;
+            }
+
+            /* Fallback. */
+        }
+        case GI_INFO_TYPE_BOXED:
+        case GI_INFO_TYPE_INTERFACE:
+        case GI_INFO_TYPE_OBJECT:
+        case GI_INFO_TYPE_UNION:
+            retval = _pygi_g_registered_type_info_check_object ( (GIRegisteredTypeInfo *) info, TRUE, object);
+            break;
+        default:
+            g_assert_not_reached();
+    }
+
+    return retval;
+}
+
 gint
 _pygi_g_type_info_check_object (GITypeInfo *type_info,
                                 PyObject   *object,
@@ -204,7 +299,7 @@ _pygi_g_type_info_check_object (GITypeInfo *type_info,
             if (type_tag == GI_TYPE_TAG_FLOAT || type_tag == GI_TYPE_TAG_DOUBLE) {
                 number = PyNumber_Float (object);
             } else {
-                number = PyNumber_Int (object);
+                number = PYGLIB_PyNumber_Long (object);
             }
 
             _pygi_g_type_tag_py_bounds (type_tag, &lower, &upper);
@@ -215,8 +310,8 @@ _pygi_g_type_info_check_object (GITypeInfo *type_info,
             }
 
             /* Check bounds */
-            if (PyObject_Compare (lower, number) > 0
-                    || PyObject_Compare (upper, number) < 0) {
+            if (PyObject_RichCompareBool (lower, number, Py_GT)
+                    || PyObject_RichCompareBool (upper, number, Py_LT)) {
                 PyObject *lower_str;
                 PyObject *upper_str;
 
@@ -232,10 +327,30 @@ _pygi_g_type_info_check_object (GITypeInfo *type_info,
                     goto check_number_error_release;
                 }
 
+#if PY_VERSION_HEX < 0x03000000
                 PyErr_Format (PyExc_ValueError, "Must range from %s to %s",
                               PyString_AS_STRING (lower_str),
                               PyString_AS_STRING (upper_str));
+#else
+                {
+                    PyObject *lower_pybytes_obj = PyUnicode_AsUTF8String (lower_str);
+                    if (!lower_pybytes_obj)
+                        goto utf8_fail;
+
+                    PyObject *upper_pybytes_obj = PyUnicode_AsUTF8String (upper_str);                    
+                    if (!upper_pybytes_obj) {
+                        Py_DECREF(lower_pybytes_obj);
+                        goto utf8_fail;
+                    }
 
+                    PyErr_Format (PyExc_ValueError, "Must range from %s to %s",
+                                  PyBytes_AsString (lower_pybytes_obj),
+                                  PyBytes_AsString (upper_pybytes_obj));
+                    Py_DECREF (lower_pybytes_obj);
+                    Py_DECREF (upper_pybytes_obj);
+                }
+utf8_fail:
+#endif
                 retval = 0;
 
 check_number_error_release:
@@ -251,15 +366,7 @@ check_number_release:
         }
         case GI_TYPE_TAG_GTYPE:
         {
-            gint is_instance;
-
-            is_instance = PyObject_IsInstance (object, (PyObject *) &PyGTypeWrapper_Type);
-            if (is_instance < 0) {
-                retval = -1;
-                break;
-            }
-
-            if (!is_instance && (!PyType_Check (object) || pyg_type_from_object (object) == 0)) {
+            if (pyg_type_from_object (object) == 0) {
                 PyErr_Format (PyExc_TypeError, "Must be gobject.GType, not %s",
                               object->ob_type->tp_name);
                 retval = 0;
@@ -268,7 +375,7 @@ check_number_release:
         }
         case GI_TYPE_TAG_UTF8:
         case GI_TYPE_TAG_FILENAME:
-            if (!PyString_Check (object)) {
+            if (!PYGLIB_PyUnicode_Check (object)) {
                 PyErr_Format (PyExc_TypeError, "Must be string, not %s",
                               object->ob_type->tp_name);
                 retval = 0;
@@ -334,77 +441,11 @@ check_number_release:
         case GI_TYPE_TAG_INTERFACE:
         {
             GIBaseInfo *info;
-            GIInfoType info_type;
 
             info = g_type_info_get_interface (type_info);
             g_assert (info != NULL);
 
-            info_type = g_base_info_get_type (info);
-
-            switch (info_type) {
-                case GI_INFO_TYPE_CALLBACK:
-                    if (!PyCallable_Check (object)) {
-                        PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
-                                      object->ob_type->tp_name);
-                        retval = 0;
-                    }
-                    break;
-                case GI_INFO_TYPE_ENUM:
-                    retval = _pygi_g_registered_type_info_check_object (
-                                 (GIRegisteredTypeInfo *) info, TRUE, object);
-                    break;
-                case GI_INFO_TYPE_FLAGS:
-                    if (PyNumber_Check (object)) {
-                        /* Accept 0 as a valid flag value */
-                        PyObject *number = PyNumber_Int (object);
-                        if (number == NULL)
-                            PyErr_Clear();
-                        else {
-                            long value = PyInt_AsLong (number);
-                            if (value == 0)
-                                break;
-                            else if (value == -1)
-                                PyErr_Clear();
-                        }
-                    }
-                    retval = _pygi_g_registered_type_info_check_object (
-                                 (GIRegisteredTypeInfo *) info, TRUE, object);
-                    break;
-                case GI_INFO_TYPE_STRUCT:
-                {
-                    GType type;
-
-                    /* Handle special cases. */
-                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
-                    if (g_type_is_a (type, G_TYPE_VALUE)) {
-                        GType object_type;
-                        object_type = pyg_type_from_object ( (PyObject *) object->ob_type);
-                        if (object_type == G_TYPE_INVALID) {
-                            PyErr_Format (PyExc_TypeError, "Must be of a known GType, not %s",
-                                          object->ob_type->tp_name);
-                            retval = 0;
-                        }
-                        break;
-                    } else if (g_type_is_a (type, G_TYPE_CLOSURE)) {
-                        if (!PyCallable_Check (object)) {
-                            PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
-                                          object->ob_type->tp_name);
-                            retval = 0;
-                        }
-                        break;
-                    }
-
-                    /* Fallback. */
-                }
-                case GI_INFO_TYPE_BOXED:
-                case GI_INFO_TYPE_INTERFACE:
-                case GI_INFO_TYPE_OBJECT:
-                case GI_INFO_TYPE_UNION:
-                    retval = _pygi_g_registered_type_info_check_object ( (GIRegisteredTypeInfo *) info, TRUE, object);
-                    break;
-                default:
-                    g_assert_not_reached();
-            }
+            retval = _pygi_g_type_interface_check_object(info, object);
 
             g_base_info_unref (info);
             break;
@@ -466,7 +507,8 @@ check_number_release:
             GITypeInfo *value_type_info;
             Py_ssize_t i;
 
-            if (!PyMapping_Check (object)) {
+            keys = PyMapping_Keys (object);
+            if (keys == NULL) {
                 PyErr_Format (PyExc_TypeError, "Must be mapping, not %s",
                               object->ob_type->tp_name);
                 retval = 0;
@@ -475,12 +517,7 @@ check_number_release:
 
             length = PyMapping_Length (object);
             if (length < 0) {
-                retval = -1;
-                break;
-            }
-
-            keys = PyMapping_Keys (object);
-            if (keys == NULL) {
+                Py_DECREF (keys);
                 retval = -1;
                 break;
             }
@@ -540,8 +577,8 @@ check_number_release:
 }
 
 GArray *
-_pygi_argument_to_array (GArgument  *arg,
-                         GArgument  *args[],
+_pygi_argument_to_array (GIArgument  *arg,
+                         GIArgument  *args[],
                          GITypeInfo *type_info,
                          gboolean is_method)
 {
@@ -572,12 +609,6 @@ _pygi_argument_to_array (GArgument  *arg,
             length_arg_pos = g_type_info_get_array_length (type_info);
             g_assert (length_arg_pos >= 0);
 
-            if (is_method) {
-                length_arg_pos--;
-            }
-
-            g_assert (length_arg_pos >= 0);
-
             /* FIXME: Take into account the type of the argument. */
             length = args[length_arg_pos]->v_int;
         }
@@ -593,15 +624,15 @@ _pygi_argument_to_array (GArgument  *arg,
     return g_array;
 }
 
-GArgument
+GIArgument
 _pygi_argument_from_object (PyObject   *object,
                             GITypeInfo *type_info,
                             GITransfer  transfer)
 {
-    GArgument arg;
+    GIArgument arg;
     GITypeTag type_tag;
 
-    memset(&arg, 0, sizeof(GArgument));
+    memset(&arg, 0, sizeof(GIArgument));
     type_tag = g_type_info_get_tag (type_info);
 
     switch (type_tag) {
@@ -622,12 +653,12 @@ _pygi_argument_from_object (PyObject   *object,
         {
             PyObject *int_;
 
-            int_ = PyNumber_Int (object);
+            int_ = PYGLIB_PyNumber_Long (object);
             if (int_ == NULL) {
                 break;
             }
 
-            arg.v_long = PyInt_AsLong (int_);
+            arg.v_long = PYGLIB_PyLong_AsLong (int_);
 
             Py_DECREF (int_);
 
@@ -639,16 +670,18 @@ _pygi_argument_from_object (PyObject   *object,
             PyObject *number;
             guint64 value;
 
-            number = PyNumber_Int (object);
+            number = PYGLIB_PyNumber_Long (object);
             if (number == NULL) {
                 break;
             }
 
+#if PY_VERSION_HEX < 0x03000000
             if (PyInt_Check (number)) {
                 value = PyInt_AS_LONG (number);
-            } else {
+            } else
+#endif
+            if (PyLong_Check (number))
                 value = PyLong_AsUnsignedLongLong (number);
-            }
 
             arg.v_uint64 = value;
 
@@ -661,16 +694,18 @@ _pygi_argument_from_object (PyObject   *object,
             PyObject *number;
             gint64 value;
 
-            number = PyNumber_Int (object);
+            number = PYGLIB_PyNumber_Long (object);
             if (number == NULL) {
                 break;
             }
 
+#if PY_VERSION_HEX < 0x03000000
             if (PyInt_Check (number)) {
                 value = PyInt_AS_LONG (number);
-            } else {
+            } else 
+#endif 
+            if (PyLong_Check (number))
                 value = PyLong_AsLongLong (number);
-            }
 
             arg.v_int64 = value;
 
@@ -714,30 +749,53 @@ _pygi_argument_from_object (PyObject   *object,
         }
         case GI_TYPE_TAG_UTF8:
         {
-            const gchar *string;
+            gchar *string;
 
             if (object == Py_None) {
                 arg.v_string = NULL;
                 break;
             }
+#if PY_VERSION_HEX < 0x03000000
+            string = g_strdup(PyString_AsString (object));
+#else
+            {
+                PyObject *pybytes_obj = PyUnicode_AsUTF8String (object);
+                if (!pybytes_obj)
+                    break;
 
-            string = PyString_AsString (object);
+                string = g_strdup(PyBytes_AsString (pybytes_obj));
+                Py_DECREF (pybytes_obj);
+            }
+#endif
+            arg.v_string = string;
 
-            /* Don't need to check for errors, since g_strdup is NULL-proof. */
-            arg.v_string = g_strdup (string);
             break;
         }
         case GI_TYPE_TAG_FILENAME:
         {
             GError *error = NULL;
-            const gchar *string;
+            gchar *string;
+
+#if PY_VERSION_HEX < 0x03000000
+            string = g_strdup(PyString_AsString (object));
+#else
+            {
+                PyObject *pybytes_obj = PyUnicode_AsUTF8String (object);
+                if (!pybytes_obj)
+                    break;
+
+                string = g_strdup(PyBytes_AsString (pybytes_obj));
+                Py_DECREF (pybytes_obj);
+            }
+#endif
 
-            string = PyString_AsString (object);
             if (string == NULL) {
                 break;
             }
 
             arg.v_string = g_filename_from_utf8 (string, -1, NULL, NULL, &error);
+            g_free(string);
+
             if (arg.v_string == NULL) {
                 PyErr_SetString (PyExc_Exception, error->message);
                 /* TODO: Convert the error to an exception. */
@@ -781,7 +839,7 @@ _pygi_argument_from_object (PyObject   *object,
 
             for (i = 0; i < length; i++) {
                 PyObject *py_item;
-                GArgument item;
+                GIArgument item;
 
                 py_item = PySequence_GetItem (object, i);
                 if (py_item == NULL) {
@@ -801,7 +859,7 @@ _pygi_argument_from_object (PyObject   *object,
 
 array_item_error:
                 /* Free everything we have converted so far. */
-                _pygi_argument_release ( (GArgument *) &array, type_info,
+                _pygi_argument_release ( (GIArgument *) &array, type_info,
                                          GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
                 array = NULL;
 
@@ -900,12 +958,12 @@ array_item_error:
                 {
                     PyObject *int_;
 
-                    int_ = PyNumber_Int (object);
+                    int_ = PYGLIB_PyNumber_Long (object);
                     if (int_ == NULL) {
                         break;
                     }
 
-                    arg.v_long = PyInt_AsLong (int_);
+                    arg.v_long = PYGLIB_PyLong_AsLong (int_);
 
                     Py_DECREF (int_);
 
@@ -956,7 +1014,7 @@ array_item_error:
 
             for (i = length - 1; i >= 0; i--) {
                 PyObject *py_item;
-                GArgument item;
+                GIArgument item;
 
                 py_item = PySequence_GetItem (object, i);
                 if (py_item == NULL) {
@@ -981,7 +1039,7 @@ array_item_error:
 
 list_item_error:
                 /* Free everything we have converted so far. */
-                _pygi_argument_release ( (GArgument *) &list, type_info,
+                _pygi_argument_release ( (GIArgument *) &list, type_info,
                                          GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
                 list = NULL;
 
@@ -1061,8 +1119,8 @@ list_item_error:
             for (i = 0; i < length; i++) {
                 PyObject *py_key;
                 PyObject *py_value;
-                GArgument key;
-                GArgument value;
+                GIArgument key;
+                GIArgument value;
 
                 py_key = PyList_GET_ITEM (keys, i);
                 py_value = PyList_GET_ITEM (values, i);
@@ -1083,7 +1141,7 @@ list_item_error:
 
 hash_table_item_error:
                 /* Free everything we have converted so far. */
-                _pygi_argument_release ( (GArgument *) &hash_table, type_info,
+                _pygi_argument_release ( (GIArgument *) &hash_table, type_info,
                                          GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
                 hash_table = NULL;
 
@@ -1110,7 +1168,7 @@ hash_table_release:
 }
 
 PyObject *
-_pygi_argument_to_object (GArgument  *arg,
+_pygi_argument_to_object (GIArgument  *arg,
                           GITypeInfo *type_info,
                           GITransfer transfer)
 {
@@ -1135,27 +1193,27 @@ _pygi_argument_to_object (GArgument  *arg,
         }
         case GI_TYPE_TAG_INT8:
         {
-            object = PyInt_FromLong (arg->v_int8);
+            object = PYGLIB_PyLong_FromLong (arg->v_int8);
             break;
         }
         case GI_TYPE_TAG_UINT8:
         {
-            object = PyInt_FromLong (arg->v_uint8);
+            object = PYGLIB_PyLong_FromLong (arg->v_uint8);
             break;
         }
         case GI_TYPE_TAG_INT16:
         {
-            object = PyInt_FromLong (arg->v_int16);
+            object = PYGLIB_PyLong_FromLong (arg->v_int16);
             break;
         }
         case GI_TYPE_TAG_UINT16:
         {
-            object = PyInt_FromLong (arg->v_uint16);
+            object = PYGLIB_PyLong_FromLong (arg->v_uint16);
             break;
         }
         case GI_TYPE_TAG_INT32:
         {
-            object = PyInt_FromLong (arg->v_int32);
+            object = PYGLIB_PyLong_FromLong (arg->v_int32);
             break;
         }
         case GI_TYPE_TAG_UINT32:
@@ -1195,7 +1253,7 @@ _pygi_argument_to_object (GArgument  *arg,
                 break;
             }
 
-            object = PyString_FromString (arg->v_string);
+            object = PYGLIB_PyUnicode_FromString (arg->v_string);
             break;
         case GI_TYPE_TAG_FILENAME:
         {
@@ -1215,7 +1273,7 @@ _pygi_argument_to_object (GArgument  *arg,
                 break;
             }
 
-            object = PyString_FromString (string);
+            object = PYGLIB_PyUnicode_FromString (string);
 
             g_free (string);
 
@@ -1249,7 +1307,7 @@ _pygi_argument_to_object (GArgument  *arg,
             item_size = g_array_get_element_size (array);
 
             for (i = 0; i < array->len; i++) {
-                GArgument item;
+                GIArgument item;
                 PyObject *py_item;
                 gboolean is_struct = FALSE;
 
@@ -1266,9 +1324,9 @@ _pygi_argument_to_object (GArgument  *arg,
                 }
 
                 if (is_struct) {
-                    item.v_pointer = &_g_array_index (array, GArgument, i);
+                    item.v_pointer = &_g_array_index (array, GIArgument, i);
                 } else {
-                    memcpy (&item, &_g_array_index (array, GArgument, i), item_size);
+                    memcpy (&item, &_g_array_index (array, GIArgument, i), item_size);
                 }
 
                 py_item = _pygi_argument_to_object (&item, item_type_info, item_transfer);
@@ -1355,15 +1413,12 @@ _pygi_argument_to_object (GArgument  *arg,
                             break;
                         }
 
-                        if (transfer != GI_TRANSFER_NOTHING)
-                            g_warning ("Transfer mode should be set to None for "
-                                       "struct types as there is no way to free "
-                                       "them safely.  Ignoring transfer mode "
-                                       "to prevent a potential invalid free. "
-                                       "This may cause a leak in your application.");
-
+                        /* Only structs created in invoke can be safely marked
+                         * GI_TRANSFER_EVERYTHING. Trust that invoke has
+                         * filtered correctly
+                         */
                         object = _pygi_struct_new ( (PyTypeObject *) py_type, arg->v_pointer,
-                                                    FALSE);
+                                                    transfer == GI_TRANSFER_EVERYTHING);
 
                         Py_DECREF (py_type);
                     } else {
@@ -1446,7 +1501,7 @@ _pygi_argument_to_object (GArgument  *arg,
             item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
 
             for (i = 0; list != NULL; list = g_slist_next (list), i++) {
-                GArgument item;
+                GIArgument item;
                 PyObject *py_item;
 
                 item.v_pointer = list->data;
@@ -1470,8 +1525,8 @@ _pygi_argument_to_object (GArgument  *arg,
             GITypeInfo *value_type_info;
             GITransfer item_transfer;
             GHashTableIter hash_table_iter;
-            GArgument key;
-            GArgument value;
+            GIArgument key;
+            GIArgument value;
 
             if (arg->v_pointer == NULL) {
                 object = Py_None;
@@ -1486,9 +1541,11 @@ _pygi_argument_to_object (GArgument  *arg,
 
             key_type_info = g_type_info_get_param_type (type_info, 0);
             g_assert (key_type_info != NULL);
+            g_assert (g_type_info_get_tag (key_type_info) != GI_TYPE_TAG_VOID);
 
             value_type_info = g_type_info_get_param_type (type_info, 1);
             g_assert (value_type_info != NULL);
+            g_assert (g_type_info_get_tag (value_type_info) != GI_TYPE_TAG_VOID);
 
             item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
 
@@ -1533,12 +1590,13 @@ _pygi_argument_to_object (GArgument  *arg,
 }
 
 void
-_pygi_argument_release (GArgument   *arg,
+_pygi_argument_release (GIArgument   *arg,
                         GITypeInfo  *type_info,
                         GITransfer   transfer,
                         GIDirection  direction)
 {
     GITypeTag type_tag;
+    gboolean is_out = (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT);
 
     type_tag = g_type_info_get_tag (type_info);
 
@@ -1590,8 +1648,8 @@ _pygi_argument_release (GArgument   *arg,
 
                 /* Free the items */
                 for (i = 0; i < array->len; i++) {
-                    GArgument *item;
-                    item = &_g_array_index (array, GArgument, i);
+                    GIArgument *item;
+                    item = &_g_array_index (array, GIArgument, i);
                     _pygi_argument_release (item, item_type_info, item_transfer, direction);
                 }
 
@@ -1649,7 +1707,7 @@ _pygi_argument_release (GArgument   *arg,
                         }
                     } else if (g_struct_info_is_foreign ( (GIStructInfo*) info)) {
                         if (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING) {
-                            pygi_struct_foreign_release_g_argument (transfer, type_info, arg);
+                            pygi_struct_foreign_release (info, arg->v_pointer);
                         }
                     } else if (g_type_is_a (type, G_TYPE_BOXED)) {
                     } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
@@ -1666,7 +1724,7 @@ _pygi_argument_release (GArgument   *arg,
                     if (arg->v_pointer == NULL) {
                         return;
                     }
-                    if (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING) {
+                    if (is_out && transfer == GI_TRANSFER_EVERYTHING) {
                         g_object_unref (arg->v_pointer);
                     }
                     break;
@@ -1701,7 +1759,7 @@ _pygi_argument_release (GArgument   *arg,
 
                 /* Free the items */
                 for (item = list; item != NULL; item = g_slist_next (item)) {
-                    _pygi_argument_release ( (GArgument *) &item->data, item_type_info,
+                    _pygi_argument_release ( (GIArgument *) &item->data, item_type_info,
                                              item_transfer, direction);
                 }
 
@@ -1754,9 +1812,9 @@ _pygi_argument_release (GArgument   *arg,
 
                 g_hash_table_iter_init (&hash_table_iter, hash_table);
                 while (g_hash_table_iter_next (&hash_table_iter, &key, &value)) {
-                    _pygi_argument_release ( (GArgument *) &key, key_type_info,
+                    _pygi_argument_release ( (GIArgument *) &key, key_type_info,
                                              item_transfer, direction);
-                    _pygi_argument_release ( (GArgument *) &value, value_type_info,
+                    _pygi_argument_release ( (GIArgument *) &value, value_type_info,
                                              item_transfer, direction);
                 }
 
index 821737a4e1fdd99691e351aacdbda7e84d1f8d9b..d932e8f1887cf205e2545ff999f5678b978b67d6 100644 (file)
@@ -30,6 +30,8 @@ G_BEGIN_DECLS
 
 
 /* Private */
+gint _pygi_g_type_interface_check_object (GIBaseInfo *info,
+                                          PyObject   *object);
 
 gint _pygi_g_type_info_check_object (GITypeInfo *type_info,
                                      PyObject   *object,
@@ -40,21 +42,21 @@ gint _pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info,
                                                 PyObject             *object);
 
 
-GArray* _pygi_argument_to_array (GArgument  *arg,
-                                 GArgument  *args[],
+GArray* _pygi_argument_to_array (GIArgument  *arg,
+                                 GIArgument  *args[],
                                  GITypeInfo *type_info,
                                  gboolean    is_method);
 
-GArgument _pygi_argument_from_object (PyObject   *object,
+GIArgument _pygi_argument_from_object (PyObject   *object,
                                       GITypeInfo *type_info,
                                       GITransfer  transfer);
 
-PyObject* _pygi_argument_to_object (GArgument  *arg,
+PyObject* _pygi_argument_to_object (GIArgument  *arg,
                                     GITypeInfo *type_info,
                                     GITransfer  transfer);
 
 
-void _pygi_argument_release (GArgument   *arg,
+void _pygi_argument_release (GIArgument   *arg,
                              GITypeInfo  *type_info,
                              GITransfer   transfer,
                              GIDirection  direction);
index 49038344cf64c1a58d3e6be8b73dde5dbcf518d7..2fd446c55c93165b8e045a8716f24e51351a1c47 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <pygobject.h>
 #include <girepository.h>
+#include <pyglib-python-compat.h>
 
 static void
 _boxed_dealloc (PyGIBoxed *self)
@@ -44,7 +45,38 @@ _boxed_dealloc (PyGIBoxed *self)
         }
     }
 
-    ( (PyGObject *) self)->ob_type->tp_free ( (PyObject *) self);
+    Py_TYPE( (PyGObject *) self)->tp_free ( (PyObject *) self);
+}
+
+void *
+_pygi_boxed_alloc (GIBaseInfo *info, gsize *size_out)
+{
+    gsize size;
+
+    /* FIXME: Remove when bgo#622711 is fixed */
+    if (g_registered_type_info_get_g_type (info) == G_TYPE_VALUE) {
+        size = sizeof (GValue);
+    } else {
+        switch (g_base_info_get_type (info)) {
+            case GI_INFO_TYPE_UNION:
+                size = g_union_info_get_size ( (GIUnionInfo *) info);
+                break;
+            case GI_INFO_TYPE_BOXED:
+            case GI_INFO_TYPE_STRUCT:
+                size = g_struct_info_get_size ( (GIStructInfo *) info);
+                break;
+            default:
+                PyErr_Format (PyExc_TypeError,
+                              "info should be Boxed or Union, not '%d'",
+                              g_base_info_get_type (info));
+                return NULL;
+        }
+    }
+
+    if( size_out != NULL)
+        *size_out = size;
+
+    return g_slice_alloc0 (size);
 }
 
 static PyObject *
@@ -55,7 +87,7 @@ _boxed_new (PyTypeObject *type,
     static char *kwlist[] = { NULL };
 
     GIBaseInfo *info;
-    gsize size;
+    gsize size = 0;
     gpointer boxed;
     PyGIBoxed *self = NULL;
 
@@ -71,22 +103,7 @@ _boxed_new (PyTypeObject *type,
         return NULL;
     }
 
-    switch (g_base_info_get_type (info)) {
-        case GI_INFO_TYPE_UNION:
-            size = g_union_info_get_size ( (GIUnionInfo *) info);
-            break;
-        case GI_INFO_TYPE_BOXED:
-        case GI_INFO_TYPE_STRUCT:
-            size = g_struct_info_get_size ( (GIStructInfo *) info);
-            break;
-        default:
-            PyErr_Format (PyExc_TypeError,
-                          "info should be Boxed or Union, not '%d'",
-                          g_base_info_get_type (info));
-            return NULL;
-    }
-
-    boxed = g_slice_alloc0 (size);
+    boxed = _pygi_boxed_alloc (info, &size);
     if (boxed == NULL) {
         PyErr_NoMemory();
         goto out;
@@ -116,41 +133,7 @@ _boxed_init (PyObject *self,
     return 0;
 }
 
-
-PyTypeObject PyGIBoxed_Type = {
-    PyObject_HEAD_INIT (NULL)
-    0,
-    "gi.Boxed",                                /* tp_name */
-    sizeof (PyGIBoxed),                        /* tp_basicsize */
-    0,                                         /* tp_itemsize */
-    (destructor) _boxed_dealloc,               /* tp_dealloc */
-    (printfunc) NULL,                          /* tp_print */
-    (getattrfunc) NULL,                        /* tp_getattr */
-    (setattrfunc) NULL,                        /* tp_setattr */
-    (cmpfunc) NULL,                            /* tp_compare */
-    (reprfunc) NULL,                           /* tp_repr */
-    NULL,                                      /* tp_as_number */
-    NULL,                                      /* tp_as_sequence */
-    NULL,                                      /* tp_as_mapping */
-    (hashfunc) NULL,                           /* tp_hash */
-    (ternaryfunc) NULL,                        /* tp_call */
-    (reprfunc) NULL,                           /* tp_str */
-    (getattrofunc) NULL,                       /* tp_getattro */
-    (setattrofunc) NULL,                       /* tp_setattro */
-    NULL,                                      /* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,  /* tp_flags */
-    NULL,                                      /* tp_doc */
-    (traverseproc) NULL,                       /* tp_traverse */
-    (inquiry) NULL,                            /* tp_clear */
-    (richcmpfunc) NULL,                        /* tp_richcompare */
-    0,                                         /* tp_weaklistoffset */
-    (getiterfunc) NULL,                        /* tp_iter */
-    (iternextfunc) NULL,                       /* tp_iternext */
-    NULL,                                      /* tp_methods */
-    NULL,                                      /* tp_members */
-    NULL,                                      /* tp_getset */
-    (PyTypeObject *) NULL,                     /* tp_base */
-};
+PYGLIB_DEFINE_TYPE("gi.Boxed", PyGIBoxed_Type, PyGIBoxed);
 
 PyObject *
 _pygi_boxed_new (PyTypeObject *type,
@@ -185,10 +168,13 @@ _pygi_boxed_new (PyTypeObject *type,
 void
 _pygi_boxed_register_types (PyObject *m)
 {
-    PyGIBoxed_Type.ob_type = &PyType_Type;
+    Py_TYPE(&PyGIBoxed_Type) = &PyType_Type;
     PyGIBoxed_Type.tp_base = &PyGBoxed_Type;
     PyGIBoxed_Type.tp_new = (newfunc) _boxed_new;
     PyGIBoxed_Type.tp_init = (initproc) _boxed_init;
+    PyGIBoxed_Type.tp_dealloc = (destructor) _boxed_dealloc;
+    PyGIBoxed_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+
     if (PyType_Ready (&PyGIBoxed_Type))
         return;
     if (PyModule_AddObject (m, "Boxed", (PyObject *) &PyGIBoxed_Type))
index 4f840604c9085a17289bd72f61be6631a45f0b4e..a84ec4e89073902a53367bed9bd342e775788450 100644 (file)
@@ -28,10 +28,12 @@ G_BEGIN_DECLS
 
 extern PyTypeObject PyGIBoxed_Type;
 
-PyObject *
-_pygi_boxed_new (PyTypeObject *type,
-                 gpointer      boxed,
-                 gboolean      free_on_dealloc);
+PyObject * _pygi_boxed_new (PyTypeObject *type,
+                            gpointer      boxed,
+                            gboolean      free_on_dealloc);
+
+void * _pygi_boxed_alloc (GIBaseInfo *info,
+                          gsize *size);
 
 void _pygi_boxed_register_types (PyObject *m);
 
index 6fdc1ce718e5d986000dfc402277396c779c03bc..bae40016a5cdd8e3870f1b31be7872f7290a684a 100644 (file)
@@ -95,7 +95,8 @@ _pygi_scan_for_callbacks (GIFunctionInfo *function_info,
             interface_type = g_base_info_get_type (interface_info);
             if (interface_type == GI_INFO_TYPE_CALLBACK &&
                     ! (strcmp (g_base_info_get_namespace ( (GIBaseInfo*) interface_info), "GLib") == 0 &&
-                       strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "DestroyNotify") == 0)) {
+                       (strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "DestroyNotify") == 0 ||
+                       (strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "FreeFunc") == 0)))) {
                 if (*callback_index != G_MAXUINT8) {
                     PyErr_Format (PyExc_TypeError, "Function %s.%s has multiple callbacks, not supported",
                                   g_base_info_get_namespace ( (GIBaseInfo*) function_info),
@@ -108,11 +109,8 @@ _pygi_scan_for_callbacks (GIFunctionInfo *function_info,
             g_base_info_unref (interface_info);
         }
         destroy = g_arg_info_get_destroy (arg_info);
-        if (is_method)
-            --destroy;
+        
         closure = g_arg_info_get_closure (arg_info);
-        if (is_method)
-            --closure;
         direction = g_arg_info_get_direction (arg_info);
 
         if (destroy > 0 && destroy < n_args) {
@@ -200,7 +198,8 @@ _pygi_create_callback (GIBaseInfo  *function_info,
 
     if (!found_py_function
             || (py_function == Py_None || !PyCallable_Check (py_function))) {
-        PyErr_Format (PyExc_TypeError, "Error invoking %s.%s: Invalid callback given for argument %s",
+        PyErr_Format (PyExc_TypeError, "Error invoking %s.%s: Unexpected value "
+                      "for argument '%s'",
                       g_base_info_get_namespace ( (GIBaseInfo*) function_info),
                       g_base_info_get_name ( (GIBaseInfo*) function_info),
                       g_base_info_get_name ( (GIBaseInfo*) callback_arg));
index b26d5b1a9523cff89ca44011bbaafede8aa723f2..1e2ce0508f91c4bf7fec657edf01e8c39b166e63 100644 (file)
@@ -28,7 +28,7 @@
 static GSList* async_free_list;
 
 
-static GArgument *
+static GIArgument *
 _pygi_closure_convert_ffi_arguments (GICallableInfo *callable_info, void **args)
 {
     gint num_args, i;
@@ -36,10 +36,10 @@ _pygi_closure_convert_ffi_arguments (GICallableInfo *callable_info, void **args)
     GITypeInfo *arg_type;
     GITypeTag tag;
     GIDirection direction;
-    GArgument *g_args;
+    GIArgument *g_args;
 
     num_args = g_callable_info_get_n_args (callable_info);
-    g_args = g_new0 (GArgument, num_args);
+    g_args = g_new0 (GIArgument, num_args);
 
     for (i = 0; i < num_args; i++) {
         arg_info = g_callable_info_get_arg (callable_info, i);
@@ -130,13 +130,13 @@ _pygi_closure_convert_ffi_arguments (GICallableInfo *callable_info, void **args)
 static gboolean
 _pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args,
                                  void *user_data, PyObject **py_args,
-                                 GArgument **out_args)
+                                 GIArgument **out_args)
 {
     int n_args = g_callable_info_get_n_args (callable_info);
     int n_in_args = 0;
     int n_out_args = 0;
     int i;
-    GArgument *g_args = NULL;
+    GIArgument *g_args = NULL;
 
     *py_args = NULL;
     *py_args = PyTuple_New (n_args);
@@ -144,7 +144,7 @@ _pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args,
         goto error;
 
     *out_args = NULL;
-    *out_args = g_new0 (GArgument, n_args);
+    *out_args = g_new0 (GIArgument, n_args);
     g_args = _pygi_closure_convert_ffi_arguments (callable_info, args);
 
     for (i = 0; i < n_args; i++) {
@@ -156,7 +156,7 @@ _pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args,
             GITypeTag arg_tag = g_type_info_get_tag (arg_type);
             GITransfer transfer = g_arg_info_get_ownership_transfer (arg_info);
             PyObject *value;
-            GArgument *arg;
+            GIArgument *arg;
 
             if (direction == GI_DIRECTION_IN && arg_tag == GI_TYPE_TAG_VOID &&
                     g_type_info_is_pointer (arg_type)) {
@@ -170,9 +170,9 @@ _pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args,
                 }
             } else {
                 if (direction == GI_DIRECTION_IN)
-                    arg = (GArgument*) &g_args[i];
+                    arg = (GIArgument*) &g_args[i];
                 else
-                    arg = (GArgument*) g_args[i].v_pointer;
+                    arg = (GIArgument*) g_args[i].v_pointer;
 
                 value = _pygi_argument_to_object (arg, arg_type, transfer);
                 if (value == NULL) {
@@ -214,7 +214,7 @@ error:
 
 static void
 _pygi_closure_set_out_arguments (GICallableInfo *callable_info,
-                                 PyObject *py_retval, GArgument *out_args,
+                                 PyObject *py_retval, GIArgument *out_args,
                                  void *resp)
 {
     int n_args, i, i_py_retval, i_out_args;
@@ -225,15 +225,15 @@ _pygi_closure_set_out_arguments (GICallableInfo *callable_info,
     return_type_info = g_callable_info_get_return_type (callable_info);
     return_type_tag = g_type_info_get_tag (return_type_info);
     if (return_type_tag != GI_TYPE_TAG_VOID) {
-        GArgument arg;
+        GIArgument arg;
         GITransfer transfer = g_callable_info_get_caller_owns (callable_info);
         if (PyTuple_Check (py_retval)) {
             PyObject *item = PyTuple_GET_ITEM (py_retval, 0);
             arg = _pygi_argument_from_object (item, return_type_info, transfer);
-            * ( (GArgument*) resp) = arg;
+            * ( (GIArgument*) resp) = arg;
         } else {
             arg = _pygi_argument_from_object (py_retval, return_type_info, transfer);
-            * ( (GArgument*) resp) = arg;
+            * ( (GIArgument*) resp) = arg;
         }
         i_py_retval++;
     }
@@ -248,14 +248,14 @@ _pygi_closure_set_out_arguments (GICallableInfo *callable_info,
 
         if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
             GITransfer transfer = g_arg_info_get_ownership_transfer (arg_info);
-            GArgument arg;
+            GIArgument arg;
             if (PyTuple_Check (py_retval)) {
                 PyObject *item = PyTuple_GET_ITEM (py_retval, i_py_retval);
                 arg = _pygi_argument_from_object (item, type_info, transfer);
-                * ( (GArgument*) out_args[i_out_args].v_pointer) = arg;
+                * ( (GIArgument*) out_args[i_out_args].v_pointer) = arg;
             } else if (i_py_retval == 0) {
                 arg = _pygi_argument_from_object (py_retval, type_info, transfer);
-                * ( (GArgument*) out_args[i_out_args].v_pointer) = arg;
+                * ( (GIArgument*) out_args[i_out_args].v_pointer) = arg;
             } else
                 g_assert_not_reached();
 
@@ -280,7 +280,7 @@ _pygi_closure_handle (ffi_cif *cif,
     GITypeInfo *return_type;
     PyObject *retval;
     PyObject *py_args;
-    GArgument *out_args = NULL;
+    GIArgument *out_args = NULL;
 
     /* Lock the GIL as we are coming into this code without the lock and we
       may be executing python code */
index 08d50ad9eb38d9ebad2eb176f03712783e79f36a..095f6cbe71ff4ef3751cdc01edd5a282908bc676 100644 (file)
  */
 
 #include <cairo.h>
+
+#if PY_VERSION_HEX < 0x03000000
 #include <pycairo.h>
+#else
+#include <pycairo/py3cairo.h>
+#endif
+
 Pycairo_CAPI_t *Pycairo_CAPI;
 
 #include "pygi-foreign.h"
 
+#include <pyglib-python-compat.h>
+
 PyObject *
 cairo_context_to_arg (PyObject       *value,
                       GITypeInfo     *type_info,
                       GITransfer      transfer,
-                      GArgument      *arg)
+                      GIArgument      *arg)
 {
     cairo_t *cr;
 
@@ -47,7 +55,7 @@ cairo_context_to_arg (PyObject       *value,
 }
 
 PyObject *
-cairo_context_from_arg (GITypeInfo *type_info, GArgument  *arg)
+cairo_context_from_arg (GITypeInfo *type_info, GIArgument  *arg)
 {
     cairo_t *context = (cairo_t*) arg;
 
@@ -57,10 +65,10 @@ cairo_context_from_arg (GITypeInfo *type_info, GArgument  *arg)
 }
 
 PyObject *
-cairo_context_release_arg (GITransfer  transfer, GITypeInfo *type_info,
-                           GArgument  *arg)
+cairo_context_release (GIBaseInfo *base_info,
+                       gpointer    struct_)
 {
-    cairo_destroy ( (cairo_t*) arg->v_pointer);
+    cairo_destroy ( (cairo_t*) struct_);
     Py_RETURN_NONE;
 }
 
@@ -69,7 +77,7 @@ PyObject *
 cairo_surface_to_arg (PyObject       *value,
                       GITypeInfo     *type_info,
                       GITransfer      transfer,
-                      GArgument      *arg)
+                      GIArgument      *arg)
 {
     cairo_surface_t *surface;
 
@@ -86,7 +94,7 @@ cairo_surface_to_arg (PyObject       *value,
 }
 
 PyObject *
-cairo_surface_from_arg (GITypeInfo *type_info, GArgument  *arg)
+cairo_surface_from_arg (GITypeInfo *type_info, GIArgument  *arg)
 {
     cairo_surface_t *surface = (cairo_surface_t*) arg;
 
@@ -96,36 +104,31 @@ cairo_surface_from_arg (GITypeInfo *type_info, GArgument  *arg)
 }
 
 PyObject *
-cairo_surface_release_arg (GITransfer  transfer, GITypeInfo *type_info,
-                           GArgument  *arg)
+cairo_surface_release (GIBaseInfo *base_info,
+                       gpointer    struct_)
 {
-    cairo_surface_destroy ( (cairo_surface_t*) arg->v_pointer);
+    cairo_surface_destroy ( (cairo_surface_t*) struct_);
     Py_RETURN_NONE;
 }
 
-PyMODINIT_FUNC
-init_gi_cairo (void)
-{
-    PyObject *m;
-
-    m = Py_InitModule ("_gi_cairo", NULL);
-    if (m == NULL) {
-        return;
-    }
 
+static PyMethodDef _gi_cairo_functions[] = {};
+PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
+{
     Pycairo_IMPORT;
     if (Pycairo_CAPI == NULL)
-        return;
+        return 0;
 
     pygi_register_foreign_struct ("cairo",
                                   "Context",
                                   cairo_context_to_arg,
                                   cairo_context_from_arg,
-                                  cairo_context_release_arg);
+                                  cairo_context_release);
 
     pygi_register_foreign_struct ("cairo",
                                   "Surface",
                                   cairo_surface_to_arg,
                                   cairo_surface_from_arg,
-                                  cairo_surface_release_arg);
+                                  cairo_surface_release);
 }
+PYGLIB_MODULE_END;
diff --git a/gi/pygi-foreign-gvariant.c b/gi/pygi-foreign-gvariant.c
new file mode 100644 (file)
index 0000000..ac16395
--- /dev/null
@@ -0,0 +1,63 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "pygobject.h"
+
+#include "pygi-private.h"
+#include "pygi-foreign-gvariant.h"
+
+PyObject *
+g_variant_to_arg (PyObject       *value,
+                  GITypeInfo     *type_info,
+                  GITransfer      transfer,
+                  GIArgument      *arg)
+{
+    g_assert (transfer == GI_TRANSFER_NOTHING);
+
+    /* TODO check that value is a PyGPointer */
+
+    arg->v_pointer = (GVariant *) ( (PyGPointer *) value)->pointer;
+    Py_RETURN_NONE;
+}
+
+PyObject *
+g_variant_from_arg (GITypeInfo *type_info,
+                    GIArgument  *arg)
+{
+    GVariant *variant = (GVariant *) arg;
+    GITypeInfo *interface_info = g_type_info_get_interface (type_info);
+    PyObject *type = _pygi_type_import_by_gi_info (interface_info);
+
+    g_variant_ref_sink (variant);
+
+    return _pygi_struct_new ( (PyTypeObject *) type, variant, FALSE);
+}
+
+PyObject *
+g_variant_release_foreign (GIBaseInfo *base_info,
+                           gpointer struct_)
+{
+    g_variant_unref ( (GVariant *) struct_);
+    Py_RETURN_NONE;
+}
+
diff --git a/gi/pygi-foreign-gvariant.h b/gi/pygi-foreign-gvariant.h
new file mode 100644 (file)
index 0000000..6de8c57
--- /dev/null
@@ -0,0 +1,41 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __PYGI_FOREIGN_G_VARIANT_H__
+#define __PYGI_FOREIGN_G_VARIANT_H__
+
+#include "pygi-foreign.h"
+
+PyObject *g_variant_to_arg(PyObject       *value,
+                           GITypeInfo     *type_info,
+                           GITransfer      transfer,
+                           GIArgument      *arg);
+
+PyObject *g_variant_from_arg(GITypeInfo *type_info,
+                             GIArgument  *arg);
+
+PyObject *g_variant_release_foreign (GIBaseInfo *base_info,
+                                     gpointer    struct_);
+
+#endif /* __PYGI_FOREIGN_G_VARIANT_H__ */
+
index 13a0f775adc8610782f6d8e259fde55e7c0f8c4f..f80b43c16f3f8076c9580f6cdc4c59271b5fcb31 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "pygi-foreign.h"
+#include "pygi-foreign-gvariant.h"
 
 #include <config.h>
 #include <girepository.h>
 typedef struct {
     const char *namespace;
     const char *name;
-    PyGIArgOverrideToGArgumentFunc to_func;
-    PyGIArgOverrideFromGArgumentFunc from_func;
-    PyGIArgOverrideReleaseGArgumentFunc release_func;
+    PyGIArgOverrideToGIArgumentFunc to_func;
+    PyGIArgOverrideFromGIArgumentFunc from_func;
+    PyGIArgOverrideReleaseFunc release_func;
 } PyGIForeignStruct;
 
 static GPtrArray *foreign_structs = NULL;
 
+void
+init_foreign_structs ()
+{
+    foreign_structs = g_ptr_array_new ();
+
+    pygi_register_foreign_struct ("GLib",
+                                  "Variant",
+                                  g_variant_to_arg,
+                                  g_variant_from_arg,
+                                  g_variant_release_foreign);
+}
+
 static PyGIForeignStruct *
-pygi_struct_foreign_lookup (GITypeInfo *type_info)
+do_lookup (const gchar *namespace, const gchar *name)
 {
     gint i;
-    PyObject *module;
-    gchar *module_name;
-    GIBaseInfo *base_info;
-    const gchar *namespace;
-    const gchar *name;
-
-    base_info = g_type_info_get_interface (type_info);
-    if (base_info == NULL) {
-        PyErr_Format (PyExc_ValueError, "Couldn't resolve the type of this foreign struct");
-        return NULL;
+    for (i = 0; i < foreign_structs->len; i++) {
+        PyGIForeignStruct *foreign_struct = \
+                g_ptr_array_index (foreign_structs, i);
+
+        if ( (strcmp (namespace, foreign_struct->namespace) == 0) &&
+                (strcmp (name, foreign_struct->name) == 0)) {
+            return foreign_struct;
+        }
+    }
+    return NULL;
+}
+
+static PyGIForeignStruct *
+pygi_struct_foreign_lookup (GIBaseInfo *base_info)
+{
+    PyGIForeignStruct *result;
+    const gchar *namespace = g_base_info_get_namespace (base_info);
+    const gchar *name = g_base_info_get_name (base_info);
+
+    if (foreign_structs == NULL) {
+        init_foreign_structs ();
     }
 
-    namespace = g_base_info_get_namespace (base_info);
-    name = g_base_info_get_name (base_info);
+    result = do_lookup (namespace, name);
 
-    module_name = g_strconcat ("gi._gi_", g_base_info_get_namespace (base_info), NULL);
-    module = PyImport_ImportModule (module_name);
-    g_free (module_name);
+    if (result == NULL) {
+        gchar *module_name = g_strconcat ("gi._gi_", namespace, NULL);
+        PyObject *module = PyImport_ImportModule (module_name);
 
-    if (foreign_structs != NULL) {
-        for (i = 0; i < foreign_structs->len; i++) {
-            PyGIForeignStruct *foreign_struct = \
-                    g_ptr_array_index (foreign_structs, i);
+        g_free (module_name);
 
-            if ( (strcmp (namespace, foreign_struct->namespace) == 0) &&
-                    (strcmp (name, foreign_struct->name) == 0)) {
-                g_base_info_unref (base_info);
-                return foreign_struct;
-            }
+        if (module == NULL)
+            PyErr_Clear ();
+        else {
+            Py_DECREF (module);
+            result = do_lookup (namespace, name);
         }
     }
 
-    g_base_info_unref (base_info);
+    if (result == NULL) {
+        PyErr_Format (PyExc_TypeError,
+                      "Couldn't find conversion for foreign struct '%s.%s'",
+                      namespace,
+                      name);
+    }
 
-    PyErr_Format (PyExc_TypeError, "Couldn't find conversion for foreign struct '%s.%s'", namespace, name);
-    return NULL;
+    return result;
 }
 
 PyObject *
-pygi_struct_foreign_convert_to_g_argument (PyObject      *value,
+pygi_struct_foreign_convert_to_g_argument (PyObject       *value,
                                            GITypeInfo     *type_info,
                                            GITransfer      transfer,
-                                           GArgument      *arg)
+                                           GIArgument      *arg)
 {
-    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (type_info);
+    GIBaseInfo *base_info = g_type_info_get_interface (type_info);
+    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
+    g_base_info_unref (base_info);
 
     if (foreign_struct == NULL)
         return NULL;
@@ -98,9 +124,12 @@ pygi_struct_foreign_convert_to_g_argument (PyObject      *value,
 
 PyObject *
 pygi_struct_foreign_convert_from_g_argument (GITypeInfo *type_info,
-                                             GArgument  *arg)
+                                             GIArgument  *arg)
 {
-    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (type_info);
+    GIBaseInfo *base_info = g_type_info_get_interface (type_info);
+    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
+    g_base_info_unref (base_info);
+
 
     if (foreign_struct == NULL)
         return NULL;
@@ -109,11 +138,10 @@ pygi_struct_foreign_convert_from_g_argument (GITypeInfo *type_info,
 }
 
 PyObject *
-pygi_struct_foreign_release_g_argument (GITransfer  transfer,
-                                        GITypeInfo *type_info,
-                                        GArgument  *arg)
+pygi_struct_foreign_release (GIBaseInfo *base_info,
+                             gpointer    struct_)
 {
-    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (type_info);
+    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
 
     if (foreign_struct == NULL)
         return NULL;
@@ -121,7 +149,7 @@ pygi_struct_foreign_release_g_argument (GITransfer  transfer,
     if (!foreign_struct->release_func)
         Py_RETURN_NONE;
 
-    if (!foreign_struct->release_func (transfer, type_info, arg))
+    if (!foreign_struct->release_func (base_info, struct_))
         return NULL;
 
     Py_RETURN_NONE;
@@ -130,9 +158,9 @@ pygi_struct_foreign_release_g_argument (GITransfer  transfer,
 void
 pygi_register_foreign_struct_real (const char* namespace_,
                                    const char* name,
-                                   PyGIArgOverrideToGArgumentFunc to_func,
-                                   PyGIArgOverrideFromGArgumentFunc from_func,
-                                   PyGIArgOverrideReleaseGArgumentFunc release_func)
+                                   PyGIArgOverrideToGIArgumentFunc to_func,
+                                   PyGIArgOverrideFromGIArgumentFunc from_func,
+                                   PyGIArgOverrideReleaseFunc release_func)
 {
     PyGIForeignStruct *new_struct = g_slice_new0 (PyGIForeignStruct);
     new_struct->namespace = namespace_;
@@ -141,8 +169,5 @@ pygi_register_foreign_struct_real (const char* namespace_,
     new_struct->from_func = from_func;
     new_struct->release_func = release_func;
 
-    if (foreign_structs == NULL)
-        foreign_structs = g_ptr_array_new ();
-
     g_ptr_array_add (foreign_structs, new_struct);
 }
index 9a35bd8610af6757a35902195a8960b41bb065cf..b57f8929c160c778ab139ee4d1cdd292c921379c 100644 (file)
 PyObject *pygi_struct_foreign_convert_to_g_argument (PyObject           *value,
                                                      GITypeInfo         *type_info,
                                                      GITransfer          transfer,
-                                                     GArgument          *arg);
+                                                     GIArgument          *arg);
 PyObject *pygi_struct_foreign_convert_from_g_argument (GITypeInfo *type_info,
-                                                       GArgument  *arg);
-PyObject *pygi_struct_foreign_release_g_argument (GITransfer          transfer,
-                                                  GITypeInfo         *type_info,
-                                                  GArgument          *arg);
+                                                       GIArgument  *arg);
+PyObject *pygi_struct_foreign_release (GITypeInfo *type_info,
+                                       gpointer struct_);
 
 void pygi_register_foreign_struct_real (const char* namespace_,
                                         const char* name,
-                                        PyGIArgOverrideToGArgumentFunc to_func,
-                                        PyGIArgOverrideFromGArgumentFunc from_func,
-                                        PyGIArgOverrideReleaseGArgumentFunc release_func);
+                                        PyGIArgOverrideToGIArgumentFunc to_func,
+                                        PyGIArgOverrideFromGIArgumentFunc from_func,
+                                        PyGIArgOverrideReleaseFunc release_func);
 
 #endif /* __PYGI_FOREIGN_H__ */
index 7888adad28acb51e1c2bf69e5f361ec680ca146e..feeccf7dcbb62ea02dc80f0ccb7b3539548223ec 100644 (file)
 #include "pygi-private.h"
 
 #include <pygobject.h>
-
-#define _PyGI_DEFINE_INFO_TYPE(name, cname, base) \
-static PyMethodDef _Py##cname##_methods[]; \
-PyTypeObject Py##cname##_Type = { \
-    PyObject_HEAD_INIT(NULL) \
-    0, \
-    "gi." name,                               /* tp_name */ \
-    sizeof(PyGIBaseInfo),                     /* tp_basicsize */ \
-    0,                                        /* tp_itemsize */ \
-    (destructor)NULL,                         /* tp_dealloc */ \
-    (printfunc)NULL,                          /* tp_print */ \
-    (getattrfunc)NULL,                        /* tp_getattr */ \
-    (setattrfunc)NULL,                        /* tp_setattr */ \
-    (cmpfunc)NULL,                            /* tp_compare */ \
-    (reprfunc)NULL,                           /* tp_repr */ \
-    NULL,                                     /* tp_as_number */ \
-    NULL,                                     /* tp_as_sequence */ \
-    NULL,                                     /* tp_as_mapping */ \
-    (hashfunc)NULL,                           /* tp_hash */ \
-    (ternaryfunc)NULL,                        /* tp_call */ \
-    (reprfunc)NULL,                           /* tp_str */ \
-    (getattrofunc)NULL,                       /* tp_getattro */ \
-    (setattrofunc)NULL,                       /* tp_setattro */ \
-    NULL,                                     /* tp_as_buffer */ \
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ \
-    NULL,                                     /* tp_doc */ \
-    (traverseproc)NULL,                       /* tp_traverse */ \
-    (inquiry)NULL,                            /* tp_clear */ \
-    (richcmpfunc)NULL,                        /* tp_richcompare */ \
-    offsetof(PyGIBaseInfo, inst_weakreflist), /* tp_weaklistoffset */ \
-    (getiterfunc)NULL,                        /* tp_iter */ \
-    (iternextfunc)NULL,                       /* tp_iternext */ \
-    _Py##cname##_methods,                     /* tp_methods */ \
-    NULL,                                     /* tp_members */ \
-    NULL,                                     /* tp_getset */ \
-    &base                                     /* tp_base */ \
-}
-
+#include <pyglib-python-compat.h>
 
 /* BaseInfo */
 
@@ -74,7 +37,7 @@ _base_info_dealloc (PyGIBaseInfo *self)
 
     g_base_info_unref (self->info);
 
-    self->ob_type->tp_free ( (PyObject *) self);
+    Py_TYPE( (PyObject *) self)->tp_free ( (PyObject *) self);
 }
 
 static int
@@ -88,55 +51,26 @@ _base_info_traverse (PyGIBaseInfo *self,
 static PyObject *
 _base_info_repr (PyGIBaseInfo *self)
 {
-    return PyString_FromFormat ("<%s object (%s) at 0x%p>",
-                                self->ob_type->tp_name, g_base_info_get_name (self->info), (void *) self);
+    return PYGLIB_PyUnicode_FromFormat ("<%s object (%s) at 0x%p>",
+                                        Py_TYPE( (PyObject *) self)->tp_name, 
+                                        g_base_info_get_name (self->info), 
+                                        (void *) self);
 }
 
 static PyMethodDef _PyGIBaseInfo_methods[];
 
-PyTypeObject PyGIBaseInfo_Type = {
-    PyObject_HEAD_INIT (NULL)
-    0,
-    "gi.BaseInfo",                             /* tp_name */
-    sizeof (PyGIBaseInfo),                     /* tp_basicsize */
-    0,                                         /* tp_itemsize */
-    (destructor) _base_info_dealloc,       /* tp_dealloc */
-    (printfunc) NULL,                          /* tp_print */
-    (getattrfunc) NULL,                        /* tp_getattr */
-    (setattrfunc) NULL,                        /* tp_setattr */
-    (cmpfunc) NULL,                            /* tp_compare */
-    (reprfunc) _base_info_repr,            /* tp_repr */
-    NULL,                                      /* tp_as_number */
-    NULL,                                      /* tp_as_sequence */
-    NULL,                                      /* tp_as_mapping */
-    (hashfunc) NULL,                           /* tp_hash */
-    (ternaryfunc) NULL,                        /* tp_call */
-    (reprfunc) NULL,                           /* tp_str */
-    (getattrofunc) NULL,                       /* tp_getattro */
-    (setattrofunc) NULL,                       /* tp_setattro */
-    NULL,                                      /* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
-    Py_TPFLAGS_HAVE_GC,                    /* tp_flags */
-    NULL,                                      /* tp_doc */
-    (traverseproc) _base_info_traverse,    /* tp_traverse */
-    (inquiry) NULL,                            /* tp_clear */
-    (richcmpfunc) NULL,                        /* tp_richcompare */
-    offsetof (PyGIBaseInfo, inst_weakreflist), /* tp_weaklistoffset */
-    (getiterfunc) NULL,                        /* tp_iter */
-    (iternextfunc) NULL,                       /* tp_iternext */
-    _PyGIBaseInfo_methods,                     /* tp_methods */
-};
+PYGLIB_DEFINE_TYPE("gi.BaseInfo", PyGIBaseInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_base_info_get_name (PyGIBaseInfo *self)
 {
-    return PyString_FromString (g_base_info_get_name (self->info));
+    return PYGLIB_PyUnicode_FromString (g_base_info_get_name (self->info));
 }
 
 static PyObject *
 _wrap_g_base_info_get_namespace (PyGIBaseInfo *self)
 {
-    return PyString_FromString (g_base_info_get_namespace (self->info));
+    return PYGLIB_PyUnicode_FromString (g_base_info_get_namespace (self->info));
 }
 
 static PyObject *
@@ -255,7 +189,7 @@ _pygi_object_get_gi_info (PyObject     *object,
     }
     if (!PyObject_TypeCheck (py_info, type)) {
         PyErr_Format (PyExc_TypeError, "attribute '__info__' must be %s, not %s",
-                      type->tp_name, py_info->ob_type->tp_name);
+                      type->tp_name, Py_TYPE(&py_info)->tp_name);
         goto out;
     }
 
@@ -270,7 +204,7 @@ out:
 
 
 /* CallableInfo */
-_PyGI_DEFINE_INFO_TYPE ("CallableInfo", GICallableInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.CallableInfo", PyGICallableInfo_Type, PyGIBaseInfo);
 
 static PyMethodDef _PyGICallableInfo_methods[] = {
     { NULL, NULL, 0 }
@@ -278,7 +212,7 @@ static PyMethodDef _PyGICallableInfo_methods[] = {
 
 
 /* FunctionInfo */
-_PyGI_DEFINE_INFO_TYPE ("FunctionInfo", GIFunctionInfo, PyGICallableInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.FunctionInfo", PyGIFunctionInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_function_info_is_constructor (PyGIBaseInfo *self)
@@ -467,7 +401,7 @@ static PyMethodDef _PyGIFunctionInfo_methods[] = {
 
 
 /* RegisteredTypeInfo */
-_PyGI_DEFINE_INFO_TYPE ("RegisteredTypeInfo", GIRegisteredTypeInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.RegisteredTypeInfo", PyGIRegisteredTypeInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_registered_type_info_get_g_type (PyGIBaseInfo *self)
@@ -486,7 +420,7 @@ static PyMethodDef _PyGIRegisteredTypeInfo_methods[] = {
 
 
 /* GIStructInfo */
-_PyGI_DEFINE_INFO_TYPE ("StructInfo", GIStructInfo, PyGIRegisteredTypeInfo_Type);
+PYGLIB_DEFINE_TYPE ("StructInfo", PyGIStructInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _get_fields (PyGIBaseInfo *self, GIInfoType info_type)
@@ -832,7 +766,7 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info)
 
 
 /* EnumInfo */
-_PyGI_DEFINE_INFO_TYPE ("EnumInfo", GIEnumInfo, PyGIRegisteredTypeInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.EnumInfo", PyGIEnumInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_enum_info_get_values (PyGIBaseInfo *self)
@@ -877,7 +811,7 @@ static PyMethodDef _PyGIEnumInfo_methods[] = {
 
 
 /* ObjectInfo */
-_PyGI_DEFINE_INFO_TYPE ("ObjectInfo", GIObjectInfo, PyGIRegisteredTypeInfo_Type);
+PYGLIB_DEFINE_TYPE ("ObjectInfo", PyGIObjectInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_object_info_get_parent (PyGIBaseInfo *self)
@@ -970,7 +904,7 @@ static PyMethodDef _PyGIObjectInfo_methods[] = {
 
 
 /* GIInterfaceInfo */
-_PyGI_DEFINE_INFO_TYPE ("InterfaceInfo", GIInterfaceInfo, PyGIRegisteredTypeInfo_Type);
+PYGLIB_DEFINE_TYPE ("InterfaceInfo", PyGIInterfaceInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_interface_info_get_methods (PyGIBaseInfo *self)
@@ -1028,13 +962,13 @@ static PyMethodDef _PyGIInterfaceInfo_methods[] = {
 };
 
 /* GIConstantInfo */
-_PyGI_DEFINE_INFO_TYPE ("ConstantInfo", GIConstantInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.ConstantInfo", PyGIConstantInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_constant_info_get_value (PyGIBaseInfo *self)
 {
     GITypeInfo *type_info;
-    GArgument value;
+    GIArgument value;
     PyObject *py_value;
 
     if (g_constant_info_get_value ( (GIConstantInfo *) self->info, &value) < 0) {
@@ -1057,7 +991,7 @@ static PyMethodDef _PyGIConstantInfo_methods[] = {
 };
 
 /* GIValueInfo */
-_PyGI_DEFINE_INFO_TYPE ("ValueInfo", GIValueInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.ValueInfo", PyGIValueInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_value_info_get_value (PyGIBaseInfo *self)
@@ -1066,7 +1000,7 @@ _wrap_g_value_info_get_value (PyGIBaseInfo *self)
 
     value = g_value_info_get_value ( (GIValueInfo *) self->info);
 
-    return PyInt_FromLong (value);
+    return PYGLIB_PyLong_FromLong (value);
 }
 
 
@@ -1077,7 +1011,7 @@ static PyMethodDef _PyGIValueInfo_methods[] = {
 
 
 /* GIFieldInfo */
-_PyGI_DEFINE_INFO_TYPE ("FieldInfo", GIFieldInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.FieldInfo", PyGIFieldInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_field_info_get_value (PyGIBaseInfo *self,
@@ -1088,10 +1022,10 @@ _wrap_g_field_info_get_value (PyGIBaseInfo *self,
     GIInfoType container_info_type;
     gpointer pointer;
     GITypeInfo *field_type_info;
-    GArgument value;
+    GIArgument value;
     PyObject *py_value = NULL;
 
-    memset(&value, 0, sizeof(GArgument));
+    memset(&value, 0, sizeof(GIArgument));
 
     if (!PyArg_ParseTuple (args, "O:FieldInfo.get_value", &instance)) {
         return NULL;
@@ -1197,7 +1131,7 @@ _wrap_g_field_info_set_value (PyGIBaseInfo *self,
     GIInfoType container_info_type;
     gpointer pointer;
     GITypeInfo *field_type_info;
-    GArgument value;
+    GIArgument value;
     PyObject *retval = NULL;
 
     if (!PyArg_ParseTuple (args, "OO:FieldInfo.set_value", &instance, &py_value)) {
@@ -1333,14 +1267,14 @@ static PyMethodDef _PyGIFieldInfo_methods[] = {
 
 
 /* GIUnresolvedInfo */
-_PyGI_DEFINE_INFO_TYPE ("UnresolvedInfo", GIUnresolvedInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.UnresolvedInfo", PyGIUnresolvedInfo_Type, PyGIBaseInfo);
 
 static PyMethodDef _PyGIUnresolvedInfo_methods[] = {
     { NULL, NULL, 0 }
 };
 
 /* GIVFuncInfo */
-_PyGI_DEFINE_INFO_TYPE ("VFuncInfo", GIVFuncInfo, PyGIBaseInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.VFuncInfo", PyGIVFuncInfo_Type, PyGIBaseInfo);
 
 static PyMethodDef _PyGIVFuncInfo_methods[] = {
     { NULL, NULL, 0 }
@@ -1348,7 +1282,7 @@ static PyMethodDef _PyGIVFuncInfo_methods[] = {
 
 
 /* GIUnionInfo */
-_PyGI_DEFINE_INFO_TYPE ("UnionInfo", GIUnionInfo, PyGIRegisteredTypeInfo_Type);
+PYGLIB_DEFINE_TYPE ("gi.UnionInfo", PyGIUnionInfo_Type, PyGIBaseInfo);
 
 static PyObject *
 _wrap_g_union_info_get_fields (PyGIBaseInfo *self)
@@ -1458,27 +1392,61 @@ _pygi_g_base_info_get_fullname (GIBaseInfo *info)
 void
 _pygi_info_register_types (PyObject *m)
 {
-#define _PyGI_REGISTER_TYPE(m, type, name) \
-    type.ob_type = &PyType_Type; \
+#define _PyGI_REGISTER_TYPE(m, type, cname, base) \
+    Py_TYPE(&type) = &PyType_Type; \
+    type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE); \
+    type.tp_weaklistoffset = offsetof(PyGIBaseInfo, inst_weakreflist); \
+    type.tp_methods = _PyGI##cname##_methods; \
+    type.tp_base = &base; \
     if (PyType_Ready(&type)) \
         return; \
-    if (PyModule_AddObject(m, name, (PyObject *)&type)) \
+    if (PyModule_AddObject(m, #cname, (PyObject *)&type)) \
         return
 
-    _PyGI_REGISTER_TYPE (m, PyGIBaseInfo_Type, "BaseInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIUnresolvedInfo_Type, "UnresolvedInfo");
-    _PyGI_REGISTER_TYPE (m, PyGICallableInfo_Type, "CallableInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIFunctionInfo_Type, "FunctionInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIRegisteredTypeInfo_Type, "RegisteredTypeInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIStructInfo_Type, "StructInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIEnumInfo_Type, "EnumInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIObjectInfo_Type, "ObjectInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIInterfaceInfo_Type, "InterfaceInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIConstantInfo_Type, "ConstantInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIValueInfo_Type, "ValueInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIFieldInfo_Type, "FieldInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIVFuncInfo_Type, "VFuncInfo");
-    _PyGI_REGISTER_TYPE (m, PyGIUnionInfo_Type, "UnionInfo");
+    Py_TYPE(&PyGIBaseInfo_Type) = &PyType_Type;
+
+    PyGIBaseInfo_Type.tp_dealloc = (destructor) _base_info_dealloc;
+    PyGIBaseInfo_Type.tp_repr = (reprfunc) _base_info_repr;
+    PyGIBaseInfo_Type.tp_flags = (Py_TPFLAGS_DEFAULT | 
+                                   Py_TPFLAGS_BASETYPE  | 
+                                   Py_TPFLAGS_HAVE_GC);
+    PyGIBaseInfo_Type.tp_traverse = (traverseproc) _base_info_traverse;
+    PyGIBaseInfo_Type.tp_weaklistoffset = offsetof(PyGIBaseInfo, inst_weakreflist);
+    PyGIBaseInfo_Type.tp_methods = _PyGIBaseInfo_methods; 
+
+    if (PyType_Ready(&PyGIBaseInfo_Type))
+        return;   
+    if (PyModule_AddObject(m, "BaseInfo", (PyObject *)&PyGIBaseInfo_Type))
+        return;
+
+    _PyGI_REGISTER_TYPE (m, PyGIUnresolvedInfo_Type, UnresolvedInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGICallableInfo_Type, CallableInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIFunctionInfo_Type, FunctionInfo, 
+                         PyGICallableInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIRegisteredTypeInfo_Type, RegisteredTypeInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIStructInfo_Type, StructInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIEnumInfo_Type, EnumInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIObjectInfo_Type, ObjectInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIInterfaceInfo_Type, InterfaceInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIConstantInfo_Type, ConstantInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIValueInfo_Type, ValueInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIFieldInfo_Type, FieldInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIVFuncInfo_Type, VFuncInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIUnionInfo_Type, UnionInfo,
+                         PyGIRegisteredTypeInfo_Type);
+
 
 #undef _PyGI_REGISTER_TYPE
 }
index a470003579bbde3801794e44d77d307dca3ce8e4..64b3f31a5159650e777d1ff3ef9ebf67a03c7494 100644 (file)
@@ -49,14 +49,14 @@ struct invocation_state
     GITypeInfo *return_type_info;
     GITypeTag return_type_tag;
 
-    GArgument **args;
+    GIArgument **args;
     gboolean *args_is_auxiliary;
 
-    GArgument *in_args;
-    GArgument *out_args;
-    GArgument *out_values;
-    GArgument *backup_args;
-    GArgument return_arg;
+    GIArgument *in_args;
+    GIArgument *out_args;
+    GIArgument *out_values;
+    GIArgument *backup_args;
+    GIArgument return_arg;
 
     PyObject *return_value;
 };
@@ -154,18 +154,14 @@ _prepare_invocation_state (struct invocation_state *state,
 
         if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
             state->n_in_args += 1;
-            if (transfer == GI_TRANSFER_CONTAINER) {
-                state->n_backup_args += 1;
-            }
+        }
+        if (direction == GI_DIRECTION_INOUT) {
+            state->n_backup_args += 1;
         }
         if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
             state->n_out_args += 1;
         }
 
-        if (direction == GI_DIRECTION_INOUT && transfer == GI_TRANSFER_NOTHING) {
-            state->n_backup_args += 1;
-        }
-
         switch (arg_type_tag) {
             case GI_TYPE_TAG_ARRAY:
             {
@@ -173,13 +169,16 @@ _prepare_invocation_state (struct invocation_state *state,
 
                 length_arg_pos = g_type_info_get_array_length (state->arg_type_infos[i]);
 
-                if (state->is_method)
-                    length_arg_pos--; // length_arg_pos refers to C args
-
                 if (length_arg_pos < 0) {
                     break;
                 }
 
+                /* For array lengths, we're going to delete the length argument;
+                 * so remove the extra backup we just added above */
+                if (direction == GI_DIRECTION_INOUT) {
+                    state->n_backup_args -= 1;
+                }
+
                 g_assert (length_arg_pos < state->n_args);
                 state->args_is_auxiliary[length_arg_pos] = TRUE;
 
@@ -208,9 +207,6 @@ _prepare_invocation_state (struct invocation_state *state,
         gint length_arg_pos;
         length_arg_pos = g_type_info_get_array_length (state->return_type_info);
 
-        if (state->is_method)
-            length_arg_pos--; // length_arg_pos refers to C args
-
         if (length_arg_pos >= 0) {
             g_assert (length_arg_pos < state->n_args);
             state->args_is_auxiliary[length_arg_pos] = TRUE;
@@ -285,10 +281,10 @@ _prepare_invocation_state (struct invocation_state *state,
     }
 
     state->args = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
-    state->in_args = g_slice_alloc0 (sizeof (GArgument) * state->n_in_args);
-    state->out_args = g_slice_alloc0 (sizeof (GArgument) * state->n_out_args);
-    state->out_values = g_slice_alloc0 (sizeof (GArgument) * state->n_out_args);
-    state->backup_args = g_slice_alloc0 (sizeof (GArgument) * state->n_backup_args);
+    state->in_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_in_args);
+    state->out_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_out_args);
+    state->out_values = g_slice_alloc0 (sizeof (GIArgument) * state->n_out_args);
+    state->backup_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_backup_args);
 
     /* Bind args so we can use an unique index. */
     {
@@ -344,19 +340,15 @@ _prepare_invocation_state (struct invocation_state *state,
                     }
 
                     if (is_caller_allocates) {
-                        gsize size;
-
                         /* if caller allocates only use one level of indirection */
                         state->out_args[out_args_pos].v_pointer = NULL;
                         state->args[i] = &state->out_args[out_args_pos];
-
-                        /* FIXME: Remove when bgo#622711 is fixed */
-                        if (g_registered_type_info_get_g_type (info) == G_TYPE_VALUE)
-                            size = sizeof (GValue);
-                        else
-                            size = g_struct_info_get_size ( (GIStructInfo *) info);
-
-                        state->args[i]->v_pointer = g_malloc0 (size);
+                        if (g_type_is_a (g_registered_type_info_get_g_type (info), G_TYPE_BOXED))
+                            state->args[i]->v_pointer = _pygi_boxed_alloc (info, NULL);
+                        else {
+                            gssize size = g_struct_info_get_size ( (GIStructInfo *) info);
+                            state->args[i]->v_pointer = g_malloc0 (size);
+                        }
                     } else {
                         state->out_args[out_args_pos].v_pointer = &state->out_values[out_args_pos];
                         state->out_values[out_args_pos].v_pointer = NULL;
@@ -387,6 +379,7 @@ _prepare_invocation_state (struct invocation_state *state,
             GIBaseInfo *container_info;
             GIInfoType container_info_type;
             PyObject *py_arg;
+            gint check_val;
 
             container_info = g_base_info_get_container (function_info);
             container_info_type = g_base_info_get_type (container_info);
@@ -394,6 +387,19 @@ _prepare_invocation_state (struct invocation_state *state,
             g_assert (py_args_pos < state->n_py_args);
             py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
 
+            /* In python 2 python takes care of checking the type
+             * of the self instance.  In python 3 it does not
+             * so we have to check it here
+             */
+            check_val = _pygi_g_type_interface_check_object(container_info,
+                                                            py_arg);
+            if (check_val < 0) {
+                return FALSE;
+            } else if (!check_val) {
+                _PyGI_ERROR_PREFIX ("instance: ");
+                return FALSE;
+            }
+
             switch (container_info_type) {
                 case GI_INFO_TYPE_UNION:
                 case GI_INFO_TYPE_STRUCT:
@@ -487,60 +493,10 @@ _prepare_invocation_state (struct invocation_state *state,
                     return FALSE;
                 }
 
-                if (direction == GI_DIRECTION_INOUT && transfer == GI_TRANSFER_NOTHING) {
+                if (direction == GI_DIRECTION_INOUT) {
                     /* We need to keep a copy of the argument to be able to release it later. */
                     g_assert (backup_args_pos < state->n_backup_args);
                     state->backup_args[backup_args_pos] = *state->args[i];
-                    backup_args_pos += 1;
-                } else if (transfer == GI_TRANSFER_CONTAINER) {
-                    /* We need to keep a copy of the items to be able to release them later. */
-                    switch (arg_type_tag) {
-                        case GI_TYPE_TAG_ARRAY:
-                        {
-                            GArray *array;
-                            gsize item_size;
-                            GArray *new_array;
-
-                            array = state->args[i]->v_pointer;
-
-                            item_size = g_array_get_element_size (array);
-
-                            new_array = g_array_sized_new (FALSE, FALSE, item_size, array->len);
-                            g_array_append_vals (new_array, array->data, array->len);
-
-                            g_assert (backup_args_pos < state->n_backup_args);
-                            state->backup_args[backup_args_pos].v_pointer = new_array;
-
-                            break;
-                        }
-                        case GI_TYPE_TAG_GLIST:
-                            g_assert (backup_args_pos < state->n_backup_args);
-                            state->backup_args[backup_args_pos].v_pointer = g_list_copy (state->args[i]->v_pointer);
-                            break;
-                        case GI_TYPE_TAG_GSLIST:
-                            g_assert (backup_args_pos < state->n_backup_args);
-                            state->backup_args[backup_args_pos].v_pointer = g_slist_copy (state->args[i]->v_pointer);
-                            break;
-                        case GI_TYPE_TAG_GHASH:
-                        {
-                            GHashTable *hash_table;
-                            GList *keys;
-                            GList *values;
-
-                            hash_table = state->args[i]->v_pointer;
-
-                            keys = g_hash_table_get_keys (hash_table);
-                            values = g_hash_table_get_values (hash_table);
-
-                            g_assert (backup_args_pos < state->n_backup_args);
-                            state->backup_args[backup_args_pos].v_pointer = g_list_concat (keys, values);
-
-                            break;
-                        }
-                        default:
-                            g_warn_if_reached();
-                    }
-
                     backup_args_pos += 1;
                 }
 
@@ -551,8 +507,6 @@ _prepare_invocation_state (struct invocation_state *state,
                     array = state->args[i]->v_pointer;
 
                     length_arg_pos = g_type_info_get_array_length (state->arg_type_infos[i]);
-                    if (state->is_method)
-                        length_arg_pos--; // length_arg_pos refers to C args
                     if (length_arg_pos >= 0) {
                         int len = 0;
                         /* Set the auxiliary argument holding the length. */
@@ -639,6 +593,11 @@ _process_invocation_state (struct invocation_state *state,
         GIInfoType info_type;
         GITransfer transfer;
 
+        if (state->return_arg.v_pointer == NULL) {
+            PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
+            return FALSE;
+        }
+
         g_assert (state->n_py_args > 0);
         py_type = (PyTypeObject *) PyTuple_GET_ITEM (py_args, 0);
 
@@ -651,10 +610,6 @@ _process_invocation_state (struct invocation_state *state,
 
         switch (info_type) {
             case GI_INFO_TYPE_UNION:
-                /* TODO */
-                PyErr_SetString (PyExc_NotImplementedError, "creating unions is not supported yet");
-                g_base_info_unref (info);
-                return FALSE;
             case GI_INFO_TYPE_STRUCT:
             {
                 GType type;
@@ -662,24 +617,22 @@ _process_invocation_state (struct invocation_state *state,
                 type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
 
                 if (g_type_is_a (type, G_TYPE_BOXED)) {
-                    if (state->return_arg.v_pointer == NULL) {
-                        PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
-                        break;
-                    }
                     g_warn_if_fail (transfer == GI_TRANSFER_EVERYTHING);
                     state->return_value = _pygi_boxed_new (py_type, state->return_arg.v_pointer, transfer == GI_TRANSFER_EVERYTHING);
+                } else if (type == G_TYPE_NONE && g_struct_info_is_foreign (info)) {
+                    state->return_value =
+                        pygi_struct_foreign_convert_from_g_argument (
+                            state->return_type_info, state->return_arg.v_pointer);
                 } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
-                    if (state->return_arg.v_pointer == NULL) {
-                        PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
-                        break;
-                    }
-
                     if (transfer != GI_TRANSFER_NOTHING)
-                        g_warning ("Transfer mode should be set to None for "
+                        g_warning ("Return argument in %s returns a struct "
+                                   "with a transfer mode of \"full\" "
+                                   "Transfer mode should be set to None for "
                                    "struct types as there is no way to free "
                                    "them safely.  Ignoring transfer mode "
                                    "to prevent a potential invalid free. "
-                                   "This may cause a leak in your application.");
+                                   "This may cause a leak in your application.",
+                                   g_base_info_get_name ( (GIBaseInfo *) function_info) );
 
                     state->return_value = _pygi_struct_new (py_type, state->return_arg.v_pointer, FALSE);
                 } else {
@@ -740,10 +693,8 @@ _process_invocation_state (struct invocation_state *state,
 
     /* Convert output arguments and release arguments. */
     {
-        gsize backup_args_pos;
         gsize return_values_pos;
 
-        backup_args_pos = 0;
         return_values_pos = 0;
 
         if (state->n_return_values > 1) {
@@ -795,6 +746,36 @@ _process_invocation_state (struct invocation_state *state,
                 /* Convert the argument. */
                 PyObject *obj;
 
+                /* If we created it, deallocate when it goes out of scope
+                 * otherwise it is unsafe to deallocate random structures
+                 * we are given
+                 */
+                if (type_tag == GI_TYPE_TAG_INTERFACE) {
+                    GIBaseInfo *info;
+                    GIInfoType info_type;
+
+                    info = g_type_info_get_interface (state->arg_type_infos[i]);
+                    g_assert (info != NULL);
+                    info_type = g_base_info_get_type (info);
+
+                    if ( (info_type == GI_INFO_TYPE_STRUCT) &&
+                             !g_struct_info_is_foreign((GIStructInfo *) info) ) {
+                        if (g_arg_info_is_caller_allocates (state->arg_infos[i])) {
+                            transfer = GI_TRANSFER_EVERYTHING;
+                        } else if (transfer == GI_TRANSFER_EVERYTHING) {
+                            transfer = GI_TRANSFER_NOTHING;
+                            g_warning ("Out argument %ld in %s returns a struct "
+                                       "with a transfer mode of \"full\". "
+                                       "Transfer mode should be set to \"none\" for "
+                                       "struct type returns as there is no way to free "
+                                       "them safely.  Ignoring transfer mode "
+                                       "to prevent a potential invalid free. "
+                                       "This may cause a leak in your application.",
+                                       i, g_base_info_get_name ( (GIBaseInfo *) function_info) );
+                        }
+                    }
+                }
+
                 obj = _pygi_argument_to_object (state->args[i], state->arg_type_infos[i], transfer);
                 if (obj == NULL) {
                     /* TODO: release arguments. */
@@ -814,83 +795,9 @@ _process_invocation_state (struct invocation_state *state,
                 return_values_pos += 1;
             }
 
-            /* Release the argument. */
-
-            if ( (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
-                    && transfer == GI_TRANSFER_CONTAINER) {
-                /* Release the items we kept in another container. */
-                switch (type_tag) {
-                    case GI_TYPE_TAG_ARRAY:
-                    case GI_TYPE_TAG_GLIST:
-                    case GI_TYPE_TAG_GSLIST:
-                        g_assert (backup_args_pos < state->n_backup_args);
-                        _pygi_argument_release (&state->backup_args[backup_args_pos], state->arg_type_infos[i],
-                                                transfer, GI_DIRECTION_IN);
-                        break;
-                    case GI_TYPE_TAG_GHASH:
-                    {
-                        GITypeInfo *key_type_info;
-                        GITypeInfo *value_type_info;
-                        GList *item;
-                        gsize length;
-                        gsize j;
-
-                        key_type_info = g_type_info_get_param_type (state->arg_type_infos[i], 0);
-                        value_type_info = g_type_info_get_param_type (state->arg_type_infos[i], 1);
-
-                        g_assert (backup_args_pos < state->n_backup_args);
-                        item = state->backup_args[backup_args_pos].v_pointer;
-
-                        length = g_list_length (item) / 2;
-
-                        for (j = 0; j < length; j++, item = g_list_next (item)) {
-                            _pygi_argument_release ( (GArgument *) &item->data, key_type_info,
-                                                     GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
-                        }
-
-                        for (j = 0; j < length; j++, item = g_list_next (item)) {
-                            _pygi_argument_release ( (GArgument *) &item->data, value_type_info,
-                                                     GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
-                        }
-
-                        g_list_free (state->backup_args[backup_args_pos].v_pointer);
-
-                        break;
-                    }
-                    default:
-                        g_warn_if_reached();
-                }
-
-                if (direction == GI_DIRECTION_INOUT) {
-                    /* Release the output argument. */
-                    _pygi_argument_release (state->args[i], state->arg_type_infos[i], GI_TRANSFER_CONTAINER,
-                                            GI_DIRECTION_OUT);
-                }
-
-                backup_args_pos += 1;
-            } else if (direction == GI_DIRECTION_INOUT) {
-                if (transfer == GI_TRANSFER_NOTHING) {
-                    g_assert (backup_args_pos < state->n_backup_args);
-                    _pygi_argument_release (&state->backup_args[backup_args_pos], state->arg_type_infos[i],
-                                            GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
-                    backup_args_pos += 1;
-                }
-
-                _pygi_argument_release (state->args[i], state->arg_type_infos[i], transfer,
-                                        GI_DIRECTION_OUT);
-            } else {
-                _pygi_argument_release (state->args[i], state->arg_type_infos[i], transfer, direction);
-            }
-
-            if (type_tag == GI_TYPE_TAG_ARRAY
-                    && (direction != GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)) {
-                /* We created a #GArray and it has not been released above, so free it. */
-                state->args[i]->v_pointer = g_array_free (state->args[i]->v_pointer, FALSE);
-            }
         }
 
         g_assert (state->n_return_values <= 1 || return_values_pos == state->n_return_values);
-        g_assert (backup_args_pos == state->n_backup_args);
     }
 
     return TRUE;
@@ -900,6 +807,7 @@ static void
 _free_invocation_state (struct invocation_state *state)
 {
     gsize i;
+    gsize backup_args_pos;
 
     if (state->return_type_info != NULL) {
         g_base_info_unref ( (GIBaseInfo *) state->return_type_info);
@@ -910,29 +818,42 @@ _free_invocation_state (struct invocation_state *state)
             _pygi_invoke_closure_free (state->closure);
     }
 
+    /* release all arguments. */
+    backup_args_pos = 0;
     for (i = 0; i < state->n_args; i++) {
 
-        /* check for caller-allocated values we need to free */
-        if (g_arg_info_is_caller_allocates (state->arg_infos[i])) {
-            GIBaseInfo *info;
-            GIInfoType info_type;
+        if (state->args_is_auxiliary[i]) {
+            /* Auxiliary arguments are not released. */
+            continue;
+        }
 
-            info = g_type_info_get_interface (state->arg_type_infos[i]);
-            g_assert (info != NULL);
-            info_type = g_base_info_get_type (info);
+        if (state->args != NULL
+            && state->args[i] != NULL
+            && state->arg_infos[i] != NULL
+            && state->arg_type_infos[i] != NULL) {
+            GIDirection direction;
+            GITypeTag type_tag;
+            GITransfer transfer;
 
-            /* caller-allocates applies only to structs right now
-             * the GI scanner is overzealous when marking parameters
-             * as caller-allocates, so we only free if this was a struct
-             */
-            if (info_type == GI_INFO_TYPE_STRUCT) {
-                /* special case GValues so we make sure to unset them */
-                if (g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info) == G_TYPE_VALUE) {
-                    g_value_unset ( (GValue *) state->args[i]);
-                }
+            direction = g_arg_info_get_direction (state->arg_infos[i]);
+            transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
+
+            type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+            /* Release the argument. */
+            if (direction == GI_DIRECTION_INOUT) {
+                _pygi_argument_release (&state->backup_args[backup_args_pos], state->arg_type_infos[i],
+                                        transfer, GI_DIRECTION_IN);
+                backup_args_pos += 1;
+            }
+           _pygi_argument_release (state->args[i], state->arg_type_infos[i], transfer, direction);
 
-                g_free (state->args[i]);
+            if (type_tag == GI_TYPE_TAG_ARRAY
+                    && (direction != GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)) {
+                /* We created a #GArray and it has not been released above, so free it. */
+                state->args[i]->v_pointer = g_array_free (state->args[i]->v_pointer, FALSE);
             }
+
         }
 
         if (state->arg_type_infos[i] != NULL)
@@ -940,37 +861,30 @@ _free_invocation_state (struct invocation_state *state)
         if (state->arg_infos[i] != NULL)
             g_base_info_unref ( (GIBaseInfo *) state->arg_infos[i]);
     }
+    g_assert (backup_args_pos == state->n_backup_args);
 
-    if (state->arg_infos != NULL) {
-        g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_infos);
-    }
-
-    if (state->arg_type_infos != NULL) {
-        g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_type_infos);
-    }
+    g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_infos);
+    g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_type_infos);
+    g_slice_free1 (sizeof (gboolean) * state->n_args, state->args_is_auxiliary);
 
     if (state->args != NULL) {
         g_slice_free1 (sizeof (gpointer) * state->n_args, state->args);
     }
 
-    if (state->args_is_auxiliary != NULL) {
-        g_slice_free1 (sizeof (gboolean) * state->n_args, state->args_is_auxiliary);
-    }
-
     if (state->in_args != NULL) {
-        g_slice_free1 (sizeof (GArgument) * state->n_in_args, state->in_args);
+        g_slice_free1 (sizeof (GIArgument) * state->n_in_args, state->in_args);
     }
 
     if (state->out_args != NULL) {
-        g_slice_free1 (sizeof (GArgument) * state->n_out_args, state->out_args);
+        g_slice_free1 (sizeof (GIArgument) * state->n_out_args, state->out_args);
     }
 
     if (state->out_values != NULL) {
-        g_slice_free1 (sizeof (GArgument) * state->n_out_args, state->out_values);
+        g_slice_free1 (sizeof (GIArgument) * state->n_out_args, state->out_values);
     }
 
     if (state->backup_args != NULL) {
-        g_slice_free1 (sizeof (GArgument) * state->n_backup_args, state->backup_args);
+        g_slice_free1 (sizeof (GIArgument) * state->n_backup_args, state->backup_args);
     }
 
     if (PyErr_Occurred()) {
@@ -1001,6 +915,7 @@ _wrap_g_function_info_invoke (PyGIBaseInfo *self, PyObject *py_args)
         return NULL;
     }
 
+    _free_invocation_state (&state);
     return state.return_value;
 }
 
index 0ff5df7efeec4e2692df88d1e8169cabe4467337..3a14bc31398c0cd431851fc79a5ebdc85038639b 100644 (file)
 #include "pygi-closure.h"
 #include "pygi-callbacks.h"
 #include "pygi-invoke.h"
+#include "pygi-property.h"
 
 G_BEGIN_DECLS
+#if PY_VERSION_HEX >= 0x03000000
+
+#define _PyGI_ERROR_PREFIX(format, ...) G_STMT_START { \
+    PyObject *py_error_prefix; \
+    py_error_prefix = PyUnicode_FromFormat(format, ## __VA_ARGS__); \
+    if (py_error_prefix != NULL) { \
+        PyObject *py_error_type, *py_error_value, *py_error_traceback; \
+        PyErr_Fetch(&py_error_type, &py_error_value, &py_error_traceback); \
+        if (PyUnicode_Check(py_error_value)) { \
+            PyObject *new; \
+            new = PyUnicode_Concat(py_error_prefix, py_error_value); \
+            Py_DECREF(py_error_value); \
+            if (new != NULL) { \
+                py_error_value = new; \
+            } \
+        } \
+        PyErr_Restore(py_error_type, py_error_value, py_error_traceback); \
+    } \
+} G_STMT_END
+
+#else
 
 #define _PyGI_ERROR_PREFIX(format, ...) G_STMT_START { \
     PyObject *py_error_prefix; \
@@ -47,6 +69,8 @@ G_BEGIN_DECLS
     } \
 } G_STMT_END
 
+#endif
+
 /* Redefine g_array_index because we want it to return the i-th element, casted
  * to the type t, of the array a, and not the i-th element of the array a
  * casted to the type t. */
diff --git a/gi/pygi-property.c b/gi/pygi-property.c
new file mode 100644 (file)
index 0000000..7b6a508
--- /dev/null
@@ -0,0 +1,345 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "pygi-private.h"
+
+#include <girepository.h>
+
+/* Copied from glib */
+static void
+canonicalize_key (gchar *key)
+{
+    gchar *p;
+
+    for (p = key; *p != 0; p++)
+    {
+        gchar c = *p;
+
+        if (c != '-' &&
+            (c < '0' || c > '9') &&
+            (c < 'A' || c > 'Z') &&
+            (c < 'a' || c > 'z'))
+                *p = '-';
+    }
+}
+
+static GIPropertyInfo *
+_pygi_lookup_property_from_g_type (GType g_type, const gchar *attr_name)
+{
+    GIRepository *repository;
+    GIBaseInfo *info;
+    gssize n_infos;
+    gssize i;
+    GType parent;
+
+    repository = g_irepository_get_default();
+    info = g_irepository_find_by_gtype (repository, g_type);
+    if (info == NULL) {
+        return NULL;
+    }
+
+    n_infos = g_object_info_get_n_properties ( (GIObjectInfo *) info);
+    for (i = 0; i < n_infos; i++) {
+        GIPropertyInfo *property_info;
+
+        property_info = g_object_info_get_property ( (GIObjectInfo *) info, i);
+        g_assert (info != NULL);
+
+        if (strcmp (attr_name, g_base_info_get_name (property_info)) == 0) {
+            g_base_info_unref (info);
+            return property_info;
+        }
+
+        g_base_info_unref (property_info);
+    }
+
+    g_base_info_unref (info);
+
+    parent = g_type_parent (g_type);
+    if (parent > 0)
+        return _pygi_lookup_property_from_g_type (parent, attr_name);
+
+    return NULL;
+}
+
+PyObject *
+pygi_get_property_value_real (PyGObject *instance,
+                              const gchar *attr_name)
+{
+    GType g_type;
+    GIPropertyInfo *property_info = NULL;
+    char *property_name = g_strdup (attr_name);
+    GParamSpec *pspec = NULL;
+    GValue value = { 0, };
+    GIArgument arg = { 0, };
+    PyObject *py_value = NULL;
+    GITypeInfo *type_info = NULL;
+    GITransfer transfer;
+
+    canonicalize_key (property_name);
+
+    g_type = pyg_type_from_object ((PyObject *)instance);
+    property_info = _pygi_lookup_property_from_g_type (g_type, property_name);
+
+    if (property_info == NULL)
+        goto out;
+
+    pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (instance->obj),
+                                          attr_name);
+    if (pspec == NULL)
+        goto out;
+
+    g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+    g_object_get_property (instance->obj, attr_name, &value);
+
+    type_info = g_property_info_get_type (property_info);
+    transfer = g_property_info_get_ownership_transfer (property_info);
+
+    GITypeTag type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_BOOLEAN:
+            arg.v_boolean = g_value_get_boolean (&value);
+            break;
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_INT64:
+            arg.v_int = g_value_get_int (&value);
+            break;
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_UINT64:
+            arg.v_uint = g_value_get_uint (&value);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            arg.v_float = g_value_get_float (&value);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            arg.v_double = g_value_get_double (&value);
+            break;
+        case GI_TYPE_TAG_GTYPE:
+            arg.v_size = g_value_get_uint (&value);
+            break;
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+            arg.v_string = g_value_dup_string (&value);
+            break;
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+            GType type;
+
+            info = g_type_info_get_interface (type_info);
+            type = g_registered_type_info_get_g_type (info);
+            info_type = g_base_info_get_type (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_ENUM:
+                    arg.v_int32 = g_value_get_enum (&value);
+                    break;
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    arg.v_pointer = g_value_get_object (&value);
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+
+                    if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        arg.v_pointer = g_value_get_boxed (&value);
+                    } else if (g_type_is_a (type, G_TYPE_POINTER)) {
+                        arg.v_pointer = g_value_get_pointer (&value);
+                    } else {
+                        PyErr_Format (PyExc_NotImplementedError,
+                                      "Retrieving properties of type '%s' is not implemented",
+                                      g_type_name (type));
+                    }
+                    break;
+                default:
+                    PyErr_Format (PyExc_NotImplementedError,
+                                  "Retrieving properties of type '%s' is not implemented",
+                                  g_type_name (type));
+                    goto out;
+            }
+            break;
+        }
+        case GI_TYPE_TAG_GHASH:
+            arg.v_pointer = g_value_get_boxed (&value);
+            break;
+        case GI_TYPE_TAG_GLIST:
+            arg.v_pointer = g_value_get_pointer (&value);
+            break;
+        default:
+            PyErr_Format (PyExc_NotImplementedError,
+                          "Retrieving properties of type %s is not implemented",
+                          g_type_tag_to_string (g_type_info_get_tag (type_info)));
+            goto out;
+    }
+
+    py_value = _pygi_argument_to_object (&arg, type_info, transfer);
+
+out:
+    g_free (property_name);
+    if (property_info != NULL)
+        g_base_info_unref (property_info);
+    if (type_info != NULL)
+        g_base_info_unref (type_info);
+
+    return py_value;
+}
+
+gint
+pygi_set_property_value_real (PyGObject *instance,
+                              const gchar *attr_name,
+                              PyObject *py_value)
+{
+    GType g_type;
+    GIPropertyInfo *property_info = NULL;
+    char *property_name = g_strdup (attr_name);
+    GITypeInfo *type_info = NULL;
+    GITypeTag type_tag;
+    GITransfer transfer;
+    GValue value = { 0, };
+    GIArgument arg = { 0, };
+    GParamSpec *pspec = NULL;
+    gint ret_value = -1;
+
+    canonicalize_key (property_name);
+
+    g_type = pyg_type_from_object ((PyObject *)instance);
+    property_info = _pygi_lookup_property_from_g_type (g_type, property_name);
+
+    if (property_info == NULL)
+        goto out;
+
+    pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (instance->obj),
+                                          attr_name);
+    if (pspec == NULL)
+        goto out;
+
+    if (! (pspec->flags & G_PARAM_WRITABLE))
+        goto out;
+
+    type_info = g_property_info_get_type (property_info);
+    transfer = g_property_info_get_ownership_transfer (property_info);
+    arg = _pygi_argument_from_object (py_value, type_info, transfer);
+
+    g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+
+    // FIXME: Lots of types still unhandled
+    type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+            GType type;
+
+            info = g_type_info_get_interface (type_info);
+            type = g_registered_type_info_get_g_type (info);
+            info_type = g_base_info_get_type (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_ENUM:
+                    g_value_set_enum (&value, arg.v_int32);
+                    break;
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    g_value_set_object (&value, arg.v_pointer);
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+                    if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        g_value_set_boxed (&value, arg.v_pointer);
+                    } else {
+                        PyErr_Format (PyExc_NotImplementedError,
+                                      "Setting properties of type '%s' is not implemented",
+                                      g_type_name (type));
+                    }
+                    break;
+                default:
+                    PyErr_Format (PyExc_NotImplementedError,
+                                  "Setting properties of type '%s' is not implemented",
+                                  g_type_name (type));
+                    goto out;
+            }
+            break;
+        }
+        case GI_TYPE_TAG_BOOLEAN:
+            g_value_set_boolean (&value, arg.v_boolean);
+            break;
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_INT64:
+            g_value_set_int (&value, arg.v_int);
+            break;
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_UINT64:
+            g_value_set_uint (&value, arg.v_uint);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            g_value_set_float (&value, arg.v_float);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            g_value_set_double (&value, arg.v_double);
+            break;
+        case GI_TYPE_TAG_GTYPE:
+            g_value_set_uint (&value, arg.v_size);
+            break;
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+            g_value_set_string (&value, arg.v_string);
+            break;
+        case GI_TYPE_TAG_GHASH:
+            g_value_set_boxed (&value, arg.v_pointer);
+            break;
+        case GI_TYPE_TAG_GLIST:
+            g_value_set_pointer (&value, arg.v_pointer);
+            break;
+        default:
+            PyErr_Format (PyExc_NotImplementedError,
+                          "Setting properties of type %s is not implemented",
+                          g_type_tag_to_string (g_type_info_get_tag (type_info)));
+            goto out;
+    }
+
+    g_object_set_property (instance->obj, attr_name, &value);
+
+    ret_value = 0;
+
+out:
+    g_free (property_name);
+    if (property_info != NULL)
+        g_base_info_unref (property_info);
+    if (type_info != NULL)
+        g_base_info_unref (type_info);
+
+    return ret_value;
+}
+
diff --git a/gi/pygi-property.h b/gi/pygi-property.h
new file mode 100644 (file)
index 0000000..31d0e42
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __PYGI_PROPERTY_H__
+#define __PYGI_PROPERTY_H__
+
+#include <Python.h>
+#include <girepository.h>
+
+#include "pygi.h"
+
+PyObject *pygi_get_property_value_real (PyGObject *instance,
+                                        const gchar *attr_name);
+
+gint pygi_set_property_value_real (PyGObject *instance,
+                                   const gchar *attr_name,
+                                   PyObject *py_value);
+
+#endif /* __PYGI_PROPERTY_H__ */
index 783b4aa2eae1f0f2b6c7beafe6c3cb532b3e8ca3..9b22eaed894bf7081015e02210a563778c703dc8 100644 (file)
 
 #include "pygi-private.h"
 
+#include <pyglib-python-compat.h>
+
 PyObject *PyGIRepositoryError;
 
 static PyMethodDef _PyGIRepository_methods[];
 
-PyTypeObject PyGIRepository_Type = {
-    PyObject_HEAD_INIT (NULL)
-    0,
-    "gi.Repository",         /* tp_name */
-    sizeof (PyGIRepository), /* tp_basicsize */
-    0,                       /* tp_itemsize */
-    (destructor) NULL,       /* tp_dealloc */
-    (printfunc) NULL,        /* tp_print */
-    (getattrfunc) NULL,      /* tp_getattr */
-    (setattrfunc) NULL,      /* tp_setattr */
-    (cmpfunc) NULL,          /* tp_compare */
-    (reprfunc) NULL,         /* tp_repr */
-    NULL,                    /* tp_as_number */
-    NULL,                    /* tp_as_sequence */
-    NULL,                    /* tp_as_mapping */
-    (hashfunc) NULL,         /* tp_hash */
-    (ternaryfunc) NULL,      /* tp_call */
-    (reprfunc) NULL,         /* tp_str */
-    (getattrofunc) NULL,     /* tp_getattro */
-    (setattrofunc) NULL,     /* tp_setattro */
-    NULL,                    /* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT,      /* tp_flags */
-    NULL,                    /* tp_doc */
-    (traverseproc) NULL,     /* tp_traverse */
-    (inquiry) NULL,          /* tp_clear */
-    (richcmpfunc) NULL,      /* tp_richcompare */
-    0,                       /* tp_weaklistoffset */
-    (getiterfunc) NULL,      /* tp_iter */
-    (iternextfunc) NULL,     /* tp_iternext */
-    _PyGIRepository_methods, /* tp_methods */
-};
+PYGLIB_DEFINE_TYPE("gi.Repository", PyGIRepository_Type, PyGIRepository);
+
+static PyObject *
+_wrap_g_irepository_enumerate_versions (PyGIRepository *self,
+                                        PyObject       *args,
+                                        PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", NULL };
+    const char *namespace_;
+    GList *versions, *item;
+    PyObject *ret = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s:Repository.enumerate_versions",
+                                      kwlist, &namespace_)) {
+        return NULL;
+    }
+
+    versions = g_irepository_enumerate_versions (self->repository, namespace_);
+    ret = PyList_New(0);
+    for (item = versions; item; item = item->next) {
+        char *version = item->data;
+        PyObject *py_version = PYGLIB_PyUnicode_FromString (version);
+        PyList_Append(ret, py_version);
+        Py_DECREF(py_version);
+        g_free (version);
+    }
+    g_list_free(versions);
+
+    return ret;
+}
 
 static PyObject *
 _wrap_g_irepository_get_default (PyObject *self)
@@ -91,7 +92,7 @@ _wrap_g_irepository_require (PyGIRepository *self,
     GTypelib *typelib;
     GError *error;
 
-    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s|sO:Repository.require",
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s|zO:Repository.require",
                                       kwlist, &namespace_, &version, &lazy)) {
         return NULL;
     }
@@ -207,25 +208,55 @@ _wrap_g_irepository_get_typelib_path (PyGIRepository *self,
         return NULL;
     }
 
-    return PyString_FromString (typelib_path);
+    return PYGLIB_PyBytes_FromString (typelib_path);
+}
+
+static PyObject *
+_wrap_g_irepository_get_version (PyGIRepository *self,
+                                 PyObject       *args,
+                                 PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", NULL };
+    const char *namespace_;
+    const gchar *version;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "s:Repository.get_version", kwlist, &namespace_)) {
+        return NULL;
+    }
+
+    version = g_irepository_get_version (self->repository, namespace_);
+    if (version == NULL) {
+        PyErr_Format (PyExc_RuntimeError, "Namespace '%s' not loaded", namespace_);
+        return NULL;
+    }
+
+    return PYGLIB_PyUnicode_FromString (version);
 }
 
 static PyMethodDef _PyGIRepository_methods[] = {
+    { "enumerate_versions", (PyCFunction) _wrap_g_irepository_enumerate_versions, METH_VARARGS | METH_KEYWORDS },
     { "get_default", (PyCFunction) _wrap_g_irepository_get_default, METH_STATIC | METH_NOARGS },
     { "require", (PyCFunction) _wrap_g_irepository_require, METH_VARARGS | METH_KEYWORDS },
     { "get_infos", (PyCFunction) _wrap_g_irepository_get_infos, METH_VARARGS | METH_KEYWORDS },
     { "find_by_name", (PyCFunction) _wrap_g_irepository_find_by_name, METH_VARARGS | METH_KEYWORDS },
     { "get_typelib_path", (PyCFunction) _wrap_g_irepository_get_typelib_path, METH_VARARGS | METH_KEYWORDS },
+    { "get_version", (PyCFunction) _wrap_g_irepository_get_version, METH_VARARGS | METH_KEYWORDS },
     { NULL, NULL, 0 }
 };
 
 void
 _pygi_repository_register_types (PyObject *m)
 {
-    PyGIRepository_Type.ob_type = &PyType_Type;
+    Py_TYPE(&PyGIRepository_Type) = &PyType_Type;
+
+    PyGIRepository_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGIRepository_Type.tp_methods = _PyGIRepository_methods;
+
     if (PyType_Ready (&PyGIRepository_Type)) {
         return;
     }
+
     if (PyModule_AddObject (m, "Repository", (PyObject *) &PyGIRepository_Type)) {
         return;
     }
index 2f1ce42cd0414d1efa68277cbccb0336a9f1529d..c2e1f4dfa81844a35eb2939c9bc6fec9c6b6eb08 100644 (file)
 
 #include <pygobject.h>
 #include <girepository.h>
+#include <pyglib-python-compat.h>
 
 static void
 _struct_dealloc (PyGIStruct *self)
 {
+    GIBaseInfo *info = _pygi_object_get_gi_info (
+                           (PyObject *) self,
+                           &PyGIStructInfo_Type);
+
     PyObject_GC_UnTrack ( (PyObject *) self);
 
     PyObject_ClearWeakRefs ( (PyObject *) self);
 
-    if (self->free_on_dealloc) {
+    if (info != NULL && g_struct_info_is_foreign ( (GIStructInfo *) info)) {
+        pygi_struct_foreign_release (info, ( (PyGPointer *) self)->pointer);
+    } else if (self->free_on_dealloc) {
         g_free ( ( (PyGPointer *) self)->pointer);
     }
 
-    ( (PyGPointer *) self)->ob_type->tp_free ( (PyObject *) self);
+    g_base_info_unref (info);
+
+    Py_TYPE( (PyGPointer *) self )->tp_free ( (PyObject *) self);
 }
 
 static PyObject *
@@ -48,7 +57,6 @@ _struct_new (PyTypeObject *type,
     static char *kwlist[] = { NULL };
 
     GIBaseInfo *info;
-    gboolean is_simple;
     gsize size;
     gpointer pointer;
     PyObject *self = NULL;
@@ -92,41 +100,7 @@ _struct_init (PyObject *self,
     return 0;
 }
 
-
-PyTypeObject PyGIStruct_Type = {
-    PyObject_HEAD_INIT (NULL)
-    0,
-    "gi.Struct",                               /* tp_name */
-    sizeof (PyGIStruct),                       /* tp_basicsize */
-    0,                                         /* tp_itemsize */
-    (destructor) _struct_dealloc,              /* tp_dealloc */
-    (printfunc) NULL,                          /* tp_print */
-    (getattrfunc) NULL,                        /* tp_getattr */
-    (setattrfunc) NULL,                        /* tp_setattr */
-    (cmpfunc) NULL,                            /* tp_compare */
-    (reprfunc) NULL,                           /* tp_repr */
-    NULL,                                      /* tp_as_number */
-    NULL,                                      /* tp_as_sequence */
-    NULL,                                      /* tp_as_mapping */
-    (hashfunc) NULL,                           /* tp_hash */
-    (ternaryfunc) NULL,                        /* tp_call */
-    (reprfunc) NULL,                           /* tp_str */
-    (getattrofunc) NULL,                       /* tp_getattro */
-    (setattrofunc) NULL,                       /* tp_setattro */
-    NULL,                                      /* tp_as_buffer */
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,  /* tp_flags */
-    NULL,                                     /* tp_doc */
-    (traverseproc) NULL,                      /* tp_traverse */
-    (inquiry) NULL,                           /* tp_clear */
-    (richcmpfunc) NULL,                       /* tp_richcompare */
-    0,                                        /* tp_weaklistoffset */
-    (getiterfunc) NULL,                       /* tp_iter */
-    (iternextfunc) NULL,                      /* tp_iternext */
-    NULL,                                     /* tp_methods */
-    NULL,                                     /* tp_members */
-    NULL,                                     /* tp_getset */
-    (PyTypeObject *) NULL,                    /* tp_base */
-};
+PYGLIB_DEFINE_TYPE("gi.Struct", PyGIStruct_Type, PyGIStruct);
 
 PyObject *
 _pygi_struct_new (PyTypeObject *type,
@@ -158,10 +132,13 @@ _pygi_struct_new (PyTypeObject *type,
 void
 _pygi_struct_register_types (PyObject *m)
 {
-    PyGIStruct_Type.ob_type = &PyType_Type;
+    Py_TYPE(&PyGIStruct_Type) = &PyType_Type;
     PyGIStruct_Type.tp_base = &PyGPointer_Type;
     PyGIStruct_Type.tp_new = (newfunc) _struct_new;
     PyGIStruct_Type.tp_init = (initproc) _struct_init;
+    PyGIStruct_Type.tp_dealloc = (destructor) _struct_dealloc;
+    PyGIStruct_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+
     if (PyType_Ready (&PyGIStruct_Type))
         return;
     if (PyModule_AddObject (m, "Struct", (PyObject *) &PyGIStruct_Type))
index bd9804efb283c99ede1808b59c8d3496c2f14d10..129ea982e4d3e494be0652818ef6a4bc4aea96a3 100644 (file)
 
 
 PyObject *
-_pygi_type_import_by_gi_info (GIBaseInfo *info)
+_pygi_type_import_by_name (const char *namespace_,
+                           const char *name)
 {
-    const gchar *namespace_;
-    const gchar *name;
     gchar *module_name;
     PyObject *py_module;
     PyObject *py_object;
 
-    namespace_ = g_base_info_get_namespace (info);
-    name = g_base_info_get_name (info);
-
     module_name = g_strconcat ("gi.repository.", namespace_, NULL);
 
     py_module = PyImport_ImportModule (module_name);
@@ -73,6 +69,13 @@ pygi_type_import_by_g_type_real (GType g_type)
     return type;
 }
 
+PyObject *
+_pygi_type_import_by_gi_info (GIBaseInfo *info)
+{
+    return _pygi_type_import_by_name (g_base_info_get_namespace (info),
+                                      g_base_info_get_name (info));
+}
+
 PyObject *
 _pygi_type_get_from_g_type (GType g_type)
 {
index 16d5bdc576aeb27f0c22626415a0a580ec9a14f6..bb43d1962947b5da0923b0730b868ab6dbef4f58 100644 (file)
@@ -33,6 +33,8 @@ PyObject *pygi_type_import_by_g_type_real (GType g_type);
 
 /* Private */
 
+PyObject *_pygi_type_import_by_name (const char *namespace_, const char *name);
+
 PyObject *_pygi_type_import_by_gi_info (GIBaseInfo *info);
 
 PyObject *_pygi_type_get_from_g_type (GType g_type);
index 0a8cbf50a5eb1064b2883c8a283c2729d52251ad..d1eaf05da50b3deb3127d5f0499e7438253b5448 100644 (file)
--- a/gi/pygi.h
+++ b/gi/pygi.h
@@ -22,6 +22,7 @@
 #ifndef __PYGI_H__
 #define __PYGI_H__
 
+#define NO_IMPORT_PYGOBJECT
 #include <config.h>
 #include <pygobject.h>
 
@@ -51,23 +52,27 @@ typedef struct {
     gsize size;
 } PyGIBoxed;
 
-typedef PyObject * (*PyGIArgOverrideToGArgumentFunc) (PyObject       *value,
+typedef PyObject * (*PyGIArgOverrideToGIArgumentFunc) (PyObject       *value,
                                                       GITypeInfo     *type_info,
                                                       GITransfer      transfer,
-                                                      GArgument      *arg);
-typedef PyObject * (*PyGIArgOverrideFromGArgumentFunc) (GITypeInfo *type_info,
-                                                        GArgument  *arg);
-typedef PyObject * (*PyGIArgOverrideReleaseGArgumentFunc) (GITransfer  transfer,
-                                                           GITypeInfo *type_info,
-                                                           GArgument  *arg);
+                                                      GIArgument      *arg);
+typedef PyObject * (*PyGIArgOverrideFromGIArgumentFunc) (GITypeInfo *type_info,
+                                                        GIArgument  *arg);
+typedef PyObject * (*PyGIArgOverrideReleaseFunc) (GITypeInfo *type_info,
+                                                  gpointer  struct_);
 
 struct PyGI_API {
     PyObject* (*type_import_by_g_type) (GType g_type);
+    PyObject* (*get_property_value) (PyGObject *instance,
+                                     const gchar *attr_name);
+    gint (*set_property_value) (PyGObject *instance,
+                                const gchar *attr_name,
+                                PyObject *value);
     void (*register_foreign_struct) (const char* namespace_,
                                      const char* name,
-                                     PyGIArgOverrideToGArgumentFunc to_func,
-                                     PyGIArgOverrideFromGArgumentFunc from_func,
-                                     PyGIArgOverrideReleaseGArgumentFunc release_func);
+                                     PyGIArgOverrideToGIArgumentFunc to_func,
+                                     PyGIArgOverrideFromGIArgumentFunc from_func,
+                                     PyGIArgOverrideReleaseFunc release_func);
 };
 
 static struct PyGI_API *PyGI_API = NULL;
@@ -96,12 +101,33 @@ pygi_type_import_by_g_type (GType g_type)
     return PyGI_API->type_import_by_g_type(g_type);
 }
 
+static inline PyObject *
+pygi_get_property_value (PyGObject *instance,
+                         const gchar *attr_name)
+{
+    if (_pygi_import() < 0) {
+        return NULL;
+    }
+    return PyGI_API->get_property_value(instance, attr_name);
+}
+
+static inline gint
+pygi_set_property_value (PyGObject *instance,
+                         const gchar *attr_name,
+                         PyObject *value)
+{
+    if (_pygi_import() < 0) {
+        return -1;
+    }
+    return PyGI_API->set_property_value(instance, attr_name, value);
+}
+
 static inline PyObject *
 pygi_register_foreign_struct (const char* namespace_,
                               const char* name,
-                              PyGIArgOverrideToGArgumentFunc to_func,
-                              PyGIArgOverrideFromGArgumentFunc from_func,
-                              PyGIArgOverrideReleaseGArgumentFunc release_func)
+                              PyGIArgOverrideToGIArgumentFunc to_func,
+                              PyGIArgOverrideFromGIArgumentFunc from_func,
+                              PyGIArgOverrideReleaseFunc release_func)
 {
     if (_pygi_import() < 0) {
         return NULL;
@@ -122,6 +148,21 @@ pygi_type_import_by_g_type (GType g_type)
     return NULL;
 }
 
+static inline PyObject *
+pygi_get_property_value (PyGObject *instance,
+                         const gchar *attr_name)
+{
+    return -1;
+}
+
+static inline gint
+pygi_set_property_value (PyGObject *instance,
+                         const gchar *attr_name,
+                         PyObject *value)
+{
+    return -1;
+}
+
 #endif /* ENABLE_INTROSPECTION */
 
 #endif /* __PYGI_H__ */
index 3252c9d455dc6091e467cb604b1ed70151d87cb3..7b36c15005024670f0c3622cc15fa5a0f35fa6f8 100644 (file)
@@ -115,6 +115,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index 8ac9cab41dd95a161f309bb2e750e3f31f82b1e8..0a8768ccd855db87e86946a9a34433a1668e213b 100644 (file)
@@ -50,7 +50,7 @@ def Constructor(info):
     def constructor(cls, *args):
         cls_name = info.get_container().get_name()
         if cls.__name__ != cls_name:
-            raise TypeError, '%s constructor cannot be used to create instances of a subclass' % cls_name
+            raise TypeError('%s constructor cannot be used to create instances of a subclass' % cls_name)
         return info.invoke(cls, *args)
 
     constructor.__info__ = info
@@ -105,10 +105,14 @@ class MetaClassHelper(object):
                             'the method do_%s()' % (base.__info__.get_namespace(),
                                                     base.__info__.get_name(),
                                                     vfunc_info.get_name()))
-                elif vfunc is not None and not \
-                        is_function_in_classes(vfunc.im_func, cls.__bases__):
-                    hook_up_vfunc_implementation(vfunc_info, cls.__gtype__,
-                                                 vfunc)
+                elif vfunc is not None:
+                    function = vfunc
+                    if sys.version_info < (3, 0):
+                        function = vfunc.im_func
+                    if not is_function_in_classes(function, cls.__bases__):
+                        hook_up_vfunc_implementation(vfunc_info, cls.__gtype__,
+                                                     vfunc)
 
 def is_function_in_classes(function, classes):
     for klass in classes:
@@ -161,6 +165,7 @@ class StructMeta(type, MetaClassHelper):
 
 def override(type_):
     g_type = type_.__info__.get_g_type()
+    assert g_type != gobject.TYPE_NONE
     if g_type != gobject.TYPE_INVALID:
         g_type.pytype = type_
     return type_
index f7bf2eb9ab86fee5957c6030720f62fe0f4f75b9..5315074ff71fb10a9c3181c9091e6b1872ffda52 100644 (file)
@@ -169,6 +169,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index 414769b050e6977fc676e9929ba9b5bb53bde1c0..7f09ce8c1eeb7f713633745023e9d5805ee5151f 100644 (file)
@@ -106,6 +106,11 @@ _wrap_g_app_info_launch_uris(PyGObject *self, PyObject *args, PyObject *kwargs)
     ret = g_app_info_launch_uris(G_APP_INFO(self->obj),
                                  file_list, ctx, &error);
 
+    /* in python 3 the C strings are not internal to the Unicode string object
+     * so we now strdup when adding element to the list and must free them here
+     */
+    g_list_foreach (file_list,
+                   (GFunc) g_free, NULL);
     g_list_free(file_list);
 
     if (pyg_error_check(&error))
index 71e2d98df1896e52f3d2547c90fb5dbd3bd041ef..b50130cc3555ae14ea91b38a2cb37c73348d33d5 100644 (file)
@@ -1155,7 +1155,7 @@ _wrap_g_file_append_to_async(PyGObject *self, PyObject *args, PyObject *kwargs)
                                      "O|OiOO:File.append_to_async",
                                       kwlist,
                                       &notify->callback,
-                                      &flags, &io_priority,
+                                      &py_flags, &io_priority,
                                       &pycancellable,
                                       &notify->data))
         goto error;
@@ -1203,7 +1203,7 @@ _wrap_g_file_create_async(PyGObject *self, PyObject *args, PyObject *kwargs)
                                      "O|OiOO:File.create_async",
                                       kwlist,
                                       &notify->callback,
-                                      &flags, &io_priority,
+                                      &py_flags, &io_priority,
                                       &pycancellable,
                                       &notify->data))
         goto error;
@@ -1253,7 +1253,7 @@ _wrap_g_file_create_readwrite_async(PyGObject *self,
                                      "O|OiOO:File.create_readwrite_async",
                                       kwlist,
                                       &notify->callback,
-                                      &flags, &io_priority,
+                                      &py_flags, &io_priority,
                                       &pycancellable,
                                       &notify->data))
         goto error;
@@ -1405,7 +1405,7 @@ _wrap_g_file_replace_async(PyGObject *self, PyObject *args, PyObject *kwargs)
                                       kwlist,
                                       &notify->callback,
                                       &etag, &py_backup,
-                                      &flags, &io_priority,
+                                      &py_flags, &io_priority,
                                       &pycancellable,
                                       &notify->data))
         goto error;
index 6d001b90d93bd8472d43d6f338322d05faae4931..7fdcb1c420685c25b636cc119e53b46f989de2f0 100644 (file)
@@ -141,7 +141,7 @@ 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);
+            PyErr_Format(PyExc_MemoryError, "failed to allocate %" G_GSIZE_FORMAT " bytes", buffer_size);
             return FALSE;
         }
 
@@ -330,7 +330,12 @@ _wrap_g_content_type_guess(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
     char *kwlist[] = {"filename", "data", "want_uncertain", NULL};
     char *filename = NULL, *data = NULL, *type;
+#ifdef PY_SSIZE_T_CLEAN
+    Py_ssize_t data_size = 0;
+#else
     int data_size = 0;
+#endif
+
     gboolean result_uncertain, want_uncertain = FALSE;
     PyObject *ret;
 
index 409aeefacfdd6d642ca77030c39c289129db3cf3..a9ddd386f6df3386f27c8f64791db25a728b235d 100644 (file)
@@ -25,6 +25,7 @@
 #include <Python.h>
 #include <pyglib.h>
 #include <pygobject.h>
+#include <pyglib-python-compat.h>
 
 #include <gio/gio.h>
 
@@ -39,167 +40,169 @@ void pygio_add_constants(PyObject *module, const gchar *strip_prefix);
 
 extern PyMethodDef pygio_functions[];
 
-DL_EXPORT(void)
-init_gio(void)
+PYGLIB_INIT_FUNCTION(_gio, "gio._gio", pygio_functions)
 {
-    PyObject *m, *d;
+    PyObject *d;
     PyObject *tuple;
     PyObject *e;
+
     /* perform any initialisation required by the library here */
 
-    m = Py_InitModule("gio._gio", pygio_functions);
-    d = PyModule_GetDict(m);
+    d = PyModule_GetDict(module);
 
     g_type_init();
     pyglib_init();
 
-    init_pygobject_check(2, 15, 2);
+    if (pygobject_init(2, 15, 2) == NULL)
+        return -1;
 
     pygio_register_classes(d);
-    pygio_add_constants(m, "G_IO_");
+    pygio_add_constants(module, "G_IO_");
 
-    PyModule_AddStringConstant(m, "ERROR", g_quark_to_string(G_IO_ERROR));
+    PyModule_AddStringConstant(module, "ERROR", g_quark_to_string(G_IO_ERROR));
     e = pyglib_register_exception_for_domain("gio.Error", G_IO_ERROR);
     PyDict_SetItemString(d, "Error", e);
     Py_DECREF(e);
 
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_TYPE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_TYPE",
                               G_FILE_ATTRIBUTE_STANDARD_TYPE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_HIDDEN",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_HIDDEN",
                               G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_BACKUP",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_BACKUP",
                               G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_SYMLINK",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_SYMLINK",
                               G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL",
                               G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_NAME",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_NAME",
                               G_FILE_ATTRIBUTE_STANDARD_NAME);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME",
                               G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_EDIT_NAME",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_EDIT_NAME",
                               G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_COPY_NAME",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_COPY_NAME",
                               G_FILE_ATTRIBUTE_STANDARD_COPY_NAME);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_DESCRIPTION",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_DESCRIPTION",
                               G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_ICON",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_ICON",
                               G_FILE_ATTRIBUTE_STANDARD_ICON);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE",
                               G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE",
                               G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SIZE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SIZE",
                               G_FILE_ATTRIBUTE_STANDARD_SIZE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET",
                               G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_TARGET_URI",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_TARGET_URI",
                               G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SORT_ORDER",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SORT_ORDER",
                               G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ETAG_VALUE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ETAG_VALUE",
                               G_FILE_ATTRIBUTE_ETAG_VALUE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ID_FILE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ID_FILE",
                               G_FILE_ATTRIBUTE_ID_FILE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ID_FILESYSTEM",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ID_FILESYSTEM",
                               G_FILE_ATTRIBUTE_ID_FILESYSTEM);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_READ",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_READ",
                               G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_WRITE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_WRITE",
                               G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE",
                               G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_DELETE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_DELETE",
                               G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_TRASH",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_TRASH",
                               G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_RENAME",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_RENAME",
                               G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT",
                               G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT",
                               G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT",
                               G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE",
                               G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI",
                               G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_MODIFIED",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_MODIFIED",
                               G_FILE_ATTRIBUTE_TIME_MODIFIED);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_MODIFIED_USEC",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_MODIFIED_USEC",
                               G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_ACCESS",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_ACCESS",
                               G_FILE_ATTRIBUTE_TIME_ACCESS);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_ACCESS_USEC",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_ACCESS_USEC",
                               G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CHANGED",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CHANGED",
                               G_FILE_ATTRIBUTE_TIME_CHANGED);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CHANGED_USEC",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CHANGED_USEC",
                               G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CREATED",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CREATED",
                               G_FILE_ATTRIBUTE_TIME_CREATED);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CREATED_USEC",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CREATED_USEC",
                               G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_DEVICE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_DEVICE",
                               G_FILE_ATTRIBUTE_UNIX_DEVICE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_INODE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_INODE",
                               G_FILE_ATTRIBUTE_UNIX_INODE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_MODE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_MODE",
                               G_FILE_ATTRIBUTE_UNIX_MODE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_NLINK",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_NLINK",
                               G_FILE_ATTRIBUTE_UNIX_NLINK);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_UID",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_UID",
                               G_FILE_ATTRIBUTE_UNIX_UID);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_GID",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_GID",
                               G_FILE_ATTRIBUTE_UNIX_GID);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_RDEV",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_RDEV",
                               G_FILE_ATTRIBUTE_UNIX_RDEV);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_BLOCK_SIZE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_BLOCK_SIZE",
                               G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_BLOCKS",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_BLOCKS",
                               G_FILE_ATTRIBUTE_UNIX_BLOCKS);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT",
                               G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_DOS_IS_ARCHIVE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_DOS_IS_ARCHIVE",
                               G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_DOS_IS_SYSTEM",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_DOS_IS_SYSTEM",
                               G_FILE_ATTRIBUTE_DOS_IS_SYSTEM);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_USER",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_USER",
                               G_FILE_ATTRIBUTE_OWNER_USER);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_USER_REAL",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_USER_REAL",
                               G_FILE_ATTRIBUTE_OWNER_USER_REAL);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_GROUP",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_GROUP",
                               G_FILE_ATTRIBUTE_OWNER_GROUP);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_THUMBNAIL_PATH",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_THUMBNAIL_PATH",
                               G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_THUMBNAILING_FAILED",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_THUMBNAILING_FAILED",
                               G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_SIZE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_SIZE",
                               G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_FREE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_FREE",
                               G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_TYPE",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_TYPE",
                               G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_READONLY",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_READONLY",
                               G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW",
                               G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_GVFS_BACKEND",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_GVFS_BACKEND",
                               G_FILE_ATTRIBUTE_GVFS_BACKEND);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_SELINUX_CONTEXT",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_SELINUX_CONTEXT",
                               G_FILE_ATTRIBUTE_SELINUX_CONTEXT);
-    PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TRASH_ITEM_COUNT",
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TRASH_ITEM_COUNT",
                               G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
-    
-    PyModule_AddStringConstant(m, "ERROR", g_quark_to_string(G_IO_ERROR));
+
+    PyModule_AddStringConstant(module, "ERROR", g_quark_to_string(G_IO_ERROR));
 
     /* pygio version */
     tuple = Py_BuildValue ("(iii)",
                           PYGIO_MAJOR_VERSION,
                           PYGIO_MINOR_VERSION,
                           PYGIO_MICRO_VERSION);
-    PyDict_SetItemString(d, "pygio_version", tuple); 
+    PyDict_SetItemString(d, "pygio_version", tuple);
     Py_DECREF(tuple);
+
+    return 0;
 }
 
index be414530bf9efaadbb2b434c1e6d677844bcf03a..f89c4b94e8b83437c12bcced865096942eab0435 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "pygio-utils.h"
+#include <pyglib-python-compat.h>
 
 /**
  * pygio_check_cancellable:
@@ -115,14 +116,28 @@ pygio_pylist_to_uri_glist(PyObject *pyfile_list)
 
     len = PySequence_Size(pyfile_list);
     for (i = 0; i < len; i++) {
-    item = PySequence_GetItem(pyfile_list, i);
-        if (!PyString_Check(item)) {
+        item = PySequence_GetItem(pyfile_list, i);
+        if (!PYGLIB_PyUnicode_Check(item)) {
             PyErr_SetString(PyExc_TypeError,
                             "files must be strings");
             g_list_free(file_list);
             return NULL;
         }
-        file_list = g_list_prepend(file_list, PyString_AsString(item));
+
+#if PY_VERSION_HEX < 0x03000000
+        file_list = g_list_prepend(file_list, g_strdup(PyString_AsString(item)));
+#else
+       {
+            PyObject *utf8_bytes_obj = PyUnicode_AsUTF8String (item);
+            if (!utf8_bytes_obj) {
+                g_list_free(file_list);
+                return NULL;
+            }
+            file_list = g_list_prepend(file_list, g_strdup(PyBytes_AsString(utf8_bytes_obj)));
+            Py_DECREF (utf8_bytes_obj);
+        }
+#endif
+
     }
     file_list = g_list_reverse(file_list);
 
@@ -144,9 +159,9 @@ strv_to_pylist (char **strv)
     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]));
-
+    for (i = 0; i < len; i++) {
+        PyList_SetItem (list, i, PYGLIB_PyUnicode_FromString (strv[i]));
+    }
     return list;
 }
 
@@ -191,7 +206,7 @@ pylist_to_strv (PyObject *list,
             return FALSE;
         }
 
-        if (!PyString_Check (item))
+        if (!PYGLIB_PyUnicode_Check (item))
         {
             Py_DECREF (item);
             g_strfreev (ret);
@@ -199,7 +214,20 @@ pylist_to_strv (PyObject *list,
             return FALSE;
         }
 
+#if PY_VERSION_HEX < 0x03000000
         ret[i] = g_strdup (PyString_AsString (item));
+#else
+       {
+            PyObject *utf8_bytes_obj = PyUnicode_AsUTF8String (item);
+            if (!utf8_bytes_obj) {
+                Py_DECREF (item);
+                g_strfreev (ret);
+                return FALSE;
+            }
+            ret[i] = g_strdup (PyBytes_AsString(utf8_bytes_obj));
+            Py_DECREF (utf8_bytes_obj);
+        }
+#endif
         Py_DECREF (item);
     }
 
index ffaeb4c0db3b04e3adec11c9086f25e80afd15e1..5fddbf266e601c3ae2686ef68c580c68e2893c5a 100644 (file)
@@ -170,6 +170,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index f794d5dedf1700b1ab7bbed5134950d1bd3a6f4e..ebea163ed70c44af5aff12d8755ba1051d7fd7bb 100644 (file)
@@ -68,19 +68,19 @@ get_handler_priority(gint *priority, PyObject *kwargs)
     }
     pos = 0;
     PyDict_Next(kwargs, &pos, &key, &val);
-    if (!_PyUnicode_Check(key)) {
+    if (!PYGLIB_PyUnicode_Check(key)) {
        PyErr_SetString(PyExc_TypeError,
                        "keyword argument name is not a string");
        return -1;
     }
 
-    if (strcmp(_PyUnicode_AsString(key), "priority") != 0) {
+    if (strcmp(PYGLIB_PyUnicode_AsString(key), "priority") != 0) {
        PyErr_SetString(PyExc_TypeError,
                        "only 'priority' keyword argument accepted");
        return -1;
     }
 
-    *priority = _PyLong_AsLong(val);
+    *priority = PYGLIB_PyLong_AsLong(val);
     if (PyErr_Occurred()) {
        PyErr_Clear();
        PyErr_SetString(PyExc_ValueError, "could not get priority value");
@@ -135,7 +135,7 @@ pyglib_idle_add(PyObject *self, PyObject *args, PyObject *kwargs)
     handler_id = g_idle_add_full(priority,
                                 _pyglib_handler_marshal, data,
                                 _pyglib_destroy_notify);
-    return _PyLong_FromLong(handler_id);
+    return PYGLIB_PyLong_FromLong(handler_id);
 }
 
 
@@ -175,7 +175,7 @@ pyglib_timeout_add(PyObject *self, PyObject *args, PyObject *kwargs)
     handler_id = g_timeout_add_full(priority, interval,
                                    _pyglib_handler_marshal, data,
                                    _pyglib_destroy_notify);
-    return _PyLong_FromLong(handler_id);
+    return PYGLIB_PyLong_FromLong(handler_id);
 }
 
 static PyObject *
@@ -214,7 +214,7 @@ pyglib_timeout_add_seconds(PyObject *self, PyObject *args, PyObject *kwargs)
     handler_id = g_timeout_add_seconds_full(priority, interval,
                                             _pyglib_handler_marshal, data,
                                             _pyglib_destroy_notify);
-    return _PyLong_FromLong(handler_id);
+    return PYGLIB_PyLong_FromLong(handler_id);
 }
 
 static gboolean
@@ -305,7 +305,7 @@ pyglib_io_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
                                     (GDestroyNotify)_pyglib_destroy_notify);
     g_io_channel_unref(iochannel);
     
-    return _PyLong_FromLong(handler_id);
+    return PYGLIB_PyLong_FromLong(handler_id);
 }
 
 static PyObject *
@@ -385,7 +385,7 @@ pyglib_child_watch_add(PyObject *unused, PyObject *args, PyObject *kwargs)
         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);
+    return PYGLIB_PyLong_FromLong(id);
 }
 
 static PyObject *
@@ -402,7 +402,7 @@ pyglib_markup_escape_text(PyObject *unused, PyObject *args, PyObject *kwargs)
         return NULL;
 
     text_out = g_markup_escape_text(text_in, text_size);
-    retval = _PyUnicode_FromString(text_out);
+    retval = PYGLIB_PyUnicode_FromString(text_out);
     g_free(text_out);
     return retval;
 }
@@ -417,12 +417,10 @@ pyglib_get_current_time(PyObject *unused)
 }
 
 static PyObject*
-pyglib_get_user_cache_dir(PyObject *self)
+get_user_dir(const char *path)
 {
-    const char *path = g_get_user_cache_dir();
-
     if (path)
-        return _PyUnicode_FromString(path);
+        return PYGLIB_PyUnicode_FromString(path);
     else {
         Py_INCREF(Py_None);
         return Py_None;
@@ -432,27 +430,19 @@ pyglib_get_user_cache_dir(PyObject *self)
 static PyObject*
 pyglib_get_user_config_dir(PyObject *self)
 {
-    const char *path = g_get_user_config_dir();
+    return get_user_dir(g_get_user_config_dir());
+}
 
-    if (path)
-        return _PyUnicode_FromString(path);
-    else {
-        Py_INCREF(Py_None);
-        return Py_None;
-    }
+static PyObject*
+pyglib_get_user_cache_dir(PyObject *self)
+{
+    return get_user_dir(g_get_user_cache_dir());
 }
 
 static PyObject*
 pyglib_get_user_data_dir(PyObject *self)
 {
-    const char *path = g_get_user_data_dir();
-
-    if (path)
-        return _PyUnicode_FromString(path);
-    else {
-        Py_INCREF(Py_None);
-        return Py_None;
-    }
+    return get_user_dir(g_get_user_data_dir());
 }
 
 static PyObject *
@@ -469,7 +459,7 @@ pyglib_get_user_special_dir(PyObject *unused, PyObject *args, PyObject *kwargs)
 
     path = g_get_user_special_dir(directory);
     if (path)
-        return _PyUnicode_FromString(path);
+        return PYGLIB_PyUnicode_FromString(path);
     else {
         Py_INCREF(Py_None);
         return Py_None;
@@ -479,7 +469,7 @@ pyglib_get_user_special_dir(PyObject *unused, PyObject *args, PyObject *kwargs)
 static PyObject *
 pyglib_main_depth(PyObject *unused)
 {
-    return _PyLong_FromLong(g_main_depth());
+    return PYGLIB_PyLong_FromLong(g_main_depth());
 }
 
 static PyObject *
@@ -535,7 +525,7 @@ pyglib_filename_from_utf8(PyObject *self, PyObject *args)
         g_free(filename);
         return NULL;
     }
-    py_filename = _PyUnicode_FromStringAndSize(filename, bytes_written);
+    py_filename = PYGLIB_PyUnicode_FromStringAndSize(filename, bytes_written);
     g_free(filename);
     return py_filename;
 }
@@ -551,19 +541,19 @@ pyglib_get_application_name(PyObject *self)
         Py_INCREF(Py_None);
         return Py_None;
     }
-    return _PyUnicode_FromString(name);
+    return PYGLIB_PyUnicode_FromString(name);
 }
 
 static PyObject*
 pyglib_set_application_name(PyObject *self, PyObject *arg)
 {
-    if (!PyString_Check(arg)) {
+    if (!PYGLIB_PyUnicode_Check(arg)) {
        PyErr_Format(PyExc_TypeError,
                     "first argument must be a string, not '%s'",
-                    PyString_AS_STRING(PyObject_Repr(arg)));
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr(arg)));
        return NULL;
     }
-    g_set_application_name(PyString_AS_STRING(arg));
+    g_set_application_name(PYGLIB_PyUnicode_AsString(arg));
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -578,19 +568,19 @@ pyglib_get_prgname(PyObject *self)
         Py_INCREF(Py_None);
         return Py_None;
     }
-    return _PyUnicode_FromString(name);
+    return PYGLIB_PyUnicode_FromString(name);
 }
 
 static PyObject*
 pyglib_set_prgname(PyObject *self, PyObject *arg)
 {
-    if (!PyString_Check(arg)) {
+    if (!PYGLIB_PyUnicode_Check(arg)) {
        PyErr_Format(PyExc_TypeError,
                     "first argument must be a string, not '%s'",
-                    PyString_AS_STRING(PyObject_Repr(arg)));
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr(arg)));
        return NULL;
     }
-    g_set_prgname(PyString_AS_STRING(arg));
+    g_set_prgname(PYGLIB_PyUnicode_AsString(arg));
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -608,11 +598,81 @@ pyglib_find_program_in_path(PyObject *unused, PyObject *args, PyObject *kwargs)
         return NULL;
 
     ret = g_find_program_in_path(program);
-    retval = _PyUnicode_FromString(ret);
+    retval = PYGLIB_PyUnicode_FromString(ret);
     g_free(ret);
     return retval;
 }
 
+static PyObject *
+pyglib_uri_list_extract_uris(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "uri_list", NULL };
+    char *uri_list;
+    char **uris, **tmp;
+    int i = 0, j;
+    PyObject *ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:uri_list_extract_uris", kwlist, &uri_list))
+        return NULL;
+
+    uris = (char **)g_uri_list_extract_uris(uri_list);
+    if (!uris) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+
+    tmp = uris;
+    while (*tmp)
+        tmp++, i++;
+
+    ret = PyTuple_New(i);
+    for (j = 0; j < i; j++)
+        PyTuple_SetItem(ret, j, PyString_FromString(uris[j]));
+
+    g_strfreev(uris);
+
+    return ret;
+}
+
+/* FIXME: we should use strv_to_pylist (in pygio-utils.h) here, but that
+ * function should be moved into pyglib first. See
+ * https://bugzilla.gnome.org/show_bug.cgi?id=630508
+ */
+static PyObject *
+tuple_of_strings_from_dirs(const gchar* const *dirs)
+{
+    char **tmp;
+    int i = 0, j;
+    PyObject *ret;
+
+    if (!dirs) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+
+    tmp = (char **)dirs;
+    while (*tmp)
+        tmp++, i++;
+
+    ret = PyTuple_New(i);
+    for (j = 0; j < i; j++)
+        PyTuple_SetItem(ret, j, PYGLIB_PyUnicode_FromString(dirs[j]));
+
+    return ret;
+}
+
+static PyObject*
+pyglib_get_system_config_dirs(PyObject *self)
+{
+    return tuple_of_strings_from_dirs(g_get_system_config_dirs());
+}
+
+static PyObject*
+pyglib_get_system_data_dirs(PyObject *self)
+{
+    return tuple_of_strings_from_dirs(g_get_system_data_dirs());
+}
+
 static PyMethodDef _glib_functions[] = {
     { "threads_init",
       (PyCFunction) pyglib_threads_init, METH_NOARGS,
@@ -708,6 +768,16 @@ static PyMethodDef _glib_functions[] = {
       (PyCFunction)pyglib_markup_escape_text, METH_VARARGS|METH_KEYWORDS },
     { "find_program_in_path",
       (PyCFunction)pyglib_find_program_in_path, METH_VARARGS|METH_KEYWORDS },
+    { "uri_list_extract_uris",
+      (PyCFunction)pyglib_uri_list_extract_uris, METH_VARARGS|METH_KEYWORDS,
+      "uri_list_extract_uris(uri_list) -> tuple of strings holding URIs\n"
+      "Splits an string containing an URI list conforming to the \n"
+      "text/uri-list mime type defined in RFC 2483 into individual URIs, \n"
+      "discarding any comments. The URIs are not validated." },
+    { "get_system_config_dirs",
+      (PyCFunction)pyglib_get_system_config_dirs, METH_NOARGS },
+    { "get_system_data_dirs",
+      (PyCFunction)pyglib_get_system_data_dirs, METH_NOARGS },
     { NULL, NULL, 0 }
 };
 
index 027752f32014c2f2b920096067333a65a9e80a55..bdfbe1d349a4bcd4453d19af84f237ab6fd7b184 100644 (file)
@@ -34,6 +34,13 @@ import optparse
 from optparse import OptParseError, OptionError, OptionValueError, \
                      BadOptionError, OptionConflictError
 
+if sys.version_info >= (3, 0):
+    _basestring = str
+    _bytes = lambda s: s.encode()
+else:
+    _basestring = basestring
+    _bytes = str
+
 import glib
 _glib = sys.modules['glib._glib']
 
@@ -42,7 +49,7 @@ __all__ = [
     "OptionError",
     "OptionValueError",
     "BadOptionError",
-    "OptionConflictError"
+    "OptionConflictError",
     "Option",
     "OptionGroup",
     "OptionParser",
@@ -110,10 +117,10 @@ class Option(optparse.Option):
         flags = 0
 
         if self.hidden:
-            self.flags |= _glib.OPTION_FLAG_HIDDEN
+            flags |= _glib.OPTION_FLAG_HIDDEN
 
         if self.in_main:
-            self.flags |= _glib.OPTION_FLAG_IN_MAIN
+            flags |= _glib.OPTION_FLAG_IN_MAIN
 
         if self.takes_value():
             if self.optional_arg:
@@ -125,10 +132,10 @@ class Option(optparse.Option):
             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)
+            yield (long_name[2:], _bytes(short_name[1]), flags, self.help, self.metavar)
 
         for long_name in self._long_opts[len(self._short_opts):]:
-            yield (long_name[2:], '\0', flags, self.help, self.metavar)
+            yield (long_name[2:], _bytes('\0'), flags, self.help, self.metavar)
 
 class OptionGroup(optparse.OptionGroup):
     """A group of command line options.
@@ -199,6 +206,7 @@ class OptionGroup(optparse.OptionGroup):
         entries = []
         for option in self.option_list:
             entries.extend(option._to_goptionentries())
         group.add_entries(entries)
 
         return group
@@ -214,7 +222,7 @@ class OptionGroup(optparse.OptionGroup):
     def set_values_to_defaults(self):
         for option in self.option_list:
             default = self.defaults.get(option.dest)
-            if isinstance(default, basestring):
+            if isinstance(default, _basestring):
                 opt_str = option.get_opt_string()
                 self.defaults[option.dest] = option.check_value(
                     opt_str, default)
@@ -292,7 +300,7 @@ class OptionParser(optparse.OptionParser):
         return context
 
     def add_option_group(self, *args, **kwargs):
-        if isinstance(args[0], basestring):
+        if isinstance(args[0], _basestring):
             optparse.OptionParser.add_option_group(self,
                 OptionGroup(self, *args, **kwargs))
             return
index 4c935e8e67d7c716999da972c0ef561d22d1050f..f7e2bc4b7507dd90d8c8e37a76e9e4791b09fe02 100644 (file)
@@ -39,17 +39,23 @@ py_io_channel_next(PyGIOChannel *self)
         return NULL;
     }
 
-    ret_obj = _PyUnicode_FromStringAndSize(str_return, length);
+    ret_obj = PYGLIB_PyUnicode_FromStringAndSize(str_return, length);
     g_free(str_return);
     return ret_obj;
 }
 
-static int
-py_io_channel_compare(PyGIOChannel *self, PyGIOChannel *v)
+static PyObject*
+py_io_channel_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->channel == v->channel) return 0;
-    if (self->channel > v->channel) return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && 
+          Py_TYPE(self) == &PyGIOChannel_Type) {
+        return _pyglib_generic_ptr_richcompare(((PyGIOChannel*)self)->channel,
+                                               ((PyGIOChannel*)other)->channel,
+                                               op);
+    } else {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
 }
 
 static PyObject*
@@ -88,7 +94,7 @@ py_io_channel_shutdown(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
     if (pyglib_error_check(&error))
        return NULL;
        
-    return _PyLong_FromLong(ret);
+    return PYGLIB_PyLong_FromLong(ret);
 }
 
 /* character encoding conversion involved functions.
@@ -112,7 +118,7 @@ py_io_channel_set_buffer_size(PyGIOChannel* self, PyObject *args, PyObject *kwar
 static PyObject*
 py_io_channel_get_buffer_size(PyGIOChannel* self)
 {
-    return _PyLong_FromLong(g_io_channel_get_buffer_size(self->channel));
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_buffer_size(self->channel));
 }
 
 static PyObject*
@@ -133,7 +139,7 @@ py_io_channel_set_buffered(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
 static PyObject*
 py_io_channel_get_buffered(PyGIOChannel* self)
 {
-    return _PyLong_FromLong(g_io_channel_get_buffered(self->channel));
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_buffered(self->channel));
 }
 
 static PyObject*
@@ -164,7 +170,7 @@ py_io_channel_get_encoding(PyGIOChannel* self)
        return Py_None;
     }
 
-    return _PyUnicode_FromString(encoding);
+    return PYGLIB_PyUnicode_FromString(encoding);
 }
 
 #define CHUNK_SIZE (8 * 1024)
@@ -183,7 +189,7 @@ py_io_channel_read_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
         return NULL;
        
     if (max_count == 0)
-       return _PyUnicode_FromString("");
+       return PYGLIB_PyUnicode_FromString("");
     
     while (status == G_IO_STATUS_NORMAL
           && (max_count == -1 || total_read < max_count)) {
@@ -200,16 +206,16 @@ py_io_channel_read_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
         }
        
        if ( ret_obj == NULL ) {
-           ret_obj = _PyUnicode_FromStringAndSize((char *)NULL, buf_size);
+           ret_obj = PYGLIB_PyBytes_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)
+       else if (buf_size + total_read > PYGLIB_PyBytes_Size(ret_obj)) {
+           if (PYGLIB_PyBytes_Resize(&ret_obj, buf_size + total_read) == -1)
                goto failure;
        }
        
-        buf = _PyUnicode_AS_STRING(ret_obj) + total_read;
+        buf = PYGLIB_PyBytes_AsString(ret_obj) + total_read;
 
         pyglib_unblock_threads();
         status = g_io_channel_read_chars(self->channel, buf, buf_size, 
@@ -221,10 +227,28 @@ py_io_channel_read_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
        total_read += single_read;
     }
        
-    if ( total_read != _PyUnicode_GET_SIZE(ret_obj) ) {
-       if (_PyUnicode_Resize(&ret_obj, total_read) == -1)
+    if ( total_read != PYGLIB_PyBytes_Size(ret_obj) ) {
+       if (PYGLIB_PyBytes_Resize(&ret_obj, total_read) == -1)
+           goto failure;
+    }
+
+#if PY_VERSION_HEX >= 0x03000000
+    /* If this is not UTF8 encoded channel return the raw bytes */
+    if (g_io_channel_get_encoding(self->channel) != NULL)
+        return ret_obj;
+
+    /* convert to Unicode string */
+    {
+       PyObject *unicode_obj;
+
+       unicode_obj = PyUnicode_FromString(PyBytes_AS_STRING(ret_obj));
+       if (unicode_obj == NULL)
            goto failure;
+       Py_DECREF(ret_obj);
+       ret_obj = unicode_obj;
     }
+#endif
+
     return ret_obj;
 
   failure:
@@ -252,7 +276,7 @@ py_io_channel_write_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
     if (pyglib_error_check(&error))
        return NULL;
        
-    return _PyLong_FromLong(count);
+    return PYGLIB_PyLong_FromLong(count);
 }
 
 static PyObject*
@@ -278,13 +302,13 @@ py_io_channel_write_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
             PyErr_Clear();
             goto normal_exit;
         }
-        if (!_PyUnicode_Check(value)) {
+        if (!PYGLIB_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_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();
@@ -312,7 +336,7 @@ py_io_channel_flush(PyGIOChannel* self)
     if (pyglib_error_check(&error))
        return NULL;
        
-    return _PyLong_FromLong(status);
+    return PYGLIB_PyLong_FromLong(status);
 }
 
 static PyObject*
@@ -331,19 +355,19 @@ py_io_channel_set_flags(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
     if (pyglib_error_check(&error))
        return NULL;
        
-    return _PyLong_FromLong(status);
+    return PYGLIB_PyLong_FromLong(status);
 }
 
 static PyObject*
 py_io_channel_get_flags(PyGIOChannel* self)
 {
-    return _PyLong_FromLong(g_io_channel_get_flags(self->channel));
+    return PYGLIB_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));
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_buffer_condition(self->channel));
 }
 
 static PyObject*
@@ -494,7 +518,7 @@ py_io_channel_win32_poll(PyObject *self, PyObject *args, PyObject *kwargs)
         pyfd = PyList_GET_ITEM(pyfds, i);
         ((PyGPollFD *) pyfd)->pollfd = pollfd[i];
     }
-    return _PyLong_FromLong(result);
+    return PYGLIB_PyLong_FromLong(result);
 }
 
 static PyObject *
@@ -538,7 +562,7 @@ py_io_channel_read_line(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
                                     &terminator_pos, &error);
     if (pyglib_error_check(&error))
         return NULL;
-    ret_obj = _PyUnicode_FromStringAndSize(str_return, length);
+    ret_obj = PYGLIB_PyUnicode_FromStringAndSize(str_return, length);
     g_free(str_return);
     return ret_obj;
 }
@@ -567,7 +591,7 @@ py_io_channel_read_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
             Py_DECREF(line);
             return NULL;
         }
-        line = _PyUnicode_FromStringAndSize(str_return, length);
+        line = PYGLIB_PyUnicode_FromStringAndSize(str_return, length);
         g_free(str_return);
         if (PyList_Append(list, line)) {
             Py_DECREF(line);
@@ -608,7 +632,7 @@ py_io_channel_seek(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
     if (pyglib_error_check(&error))
        return NULL;
        
-    return _PyLong_FromLong(status);
+    return PYGLIB_PyLong_FromLong(status);
 }
 
 #if 0 // Not wrapped
@@ -643,29 +667,29 @@ static PyMemberDef py_io_channel_members[] = {
 };
 
 static PyMethodDef py_io_channel_methods[] = {
-    { "close", (PyCFunction)py_io_channel_shutdown, METH_KEYWORDS },
+    { "close", (PyCFunction)py_io_channel_shutdown, METH_VARARGS|METH_KEYWORDS },
     { "flush", (PyCFunction)py_io_channel_flush, METH_NOARGS },
-    { "set_encoding", (PyCFunction)py_io_channel_set_encoding, METH_KEYWORDS },
+    { "set_encoding", (PyCFunction)py_io_channel_set_encoding, METH_VARARGS|METH_KEYWORDS },
     { "get_encoding", (PyCFunction)py_io_channel_get_encoding, METH_NOARGS },
-    { "set_buffered", (PyCFunction)py_io_channel_set_buffered, METH_KEYWORDS },
+    { "set_buffered", (PyCFunction)py_io_channel_set_buffered, METH_VARARGS|METH_KEYWORDS },
     { "get_buffered", (PyCFunction)py_io_channel_get_buffered, METH_NOARGS },
-    { "set_buffer_size", (PyCFunction)py_io_channel_set_buffer_size, METH_KEYWORDS },
+    { "set_buffer_size", (PyCFunction)py_io_channel_set_buffer_size, METH_VARARGS|METH_KEYWORDS },
     { "get_buffer_size", (PyCFunction)py_io_channel_get_buffer_size, METH_NOARGS },
-    { "read", (PyCFunction)py_io_channel_read_chars, METH_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 },
+    { "read", (PyCFunction)py_io_channel_read_chars, METH_VARARGS|METH_KEYWORDS },
+    { "readline", (PyCFunction)py_io_channel_read_line, METH_VARARGS|METH_KEYWORDS },
+    { "readlines", (PyCFunction)py_io_channel_read_lines, METH_VARARGS|METH_KEYWORDS },
+    { "write", (PyCFunction)py_io_channel_write_chars, METH_VARARGS|METH_KEYWORDS },
+    { "writelines", (PyCFunction)py_io_channel_write_lines, METH_VARARGS|METH_KEYWORDS },
+    { "set_flags", (PyCFunction)py_io_channel_set_flags, METH_VARARGS|METH_KEYWORDS },
     { "get_flags", (PyCFunction)py_io_channel_get_flags, METH_NOARGS },
     { "get_buffer_condition", (PyCFunction)py_io_channel_get_buffer_condition, METH_NOARGS },
-    { "set_close_on_unref", (PyCFunction)py_io_channel_set_close_on_unref, METH_KEYWORDS },
+    { "set_close_on_unref", (PyCFunction)py_io_channel_set_close_on_unref, METH_VARARGS | METH_KEYWORDS },
     { "get_close_on_unref", (PyCFunction)py_io_channel_get_close_on_unref, METH_NOARGS },
-    { "add_watch", (PyCFunction)py_io_channel_add_watch, METH_KEYWORDS },
-    { "seek", (PyCFunction)py_io_channel_seek, METH_KEYWORDS },
+    { "add_watch", (PyCFunction)py_io_channel_add_watch, METH_VARARGS|METH_KEYWORDS },
+    { "seek", (PyCFunction)py_io_channel_seek, METH_VARARGS|METH_KEYWORDS },
 #ifdef G_OS_WIN32
-    { "win32_make_pollfd", (PyCFunction)py_io_channel_win32_make_pollfd, METH_KEYWORDS },
-    { "win32_poll", (PyCFunction)py_io_channel_win32_poll, METH_KEYWORDS|METH_STATIC },
+    { "win32_make_pollfd", (PyCFunction)py_io_channel_win32_make_pollfd, METH_VARARGS | METH_KEYWORDS },
+    { "win32_poll", (PyCFunction)py_io_channel_win32_poll, METH_VARARGS|METH_KEYWORDS|METH_STATIC },
 #endif
     { NULL, NULL, 0 }
 };
@@ -732,7 +756,7 @@ pyglib_iochannel_register_types(PyObject *d)
     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_richcompare = (richcmpfunc)py_io_channel_richcompare;
     PyGIOChannel_Type.tp_iter = (getiterfunc)py_io_channel_get_iter;
     PyGIOChannel_Type.tp_iternext = (iternextfunc)py_io_channel_next;
 
index 915a912491d4a7b6500172918799694c189138e3..bb7bcadb05f71c87e011cb18540a3d07f46f4e9b 100644 (file)
@@ -41,31 +41,110 @@ typedef int Py_ssize_t;
 typedef inquiry lenfunc;
 #endif
 
+#if PY_VERSION_HEX < 0x03000000
+
+#define PYGLIB_INIT_FUNCTION(modname, fullpkgname, functions) \
+static int _pyglib_init_##modname(PyObject *module); \
+void init##modname(void) \
+{ \
+    PyObject *module = Py_InitModule(fullpkgname, functions); \
+    _pyglib_init_##modname(module); \
+} \
+static int _pyglib_init_##modname(PyObject *module)
+
+#else
+
+#define PYGLIB_INIT_FUNCTION(modname, fullpkgname, functions) \
+static struct PyModuleDef _##modname##module = {     \
+    PyModuleDef_HEAD_INIT,                              \
+    fullpkgname,                                        \
+    NULL,                                               \
+    -1,                                                 \
+    functions,                                          \
+    NULL,                                               \
+    NULL,                                               \
+    NULL,                                               \
+    NULL                                                \
+};                                                      \
+static int _pyglib_init_##modname(PyObject *module); \
+PyObject *PyInit_##modname(void) \
+{ \
+    PyObject *module = PyModule_Create(&_##modname##module);  \
+    if (module == NULL) \
+       return NULL; \
+    if (_pyglib_init_##modname(module) != 0 ) {\
+       Py_DECREF(module); \
+       return NULL; \
+    } \
+    return module; \
+} \
+static int _pyglib_init_##modname(PyObject *module)
+
+#endif
+
 /* Compilation on Python 2.x */
 #if PY_VERSION_HEX < 0x03000000
 #define 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 PYGLIB_PyUnicode_Check PyString_Check
+#define PYGLIB_PyUnicode_AsString PyString_AsString
+#define PYGLIB_PyUnicode_AsStringAndSize PyString_AsStringAndSize
+#define PYGLIB_PyUnicode_FromString PyString_FromString
+#define PYGLIB_PyUnicode_FromStringAndSize PyString_FromStringAndSize
+#define PYGLIB_PyUnicode_FromFormat PyString_FromFormat
+#define PYGLIB_PyUnicode_AS_STRING PyString_AS_STRING
+#define PYGLIB_PyUnicode_GET_SIZE PyString_GET_SIZE
+#define PYGLIB_PyUnicode_Type PyString_Type
+
+#define PYGLIB_PyBytes_FromString PyString_FromString
+#define PYGLIB_PyBytes_FromStringAndSize PyString_FromStringAndSize
+#define PYGLIB_PyBytes_Resize _PyString_Resize
+#define PYGLIB_PyBytes_AsString PyString_AsString
+#define PYGLIB_PyBytes_Size PyString_Size
+#define PYGLIB_PyBytes_Check PyString_Check
+
+#define PYGLIB_PyLong_Check PyInt_Check
+#define PYGLIB_PyLong_FromLong PyInt_FromLong
+#define PYGLIB_PyLong_FromSsize_t PyInt_FromSsize_t
+#define PYGLIB_PyLong_FromSize_t PyInt_FromSize_t
+#define PYGLIB_PyLong_AsLong  PyInt_AsLong
+#define PYGLIB_PyLongObject PyIntObject
+#define PYGLIB_PyLong_Type PyInt_Type
+#define PYGLIB_PyLong_AS_LONG PyInt_AS_LONG
 #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+
+#define PYGLIB_PyNumber_Long PyNumber_Int
+
+#ifndef PyVarObject_HEAD_INIT
+#define PyVarObject_HEAD_INIT(base, size) \
+  PyObject_HEAD_INIT(base) \
+  size,
+#endif
+
+#define PYGLIB_MODULE_START(symbol, modname)           \
+DL_EXPORT(void) init##symbol(void)                     \
+{                                                       \
+    PyObject *module;                                   \
+    module = Py_InitModule(modname, symbol##_functions);
+#define PYGLIB_MODULE_END }
+#define PYGLIB_DEFINE_TYPE(typename, symbol, csymbol)  \
+PyTypeObject symbol = {                                 \
+    PyObject_HEAD_INIT(NULL)                            \
+    0,                                                  \
+    typename,                                          \
+    sizeof(csymbol),                                    \
+    0,                                                  \
+};
+#define PYGLIB_REGISTER_TYPE(d, type, name)            \
+    if (!type.tp_alloc)                                 \
+       type.tp_alloc = PyType_GenericAlloc;            \
+    if (!type.tp_new)                                   \
+       type.tp_new = PyType_GenericNew;                \
+    if (PyType_Ready(&type))                            \
+       return;                                         \
+    PyDict_SetItemString(d, name, (PyObject *)&type);
+
 #else
-#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 = {     \
@@ -99,22 +178,32 @@ PyTypeObject symbol = {                                 \
            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
+#define PYGLIB_PyUnicode_Check PyUnicode_Check
+#define PYGLIB_PyUnicode_AsString _PyUnicode_AsString
+#define PYGLIB_PyUnicode_AsStringAndSize(obj, buf, size) \
+    (((*(buf) = _PyUnicode_AsStringAndSize(obj, size)) != NULL) ? 0 : -1) 
+#define PYGLIB_PyUnicode_FromString PyUnicode_FromString
+#define PYGLIB_PyUnicode_FromStringAndSize PyUnicode_FromStringAndSize
+#define PYGLIB_PyUnicode_FromFormat PyUnicode_FromFormat
+#define PYGLIB_PyUnicode_GET_SIZE PyUnicode_GET_SIZE
+#define PYGLIB_PyUnicode_Resize PyUnicode_Resize
+#define PYGLIB_PyUnicode_Type PyUnicode_Type
+#define PYGLIB_PyLong_Check PyLong_Check
+#define PYGLIB_PyLong_FromLong PyLong_FromLong
+#define PYGLIB_PyLong_AsLong PyLong_AsLong
+#define PYGLIB_PyLong_AS_LONG(o) PyLong_AS_LONG((PyObject*)(o))
+#define PYGLIB_PyLongObject PyLongObject
+#define PYGLIB_PyLong_Type PyLong_Type
+
+#define PYGLIB_PyBytes_FromString PyBytes_FromString
+#define PYGLIB_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+#define PYGLIB_PyBytes_Resize(o, len) _PyBytes_Resize(o, len)
+#define PYGLIB_PyBytes_AsString PyBytes_AsString
+#define PYGLIB_PyBytes_Size PyBytes_Size
+#define PYGLIB_PyBytes_Check PyBytes_Check
+
+#define PYGLIB_PyNumber_Long PyNumber_Long
+
 #endif
 
 #endif /* __PYGLIB_PYTHON_COMPAT_H__ */
index a1bdbb902d16ef7563a596fa7f4e556f8cd52e0b..07db57981c058c41c5ba74edad4f68efe69f0cfc 100644 (file)
@@ -61,7 +61,7 @@ pyglib_init(void)
            Py_XDECREF(traceback);
            PyErr_Format(PyExc_ImportError,
                         "could not import glib (error was: %s)",
-                        _PyUnicode_AsString(py_orig_exc));
+                        PYGLIB_PyUnicode_AsString(py_orig_exc));
            Py_DECREF(py_orig_exc);
         } else {
            PyErr_SetString(PyExc_ImportError,
@@ -264,7 +264,7 @@ pyglib_error_check(GError **error)
     if (exception_table != NULL)
     {
        PyObject *item;
-       item = PyDict_GetItem(exception_table, _PyLong_FromLong((*error)->domain));
+       item = PyDict_GetItem(exception_table, PYGLIB_PyLong_FromLong((*error)->domain));
        if (item != NULL)
            exc_type = item;
     }
@@ -273,19 +273,19 @@ pyglib_error_check(GError **error)
 
     if ((*error)->domain) {
        PyObject_SetAttrString(exc_instance, "domain",
-                              d=_PyUnicode_FromString(g_quark_to_string((*error)->domain)));
+                              d=PYGLIB_PyUnicode_FromString(g_quark_to_string((*error)->domain)));
        Py_DECREF(d);
     }
     else
        PyObject_SetAttrString(exc_instance, "domain", Py_None);
 
     PyObject_SetAttrString(exc_instance, "code",
-                          d=_PyLong_FromLong((*error)->code));
+                          d=PYGLIB_PyLong_FromLong((*error)->code));
     Py_DECREF(d);
 
     if ((*error)->message) {
        PyObject_SetAttrString(exc_instance, "message",
-                              d=_PyUnicode_FromString((*error)->message));
+                              d=PYGLIB_PyUnicode_FromString((*error)->message));
        Py_DECREF(d);
     } else {
        PyObject_SetAttrString(exc_instance, "message", Py_None);
@@ -338,28 +338,28 @@ pyglib_gerror_exception_check(GError **error)
     Py_XDECREF(traceback);
 
     py_message = PyObject_GetAttrString(value, "message");
-    if (!py_message || !_PyUnicode_Check(py_message)) {
+    if (!py_message || !PYGLIB_PyUnicode_Check(py_message)) {
         bad_gerror_message = "glib.GError instances must have a 'message' string attribute";
         goto bad_gerror;
     }
 
     py_domain = PyObject_GetAttrString(value, "domain");
-    if (!py_domain || !_PyUnicode_Check(py_domain)) {
+    if (!py_domain || !PYGLIB_PyUnicode_Check(py_domain)) {
         bad_gerror_message = "glib.GError instances must have a 'domain' string attribute";
         Py_DECREF(py_message);
         goto bad_gerror;
     }
 
     py_code = PyObject_GetAttrString(value, "code");
-    if (!py_code || !_PyLong_Check(py_code)) {
+    if (!py_code || !PYGLIB_PyLong_Check(py_code)) {
         bad_gerror_message = "glib.GError instances must have a 'code' int attribute";
         Py_DECREF(py_message);
         Py_DECREF(py_domain);
         goto bad_gerror;
     }
 
-    g_set_error(error, g_quark_from_string(_PyUnicode_AsString(py_domain)),
-                _PyLong_AsLong(py_code), _PyUnicode_AsString(py_message));
+    g_set_error(error, g_quark_from_string(PYGLIB_PyUnicode_AsString(py_domain)),
+                PYGLIB_PyLong_AsLong(py_code), PYGLIB_PyUnicode_AsString(py_message));
 
     Py_DECREF(py_message);
     Py_DECREF(py_code);
@@ -368,7 +368,7 @@ pyglib_gerror_exception_check(GError **error)
 
 bad_gerror:
     Py_DECREF(value);
-    g_set_error(error, g_quark_from_static_string("pyglib"), 0, bad_gerror_message);
+    g_set_error(error, g_quark_from_static_string("pyglib"), 0, "%s", bad_gerror_message);
     PyErr_SetString(PyExc_ValueError, bad_gerror_message);
     PyErr_Print();
     return -2;
@@ -397,7 +397,7 @@ pyglib_register_exception_for_domain(gchar *name,
        exception_table = PyDict_New();
 
     PyDict_SetItem(exception_table,
-                  _PyLong_FromLong(error_domain),
+                  PYGLIB_PyLong_FromLong(error_domain),
                   exception);
     
     return exception;
@@ -574,4 +574,90 @@ _pyglib_handler_marshal(gpointer user_data)
     return res;
 }
 
+PyObject*
+_pyglib_generic_ptr_richcompare(void* a, void *b, int op)
+{
+    PyObject *res;
+
+    switch (op) {
+
+      case Py_EQ:
+        res = (a == b) ? Py_True : Py_False;
+        break;
+
+      case Py_NE:
+        res = (a != b) ? Py_True : Py_False;
+        break;
+
+      case Py_LT:
+        res = (a < b) ? Py_True : Py_False;
+        break;
+
+      case Py_LE:
+        res = (a <= b) ? Py_True : Py_False;
+        break;
+
+      case Py_GT:
+        res = (a > b) ? Py_True : Py_False;
+        break;
+
+      case Py_GE:
+        res = (a >= b) ? Py_True : Py_False;
+        break;
+
+      default:
+        res = Py_NotImplemented;
+        break;
+    }
+
+    Py_INCREF(res);
+    return res;
+}
+
+PyObject*
+_pyglib_generic_long_richcompare(long a, long b, int op)
+{
+    PyObject *res;
+
+    switch (op) {
+
+      case Py_EQ:
+        res = (a == b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_NE:
+        res = (a != b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+
+      case Py_LT:
+        res = (a < b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_LE:
+        res = (a <= b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_GT:
+        res = (a > b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_GE:
+        res = (a >= b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      default:
+        res = Py_NotImplemented;
+        Py_INCREF(res);
+        break;
+    }
+
+    return res;
+}
 
index 84bb36cee22e521ea4f17da3b7599d59c436ac94..44ead477561d6969001703f6f05dbb5c31941b2f 100644 (file)
@@ -53,6 +53,8 @@ PyObject * pyglib_float_from_timeval(GTimeVal timeval);
 
 /* Private: for gobject <-> glib interaction only. */
 void _pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback);
+PyObject* _pyglib_generic_ptr_richcompare(void* a, void *b, int op);
+PyObject* _pyglib_generic_long_richcompare(long a, long b, int op);
 
 #define pyglib_begin_allow_threads             \
     G_STMT_START {                              \
@@ -65,20 +67,6 @@ void _pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback);
             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;            \
@@ -88,6 +76,7 @@ PyTypeObject symbol = {                                 \
        return;                                         \
     PyDict_SetItemString(d, name, (PyObject *)&type);
 
+
 G_END_DECLS
 
 #endif /* __PYGLIB_H__ */
index 186215a32a2040ec197c7f7e3e4dca422b23d592..43ca84e2eddaf605df1bc3435a045cef561c5def 100644 (file)
@@ -51,12 +51,17 @@ pyg_main_context_dealloc(PyGMainContext *self)
     PyObject_Del(self);
 }
 
-static int
-pyg_main_context_compare(PyGMainContext *self, PyGMainContext *v)
+static PyObject*
+pyg_main_context_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->context == v->context) return 0;
-    if (self->context > v->context) return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGMainContext_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGMainContext*)self)->context,
+                                               ((PyGMainContext*)other)->context,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 }
 
 static PyObject *
@@ -91,7 +96,7 @@ 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_richcompare = pyg_main_context_richcompare;
     PyGMainContext_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     PyGMainContext_Type.tp_methods = _PyGMainContext_methods;
     PyGMainContext_Type.tp_init = (initproc)pyg_main_context_init;
index d9f048c510ad9e2f6fb4af8489d32dd4b593384a..de74971154797783d1b92c43d9791be43e1d3e81 100644 (file)
@@ -285,12 +285,17 @@ pyg_main_loop_dealloc(PyGMainLoop *self)
     PyObject_Del(self);
 }
 
-static int
-pyg_main_loop_compare(PyGMainLoop *self, PyGMainLoop *v)
+static PyObject*
+pyg_main_loop_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->loop == v->loop) return 0;
-    if (self->loop > v->loop) return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGMainLoop_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGMainLoop*)self)->loop,
+                                               ((PyGMainLoop*)other)->loop,
+                                               op);
+    else {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
 }
 
 static PyObject *
@@ -346,7 +351,7 @@ 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_richcompare = pyg_main_loop_richcompare;
     PyGMainLoop_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     PyGMainLoop_Type.tp_methods = _PyGMainLoop_methods;
     PyGMainLoop_Type.tp_init = (initproc)pyg_main_loop_init;
index 92ba901c04f73a4c959a69cbb1cd47b1a7645dc4..1d67ac53a61d1cb5ecb62f46576ea868d37d5ff5 100644 (file)
@@ -98,7 +98,7 @@ pyg_option_context_parse(PyGOptionContext *self,
     for (pos = 0; pos < argv_length; pos++)
     {
         arg = PyList_GetItem(argv, pos);
-        argv_content[pos] = g_strdup(_PyUnicode_AsString(arg));
+        argv_content[pos] = g_strdup(PYGLIB_PyUnicode_AsString(arg));
         if (argv_content[pos] == NULL)
         {
             g_strfreev(argv_content);
@@ -126,7 +126,7 @@ pyg_option_context_parse(PyGOptionContext *self,
     new_argv = PyList_New(g_strv_length(argv_content));
     for (pos = 0; pos < argv_length; pos++)
     {
-        arg = _PyUnicode_FromString(argv_content[pos]);
+        arg = PYGLIB_PyUnicode_FromString(argv_content[pos]);
         PyList_SetItem(new_argv, pos, arg);
     }
 
@@ -272,13 +272,17 @@ pyg_option_context_add_group(PyGOptionContext *self,
     return Py_None;
 }
 
-static int
-pyg_option_context_compare(PyGOptionContext *self, PyGOptionContext *context)
+static PyObject*
+pyg_option_context_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->context == context->context) return 0;
-    if (self->context > context->context)
-        return 1;
-    return -1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGOptionContext_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGOptionContext*)self)->context,
+                                               ((PyGOptionContext*)other)->context,
+                                               op);
+    else {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
 }
 
 static PyObject *
@@ -304,7 +308,7 @@ 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_richcompare = pyg_option_context_richcompare;
     PyGOptionContext_Type.tp_flags = Py_TPFLAGS_DEFAULT;
     PyGOptionContext_Type.tp_methods = pyg_option_context_methods;
     PyGOptionContext_Type.tp_init = (initproc)pyg_option_context_init;
index 70e45296543360da3e4c57b40000f8610270204b..9345869748ef1e0cc107f6cf94b4cee109fe1693 100644 (file)
@@ -240,16 +240,18 @@ pyg_option_group_set_translation_domain(PyGOptionGroup *self,
     return Py_None;
 }
 
-static int
-pyg_option_group_compare(PyGOptionGroup *self, PyGOptionGroup *group)
+static PyObject*
+pyg_option_group_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->group == group->group)
-       return 0;
-
-    if (self->group > group->group)
-        return 1;
-
-    return -1;
+    if (Py_TYPE(self) == Py_TYPE(other) && 
+          Py_TYPE(self) == &PyGOptionGroup_Type) {
+        return _pyglib_generic_ptr_richcompare(((PyGOptionGroup*)self)->group,
+                                               ((PyGOptionGroup*)other)->group,
+                                               op);
+    } else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 }
 
 static PyMethodDef pyg_option_group_methods[] = {
@@ -262,7 +264,7 @@ 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_richcompare = pyg_option_group_richcompare;
     PyGOptionGroup_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     PyGOptionGroup_Type.tp_methods = pyg_option_group_methods;
     PyGOptionGroup_Type.tp_init = (initproc)pyg_option_group_init;
index 298b928343446dcf80718796497ae2958520666c..3587c388a2a9e1fde6651e817990f33313e5fb30 100644 (file)
@@ -82,7 +82,7 @@ source_repr(PyGSource *self, const char *type)
        g_snprintf(buf, sizeof(buf), "<%s glib source at 0x%lx>",
                   desc, (long) self);
 
-    return _PyUnicode_FromString(buf);
+    return PYGLIB_PyUnicode_FromString(buf);
 }
 
 static PyObject *
@@ -109,7 +109,7 @@ pyg_source_attach(PyGSource *self, PyObject *args, PyObject *kwargs)
     }
 
     id = g_source_attach(self->source, context);
-    return _PyLong_FromLong(id);
+    return PYGLIB_PyLong_FromLong(id);
 }
 
 static PyObject *
@@ -255,12 +255,12 @@ pyg_source_get_current_time(PyGSource *self)
 }
 
 static PyMethodDef pyg_source_methods[] = {
-    { "attach", (PyCFunction)pyg_source_attach, METH_KEYWORDS },
+    { "attach", (PyCFunction)pyg_source_attach, METH_VARARGS|METH_KEYWORDS },
     { "destroy", (PyCFunction)pyg_source_destroy, METH_NOARGS },
     { "set_callback", (PyCFunction)pyg_source_set_callback, METH_VARARGS },
     { "get_context", (PyCFunction)pyg_source_get_context, METH_NOARGS },
     { "add_poll", (PyCFunction)pyg_source_add_poll, METH_KEYWORDS },
-    { "remove_poll", (PyCFunction)pyg_source_remove_poll, METH_KEYWORDS },
+    { "remove_poll", (PyCFunction)pyg_source_remove_poll, METH_VARARGS|METH_KEYWORDS },
     { "get_current_time", (PyCFunction)pyg_source_get_current_time, METH_NOARGS },
     { NULL, NULL, 0 }
 };
@@ -283,7 +283,7 @@ pyg_source_get_priority(PyGSource *self, void *closure)
 {
     CHECK_DESTROYED(self, NULL);
 
-    return _PyLong_FromLong(g_source_get_priority(self->source));
+    return PYGLIB_PyLong_FromLong(g_source_get_priority(self->source));
 }
 
 static int
@@ -296,12 +296,12 @@ pyg_source_set_priority(PyGSource *self, PyObject *value, void *closure)
        return -1;
     }
 
-    if (!_PyLong_Check(value)) {
+    if (!PYGLIB_PyLong_Check(value)) {
        PyErr_SetString(PyExc_TypeError, "type mismatch");
        return -1;
     }
 
-    g_source_set_priority(self->source, _PyLong_AsLong(value));
+    g_source_set_priority(self->source, PYGLIB_PyLong_AsLong(value));
 
     return 0;
 }
@@ -339,7 +339,7 @@ pyg_source_get_id(PyGSource *self, void *closure)
        return NULL;
     }
 
-    return _PyLong_FromLong(g_source_get_id(self->source));
+    return PYGLIB_PyLong_FromLong(g_source_get_id(self->source));
 }
 
 static PyGetSetDef pyg_source_getsets[] = {
@@ -426,7 +426,7 @@ pyg_source_prepare(GSource *source, gint *timeout)
     }
 
     ret = PyObject_IsTrue(PyTuple_GET_ITEM(t, 0));
-       *timeout = _PyLong_AsLong(PyTuple_GET_ITEM(t, 1));
+       *timeout = PYGLIB_PyLong_AsLong(PyTuple_GET_ITEM(t, 1));
 
        if (*timeout == -1 && PyErr_Occurred()) {
            ret = FALSE;
@@ -652,7 +652,7 @@ pyg_poll_fd_dealloc(PyGPollFD *self)
 static PyObject *
 pyg_poll_fd_repr(PyGPollFD *self)
 {
-    return _PyUnicode_FromFormat("<GPollFD %d (%d) at 0x%lx>",
+    return PYGLIB_PyUnicode_FromFormat("<GPollFD %d (%d) at 0x%lx>",
                                 self->pollfd.fd, self->pollfd.events,
                                 (long)self);
 }
index cded501886be6edae299eb842a91b4d92de28ada..75e2232b4eddcc55eb4cf5243582e68549375acd 100644 (file)
@@ -32,12 +32,12 @@ struct _PyGChildSetupData {
     PyObject *data;
 };
 
-PYGLIB_DEFINE_TYPE("glib.Pid", PyGPid_Type, _PyLongObject)
+PYGLIB_DEFINE_TYPE("glib.Pid", PyGPid_Type, PYGLIB_PyLongObject)
 
 static PyObject *
 pyg_pid_close(PyObject *self, PyObject *args, PyObject *kwargs)
 {
-    g_spawn_close_pid(_PyLong_AsLong(self));
+    g_spawn_close_pid(PYGLIB_PyLong_AsLong(self));
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -50,8 +50,8 @@ static PyMethodDef pyg_pid_methods[] = {
 static void
 pyg_pid_free(PyObject *gpid)
 {
-    g_spawn_close_pid((GPid) _PyLong_AsLong(gpid));
-    _PyLong_Type.tp_free((void *) gpid);
+    g_spawn_close_pid((GPid) PYGLIB_PyLong_AsLong(gpid));
+    PYGLIB_PyLong_Type.tp_free((void *) gpid);
 }
 
 static int
@@ -64,14 +64,15 @@ pyg_pid_tp_init(PyObject *self, PyObject *args, PyObject *kwargs)
 PyObject *
 pyg_pid_new(GPid pid)
 {
-    _PyLongObject *pygpid;
-    pygpid = PyObject_NEW(_PyLongObject, &PyGPid_Type);
+    PYGLIB_PyLongObject *pygpid;
 
 #if PY_VERSION_HEX >= 0x03000000
-#   warning "FIXME: figure out how to subclass long"    
+    return PyObject_CallMethod((PyObject*)&PyGPid_Type, "__new__", "Oi",
+                              &PyGPid_Type, pid);
 #else
+    pygpid = PyObject_NEW(PyIntObject, &PyGPid_Type);
     pygpid->ob_ival = pid;
-#endif    
+#endif
     return (PyObject *) pygpid;
 }
 
@@ -149,7 +150,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
     argv = g_new0(char *, len + 1);
     for (i = 0; i < len; ++i) {
         PyObject *tmp = PySequence_ITEM(pyargv, i);
-        if (!_PyUnicode_Check(tmp)) {
+        if (!PYGLIB_PyUnicode_Check(tmp)) {
             PyErr_SetString(PyExc_TypeError,
                             "glib.spawn_async: "
                            "first argument must be a sequence of strings");
@@ -157,7 +158,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
             Py_XDECREF(tmp);
             return NULL;
         }
-        argv[i] = _PyUnicode_AsString(tmp);
+        argv[i] = PYGLIB_PyUnicode_AsString(tmp);
         Py_DECREF(tmp);
     }
 
@@ -174,7 +175,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
         envp = g_new0(char *, len + 1);
         for (i = 0; i < len; ++i) {
             PyObject *tmp = PySequence_ITEM(pyenvp, i);
-            if (!_PyUnicode_Check(tmp)) {
+            if (!PYGLIB_PyUnicode_Check(tmp)) {
                 PyErr_SetString(PyExc_TypeError,
                                 "glib.spawn_async: "
                                "second argument must be a sequence of strings");
@@ -183,7 +184,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
                g_free(argv);
                 return NULL;
             }
-            envp[i] = _PyUnicode_AsString(tmp);
+            envp[i] = PYGLIB_PyUnicode_AsString(tmp);
             Py_DECREF(tmp);
         }
     }
@@ -228,21 +229,21 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
     if (envp) g_free(envp);
 
     if (standard_input)
-        pystdin = _PyLong_FromLong(*standard_input);
+        pystdin = PYGLIB_PyLong_FromLong(*standard_input);
     else {
         Py_INCREF(Py_None);
         pystdin = Py_None;
     }
 
     if (standard_output)
-        pystdout = _PyLong_FromLong(*standard_output);
+        pystdout = PYGLIB_PyLong_FromLong(*standard_output);
     else {
         Py_INCREF(Py_None);
         pystdout = Py_None;
     }
 
     if (standard_error)
-        pystderr = _PyLong_FromLong(*standard_error);
+        pystderr = PYGLIB_PyLong_FromLong(*standard_error);
     else {
         Py_INCREF(Py_None);
         pystderr = Py_None;
@@ -254,7 +255,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
 void
 pyglib_spawn_register_types(PyObject *d)
 {
-    PyGPid_Type.tp_base = &_PyLong_Type;
+    PyGPid_Type.tp_base = &PYGLIB_PyLong_Type;
     PyGPid_Type.tp_flags = Py_TPFLAGS_DEFAULT;
     PyGPid_Type.tp_methods = pyg_pid_methods;
     PyGPid_Type.tp_init = pyg_pid_tp_init;
index 7300152c69fd78ae365ec99169babe2c2edd3957..b92611e20f122530bae6e80281a3e2d2520b603c 100644 (file)
@@ -168,6 +168,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
index d5aec455a91243a3e000a7e48a526fe98632aacb..31e6bb0e4d9d6b2468ca6cb826d16efc5be09912 100644 (file)
@@ -29,7 +29,7 @@ from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
      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
+     Timeout, PollFD, OptionGroup, OptionContext, option, uri_list_extract_uris
 from glib import SPAWN_LEAVE_DESCRIPTORS_OPEN, SPAWN_DO_NOT_REAP_CHILD, \
      SPAWN_SEARCH_PATH, SPAWN_STDOUT_TO_DEV_NULL, SPAWN_STDERR_TO_DEV_NULL, \
      SPAWN_CHILD_INHERITS_STDIN, SPAWN_FILE_AND_ARGV_ZERO, PRIORITY_HIGH, \
index 09244b8d9c2b447e86dbe74feb074372ded3d991..4e9c07d137a0afeffc868bf12d57c10f8bc2d333 100644 (file)
@@ -50,7 +50,7 @@ static gboolean log_handlers_disabled = FALSE;
 static void pyg_flags_add_constants(PyObject *module, GType flags_type,
                                    const gchar *strip_prefix);
 
-    
+
 /* -------------- GDK threading hooks ---------------------------- */
 
 /**
@@ -109,14 +109,14 @@ pyg_type_name (PyObject *self, PyObject *args)
                   "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);
+       return PYGLIB_PyUnicode_FromString(name);
     PyErr_SetString(PyExc_RuntimeError, "unknown typecode");
     return NULL;
 }
@@ -131,14 +131,14 @@ pyg_type_from_name (PyObject *self, PyObject *args)
                   "gobject.type_from_name is deprecated; "
                   "use GType.from_name instead"))
         return NULL;
-#endif    
+#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)),
+         PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                 name);
     return NULL;
 }
@@ -153,7 +153,7 @@ pyg_type_parent (PyObject *self, PyObject *args)
                   "gobject.type_parent is deprecated; "
                   "use GType.parent instead"))
         return NULL;
-#endif    
+#endif
     if (!PyArg_ParseTuple(args, "O:gobject.type_parent", &gtype))
        return NULL;
     if ((type = pyg_type_from_object(gtype)) == 0)
@@ -175,7 +175,7 @@ pyg_type_is_a (PyObject *self, PyObject *args)
                   "gobject.type_is_a is deprecated; "
                   "use GType.is_a instead"))
         return NULL;
-#endif    
+#endif
     if (!PyArg_ParseTuple(args, "OO:gobject.type_is_a", &gtype, &gparent))
        return NULL;
     if ((type = pyg_type_from_object(gtype)) == 0)
@@ -196,7 +196,7 @@ pyg_type_children (PyObject *self, PyObject *args)
                   "gobject.type_children is deprecated; "
                   "use GType.children instead"))
         return NULL;
-#endif    
+#endif
     if (!PyArg_ParseTuple(args, "O:gobject.type_children", &gtype))
        return NULL;
     if ((type = pyg_type_from_object(gtype)) == 0)
@@ -227,7 +227,7 @@ pyg_type_interfaces (PyObject *self, PyObject *args)
                   "gobject.type_interfaces is deprecated; "
                   "use GType.interfaces instead"))
         return NULL;
-#endif    
+#endif
     if (!PyArg_ParseTuple(args, "O:gobject.type_interfaces", &gtype))
        return NULL;
     if ((type = pyg_type_from_object(gtype)) == 0)
@@ -308,7 +308,7 @@ pyg_object_get_property (GObject *object, guint property_id,
     Py_DECREF(object_wrapper);
     Py_DECREF(py_pspec);
     Py_XDECREF(retval);
-    
+
     pyglib_gil_state_release(state);
 }
 
@@ -338,7 +338,7 @@ _pyg_signal_accumulator(GSignalInvocationHint *ihint,
 
     state = pyglib_gil_state_ensure();
     if (ihint->detail)
-        py_detail = _PyUnicode_FromString(g_quark_to_string(ihint->detail));
+        py_detail = PYGLIB_PyUnicode_FromString(g_quark_to_string(ihint->detail));
     else {
         Py_INCREF(Py_None);
         py_detail = Py_None;
@@ -497,17 +497,17 @@ add_signals (GType instance_type, PyObject *signals)
        const gchar *signal_name;
         gchar *signal_name_canon, *c;
 
-       if (!_PyUnicode_Check(key)) {
+       if (!PYGLIB_PyUnicode_Check(key)) {
            PyErr_SetString(PyExc_TypeError,
                            "__gsignals__ keys must be strings");
            ret = FALSE;
            break;
        }
-       signal_name = _PyUnicode_AsString (key);
+       signal_name = PYGLIB_PyUnicode_AsString (key);
 
        if (value == Py_None ||
-           (_PyUnicode_Check(value) &&
-            !strcmp(_PyUnicode_AsString(value), "override")))
+           (PYGLIB_PyUnicode_Check(value) &&
+            !strcmp(PYGLIB_PyUnicode_AsString(value), "override")))
         {
               /* canonicalize signal name, replacing '-' with '_' */
             signal_name_canon = g_strdup(signal_name);
@@ -652,14 +652,14 @@ create_property (const gchar  *prop_name,
        {
            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);
        }
@@ -671,11 +671,11 @@ create_property (const gchar  *prop_name,
 
            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);
        }
@@ -745,7 +745,7 @@ create_property (const gchar  *prop_name,
        PyErr_SetString(PyExc_TypeError, buf);
        return NULL;
     }
-    
+
     return pspec;
 }
 
@@ -764,27 +764,27 @@ pyg_param_spec_from_object (PyObject *tuple)
        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)) {
+    if (!PYGLIB_PyLong_Check(item)) {
        PyErr_SetString(PyExc_TypeError,
                        "last element in tuple must be an int");
        return NULL;
@@ -794,7 +794,7 @@ pyg_param_spec_from_object (PyObject *tuple)
     slice = PySequence_GetSlice(tuple, 4, val_length-1);
     pspec = create_property(prop_name, prop_type,
                            nick, blurb, slice,
-                           _PyLong_AsLong(item));
+                           PYGLIB_PyLong_AsLong(item));
 
     return pspec;
 }
@@ -816,16 +816,16 @@ add_properties (GType instance_type, PyObject *properties)
        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)) {
+
+       if (!PYGLIB_PyUnicode_Check(key)) {
            PyErr_SetString(PyExc_TypeError,
                            "__gproperties__ keys must be strings");
            ret = FALSE;
            break;
        }
-       prop_name = _PyUnicode_AsString (key);
+       prop_name = PYGLIB_PyUnicode_AsString (key);
 
        if (!PyTuple_Check(value)) {
            PyErr_SetString(PyExc_TypeError,
@@ -839,7 +839,7 @@ add_properties (GType instance_type, PyObject *properties)
                            "__gproperties__ values must be at least 4 elements long");
            ret = FALSE;
            break;
-       }           
+       }
 
        slice = PySequence_GetSlice(value, 0, 3);
        if (!slice) {
@@ -858,40 +858,40 @@ add_properties (GType instance_type, PyObject *properties)
            break;
        }
        item = PyTuple_GetItem(value, val_length-1);
-       if (!_PyLong_Check(item)) {
+       if (!PYGLIB_PyLong_Check(item)) {
            PyErr_SetString(PyExc_TypeError,
                "last element in __gproperties__ value tuple must be an int");
            ret = FALSE;
            break;
        }
-       flags = _PyLong_AsLong(item);
+       flags = PYGLIB_PyLong_AsLong(item);
 
        /* slice is the extra items in the tuple */
        slice = PySequence_GetSlice(value, 3, val_length-1);
        pspec = create_property(prop_name, prop_type, nick, blurb,
                                slice, flags);
        Py_DECREF(slice);
-       
+
        if (pspec) {
            g_object_class_install_property(oclass, 1, pspec);
        } else {
             PyObject *type, *value, *traceback;
            ret = FALSE;
             PyErr_Fetch(&type, &value, &traceback);
-            if (_PyUnicode_Check(value)) {
+            if (PYGLIB_PyUnicode_Check(value)) {
                 char msg[256];
                 g_snprintf(msg, 256,
                           "%s (while registering property '%s' for GType '%s')",
-                           _PyUnicode_AsString(value),
+               PYGLIB_PyUnicode_AsString(value),
                           prop_name, g_type_name(instance_type));
                 Py_DECREF(value);
-                value = _PyUnicode_FromString(msg);
+                value = PYGLIB_PyUnicode_FromString(msg);
             }
             PyErr_Restore(type, value, traceback);
            break;
        }
     }
-    
+
     g_type_class_unref(oclass);
     return ret;
 }
@@ -920,7 +920,7 @@ pyg_run_class_init(GType gtype, gpointer gclass, PyTypeObject *pyclass)
         if (rv)
            return rv;
     }
-    
+
     list = g_type_get_qdata(gtype, pygobject_class_init_key);
     for (; list; list = list->next) {
        class_init = list->data;
@@ -928,7 +928,7 @@ pyg_run_class_init(GType gtype, gpointer gclass, PyTypeObject *pyclass)
         if (rv)
            return rv;
     }
-    
+
     return 0;
 }
 
@@ -954,7 +954,7 @@ _wrap_pyg_type_register(PyObject *self, PyObject *args)
         if (pyg_type_register(class, type_name))
             return NULL;
     }
+
     Py_INCREF(class);
     return (PyObject *) class;
 }
@@ -966,17 +966,17 @@ get_type_name_for_class(PyTypeObject *class)
     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) 
+    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), ".",
+       if (module && PYGLIB_PyUnicode_Check(module)) {
+           type_name = g_strconcat(PYGLIB_PyUnicode_AsString(module), ".",
                                    class->tp_name,
                                    name_serial > 1 ? name_serial_str : NULL,
                                    NULL);
@@ -1028,7 +1028,7 @@ pygobject__g_instance_init(GTypeInstance   *instance,
                          pygobject_has_updated_constructor_key))
         return;
 
-    wrapper = g_object_get_qdata(object, pygobject_wrapper_key); 
+    wrapper = g_object_get_qdata(object, pygobject_wrapper_key);
     if (wrapper == NULL) {
         wrapper = pygobject_init_wrapper_get();
         if (wrapper && ((PyGObject *) wrapper)->obj == NULL) {
@@ -1160,10 +1160,10 @@ pyg_type_register(PyTypeObject *class, const char *type_name)
 
     if (type_name)
        /* care is taken below not to free this */
-        new_type_name = (gchar *) type_name; 
+        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;
 
@@ -1192,7 +1192,7 @@ pyg_type_register(PyTypeObject *class, const char *type_name)
 
     /* set new value of __gtype__ on class */
     gtype = pyg_type_wrapper_new(instance_type);
-    PyDict_SetItemString(class->tp_dict, "__gtype__", gtype);
+    PyObject_SetAttrString((PyObject *)class, "__gtype__", gtype);
     Py_DECREF(gtype);
 
       /* propagate new constructor API compatility flag from parent to child type */
@@ -1334,7 +1334,7 @@ pyg_signal_new(PyObject *self, PyObject *args)
                        "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;
@@ -1368,7 +1368,7 @@ pyg_signal_new(PyObject *self, PyObject *args)
                              return_type, n_params, param_types);
     g_free(param_types);
     if (signal_id != 0)
-       return _PyLong_FromLong(signal_id);
+       return PYGLIB_PyLong_FromLong(signal_id);
     PyErr_SetString(PyExc_RuntimeError, "could not create signal");
     return NULL;
 }
@@ -1406,16 +1406,16 @@ pyg_signal_list_names (PyObject *self, PyObject *args, PyObject *kwargs)
     } 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])));
+                       PYGLIB_PyUnicode_FromString(g_signal_name(ids[i])));
     }
-    
+
     g_free(ids);
     if (class)
         g_type_class_unref(class);
@@ -1458,7 +1458,7 @@ pyg_signal_list_ids (PyObject *self, PyObject *args, PyObject *kwargs)
     } else {
         iface = g_type_default_interface_ref(itype);
     }
-    
+
     ids = g_signal_list_ids(itype, &n);
 
     list = PyTuple_New((gint)n);
@@ -1469,7 +1469,7 @@ pyg_signal_list_ids (PyObject *self, PyObject *args, PyObject *kwargs)
     }
 
     for (i = 0; i < n; i++)
-       PyTuple_SetItem(list, i, _PyLong_FromLong(ids[i]));
+       PyTuple_SetItem(list, i, PYGLIB_PyLong_FromLong(ids[i]));
     g_free(ids);
     if (class)
         g_type_class_unref(class);
@@ -1510,14 +1510,14 @@ pyg_signal_lookup (PyObject *self, PyObject *args, PyObject *kwargs)
     } 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);
+    return PYGLIB_PyLong_FromLong(id);
 }
 
 static PyObject *
@@ -1532,7 +1532,7 @@ pyg_signal_name (PyObject *self, PyObject *args, PyObject *kwargs)
        return NULL;
     signal_name = g_signal_name(id);
     if (signal_name)
-        return _PyUnicode_FromString(signal_name);
+        return PYGLIB_PyUnicode_FromString(signal_name);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -1582,7 +1582,7 @@ pyg_signal_query (PyObject *self, PyObject *args, PyObject *kwargs)
                             "Usage: one of:\n"
                             "  gobject.signal_query(name, type)\n"
                             "  gobject.signal_query(signal_id)");
-             
+
        return NULL;
         }
     }
@@ -1605,10 +1605,10 @@ pyg_signal_query (PyObject *self, PyObject *args, PyObject *kwargs)
         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, 0, PYGLIB_PyLong_FromLong(query.signal_id));
+    PyTuple_SET_ITEM(py_query, 1, PYGLIB_PyUnicode_FromString(query.signal_name));
     PyTuple_SET_ITEM(py_query, 2, pyg_type_wrapper_new(query.itype));
-    PyTuple_SET_ITEM(py_query, 3, _PyLong_FromLong(query.signal_flags));
+    PyTuple_SET_ITEM(py_query, 3, PYGLIB_PyLong_FromLong(query.signal_flags));
     PyTuple_SET_ITEM(py_query, 4, pyg_type_wrapper_new(query.return_type));
     for (i = 0; i < query.n_params; i++) {
         PyTuple_SET_ITEM(params_list, i,
@@ -1663,7 +1663,7 @@ pyg_object_class_list_properties (PyObject *self, PyObject *args)
                         "type must be derived from GObject or an interface");
        return NULL;
     }
-        
+
     list = PyTuple_New(nprops);
     if (list == NULL) {
        g_free(specs);
@@ -1719,7 +1719,7 @@ pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs)
        params = g_new0(GParameter, PyDict_Size(kwargs));
        while (PyDict_Next (kwargs, &pos, &key, &value)) {
            GParamSpec *pspec;
-           const gchar *key_str = _PyUnicode_AsString (key);
+           const gchar *key_str = PYGLIB_PyUnicode_AsString (key);
 
            pspec = g_object_class_find_property (class, key_str);
            if (!pspec) {
@@ -1754,7 +1754,7 @@ pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs)
     }
     g_free(params);
     g_type_class_unref(class);
-    
+
     if (obj) {
        self = (PyGObject *) pygobject_new_full((GObject *)obj, FALSE, NULL);
         g_object_unref(obj);
@@ -1785,7 +1785,7 @@ pyg_handler_marshal(gpointer user_data)
        res = PyObject_IsTrue(ret);
        Py_DECREF(ret);
     }
-    
+
     pyglib_gil_state_release(state);
 
     return res;
@@ -1808,7 +1808,7 @@ pyg_threads_init (PyObject *unused, PyObject *args, PyObject *kwargs)
 {
     if (!pyglib_enable_threads())
         return NULL;
-    
+
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -1857,7 +1857,7 @@ marshal_emission_hook(GSignalInvocationHint *ihint,
 
     for (i = 0; i < n_param_values; i++) {
        PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
-       
+
        /* error condition */
        if (!item) {
            goto out;
@@ -1877,7 +1877,7 @@ marshal_emission_hook(GSignalInvocationHint *ihint,
     if (retobj == NULL) {
         PyErr_Print();
     }
-    
+
     retval = (retobj == Py_True ? TRUE : FALSE);
     Py_XDECREF(retobj);
 out:
@@ -1910,7 +1910,7 @@ pyg_add_emission_hook(PyGObject *self, PyObject *args)
        return NULL;
     }
     Py_DECREF(first);
-    
+
     if ((gtype = pyg_type_from_object(pygtype)) == 0) {
        return NULL;
     }
@@ -1921,7 +1921,7 @@ pyg_add_emission_hook(PyGObject *self, PyObject *args)
 
     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)),
+                       PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     name);
        return NULL;
     }
@@ -1932,12 +1932,12 @@ pyg_add_emission_hook(PyGObject *self, PyObject *args)
     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);
 }
 
@@ -1949,24 +1949,24 @@ pyg_remove_emission_hook(PyGObject *self, PyObject *args)
     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);
+                 PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                 name);
        return NULL;
     }
 
     g_signal_remove_emission_hook(signal_id, hook_id);
-    
+
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -2042,7 +2042,7 @@ 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:
@@ -2162,7 +2162,7 @@ pyg_error_check(GError **error)
                   "pyg_error_check is deprecated, use "
                   "pyglib_error_check instead"))
         return NULL;
-#endif    
+#endif
     return pyglib_error_check(error);
 }
 
@@ -2187,7 +2187,7 @@ pyg_gerror_exception_check(GError **error)
                   "pyg_gerror_exception_check is deprecated, use "
                   "pyglib_gerror_exception_check instead"))
         return NULL;
-#endif    
+#endif
     return pyglib_gerror_exception_check(error);
 }
 
@@ -2202,9 +2202,9 @@ pyg_gerror_exception_check(GError **error)
  * 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.
  **/
@@ -2298,9 +2298,9 @@ pygobject_construct(PyGObject *self, const char *first_property_name, ...)
 
         if (!pspec)
        {
-            g_warning("%s: object class `%s' has no property named `%s'", 
-                      G_STRFUNC, 
-                      g_type_name(object_type), 
+            g_warning("%s: object class `%s' has no property named `%s'",
+                      G_STRFUNC,
+                      g_type_name(object_type),
                       name);
             break;
        }
@@ -2347,12 +2347,12 @@ pyg_integer_richcompare(PyObject *v, PyObject *w, int op)
     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;
+    case Py_EQ: t = PYGLIB_PyLong_AS_LONG(v) == PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_NE: t = PYGLIB_PyLong_AS_LONG(v) != PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_LE: t = PYGLIB_PyLong_AS_LONG(v) <= PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_GE: t = PYGLIB_PyLong_AS_LONG(v) >= PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_LT: t = PYGLIB_PyLong_AS_LONG(v) <  PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_GT: t = PYGLIB_PyLong_AS_LONG(v) >  PYGLIB_PyLong_AS_LONG(w); break;
     default: g_assert_not_reached();
     }
 
@@ -2380,7 +2380,7 @@ _log_func(const gchar *log_domain,
 }
 
 static void
-add_warning_redirection(const char *domain, 
+add_warning_redirection(const char *domain,
                         PyObject   *warning)
 {
     g_return_if_fail(domain != NULL);
@@ -2390,7 +2390,7 @@ add_warning_redirection(const char *domain,
     {
        guint handler;
        gpointer old_handler;
-       
+
        if (!log_handlers)
            log_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
 
@@ -2415,7 +2415,7 @@ static void
 disable_warning_redirections(void)
 {
     log_handlers_disabled = TRUE;
-    
+
     if (log_handlers)
     {
        g_hash_table_foreach(log_handlers, remove_handler, NULL);
@@ -2457,7 +2457,7 @@ struct _PyGObject_Functions pygobject_api_functions = {
 
   pyg_enum_add_constants,
   pyg_flags_add_constants,
-  
+
   pyg_constant_strip_prefix,
 
   pyg_error_check,
@@ -2478,7 +2478,7 @@ struct _PyGObject_Functions pygobject_api_functions = {
   &PyGEnum_Type,
   pyg_enum_add,
   pyg_enum_from_gtype,
-  
+
   &PyGFlags_Type,
   pyg_flags_add,
   pyg_flags_from_gtype,
@@ -2494,15 +2494,15 @@ struct _PyGObject_Functions pygobject_api_functions = {
   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 ... */
@@ -2510,7 +2510,7 @@ 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);
@@ -2548,8 +2548,8 @@ pygobject_register_constants(PyObject *m)
     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));
+    PyModule_AddObject(m,       "G_MAXSIZE", PYGLIB_PyLong_FromSize_t(G_MAXSIZE));
+    PyModule_AddObject(m,       "G_MAXSSIZE", PYGLIB_PyLong_FromSsize_t(G_MAXSSIZE));
 #else /* 2.6+ */
     PyModule_AddObject(m,       "G_MAXSIZE", PyLong_FromSize_t(G_MAXSIZE));
     PyModule_AddObject(m,       "G_MAXSSIZE", PyLong_FromSsize_t(G_MAXSSIZE));
@@ -2588,7 +2588,7 @@ static void
 pygobject_register_features(PyObject *d)
 {
     PyObject *features;
-    
+
     features = PyDict_New();
 #ifdef HAVE_FFI_H
     PyDict_SetItemString(features, "generic-c-marshaller", Py_True);
@@ -2648,7 +2648,7 @@ PYGLIB_MODULE_START(_gobject, "gobject._gobject")
     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");
index e2992736df61e82c5746516d72db10032b4a90f9..2f77a4d6e295a77ad442d7b4a6b1253c0899d7ac 100644 (file)
@@ -36,6 +36,12 @@ from gobject.constants import \
      G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
      G_MAXULONG
 
+if sys.version_info >= (3, 0):
+    _basestring = str
+    _long = int
+else:
+    _basestring = basestring
+    _long = long
 
 class property(object):
     """
@@ -107,11 +113,11 @@ class property(object):
         self.default = self._get_default(default)
         self._check_default()
 
-        if not isinstance(nick, basestring):
+        if not isinstance(nick, _basestring):
             raise TypeError("nick must be a string")
         self.nick = nick
 
-        if not isinstance(blurb, basestring):
+        if not isinstance(blurb, _basestring):
             raise TypeError("blurb must be a string")
         self.blurb = blurb
 
@@ -171,12 +177,12 @@ class property(object):
             raise exc
 
     def _type_from_python(self, type):
-        if type == int:
+        if type == _long:
+            return TYPE_LONG
+        elif 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:
index 7bc8e8eb94abf3ef185317f25f65958eaded0033..a00386bc694ff671efc7d541b5c4fdbc4ce8eebc 100644 (file)
@@ -47,14 +47,20 @@ pyg_boxed_dealloc(PyGBoxed *self)
     Py_TYPE(self)->tp_free((PyObject *)self);
 }
 
-static int
-pyg_boxed_compare(PyGBoxed *self, PyGBoxed *v)
+static PyObject*
+pyg_boxed_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->boxed == v->boxed) return 0;
-    if (self->boxed > v->boxed)  return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGBoxed_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGBoxed*)self)->boxed,
+                                               ((PyGBoxed*)other)->boxed,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 }
 
+
 static long
 pyg_boxed_hash(PyGBoxed *self)
 {
@@ -68,7 +74,7 @@ pyg_boxed_repr(PyGBoxed *self)
 
     g_snprintf(buf, sizeof(buf), "<%s at 0x%lx>", g_type_name(self->gtype),
               (long)self->boxed);
-    return _PyUnicode_FromString(buf);
+    return PYGLIB_PyUnicode_FromString(buf);
 }
 
 static int
@@ -216,7 +222,7 @@ pygobject_boxed_register_types(PyObject *d)
     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_richcompare = pyg_boxed_richcompare;
     PyGBoxed_Type.tp_repr = (reprfunc)pyg_boxed_repr;
     PyGBoxed_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     PyGBoxed_Type.tp_methods = pygboxed_methods;
index a09ab98b418a364ea574650dea256eea83568fef..c0a51a993208fd3f47d0eb8e3650dc6c1b51889a 100644 (file)
@@ -34,12 +34,29 @@ GQuark pygenum_class_key;
 
 PYGLIB_DEFINE_TYPE("gobject.GEnum", PyGEnum_Type, PyGEnum);
 
+static PyObject *
+pyg_enum_val_new(PyObject* subclass, GType gtype, PyObject *intval)
+{     
+    PyObject *item;
+    
+#if PY_VERSION_HEX >= 0x03000000
+    item = PyObject_CallMethod((PyObject*)&PyLong_Type, "__new__", "OO",
+                               subclass, intval);
+#else
+    item = ((PyTypeObject *)subclass)->tp_alloc((PyTypeObject *)subclass, 0);
+    ((PyIntObject*)item)->ob_ival = PyInt_AS_LONG(intval);
+#endif    
+    ((PyGEnum*)item)->gtype = gtype;
+    
+    return item;
+}
+
 static PyObject *
 pyg_enum_richcompare(PyGEnum *self, PyObject *other, int op)
 {
     static char warning[256];
 
-    if (!_PyLong_Check(other)) {
+    if (!PYGLIB_PyLong_Check(other)) {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
     }
@@ -61,22 +78,25 @@ pyg_enum_repr(PyGEnum *self)
   const char *value;
   guint index;
   static char tmp[256];
-  
+  long l;
+
   enum_class = g_type_class_ref(self->gtype);
   g_assert(G_IS_ENUM_CLASS(enum_class));
 
-  for (index = 0; index < enum_class->n_values; index++)
-      if (_PyLong_AS_LONG(self) == enum_class->values[index].value)
+  l = PYGLIB_PyLong_AS_LONG(self);
+  for (index = 0; index < enum_class->n_values; index++) 
+      if (l == enum_class->values[index].value)
           break;
+
   value = enum_class->values[index].value_name;
   if (value)
       sprintf(tmp, "<enum %s of type %s>", value, g_type_name(self->gtype));
   else
-      sprintf(tmp, "<enum %ld of type %s>", _PyLong_AS_LONG(self), g_type_name(self->gtype));
+      sprintf(tmp, "<enum %ld of type %s>", PYGLIB_PyLong_AS_LONG(self), g_type_name(self->gtype));
 
   g_type_class_unref(enum_class);
 
-  return _PyUnicode_FromString(tmp);
+  return PYGLIB_PyUnicode_FromString(tmp);
 }
 
 static PyObject *
@@ -90,18 +110,18 @@ pyg_enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
     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);
 
@@ -133,8 +153,8 @@ pyg_enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     }
 
     g_type_class_unref(eclass);
-    
-    intvalue = _PyLong_FromLong(value);
+
+    intvalue = PYGLIB_PyLong_FromLong(value);
     ret = PyDict_GetItem(values, intvalue);
     Py_DECREF(intvalue);
     Py_DECREF(values);
@@ -142,7 +162,7 @@ pyg_enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
         Py_INCREF(ret);
     else
        PyErr_Format(PyExc_ValueError, "invalid enum value: %ld", value);
-    
+
     return ret;
 }
 
@@ -164,28 +184,21 @@ pyg_enum_from_gtype (GType gtype, int value)
     if (!pyclass)
         pyclass = pyg_enum_add(NULL, g_type_name(gtype), NULL, gtype);
     if (!pyclass)
-       return _PyLong_FromLong(value);
-    
+       return PYGLIB_PyLong_FromLong(value);
+
     values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
                                  "__enum_values__");
-    intvalue = _PyLong_FromLong(value);
+    intvalue = PYGLIB_PyLong_FromLong(value);
     retval = PyDict_GetItem(values, intvalue);
-    Py_DECREF(intvalue);
-    if (!retval) {
+    if (retval) {
+       Py_INCREF(retval);
+    }
+    else {
        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);
+       retval = pyg_enum_val_new(pyclass, gtype, intvalue);
     }
-    
-    Py_INCREF(retval);
+    Py_DECREF(intvalue);
+
     return retval;
 }
 
@@ -199,14 +212,14 @@ pyg_enum_add (PyObject *   module,
     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();
@@ -226,8 +239,8 @@ pyg_enum_add (PyObject *   module,
     if (module)
        PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
                             "__module__",
-                            _PyUnicode_FromString(PyModule_GetName(module)));
-    
+                            PYGLIB_PyUnicode_FromString(PyModule_GetName(module)));
+
     g_type_set_qdata(gtype, pygenum_class_key, stub);
 
     o = pyg_type_wrapper_new(gtype);
@@ -247,18 +260,11 @@ pyg_enum_add (PyObject *   module,
     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);
+        intval = PYGLIB_PyLong_FromLong(eclass->values[i].value);
+       item = pyg_enum_val_new(stub, gtype, intval);
        PyDict_SetItem(values, intval, item);
         Py_DECREF(intval);
-       
+
        if (module) {
            char *prefix;
 
@@ -269,13 +275,13 @@ pyg_enum_add (PyObject *   module,
            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;
 }
@@ -286,7 +292,7 @@ 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),
+    return Py_BuildValue("(O(i)O)", Py_TYPE(self), PYGLIB_PyLong_AsLong(self),
                          PyObject_GetAttrString(self, "__dict__"));
 }
 
@@ -296,13 +302,13 @@ 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);
+  enum_value = g_enum_get_value(enum_class, PYGLIB_PyLong_AS_LONG(self));
+
+  retval = PYGLIB_PyUnicode_FromString(enum_value->value_name);
   g_type_class_unref(enum_class);
 
   return retval;
@@ -314,13 +320,13 @@ 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);
+  enum_value = g_enum_get_value(enum_class, PYGLIB_PyLong_AS_LONG(self));
+
+  retval = PYGLIB_PyUnicode_FromString(enum_value->value_nick);
   g_type_class_unref(enum_class);
 
   return retval;
@@ -343,14 +349,18 @@ 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_base = &PYGLIB_PyLong_Type;
+#if PY_VERSION_HEX < 0x03000000
+    PyGEnum_Type.tp_new = pyg_enum_new;
+#else
+    PyGEnum_Type.tp_new = PyLong_Type.tp_new;
+    PyGEnum_Type.tp_hash = PyLong_Type.tp_hash;    
+#endif
     PyGEnum_Type.tp_repr = (reprfunc)pyg_enum_repr;
     PyGEnum_Type.tp_str = (reprfunc)pyg_enum_repr;
     PyGEnum_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     PyGEnum_Type.tp_richcompare = (richcmpfunc)pyg_enum_richcompare;
     PyGEnum_Type.tp_methods = pyg_enum_methods;
     PyGEnum_Type.tp_getset = pyg_enum_getsets;
-    PyGEnum_Type.tp_new = pyg_enum_new;
     PYGOBJECT_REGISTER_GTYPE(d, PyGEnum_Type, "GEnum", G_TYPE_ENUM);
-
 }
index 7bcd294149915e64f3cf3b9e82b976a1f465e9c8..936f314e250aad7b21a7f8787923a1a5831e38fe 100644 (file)
@@ -35,12 +35,29 @@ GQuark pygflags_class_key;
 
 PYGLIB_DEFINE_TYPE("gobject.GFlags", PyGFlags_Type, PyGFlags);
 
+static PyObject *
+pyg_flags_val_new(PyObject* subclass, GType gtype, PyObject *intval)
+{     
+    PyObject *item;
+    
+#if PY_VERSION_HEX >= 0x03000000
+    item = PyObject_CallMethod((PyObject*)&PyLong_Type, "__new__", "OO",
+                               subclass, intval);
+#else
+    item = ((PyTypeObject *)subclass)->tp_alloc((PyTypeObject *)subclass, 0);
+    ((PyIntObject*)item)->ob_ival = PyInt_AS_LONG(intval);
+#endif    
+    ((PyGFlags*)item)->gtype = gtype;
+    
+    return item;
+}
+
 static PyObject *
 pyg_flags_richcompare(PyGFlags *self, PyObject *other, int op)
 {
     static char warning[256];
 
-    if (!_PyLong_Check(other)) {
+    if (!PYGLIB_PyLong_Check(other)) {
         Py_INCREF(Py_NotImplemented);
         return Py_NotImplemented;
     }
@@ -64,7 +81,7 @@ generate_repr(GType gtype, int value)
 
     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
@@ -82,31 +99,31 @@ generate_repr(GType gtype, int value)
            }
        }
     }
-    
+
     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));
+
+    tmp = generate_repr(self->gtype, PYGLIB_PyLong_AS_LONG(self));
 
     if (tmp)
         retval = g_strdup_printf("<flags %s of type %s>", tmp,
                                  g_type_name(self->gtype));
     else
-        retval = g_strdup_printf("<flags %ld of type %s>", _PyLong_AS_LONG(self),
+        retval = g_strdup_printf("<flags %ld of type %s>", PYGLIB_PyLong_AS_LONG(self),
                                  g_type_name(self->gtype));
     g_free(tmp);
-    
-    pyretval = _PyUnicode_FromString(retval);
+
+    pyretval = PYGLIB_PyUnicode_FromString(retval);
     g_free(retval);
-  
+
     return pyretval;
 }
 
@@ -118,21 +135,21 @@ pyg_flags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     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);
 
@@ -143,7 +160,7 @@ pyg_flags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
        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);
@@ -152,8 +169,8 @@ pyg_flags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     }
 
     g_type_class_unref(eclass);
-    
-    pyint = _PyLong_FromLong(value);
+
+    pyint = PYGLIB_PyLong_FromLong(value);
     ret = PyDict_GetItem(values, pyint);
     Py_DECREF(pyint);
     Py_DECREF(values);
@@ -171,7 +188,7 @@ 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
@@ -183,29 +200,22 @@ pyg_flags_from_gtype (GType gtype, int value)
     if (!pyclass)
         pyclass = pyg_flags_add(NULL, g_type_name(gtype), NULL, gtype);
     if (!pyclass)
-       return _PyLong_FromLong(value);
-    
+       return PYGLIB_PyLong_FromLong(value);
+
     values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
                                  "__flags_values__");
-    pyint = _PyLong_FromLong(value);
+    pyint = PYGLIB_PyLong_FromLong(value);
     retval = PyDict_GetItem(values, pyint);
-    Py_DECREF(pyint);
-
     if (!retval) {
        PyErr_Clear();
 
-       retval = ((PyTypeObject *)pyclass)->tp_alloc((PyTypeObject *)pyclass, 0);
+       retval = pyg_flags_val_new(pyclass, gtype, pyint);
        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);
     }
+    Py_DECREF(pyint);
+    
     return retval;
 }
 
@@ -226,7 +236,7 @@ pyg_flags_add (PyObject *   module,
                   g_type_name(gtype), g_type_name(G_TYPE_FUNDAMENTAL(gtype)));
         return NULL;
     }
-    
+
     state = pyglib_gil_state_ensure();
 
     instance_dict = PyDict_New();
@@ -239,15 +249,15 @@ pyg_flags_add (PyObject *   module,
        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)));
-    
+                             PYGLIB_PyUnicode_FromString(PyModule_GetName(module)));
+
           /* Add it to the module name space */
         PyModule_AddObject(module, (char*)typename, stub);
         Py_INCREF(stub);
@@ -257,7 +267,7 @@ pyg_flags_add (PyObject *   module,
     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));
 
@@ -265,29 +275,22 @@ pyg_flags_add (PyObject *   module,
     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);
+      intval = PYGLIB_PyLong_FromLong(eclass->values[i].value);
+      item = pyg_flags_val_new(stub, gtype, intval);
       PyDict_SetItem(values, intval, item);
       Py_DECREF(intval);
 
       if (module) {
          char *prefix;
-         
+
          prefix = g_strdup(pyg_constant_strip_prefix(eclass->values[i].value_name, strip_prefix));
+         Py_INCREF(item);
          PyModule_AddObject(module, prefix, item);
          g_free(prefix);
-         
-         Py_INCREF(item);
       }
+      Py_DECREF(item);
     }
-    
+
     PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
                         "__flags_values__", values);
     Py_DECREF(values);
@@ -303,32 +306,32 @@ 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,
+               return PYGLIB_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));
+                                   PYGLIB_PyLong_AS_LONG(a) & PYGLIB_PyLong_AS_LONG(b));
 }
 
 static PyObject *
 pyg_flags_or(PyGFlags *a, PyGFlags *b)
 {
        if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
-               return _PyLong_Type.tp_as_number->nb_or((PyObject*)a,
+               return PYGLIB_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));
+       return pyg_flags_from_gtype(a->gtype, PYGLIB_PyLong_AS_LONG(a) | PYGLIB_PyLong_AS_LONG(b));
 }
 
 static PyObject *
 pyg_flags_xor(PyGFlags *a, PyGFlags *b)
 {
        if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
-               return _PyLong_Type.tp_as_number->nb_xor((PyObject*)a,
+               return PYGLIB_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));
+                                   PYGLIB_PyLong_AS_LONG(a) ^ PYGLIB_PyLong_AS_LONG(b));
 
 }
 
@@ -348,12 +351,12 @@ 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));
+  flags_value = g_flags_get_first_value(flags_class, PYGLIB_PyLong_AS_LONG(self));
   if (flags_value)
-      retval = _PyUnicode_FromString(flags_value->value_name);
+      retval = PYGLIB_PyUnicode_FromString(flags_value->value_name);
   else {
       retval = Py_None;
       Py_INCREF(Py_None);
@@ -369,13 +372,13 @@ 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));
+  flags_value = g_flags_get_first_value(flags_class, PYGLIB_PyLong_AS_LONG(self));
   if (flags_value)
-      retval = _PyUnicode_FromString(flags_value->value_nick);
+      retval = PYGLIB_PyUnicode_FromString(flags_value->value_nick);
   else {
       retval = Py_None;
       Py_INCREF(Py_None);
@@ -391,14 +394,14 @@ 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));
+      if ((PYGLIB_PyLong_AS_LONG(self) & flags_class->values[i].value) == flags_class->values[i].value)
+         PyList_Append(retval, PYGLIB_PyUnicode_FromString(flags_class->values[i].value_name));
 
   g_type_class_unref(flags_class);
 
@@ -411,14 +414,14 @@ 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));
+      if ((PYGLIB_PyLong_AS_LONG(self) & flags_class->values[i].value) == flags_class->values[i].value)
+         PyList_Append(retval, PYGLIB_PyUnicode_FromString(flags_class->values[i].value_nick));
 
   g_type_class_unref(flags_class);
 
@@ -439,7 +442,9 @@ static PyNumberMethods pyg_flags_as_number = {
        (binaryfunc)pyg_flags_warn,             /* nb_multiply */
        (binaryfunc)pyg_flags_warn,             /* nb_divide */
        (binaryfunc)pyg_flags_warn,             /* nb_remainder */
-       (binaryfunc)pyg_flags_warn,             /* nb_divmod */
+#if PY_VERSION_HEX < 0x03000000
+        (binaryfunc)pyg_flags_warn,            /* nb_divmod */
+#endif
        (ternaryfunc)pyg_flags_warn,            /* nb_power */
        0,                                      /* nb_negative */
        0,                                      /* nb_positive */
@@ -451,27 +456,6 @@ static PyNumberMethods pyg_flags_as_number = {
        (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
@@ -479,13 +463,18 @@ 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_base = &PYGLIB_PyLong_Type;
+#if PY_VERSION_HEX < 0x03000000
+    PyGFlags_Type.tp_new = pyg_flags_new;
+#else
+    PyGFlags_Type.tp_new = PyLong_Type.tp_new;
+    PyGFlags_Type.tp_hash = PyLong_Type.tp_hash;    
+#endif
     PyGFlags_Type.tp_repr = (reprfunc)pyg_flags_repr;
     PyGFlags_Type.tp_as_number = &pyg_flags_as_number;
     PyGFlags_Type.tp_str = (reprfunc)pyg_flags_repr;
     PyGFlags_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     PyGFlags_Type.tp_richcompare = (richcmpfunc)pyg_flags_richcompare;
     PyGFlags_Type.tp_getset = pyg_flags_getsets;
-    PyGFlags_Type.tp_new = pyg_flags_new;
     PYGOBJECT_REGISTER_GTYPE(d, PyGFlags_Type, "GFlags", G_TYPE_FLAGS);
 }
index 2a09eed47cebd19546ea950f00f0d093479c8332..26cb5f249a8653422cd734f1c4eea94983ec880c 100644 (file)
@@ -113,10 +113,10 @@ void      pyg_register_gtype_custom(GType gtype,
 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, 
+                                         PyObject* py_obj,
                                          const GParamSpec* pspec);
 PyObject *pyg_param_gvalue_as_pyobject(const GValue* gvalue,
-                                       gboolean copy_boxed, 
+                                       gboolean copy_boxed,
                                        const GParamSpec* pspec);
 
 GClosure *pyg_closure_new(PyObject *callback, PyObject *extra_args, PyObject *swap_data);
@@ -175,14 +175,14 @@ const gchar * pyg_constant_strip_prefix(const gchar *name, const gchar *strip_pr
 
 /* pygflags */
 typedef struct {
-    _PyLongObject parent;
+       PYGLIB_PyLongObject parent;
     GType gtype;
 } PyGFlags;
 
 extern PyTypeObject PyGFlags_Type;
 
 #define PyGFlags_Check(x) (g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_FLAGS))
-                          
+
 extern PyObject * pyg_flags_add        (PyObject *   module,
                                        const char * type_name,
                                        const char * strip_prefix,
@@ -194,7 +194,7 @@ extern PyObject * pyg_flags_from_gtype (GType        gtype,
 #define PyGEnum_Check(x) (g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_ENUM))
 
 typedef struct {
-    _PyLongObject parent;
+       PYGLIB_PyLongObject parent;
     GType gtype;
 } PyGEnum;
 
@@ -221,7 +221,7 @@ extern PyTypeObject PyGObjectWeakRef_Type;
 static inline PyGObjectData *
 pyg_object_peek_inst_data(GObject *obj)
 {
-    return ((PyGObjectData *) 
+    return ((PyGObjectData *)
             g_object_get_qdata(obj, pygobject_instance_data_key));
 }
 
index c37c8a8148eeffae720a4f52f210977f95c696ee..eee3963498cde4022ca60bf07413821aa9fe2129 100644 (file)
@@ -255,7 +255,7 @@ build_parameter_list(GObjectClass *class)
        name = g_strdup(g_param_spec_get_name(props[i]));
        /* hyphens cannot belong in identifiers */
        g_strdelimit(name, "-", '_');
-       prop_str = _PyUnicode_FromString(name);
+       prop_str = PYGLIB_PyUnicode_FromString(name);
        
        PyList_SetItem(props_list, i, prop_str);
        g_free(name);
@@ -276,7 +276,7 @@ PyGProps_getattro(PyGProps *self, PyObject *attr)
     GValue value = { 0, };
     PyObject *ret;
 
-    attr_name = _PyUnicode_AsString(attr);
+    attr_name = PYGLIB_PyUnicode_AsString(attr);
     if (!attr_name) {
         PyErr_Clear();
         return PyObject_GenericGetAttr((PyObject *)self, attr);
@@ -288,6 +288,12 @@ PyGProps_getattro(PyGProps *self, PyObject *attr)
        return build_parameter_list(class);
     }
 
+    if (self->pygobject != NULL) {
+        ret = pygi_get_property_value (self->pygobject, attr_name);
+        if (ret != NULL)
+            return ret;
+    }
+
     pspec = g_object_class_find_property(class, attr_name);
     g_type_class_unref(class);
 
@@ -361,6 +367,7 @@ PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
     GParamSpec *pspec;
     char *attr_name;
     GObject *obj;
+    int ret = -1;
     
     if (pvalue == NULL) {
        PyErr_SetString(PyExc_TypeError, "properties cannot be "
@@ -368,7 +375,7 @@ PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
        return -1;
     }
 
-    attr_name = _PyUnicode_AsString(attr);
+    attr_name = PYGLIB_PyUnicode_AsString(attr);
     if (!attr_name) {
         PyErr_Clear();
         return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
@@ -380,6 +387,13 @@ PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
         return -1;
     }
 
+    ret = pygi_set_property_value (self->pygobject, attr_name, pvalue);
+    if (ret == 0)
+        return 0;
+    else if (ret == -1)
+        if (PyErr_Occurred())
+            return -1;
+
     obj = self->pygobject->obj;
     pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(obj), attr_name);
     if (!pspec) {
@@ -540,7 +554,7 @@ pygobject_register_class(PyObject *dict, const gchar *type_name,
      */
     s = strrchr(type->tp_name, '.');
     if (s != NULL) {
-       mod_name = _PyUnicode_FromStringAndSize(type->tp_name, (int)(s - type->tp_name));
+       mod_name = PYGLIB_PyUnicode_FromStringAndSize(type->tp_name, (int)(s - type->tp_name));
        PyDict_SetItemString(type->tp_dict, "__module__", mod_name);
        Py_DECREF(mod_name);
     }
@@ -795,12 +809,15 @@ 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) };
+#if PY_VERSION_HEX < 0x03000000
+                                  offsetof(PyTypeObject, tp_compare),
+#endif
+                                  offsetof(PyTypeObject, tp_richcompare),
+                                  offsetof(PyTypeObject, tp_hash),
+                                  offsetof(PyTypeObject, tp_iter),
+                                  offsetof(PyTypeObject, tp_repr),
+                                  offsetof(PyTypeObject, tp_str),
+                                  offsetof(PyTypeObject, tp_print) };
     int i;
 
     /* Happens when registering gobject.GObject itself, at least. */
@@ -1021,12 +1038,29 @@ pygobject_dealloc(PyGObject *self)
     PyObject_GC_Del(self);
 }
 
-static int
-pygobject_compare(PyGObject *self, PyGObject *v)
+static PyObject*
+pygobject_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->obj == v->obj) return 0;
-    if (self->obj > v->obj)  return -1;
-    return 1;
+    int isinst;
+
+    isinst = PyObject_IsInstance(self, (PyObject*)&PyGObject_Type);
+    if (isinst == -1)
+        return NULL;
+    if (!isinst) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    isinst = PyObject_IsInstance(other, (PyObject*)&PyGObject_Type);
+    if (isinst == -1)
+        return NULL;
+    if (!isinst) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+
+    return _pyglib_generic_ptr_richcompare(((PyGObject*)self)->obj,
+                                           ((PyGObject*)other)->obj,
+                                           op);
 }
 
 static long
@@ -1046,7 +1080,7 @@ pygobject_repr(PyGObject *self)
               (long)self,
               self->obj ? G_OBJECT_TYPE_NAME(self->obj) : "uninitialized",
                (long)self->obj);
-    return _PyUnicode_FromString(buf);
+    return PYGLIB_PyUnicode_FromString(buf);
 }
 
 
@@ -1141,7 +1175,7 @@ pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs)
        params = g_new0(GParameter, PyDict_Size(kwargs));
        while (PyDict_Next (kwargs, &pos, &key, &value)) {
            GParamSpec *pspec;
-           gchar *key_str = _PyUnicode_AsString(key);
+           gchar *key_str = PYGLIB_PyUnicode_AsString(key);
 
            pspec = g_object_class_find_property (class, key_str);
            if (!pspec) {
@@ -1249,13 +1283,13 @@ pygobject_get_properties(PyGObject *self, PyObject *args)
         GValue value = { 0 };
         PyObject *item;
 
-        if (!_PyUnicode_Check(py_property)) {
+        if (!PYGLIB_PyUnicode_Check(py_property)) {
             PyErr_SetString(PyExc_TypeError,
                             "Expected string argument for property.");
             return NULL;
         }
 
-        property_name = _PyUnicode_AsString(py_property);
+        property_name = PYGLIB_PyUnicode_AsString(py_property);
 
         pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
                                         property_name);
@@ -1331,7 +1365,7 @@ pygobject_set_properties(PyGObject *self, PyObject *args, PyObject *kwargs)
     pos = 0;
 
     while (kwargs && PyDict_Next (kwargs, &pos, &key, &value)) {
-       gchar *key_str = _PyUnicode_AsString(key);
+       gchar *key_str = PYGLIB_PyUnicode_AsString(key);
        GParamSpec *pspec;
 
        pspec = g_object_class_find_property(class, key_str);
@@ -1468,7 +1502,7 @@ pygobject_connect(PyGObject *self, PyObject *args)
     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)),
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     name);
        return NULL;
     }
@@ -1517,7 +1551,7 @@ pygobject_connect_after(PyGObject *self, PyObject *args)
     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)),
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     name);
        return NULL;
     }
@@ -1566,7 +1600,7 @@ pygobject_connect_object(PyGObject *self, PyObject *args)
     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)),
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     name);
        return NULL;
     }
@@ -1615,7 +1649,7 @@ pygobject_connect_object_after(PyGObject *self, PyObject *args)
     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)),
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     name);
        return NULL;
     }
@@ -1714,7 +1748,7 @@ pygobject_emit(PyGObject *self, PyObject *args)
     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)),
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     name);
        return NULL;
     }
@@ -1790,7 +1824,7 @@ pygobject_stop_emission(PyGObject *self, PyObject *args)
     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)),
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
                     signal);
        return NULL;
     }
@@ -1938,7 +1972,7 @@ pygobject_disconnect_by_func(PyGObject *self, PyObject *args)
     closure = gclosure_from_pyfunc(self, pyfunc);
     if (!closure) {
        PyErr_Format(PyExc_TypeError, "nothing connected to %s",
-                    _PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
        return NULL;
     }
     
@@ -1947,7 +1981,7 @@ pygobject_disconnect_by_func(PyGObject *self, PyObject *args)
                                                  0, 0,
                                                  closure,
                                                  NULL, NULL);
-    return _PyLong_FromLong(retval);
+    return PYGLIB_PyLong_FromLong(retval);
 }
 
 static PyObject *
@@ -1970,7 +2004,7 @@ pygobject_handler_block_by_func(PyGObject *self, PyObject *args)
     closure = gclosure_from_pyfunc(self, pyfunc);
     if (!closure) {
        PyErr_Format(PyExc_TypeError, "nothing connected to %s",
-                    _PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
        return NULL;
     }
     
@@ -1979,7 +2013,7 @@ pygobject_handler_block_by_func(PyGObject *self, PyObject *args)
                                             0, 0,
                                             closure,
                                             NULL, NULL);
-    return _PyLong_FromLong(retval);
+    return PYGLIB_PyLong_FromLong(retval);
 }
 
 static PyObject *
@@ -2002,7 +2036,7 @@ pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args)
     closure = gclosure_from_pyfunc(self, pyfunc);
     if (!closure) {
        PyErr_Format(PyExc_TypeError, "nothing connected to %s",
-                    _PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
        return NULL;
     }
     
@@ -2011,7 +2045,7 @@ pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args)
                                               0, 0,
                                               closure,
                                               NULL, NULL);
-    return _PyLong_FromLong(retval);
+    return PYGLIB_PyLong_FromLong(retval);
 }
 
 static PyMethodDef pygobject_methods[] = {
@@ -2020,7 +2054,7 @@ static PyMethodDef pygobject_methods[] = {
     { "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 },
+    { "set_properties", (PyCFunction)pygobject_set_properties, METH_VARARGS|METH_KEYWORDS },
     { "freeze_notify", (PyCFunction)pygobject_freeze_notify, METH_VARARGS },
     { "notify", (PyCFunction)pygobject_notify, METH_VARARGS },
     { "thaw_notify", (PyCFunction)pygobject_thaw_notify, METH_VARARGS },
@@ -2066,7 +2100,7 @@ pygobject_get_dict(PyGObject *self, void *closure)
 static PyObject *
 pygobject_get_refcount(PyGObject *self, void *closure)
 {
-    return _PyLong_FromLong(self->obj->ref_count);
+    return PYGLIB_PyLong_FromLong(self->obj->ref_count);
 }
 
 static int
@@ -2259,7 +2293,7 @@ pygobject_object_register_types(PyObject *d)
                                                      pyobject_copy,
                                                      pyobject_free);
     PyGObject_Type.tp_dealloc = (destructor)pygobject_dealloc;
-    PyGObject_Type.tp_compare = (cmpfunc)pygobject_compare;
+    PyGObject_Type.tp_richcompare = pygobject_richcompare;
     PyGObject_Type.tp_repr = (reprfunc)pygobject_repr;
     PyGObject_Type.tp_hash = (hashfunc)pygobject_hash;
     PyGObject_Type.tp_setattro = (setattrofunc)pygobject_setattro;
@@ -2302,7 +2336,7 @@ pygobject_object_register_types(PyObject *d)
     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"));
+                        o=PYGLIB_PyUnicode_FromString("gobject._gobject"));
     Py_DECREF(o);
 
     /* GPropsIter */
index 85d8bcad9717eddccf61f15ab57e9273342c9bcf..e75c89088fb04877bc12a672d721620a01f4b7b0 100644 (file)
@@ -317,9 +317,32 @@ pygobject_init(int req_major, int req_minor, int req_micro)
             Py_XDECREF(type);
             Py_XDECREF(value);
             Py_XDECREF(traceback);
+
+
+#if PY_VERSION_HEX < 0x03000000
             PyErr_Format(PyExc_ImportError,
                          "could not import gobject (error was: %s)",
                          PyString_AsString(py_orig_exc));
+#else
+            {
+                /* Can not use PyErr_Format because it doesn't have
+                 * a format string for dealing with PyUnicode objects
+                 * like PyUnicode_FromFormat has
+                 */
+                PyObject *errmsg = PyUnicode_FromFormat("could not import gobject (error was: %U)",
+                                                        py_orig_exc);
+
+                if (errmsg) {
+                   PyErr_SetObject(PyExc_ImportError,
+                                   errmsg);
+                   Py_DECREF(errmsg);
+                }
+                /* if errmsg is NULL then we might have OOM
+                 * PyErr should already be set and trying to
+                 * return our own error would be futile
+                 */
+            }
+#endif
             Py_DECREF(py_orig_exc);
         } else {
             PyErr_SetString(PyExc_ImportError,
index be3840bd49b209bb61e004922e5cfd7dc7dd26e4..77436291ee9b49744672095cd5c3d5bfc3199aab 100644 (file)
 
 PYGLIB_DEFINE_TYPE("gobject.GParamSpec", PyGParamSpec_Type, PyGParamSpec);
 
-static int
-pyg_param_spec_compare(PyGParamSpec *self, PyGParamSpec *v)
+static PyObject*
+pyg_param_spec_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->pspec == v->pspec) return 0;
-    if (self->pspec > v->pspec) return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGParamSpec_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGParamSpec*)self)->pspec,
+                                               ((PyGParamSpec*)other)->pspec,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 }
 
 static long
@@ -54,7 +59,7 @@ pyg_param_spec_repr(PyGParamSpec *self)
     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);
+    return PYGLIB_PyUnicode_FromString(buf);
 }
 
 static void
@@ -121,7 +126,7 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
     } 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);
+       return PYGLIB_PyLong_FromLong(pspec->flags);
     } else if (!strcmp(attr, "value_type")) {
        return pyg_type_wrapper_new(pspec->value_type);
     } else if (!strcmp(attr, "owner_type")) {
@@ -135,12 +140,12 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
                                 "maximum", "minimum", "name", "nick",
                                 "owner_type", "value_type");
        } else if (!strcmp(attr, "default_value")) {
-           return _PyUnicode_FromFormat(
+           return PYGLIB_PyUnicode_FromFormat(
                "%c", G_PARAM_SPEC_CHAR(pspec)->default_value);
        } else if (!strcmp(attr, "minimum")) {
-           return _PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->minimum);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->minimum);
        } else if (!strcmp(attr, "maximum")) {
-           return _PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->maximum);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->maximum);
        }
     } else if (G_IS_PARAM_SPEC_UCHAR(pspec)) {
        if (!strcmp(attr, "__members__")) {
@@ -150,12 +155,12 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
                                 "name", "nick", "owner_type",
                                 "value_type");
        } else if (!strcmp(attr, "default_value")) {
-           return _PyUnicode_FromFormat(
+           return PYGLIB_PyUnicode_FromFormat(
                "%c", G_PARAM_SPEC_UCHAR(pspec)->default_value);
        } else if (!strcmp(attr, "minimum")) {
-           return _PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->minimum);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->minimum);
        } else if (!strcmp(attr, "maximum")) {
-           return _PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->maximum);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->maximum);
        }
     } else if (G_IS_PARAM_SPEC_BOOLEAN(pspec)) {
        if (!strcmp(attr, "__members__")) {
@@ -173,11 +178,11 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
                                 "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);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->default_value);
        } else if (!strcmp(attr, "minimum")) {
-           return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->minimum);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->minimum);
        } else if (!strcmp(attr, "maximum")) {
-           return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->maximum);
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->maximum);
        }
     } else if (G_IS_PARAM_SPEC_UINT(pspec)) {
        if (!strcmp(attr, "__members__")) {
@@ -253,7 +258,7 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
                                 "flags", "name", "nick", "owner_type",
                                 "value_type");
        } else if (!strcmp(attr, "default_value")) {
-           return _PyUnicode_FromFormat(
+           return PYGLIB_PyUnicode_FromFormat(
                "%c", G_PARAM_SPEC_UNICHAR(pspec)->default_value);
        }
     } else if (G_IS_PARAM_SPEC_ENUM(pspec)) {
@@ -387,10 +392,12 @@ 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_richcompare = pyg_param_spec_richcompare;
+    PyGParamSpec_Type.tp_flags = Py_TPFLAGS_DEFAULT;
     PyGParamSpec_Type.tp_repr = (reprfunc)pyg_param_spec_repr;
     PyGParamSpec_Type.tp_hash = (hashfunc)pyg_param_spec_hash;
 
+
     if (PyType_Ready(&PyGParamSpec_Type))
        return;
     PyDict_SetItemString(d, "GParamSpec", (PyObject *)&PyGParamSpec_Type);
index 95bfae9d754ab111e48cd3b1f383b768f2dc48c7..fbe3e1058ce902900f2c88b66022de93df873ea7 100644 (file)
@@ -41,12 +41,17 @@ pyg_pointer_dealloc(PyGPointer *self)
     Py_TYPE(self)->tp_free((PyObject *)self);
 }
 
-static int
-pyg_pointer_compare(PyGPointer *self, PyGPointer *v)
+static PyObject*
+pyg_pointer_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->pointer == v->pointer) return 0;
-    if (self->pointer > v->pointer)  return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGPointer_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGPointer*)self)->pointer,
+                                               ((PyGPointer*)other)->pointer,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 }
 
 static long
@@ -62,7 +67,7 @@ pyg_pointer_repr(PyGPointer *self)
 
     g_snprintf(buf, sizeof(buf), "<%s at 0x%lx>", g_type_name(self->gtype),
               (long)self->pointer);
-    return _PyUnicode_FromString(buf);
+    return PYGLIB_PyUnicode_FromString(buf);
 }
 
 static int
@@ -183,7 +188,7 @@ 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_richcompare = pyg_pointer_richcompare;
     PyGPointer_Type.tp_repr = (reprfunc)pyg_pointer_repr;
     PyGPointer_Type.tp_hash = (hashfunc)pyg_pointer_hash;
     PyGPointer_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
index 5550ce8c80e3e86df94c6adf15fa4be1301e257c..c875aa2b76fac54579b4dd5d9277c4c3af31e0d2 100644 (file)
@@ -39,12 +39,17 @@ typedef struct {
 
 PYGLIB_DEFINE_TYPE("gobject.GType", PyGTypeWrapper_Type, PyGTypeWrapper);
 
-static int
-pyg_type_wrapper_compare(PyGTypeWrapper *self, PyGTypeWrapper *v)
+static PyObject*
+pyg_type_wrapper_richcompare(PyObject *self, PyObject *other, int op)
 {
-    if (self->type == v->type) return 0;
-    if (self->type > v->type) return -1;
-    return 1;
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGTypeWrapper_Type)
+        return _pyglib_generic_long_richcompare(((PyGTypeWrapper*)self)->type,
+                                                ((PyGTypeWrapper*)other)->type,
+                                                op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
 }
 
 static long
@@ -61,7 +66,7 @@ pyg_type_wrapper_repr(PyGTypeWrapper *self)
 
     g_snprintf(buf, sizeof(buf), "<GType %s (%lu)>",
               name?name:"invalid", (unsigned long int) self->type);
-    return _PyUnicode_FromString(buf);
+    return PYGLIB_PyUnicode_FromString(buf);
 }
 
 static void
@@ -134,7 +139,7 @@ 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");
+   return PYGLIB_PyUnicode_FromString(name ? name : "invalid");
 }
 
 static PyObject *
@@ -155,14 +160,14 @@ _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;
 }
 
@@ -172,21 +177,21 @@ _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));
+  return PYGLIB_PyLong_FromLong(g_type_depth(self->type));
 }
 
 static PyGetSetDef _PyGTypeWrapper_getsets[] = {
@@ -259,7 +264,7 @@ _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;
 
@@ -282,7 +287,7 @@ _wrap_g_type_is_a(PyGTypeWrapper *self, PyObject *args)
        return NULL;
     else if ((parent = pyg_type_from_object(gparent)) == 0)
        return NULL;
-    
+
     return PyBool_FromLong(g_type_is_a(self->type, parent));
 }
 
@@ -300,14 +305,14 @@ static PyMethodDef _PyGTypeWrapper_methods[] = {
     { "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))
@@ -370,7 +375,7 @@ pyg_type_from_object(PyObject *obj)
     if (PyType_Check(obj)) {
        PyTypeObject *tp = (PyTypeObject *)obj;
 
-       if (tp == &_PyLong_Type)
+       if (tp == &PYGLIB_PyLong_Type)
            return G_TYPE_INT;
        else if (tp == &PyBool_Type)
            return G_TYPE_BOOLEAN;
@@ -378,7 +383,7 @@ pyg_type_from_object(PyObject *obj)
            return G_TYPE_LONG;
        else if (tp == &PyFloat_Type)
            return G_TYPE_DOUBLE;
-       else if (tp == &_PyUnicode_Type)
+       else if (tp == &PYGLIB_PyUnicode_Type)
            return G_TYPE_STRING;
        else if (tp == &PyBaseObject_Type)
            return PY_TYPE_OBJECT;
@@ -389,9 +394,9 @@ pyg_type_from_object(PyObject *obj)
     }
 
     /* handle strings */
-    if (_PyUnicode_Check(obj)) {
-       gchar *name = _PyUnicode_AsString(obj);
-       
+    if (PYGLIB_PyUnicode_Check(obj)) {
+       gchar *name = PYGLIB_PyUnicode_AsString(obj);
+
        type = _pyg_type_from_name(name);
        if (type != 0) {
            return type;
@@ -440,8 +445,8 @@ pyg_enum_get_value(GType enum_type, PyObject *obj, gint *val)
     if (!obj) {
        *val = 0;
        res = 0;
-    } else if (_PyLong_Check(obj)) {
-       *val = _PyLong_AsLong(obj);
+    } else if (PYGLIB_PyLong_Check(obj)) {
+       *val = PYGLIB_PyLong_AsLong(obj);
        res = 0;
 
        if (PyObject_TypeCheck(obj, &PyGEnum_Type) && ((PyGEnum *) obj)->gtype != enum_type) {
@@ -459,10 +464,10 @@ pyg_enum_get_value(GType enum_type, PyObject *obj, gint *val)
                      g_type_name(enum_type),
                      g_type_name(((PyGEnum *) obj)->gtype));
        }
-    } else if (_PyUnicode_Check(obj)) {
+    } else if (PYGLIB_PyUnicode_Check(obj)) {
        GEnumValue *info;
-       char *str = _PyUnicode_AsString(obj);
-       
+       char *str = PYGLIB_PyUnicode_AsString(obj);
+
        if (enum_type != G_TYPE_NONE)
            eclass = G_ENUM_CLASS(g_type_class_ref(enum_type));
        else {
@@ -513,15 +518,15 @@ pyg_flags_get_value(GType flag_type, PyObject *obj, gint *val)
     if (!obj) {
        *val = 0;
        res = 0;
-    } else if (_PyLong_Check(obj)) {
-       *val = _PyLong_AsLong(obj);
+    } else if (PYGLIB_PyLong_Check(obj)) {
+       *val = PYGLIB_PyLong_AsLong(obj);
        res = 0;
     } else if (PyLong_Check(obj)) {
         *val = PyLong_AsLongLong(obj);
         res = 0;
-    } else if (_PyUnicode_Check(obj)) {
+    } else if (PYGLIB_PyUnicode_Check(obj)) {
        GFlagsValue *info;
-       char *str = _PyUnicode_AsString(obj);
+       char *str = PYGLIB_PyUnicode_AsString(obj);
 
        if (flag_type != G_TYPE_NONE)
            fclass = G_FLAGS_CLASS(g_type_class_ref(flag_type));
@@ -531,7 +536,7 @@ pyg_flags_get_value(GType flag_type, PyObject *obj, gint *val)
        }
        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) {
@@ -557,7 +562,7 @@ pyg_flags_get_value(GType flag_type, PyObject *obj, gint *val)
 
        for (i = 0; i < len; i++) {
            PyObject *item = PyTuple_GetItem(obj, i);
-           char *str = _PyUnicode_AsString(item);
+           char *str = PYGLIB_PyUnicode_AsString(item);
            GFlagsValue *info = g_flags_get_value_by_name(fclass, str);
 
            if (!info)
@@ -644,7 +649,7 @@ pyg_value_array_from_pyobject(GValue *value,
 
     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) {
@@ -732,7 +737,7 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
        break;
     case G_TYPE_CHAR:
        if ((tmp = PyObject_Str(obj)))
-           g_value_set_char(value, _PyUnicode_AsString(tmp)[0]);
+           g_value_set_char(value, PYGLIB_PyUnicode_AsString(tmp)[0]);
        else {
            PyErr_Clear();
            return -1;
@@ -740,15 +745,15 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
        Py_DECREF(tmp);
        break;
     case G_TYPE_UCHAR:
-       if (_PyLong_Check(obj)) {
-           glong val; 
-           val = _PyLong_AsLong(obj);
+       if (PYGLIB_PyLong_Check(obj)) {
+           glong val;
+           val = PYGLIB_PyLong_AsLong(obj);
            if (val >= 0 && val <= 255)
-             g_value_set_uchar(value, (guchar)_PyLong_AsLong (obj));
+             g_value_set_uchar(value, (guchar)PYGLIB_PyLong_AsLong (obj));
            else
              return -1;
        } else if ((tmp = PyObject_Str(obj))) {
-           g_value_set_uchar(value, _PyUnicode_AsString(tmp)[0]);
+           g_value_set_uchar(value, PYGLIB_PyUnicode_AsString(tmp)[0]);
            Py_DECREF(tmp);
        } else {
            PyErr_Clear();
@@ -759,14 +764,14 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
        g_value_set_boolean(value, PyObject_IsTrue(obj));
        break;
     case G_TYPE_INT:
-       g_value_set_int(value, _PyLong_AsLong(obj));
+       g_value_set_int(value, PYGLIB_PyLong_AsLong(obj));
        break;
     case G_TYPE_UINT:
        {
-           if (_PyLong_Check(obj)) {
+           if (PYGLIB_PyLong_Check(obj)) {
                glong val;
 
-               val = _PyLong_AsLong(obj);
+               val = PYGLIB_PyLong_AsLong(obj);
                if (val >= 0 && val <= G_MAXUINT)
                    g_value_set_uint(value, (guint)val);
                else
@@ -777,23 +782,26 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
        }
        break;
     case G_TYPE_LONG:
-       g_value_set_long(value, _PyLong_AsLong(obj));
+       g_value_set_long(value, PYGLIB_PyLong_AsLong(obj));
        break;
     case G_TYPE_ULONG:
-       {
-           if (_PyLong_Check(obj)) {
-               glong val;
+#if PY_VERSION_HEX < 0x03000000
+       if (PyInt_Check(obj)) {
+            long 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;
+            val = PYGLIB_PyLong_AsLong(obj);
+            if (val < 0) {
+                PyErr_SetString(PyExc_OverflowError, "negative value not allowed for uint64 property");
+                return -1;
+            }
+            g_value_set_ulong(value, (gulong)val);
+        } else
+#endif
+        if (PyLong_Check(obj))
+           g_value_set_ulong(value, PyLong_AsUnsignedLong(obj));
+        else
+            return -1;
+        break;
     case G_TYPE_INT64:
        g_value_set_int64(value, PyLong_AsLongLong(obj));
        break;
@@ -843,7 +851,7 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
        if (obj == Py_None)
            g_value_set_string(value, NULL);
        else if ((tmp = PyObject_Str(obj))) {
-           g_value_set_string(value, _PyUnicode_AsString(tmp));
+           g_value_set_string(value, PYGLIB_PyUnicode_AsString(tmp));
            Py_DECREF(tmp);
        } else {
            PyErr_Clear();
@@ -873,8 +881,8 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
            g_value_set_boxed(value, pyg_boxed_get(obj, gpointer));
         else if (G_VALUE_HOLDS(value, G_TYPE_VALUE)) {
             GType type;
-            GValue *n_value; 
-            
+            GValue *n_value;
+
             type = pyg_type_from_object((PyObject*)Py_TYPE(obj));
             if (G_UNLIKELY (! type)) {
                 PyErr_Clear();
@@ -888,12 +896,12 @@ pyg_value_from_pyobject(GValue *value, PyObject *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) &&
+       else if (PYGLIB_PyUnicode_Check(obj) &&
                  G_VALUE_HOLDS(value, G_TYPE_GSTRING)) {
             GString *string;
             char *buffer;
             Py_ssize_t len;
-            if (_PyUnicode_AsStringAndSize(obj, &buffer, &len))
+            if (PYGLIB_PyUnicode_AsStringAndSize(obj, &buffer, &len))
                 return -1;
             string = g_string_new_len(buffer, len);
            g_value_set_boxed(value, string);
@@ -963,17 +971,17 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
            break;
     case G_TYPE_CHAR: {
        gint8 val = g_value_get_char(value);
-       return _PyUnicode_FromStringAndSize((char *)&val, 1);
+       return PYGLIB_PyUnicode_FromStringAndSize((char *)&val, 1);
     }
     case G_TYPE_UCHAR: {
        guint8 val = g_value_get_uchar(value);
-       return _PyUnicode_FromStringAndSize((char *)&val, 1);
+       return PYGLIB_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));
+       return PYGLIB_PyLong_FromLong(g_value_get_int(value));
     case G_TYPE_UINT:
        {
            /* in Python, the Int object is backed by a long.  If a
@@ -981,19 +989,19 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
               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));
+           return PYGLIB_PyLong_FromLong((glong) g_value_get_uint(value));
 #else
            return PyLong_FromUnsignedLong((gulong) g_value_get_uint(value));
 #endif
        }
     case G_TYPE_LONG:
-       return _PyLong_FromLong(g_value_get_long(value));
+       return PYGLIB_PyLong_FromLong(g_value_get_long(value));
     case G_TYPE_ULONG:
        {
            gulong val = g_value_get_ulong(value);
 
            if (val <= G_MAXLONG)
-               return _PyLong_FromLong((glong) val);
+               return PYGLIB_PyLong_FromLong((glong) val);
            else
                return PyLong_FromUnsignedLong(val);
        }
@@ -1002,7 +1010,7 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
            gint64 val = g_value_get_int64(value);
 
            if (G_MINLONG <= val && val <= G_MAXLONG)
-               return _PyLong_FromLong((glong) val);
+               return PYGLIB_PyLong_FromLong((glong) val);
            else
                return PyLong_FromLongLong(val);
        }
@@ -1011,7 +1019,7 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
            guint64 val = g_value_get_uint64(value);
 
            if (val <= G_MAXLONG)
-               return _PyLong_FromLong((glong) val);
+               return PYGLIB_PyLong_FromLong((glong) val);
            else
                return PyLong_FromUnsignedLongLong(val);
        }
@@ -1028,7 +1036,7 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
            const gchar *str = g_value_get_string(value);
 
            if (str)
-               return _PyUnicode_FromString(str);
+               return PYGLIB_PyUnicode_FromString(str);
            Py_INCREF(Py_None);
            return Py_None;
        }
@@ -1058,9 +1066,9 @@ pyg_value_as_pyobject(const GValue *value, gboolean 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);
+           PyObject *ret = PYGLIB_PyUnicode_FromStringAndSize(string->str, string->len);
            return ret;
-       }           
+       }
        bm = pyg_type_lookup(G_VALUE_TYPE(value));
        if (bm) {
            return bm->fromvalue(value);
@@ -1157,18 +1165,18 @@ pyg_closure_marshal(GClosure *closure,
            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);
@@ -1220,7 +1228,7 @@ pyg_closure_new(PyObject *callback, PyObject *extra_args, PyObject *swap_data)
  * @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 
+ * 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.
@@ -1230,7 +1238,7 @@ pyg_closure_set_exception_handler(GClosure *closure,
                                  PyClosureExceptionHandler handler)
 {
     PyGClosure *pygclosure;
-    
+
     g_return_if_fail(closure != NULL);
 
     pygclosure = (PyGClosure *)closure;
@@ -1265,7 +1273,7 @@ pyg_signal_class_closure_marshal(GClosure *closure,
     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]);
@@ -1311,10 +1319,10 @@ pyg_signal_class_closure_marshal(GClosure *closure,
     }
 
     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);    
+    len = PyTuple_Size(params);
     for (i = 0; i < len; i++) {
        PyObject *item = PyTuple_GetItem(params, i);
        if (item != NULL && PyObject_TypeCheck(item, &PyGBoxed_Type)
@@ -1372,13 +1380,13 @@ gclosure_from_pyfunc(PyGObject *object, PyObject *func)
     GSList *l;
     PyGObjectData *inst_data;
     inst_data = pyg_object_peek_inst_data(object->obj);
-    if (inst_data)
-    {
+    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) {
+            int res = PyObject_RichCompareBool(pyclosure->callback, func, Py_EQ);
+            if (res == -1) {
+                PyErr_Clear(); // Is there anything else to do?
+            } else if (res) {
                 return (GClosure*)pyclosure;
             }
         }
@@ -1464,7 +1472,7 @@ add_property_docs(GType gtype, GString *string)
                               g_type_name(props[i]->value_type),
                               g_param_spec_get_nick(props[i]));
 
-       /* g_string_append_printf crashes on win32 if the third 
+       /* g_string_append_printf crashes on win32 if the third
           argument is NULL. */
        blurb=g_param_spec_get_blurb(props[i]);
        if (blurb)
@@ -1514,7 +1522,7 @@ object_doc_descr_get(PyObject *self, PyObject *obj, PyObject *type)
             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;
@@ -1532,7 +1540,7 @@ object_doc_descr_get(PyObject *self, PyObject *obj, PyObject *type)
         g_array_free(parents, TRUE);
     }
 
-    pystring = _PyUnicode_FromStringAndSize(string->str, string->len);
+    pystring = PYGLIB_PyUnicode_FromStringAndSize(string->str, string->len);
     g_string_free(string, TRUE);
     return pystring;
 }
@@ -1582,7 +1590,7 @@ 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);
@@ -1592,7 +1600,7 @@ int pyg_pyobj_to_unichar_conv(PyObject* py_obj, void* ptr)
        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;
@@ -1601,24 +1609,24 @@ int pyg_pyobj_to_unichar_conv(PyObject* py_obj, void* ptr)
     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, 
+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;
@@ -1634,15 +1642,15 @@ pyg_param_gvalue_from_pyobject(GValue* value,
     }
 }
 
-PyObject* 
+PyObject*
 pyg_param_gvalue_as_pyobject(const GValue* gvalue,
-                             gboolean copy_boxed, 
+                             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);
@@ -1663,7 +1671,7 @@ typedef struct {
     gpointer data;
 } CustomTypeData;
 
-void 
+void
 pyg_type_register_custom_callback(const gchar *typename,
                                  PyGTypeRegistrationFunction callback,
                                  gpointer user_data)
@@ -1688,7 +1696,7 @@ pyg_type_get_custom(const gchar *name)
 {
     CustomTypeData *data;
     PyTypeObject *retval;
-    
+
     if (!custom_type_registration)
        return NULL;
 
@@ -1713,7 +1721,7 @@ _pyg_type_from_name(const gchar *name)
        pyg_type_get_custom(name);
        type = g_type_from_name(name);
     }
-    
+
     return type;
 }
 
@@ -1730,7 +1738,7 @@ _pyg_strv_from_gvalue(const GValue *value)
     }
     py_argv = PyList_New(argc);
     for (i = 0; i < argc; ++i)
-       PyList_SET_ITEM(py_argv, i, _PyUnicode_FromString(argv[i]));
+       PyList_SET_ITEM(py_argv, i, PYGLIB_PyUnicode_FromString(argv[i]));
     return py_argv;
 }
 
@@ -1745,11 +1753,11 @@ _pyg_strv_to_gvalue(GValue *value, PyObject *obj)
 
     argc = PySequence_Length(obj);
     for (i = 0; i < argc; ++i)
-       if (!_PyUnicode_Check(PySequence_Fast_GET_ITEM(obj, i)))
+       if (!PYGLIB_PyUnicode_Check(PySequence_Fast_GET_ITEM(obj, i)))
            return -1;
     argv = g_new(gchar *, argc + 1);
     for (i = 0; i < argc; ++i)
-       argv[i] = g_strdup(_PyUnicode_AsString(PySequence_Fast_GET_ITEM(obj, i)));
+       argv[i] = g_strdup(PYGLIB_PyUnicode_AsString(PySequence_Fast_GET_ITEM(obj, i)));
     argv[i] = NULL;
     g_value_take_boxed(value, argv);
     return 0;
@@ -1759,7 +1767,7 @@ 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_richcompare = pyg_type_wrapper_richcompare;
     PyGTypeWrapper_Type.tp_repr = (reprfunc)pyg_type_wrapper_repr;
     PyGTypeWrapper_Type.tp_hash = (hashfunc)pyg_type_wrapper_hash;
     PyGTypeWrapper_Type.tp_flags = Py_TPFLAGS_DEFAULT;
@@ -1772,7 +1780,7 @@ pygobject_type_register_types(PyObject *d)
     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);
index d0b1ca1f9ed84740ad3ee11454ee45d855404c99..77bc02022b11e6a73a8dc47703887fa8a702531d 100644 (file)
@@ -1,20 +1,51 @@
-INCLUDES = \
-       -I$(top_srcdir)/gobject \
-       $(PYTHON_INCLUDES) \
-       $(GLIB_CFLAGS)
+CLEANFILES =
+noinst_LTLIBRARIES = 
+if ENABLE_INTROSPECTION
+noinst_LTLIBRARIES += libregress.la libgimarshallingtests.la
 
-EXTRA_DIST = \
-       $(tests) \
-       common.py \
-       runtests.py \
-       testmodule.py \
-       test-floating.h \
-       test-thread.h \
-       test-unknown.h
+nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
+libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
+libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
+libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
+
+# This is a hack to make sure a shared library is built
+libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
+       $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
+
+libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
+       $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
+
+# g-i doesn't ship these as shared libraries anymore; we build them here
+Regress-1.0.gir: libregress.la Makefile
+       $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
+       --namespace=Regress --nsversion=1.0 \
+       --warn-all --warn-error \
+       --library=libregress.la \
+       --libtool="$(top_builddir)/libtool" \
+       --output $@ \
+       $(nodist_libregress_la_SOURCES)
+Regress-1.0.typelib: Regress-1.0.gir Makefile
+       $(AM_V_GEN) g-ir-compiler $< -o $@
+
+GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
+       $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
+       --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
+       --warn-all --warn-error \
+       --library=libgimarshallingtests.la \
+       --libtool="$(top_builddir)/libtool" \
+       --output $@ \
+       $(nodist_libgimarshallingtests_la_SOURCES)
+GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
+       $(AM_V_GEN) g-ir-compiler $< -o $@
 
-noinst_LTLIBRARIES = testhelper.la
-linked_LIBS = testhelper.la
+CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib
+endif
+
+noinst_LTLIBRARIES += testhelper.la
 
+testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
 testhelper_la_LDFLAGS = -module -avoid-version
 testhelper_la_LIBADD = $(GLIB_LIBS)
 testhelper_la_SOURCES = \
@@ -23,49 +54,64 @@ testhelper_la_SOURCES = \
        test-thread.c \
        test-unknown.c
 
-tests =  \
-       test_gicon.py \
-       test_gio.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)
+
+
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
+
+
+all: $(LTLIBRARIES:.la=.so)
+
+TEST_FILES = \
        test_gobject.py \
        test_interface.py \
        test_mainloop.py \
+       test_option.py \
        test_properties.py \
        test_signal.py \
+       test_source.py \
        test_subprocess.py \
-       test_unknown.py \
-       test_source.py
+       test_thread.py \
+       test_uris.py
+
+if BUILD_GIO
+TEST_FILES += \
+       test_gio.py \
+       test_gresolver.py \
+       test_gsocket.py \
+       test_gicon.py \
+       test_gcancellable.py
+endif 
 
 if ENABLE_INTROSPECTION
-tests += \
+TEST_FILES += \
        test_everything.py \
        test_gi.py \
        test_overrides.py
 endif
 
-# 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: $(LTLIBRARIES:.la=.so)
-       $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(tests)
+EXTRA_DIST = \
+       compathelper.py \
+       runtests.py \
+       testmodule.py \
+       test-floating.h \
+       test-thread.h \
+       test-unknown.h 
 
-all: $(LTLIBRARIES:.la=.so)
+EXTRA_DIST += $(TEST_FILES)
 
 clean-local:
-       rm -f $(LTLIBRARIES:.la=.so)
+       rm -f $(LTLIBRARIES:.la=.so) file.txt~
 
-.la.so:
-       $(LN_S) .libs/$@ $@ || true
+
+check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib
+       TEST_FILES="$(TEST_FILES)" PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH GI_TYPELIB_PATH=$(builddir) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
 
 check.gdb:
        EXEC_NAME="gdb --args" $(MAKE) check
 
-%.gdb:
-       EXEC_NAME="gdb --args" TEST_NAMES=$* $(MAKE) check
-
 check.valgrind:
-       EXEC_NAME="valgrind" $(MAKE) check
-
-%.valgrind:
-       EXEC_NAME="valgrind" TEST_NAMES=$* $(MAKE) check
-
+       EXEC_NAME="valgrind" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
index 5a99d639b18c65d0bf7450f73f62bd4917d9650e..e9c6223e2afb203344a8968cf639390a324d0366 100644 (file)
@@ -34,7 +34,16 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-@ENABLE_INTROSPECTION_TRUE@am__append_1 = \
+@ENABLE_INTROSPECTION_TRUE@am__append_1 = libregress.la libgimarshallingtests.la
+@ENABLE_INTROSPECTION_TRUE@am__append_2 = Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib
+@BUILD_GIO_TRUE@am__append_3 = \
+@BUILD_GIO_TRUE@       test_gio.py \
+@BUILD_GIO_TRUE@       test_gresolver.py \
+@BUILD_GIO_TRUE@       test_gsocket.py \
+@BUILD_GIO_TRUE@       test_gicon.py \
+@BUILD_GIO_TRUE@       test_gcancellable.py
+
+@ENABLE_INTROSPECTION_TRUE@am__append_4 = \
 @ENABLE_INTROSPECTION_TRUE@    test_everything.py \
 @ENABLE_INTROSPECTION_TRUE@    test_gi.py \
 @ENABLE_INTROSPECTION_TRUE@    test_overrides.py
@@ -54,17 +63,35 @@ 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)
+libgimarshallingtests_la_LIBADD =
+@ENABLE_INTROSPECTION_TRUE@nodist_libgimarshallingtests_la_OBJECTS = libgimarshallingtests_la-gimarshallingtests.lo
+libgimarshallingtests_la_OBJECTS =  \
+       $(nodist_libgimarshallingtests_la_OBJECTS)
 AM_V_lt = $(am__v_lt_$(V))
 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
 am__v_lt_0 = --silent
+libgimarshallingtests_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libgimarshallingtests_la_CFLAGS) $(CFLAGS) \
+       $(libgimarshallingtests_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_INTROSPECTION_TRUE@am_libgimarshallingtests_la_rpath =
+libregress_la_LIBADD =
+@ENABLE_INTROSPECTION_TRUE@nodist_libregress_la_OBJECTS =  \
+@ENABLE_INTROSPECTION_TRUE@    libregress_la-regress.lo
+libregress_la_OBJECTS = $(nodist_libregress_la_OBJECTS)
+libregress_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libregress_la_CFLAGS) \
+       $(CFLAGS) $(libregress_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_INTROSPECTION_TRUE@am_libregress_la_rpath =
+am__DEPENDENCIES_1 =
+testhelper_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_testhelper_la_OBJECTS = testhelper_la-testhelpermodule.lo \
+       testhelper_la-test-floating.lo testhelper_la-test-thread.lo \
+       testhelper_la-test-unknown.lo
+testhelper_la_OBJECTS = $(am_testhelper_la_OBJECTS)
 testhelper_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(testhelper_la_LDFLAGS) $(LDFLAGS) -o $@
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testhelper_la_CFLAGS) \
+       $(CFLAGS) $(testhelper_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -91,7 +118,8 @@ am__v_CCLD_0 = @echo "  CCLD  " $@;
 AM_V_GEN = $(am__v_GEN_$(V))
 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
 am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(testhelper_la_SOURCES)
+SOURCES = $(nodist_libgimarshallingtests_la_SOURCES) \
+       $(nodist_libregress_la_SOURCES) $(testhelper_la_SOURCES)
 DIST_SOURCES = $(testhelper_la_SOURCES)
 ETAGS = etags
 CTAGS = ctags
@@ -131,6 +159,7 @@ GIOUNIX_LIBS = @GIOUNIX_LIBS@
 GIO_CFLAGS = @GIO_CFLAGS@
 GIO_LIBS = @GIO_LIBS@
 GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
 GI_LIBS = @GI_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
@@ -250,22 +279,15 @@ 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
+CLEANFILES = $(am__append_2)
+noinst_LTLIBRARIES = $(am__append_1) testhelper.la
+@ENABLE_INTROSPECTION_TRUE@nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+@ENABLE_INTROSPECTION_TRUE@libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
+@ENABLE_INTROSPECTION_TRUE@libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+@ENABLE_INTROSPECTION_TRUE@nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
+@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
+@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
+testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
 testhelper_la_LDFLAGS = -module -avoid-version
 testhelper_la_LIBADD = $(GLIB_LIBS)
 testhelper_la_SOURCES = \
@@ -274,10 +296,12 @@ testhelper_la_SOURCES = \
        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 \
-       $(am__append_1)
+TEST_FILES = test_gobject.py test_interface.py test_mainloop.py \
+       test_option.py test_properties.py test_signal.py \
+       test_source.py test_subprocess.py test_thread.py test_uris.py \
+       $(am__append_3) $(am__append_4)
+EXTRA_DIST = compathelper.py runtests.py testmodule.py test-floating.h \
+       test-thread.h test-unknown.h $(TEST_FILES)
 all: all-am
 
 .SUFFIXES:
@@ -321,6 +345,10 @@ clean-noinstLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
+@ENABLE_INTROSPECTION_FALSE@libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES) 
+@ENABLE_INTROSPECTION_FALSE@   $(AM_V_CCLD)$(libgimarshallingtests_la_LINK) $(am_libgimarshallingtests_la_rpath) $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_LIBADD) $(LIBS)
+@ENABLE_INTROSPECTION_FALSE@libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES) 
+@ENABLE_INTROSPECTION_FALSE@   $(AM_V_CCLD)$(libregress_la_LINK) $(am_libregress_la_rpath) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -328,10 +356,12 @@ mostlyclean-compile:
 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@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregress_la-regress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-test-floating.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-test-thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-test-unknown.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-testhelpermodule.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -357,6 +387,54 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
+libgimarshallingtests_la-gimarshallingtests.lo: $(GI_DATADIR)/tests/gimarshallingtests.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimarshallingtests_la_CFLAGS) $(CFLAGS) -MT libgimarshallingtests_la-gimarshallingtests.lo -MD -MP -MF $(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Tpo -c -o libgimarshallingtests_la-gimarshallingtests.lo `test -f '$(GI_DATADIR)/tests/gimarshallingtests.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/gimarshallingtests.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Tpo $(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(GI_DATADIR)/tests/gimarshallingtests.c' object='libgimarshallingtests_la-gimarshallingtests.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimarshallingtests_la_CFLAGS) $(CFLAGS) -c -o libgimarshallingtests_la-gimarshallingtests.lo `test -f '$(GI_DATADIR)/tests/gimarshallingtests.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/gimarshallingtests.c
+
+libregress_la-regress.lo: $(GI_DATADIR)/tests/regress.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libregress_la_CFLAGS) $(CFLAGS) -MT libregress_la-regress.lo -MD -MP -MF $(DEPDIR)/libregress_la-regress.Tpo -c -o libregress_la-regress.lo `test -f '$(GI_DATADIR)/tests/regress.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/regress.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libregress_la-regress.Tpo $(DEPDIR)/libregress_la-regress.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(GI_DATADIR)/tests/regress.c' object='libregress_la-regress.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libregress_la_CFLAGS) $(CFLAGS) -c -o libregress_la-regress.lo `test -f '$(GI_DATADIR)/tests/regress.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/regress.c
+
+testhelper_la-testhelpermodule.lo: testhelpermodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-testhelpermodule.lo -MD -MP -MF $(DEPDIR)/testhelper_la-testhelpermodule.Tpo -c -o testhelper_la-testhelpermodule.lo `test -f 'testhelpermodule.c' || echo '$(srcdir)/'`testhelpermodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-testhelpermodule.Tpo $(DEPDIR)/testhelper_la-testhelpermodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testhelpermodule.c' object='testhelper_la-testhelpermodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-testhelpermodule.lo `test -f 'testhelpermodule.c' || echo '$(srcdir)/'`testhelpermodule.c
+
+testhelper_la-test-floating.lo: test-floating.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-test-floating.lo -MD -MP -MF $(DEPDIR)/testhelper_la-test-floating.Tpo -c -o testhelper_la-test-floating.lo `test -f 'test-floating.c' || echo '$(srcdir)/'`test-floating.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-test-floating.Tpo $(DEPDIR)/testhelper_la-test-floating.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test-floating.c' object='testhelper_la-test-floating.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-test-floating.lo `test -f 'test-floating.c' || echo '$(srcdir)/'`test-floating.c
+
+testhelper_la-test-thread.lo: test-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-test-thread.lo -MD -MP -MF $(DEPDIR)/testhelper_la-test-thread.Tpo -c -o testhelper_la-test-thread.lo `test -f 'test-thread.c' || echo '$(srcdir)/'`test-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-test-thread.Tpo $(DEPDIR)/testhelper_la-test-thread.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test-thread.c' object='testhelper_la-test-thread.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-test-thread.lo `test -f 'test-thread.c' || echo '$(srcdir)/'`test-thread.c
+
+testhelper_la-test-unknown.lo: test-unknown.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-test-unknown.lo -MD -MP -MF $(DEPDIR)/testhelper_la-test-unknown.Tpo -c -o testhelper_la-test-unknown.lo `test -f 'test-unknown.c' || echo '$(srcdir)/'`test-unknown.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-test-unknown.Tpo $(DEPDIR)/testhelper_la-test-unknown.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test-unknown.c' object='testhelper_la-test-unknown.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-test-unknown.lo `test -f 'test-unknown.c' || echo '$(srcdir)/'`test-unknown.c
+
 mostlyclean-libtool:
        -rm -f *.lo
 
@@ -467,6 +545,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -563,32 +642,56 @@ uninstall-am:
        tags uninstall uninstall-am
 
 
+# This is a hack to make sure a shared library is built
+@ENABLE_INTROSPECTION_TRUE@libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
+@ENABLE_INTROSPECTION_TRUE@    $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
+
+@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
+@ENABLE_INTROSPECTION_TRUE@    $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
+
+# g-i doesn't ship these as shared libraries anymore; we build them here
+@ENABLE_INTROSPECTION_TRUE@Regress-1.0.gir: libregress.la Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
+@ENABLE_INTROSPECTION_TRUE@    --namespace=Regress --nsversion=1.0 \
+@ENABLE_INTROSPECTION_TRUE@    --warn-all --warn-error \
+@ENABLE_INTROSPECTION_TRUE@    --library=libregress.la \
+@ENABLE_INTROSPECTION_TRUE@    --libtool="$(top_builddir)/libtool" \
+@ENABLE_INTROSPECTION_TRUE@    --output $@ \
+@ENABLE_INTROSPECTION_TRUE@    $(nodist_libregress_la_SOURCES)
+@ENABLE_INTROSPECTION_TRUE@Regress-1.0.typelib: Regress-1.0.gir Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-compiler $< -o $@
+
+@ENABLE_INTROSPECTION_TRUE@GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
+@ENABLE_INTROSPECTION_TRUE@    --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
+@ENABLE_INTROSPECTION_TRUE@    --warn-all --warn-error \
+@ENABLE_INTROSPECTION_TRUE@    --library=libgimarshallingtests.la \
+@ENABLE_INTROSPECTION_TRUE@    --libtool="$(top_builddir)/libtool" \
+@ENABLE_INTROSPECTION_TRUE@    --output $@ \
+@ENABLE_INTROSPECTION_TRUE@    $(nodist_libgimarshallingtests_la_SOURCES)
+@ENABLE_INTROSPECTION_TRUE@GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-compiler $< -o $@
+
 # 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: $(LTLIBRARIES:.la=.so)
-       $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(tests)
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
 
 all: $(LTLIBRARIES:.la=.so)
 
 clean-local:
-       rm -f $(LTLIBRARIES:.la=.so)
+       rm -f $(LTLIBRARIES:.la=.so) file.txt~
 
-.la.so:
-       $(LN_S) .libs/$@ $@ || true
+check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib
+       TEST_FILES="$(TEST_FILES)" PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH GI_TYPELIB_PATH=$(builddir) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
 
 check.gdb:
        EXEC_NAME="gdb --args" $(MAKE) check
 
-%.gdb:
-       EXEC_NAME="gdb --args" TEST_NAMES=$* $(MAKE) check
-
 check.valgrind:
-       EXEC_NAME="valgrind" $(MAKE) check
-
-%.valgrind:
-       EXEC_NAME="valgrind" TEST_NAMES=$* $(MAKE) check
+       EXEC_NAME="valgrind" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
 
 # 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.
diff --git a/tests/common.py b/tests/common.py
deleted file mode 100644 (file)
index 1fbeba4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-import os
-import sys
-
-def importModules(buildDir):
-    # Be very careful when you change this code, it's
-    # fragile and the order is really significant
-
-    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/compathelper.py b/tests/compathelper.py
new file mode 100644 (file)
index 0000000..754285c
--- /dev/null
@@ -0,0 +1,50 @@
+import sys
+
+if sys.version_info >= (3, 0):
+    '''
+    for tests that need to test long values in python 2
+
+    python 3 does not differentiate between long and int
+    and does not supply a long keyword
+
+    instead of testing longs by using values such as 10L
+    test writters should do this:
+
+    from compathelper import _long
+    _long(10)
+    '''
+    _long = int
+
+    '''
+    for tests that need to test string values in python 2
+
+    python 3 does differentiate between str and bytes
+    and does not supply a basestring keyword
+
+    any tests that use basestring should do this:
+
+    from compathelper import _basestring
+    isinstance(_basestring, "hello")
+    '''
+    _basestring = str
+
+    '''
+    for tests that need to write to intefaces that take bytes in
+    python 3
+
+    python 3 has a seperate bytes type for low level functions like os.write
+
+    python 2 treats these as strings
+
+    any tests that need to write a string of bytes should do something like
+    this:
+
+    from compathelper import _bytes
+    os.write(_bytes("hello"))
+    '''
+
+    _bytes = lambda s: s.encode()
+else:
+    _long = long
+    _basestring = basestring
+    _bytes = str
index ea19df5860647089cc2e0e49c6cb9090d95ea366..d99f0cc7b436024bdc5904a9f57bd070dbaa9b63 100644 (file)
@@ -1,35 +1,28 @@
-#!/usr/bin/env python
-import glob
-import os
-import sys
-import unittest
-
-import common
-
-program = None
-if len(sys.argv) < 2:
-    raise ValueError('Need at least 2 parameters: runtests.py <build-dir> '
-                     '<test-module-1> <test-module-2> ...')
+# -*- Mode: Python -*-
 
-buildDir = sys.argv[1]
-files = sys.argv[2:]
+import os
+import glob
 
-common.importModules(buildDir=buildDir)
+import unittest
 
-dir = os.path.split(os.path.abspath(__file__))[0]
-os.chdir(dir)
 
-def gettestnames():
-    names = map(lambda x: x[:-3], files)
-    return names
+# Load tests.
+if 'TEST_NAMES' in os.environ:
+       names = os.environ['TEST_NAMES'].split()
+elif 'TEST_FILES' in os.environ:
+       names = []
+       for filename in os.environ['TEST_FILES'].split():
+               names.append(filename[:-3])
+else:
+       names = []
+       for filename in glob.iglob("test_*.py"):
+               names.append(filename[:-3])
 
-suite = unittest.TestSuite()
 loader = unittest.TestLoader()
+suite = loader.loadTestsFromNames(names)
+
 
-for name in gettestnames():
-    if program and program not in name:
-        continue
-    suite.addTest(loader.loadTestsFromName(name))
+# Run tests.
+runner = unittest.TextTestRunner(verbosity=2)
+runner.run(suite)
 
-testRunner = unittest.TextTestRunner()
-testRunner.run(suite)
index 69d19543dc2a52b1912c46b60a38cce41bdc14f8..6e77a3dc9b6b0ad5b937ec27ade8edf920283019 100644 (file)
@@ -10,7 +10,8 @@ from sys import getrefcount
 import cairo
 
 from gi.repository import GObject
-from gi.repository import Everything
+from gi.repository import GLib
+from gi.repository import Regress as Everything
 
 class TestEverything(unittest.TestCase):
 
@@ -82,9 +83,37 @@ class TestEverything(unittest.TestCase):
     def test_wrong_type_of_arguments(self):
         try:
             Everything.test_int8()
-        except TypeError, e:
+        except TypeError:
+            (e_type, e) = sys.exc_info()[:2]
             self.assertEquals(e.args, ("test_int8() takes exactly 1 argument(s) (0 given)",))
 
+    def test_gtypes(self):
+        gchararray_gtype = GObject.type_from_name('gchararray')
+        gtype = Everything.test_gtype(str)
+        self.assertEquals(gchararray_gtype, gtype)
+        gtype = Everything.test_gtype('gchararray')
+        self.assertEquals(gchararray_gtype, gtype)
+        gobject_gtype = GObject.GObject.__gtype__
+        gtype = Everything.test_gtype(GObject.GObject)
+        self.assertEquals(gobject_gtype, gtype)
+        gtype = Everything.test_gtype('GObject')
+        self.assertEquals(gobject_gtype, gtype)
+        self.assertRaises(TypeError, Everything.test_gtype, 'invalidgtype')
+
+        class NotARegisteredClass(object):
+            pass
+
+        self.assertRaises(TypeError, Everything.test_gtype, NotARegisteredClass)
+
+        class ARegisteredClass(GObject.GObject):
+            __gtype_name__ = 'EverythingTestsARegisteredClass'
+
+        gtype = Everything.test_gtype('EverythingTestsARegisteredClass')
+        self.assertEquals(ARegisteredClass.__gtype__, gtype)
+        gtype = Everything.test_gtype(ARegisteredClass)
+        self.assertEquals(ARegisteredClass.__gtype__, gtype)
+        self.assertRaises(TypeError, Everything.test_gtype, 'ARegisteredClass')
+
 class TestNullableArgs(unittest.TestCase):
     def test_in_nullable_hash(self):
         Everything.test_ghash_null_in(None)
@@ -103,7 +132,7 @@ class TestNullableArgs(unittest.TestCase):
         Everything.test_utf8_null_in(None)
 
     def test_in_nullable_object(self):
-        Everything.test_object_null_in(None)
+        Everything.func_obj_null_in(None)
 
     def test_out_nullable_hash(self):
         self.assertEqual(None, Everything.test_ghash_null_out())
@@ -119,7 +148,7 @@ class TestNullableArgs(unittest.TestCase):
         self.assertEqual(None, Everything.test_utf8_null_out())
 
     def test_out_nullable_object(self):
-        self.assertEqual(None, Everything.test_object_null_out())
+        self.assertEqual(None, Everything.TestObj.null_out())
 
 
 class TestCallbacks(unittest.TestCase):
@@ -218,7 +247,7 @@ class TestCallbacks(unittest.TestCase):
         start_ref_count = getrefcount(ud)
         for i in range(100):
             Everything.test_callback_destroy_notify(callback, ud)
-
+            
         Everything.test_callback_thaw_notifications()
         end_ref_count = getrefcount(ud)
 
@@ -253,6 +282,7 @@ class TestCallbacks(unittest.TestCase):
 
         def callback():
             TestCallbacks.called = True
+            return 42
 
         TestCallbacks.called = False
         object_.instance_method_callback(callback)
@@ -264,6 +294,7 @@ class TestCallbacks(unittest.TestCase):
 
         def callbackWithUserData(user_data):
             TestCallbacks.called = True
+            return 42
 
         TestCallbacks.called = False
         obj_ = Everything.TestObj.new_callback(callbackWithUserData, None)
@@ -272,3 +303,56 @@ class TestCallbacks(unittest.TestCase):
     def testCallbackNone(self):
         # make sure this doesn't assert or crash
         Everything.test_simple_callback(None)
+
+
+class TestProperties(unittest.TestCase):
+
+    def test_basic(self):
+        object_ = Everything.TestObj()
+
+        self.assertEquals(object_.props.int, 0)
+        object_.props.int = 42
+        self.assertTrue(isinstance(object_.props.int, int))
+        self.assertEquals(object_.props.int, 42)
+
+        self.assertEquals(object_.props.float, 0.0)
+        object_.props.float = 42.42
+        self.assertTrue(isinstance(object_.props.float, float))
+        self.assertAlmostEquals(object_.props.float, 42.42, places=5)
+
+        self.assertEquals(object_.props.double, 0.0)
+        object_.props.double = 42.42
+        self.assertTrue(isinstance(object_.props.double, float))
+        self.assertAlmostEquals(object_.props.double, 42.42, places=5)
+
+        self.assertEquals(object_.props.string, None)
+        object_.props.string = 'mec'
+        self.assertTrue(isinstance(object_.props.string, str))
+        self.assertEquals(object_.props.string, 'mec')
+
+    def test_hash_table(self):
+        object_ = Everything.TestObj()
+        self.assertEquals(object_.props.hash_table, None)
+
+        object_.props.hash_table = {'mec': 56}
+        self.assertTrue(isinstance(object_.props.hash_table, dict))
+        self.assertEquals(list(object_.props.hash_table.items())[0], ('mec', 56))
+
+    def test_list(self):
+        object_ = Everything.TestObj()
+        self.assertEquals(object_.props.list, [])
+
+        object_.props.list = ['1', '2', '3']
+        self.assertTrue(isinstance(object_.props.list, list))
+        self.assertEquals(object_.props.list, ['1', '2', '3'])
+
+    def test_boxed(self):
+        object_ = Everything.TestObj()
+        self.assertEquals(object_.props.boxed, None)
+
+        boxed = Everything.TestBoxed()
+        boxed.some_int8 = 42
+        object_.props.boxed = boxed
+
+        self.assertTrue(isinstance(object_.props.boxed, Everything.TestBoxed))
+        self.assertEquals(object_.props.boxed.some_int8, 42)
diff --git a/tests/test_gcancellable.py b/tests/test_gcancellable.py
new file mode 100644 (file)
index 0000000..f911572
--- /dev/null
@@ -0,0 +1,15 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+import gio
+
+
+class TestResolver(unittest.TestCase):
+    def setUp(self):
+        self.cancellable = gio.Cancellable()
+    
+    def test_make_poll_fd(self):
+        poll = self.cancellable.make_pollfd()
+        self.failUnless(isinstance(poll, glib.PollFD))
index 3444c9d7dbe73582a7cc519971ee8a56934e668a..fa9df70c110a96e50a313d1f7b45671c227c33a0 100644 (file)
@@ -1,20 +1,22 @@
 # -*- Mode: Python; py-indent-offset: 4 -*-
+# coding=utf-8
 # vim: tabstop=4 shiftwidth=4 expandtab
 
+import sys
 import pygtk
 pygtk.require("2.0")
 
 import unittest
 from gi.repository import GObject
 
-import sys
-sys.path.insert(0, "../")
-
 import gobject
 from gi.repository import GIMarshallingTests
 
+if sys.version_info < (3, 0):
+    CONSTANT_UTF8 = "const \xe2\x99\xa5 utf8"
+else:
+    CONSTANT_UTF8 = "const â™¥ utf8"
 
-CONSTANT_UTF8 = "const \xe2\x99\xa5 utf8"
 CONSTANT_NUMBER = 42
 
 
@@ -617,9 +619,6 @@ class TestUtf8(unittest.TestCase):
         self.assertRaises(TypeError, GIMarshallingTests.utf8_none_in, CONSTANT_NUMBER)
         self.assertRaises(TypeError, GIMarshallingTests.utf8_none_in, None)
 
-    def test_utf8_full_in(self):
-        GIMarshallingTests.utf8_full_in(CONSTANT_UTF8)
-
     def test_utf8_none_out(self):
         self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_none_out())
 
@@ -754,12 +753,6 @@ class TestGArray(unittest.TestCase):
     def test_garray_utf8_none_in(self):
         GIMarshallingTests.garray_utf8_none_in(Sequence(['0', '1', '2']))
 
-    def test_garray_utf8_container_in(self):
-        GIMarshallingTests.garray_utf8_container_in(Sequence(['0', '1', '2']))
-
-    def test_garray_utf8_full_in(self):
-        GIMarshallingTests.garray_utf8_full_in(Sequence(['0', '1', '2']))
-
     def test_garray_utf8_none_out(self):
         self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_out())
 
@@ -804,12 +797,6 @@ class TestGList(unittest.TestCase):
     def test_glist_utf8_none_in(self):
         GIMarshallingTests.glist_utf8_none_in(Sequence(('0', '1', '2')))
 
-    def test_glist_utf8_container_in(self):
-        GIMarshallingTests.glist_utf8_container_in(Sequence(('0', '1', '2')))
-
-    def test_glist_utf8_full_in(self):
-        GIMarshallingTests.glist_utf8_full_in(Sequence(('0', '1', '2')))
-
     def test_glist_utf8_none_out(self):
         self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_out())
 
@@ -854,12 +841,6 @@ class TestGSList(unittest.TestCase):
     def test_gslist_utf8_none_in(self):
         GIMarshallingTests.gslist_utf8_none_in(Sequence(('0', '1', '2')))
 
-    def test_gslist_utf8_container_in(self):
-        GIMarshallingTests.gslist_utf8_container_in(Sequence(('0', '1', '2')))
-
-    def test_gslist_utf8_full_in(self):
-        GIMarshallingTests.gslist_utf8_full_in(Sequence(('0', '1', '2')))
-
     def test_gslist_utf8_none_out(self):
         self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_out())
 
@@ -905,12 +886,6 @@ class TestGHashTable(unittest.TestCase):
     def test_ghashtable_utf8_none_in(self):
         GIMarshallingTests.ghashtable_utf8_none_in({'-1': '1', '0': '0', '1': '-1', '2': '-2'})
 
-    def test_ghashtable_utf8_container_in(self):
-        GIMarshallingTests.ghashtable_utf8_container_in({'-1': '1', '0': '0', '1': '-1', '2': '-2'})
-
-    def test_ghashtable_utf8_full_in(self):
-        GIMarshallingTests.ghashtable_utf8_full_in({'-1': '1', '0': '0', '1': '-1', '2': '-2'})
-
     def test_ghashtable_utf8_none_out(self):
         self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_out())
 
@@ -974,8 +949,9 @@ class TestEnum(unittest.TestCase):
 
     def test_enum_in(self):
         GIMarshallingTests.enum_in(GIMarshallingTests.Enum.VALUE3)
+        GIMarshallingTests.enum_in(42)
 
-        self.assertRaises(TypeError, GIMarshallingTests.enum_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.enum_in, 43)
         self.assertRaises(TypeError, GIMarshallingTests.enum_in, 'GIMarshallingTests.Enum.VALUE3')
 
     def test_enum_out(self):
@@ -1000,8 +976,9 @@ class TestGEnum(unittest.TestCase):
 
     def test_genum_in(self):
         GIMarshallingTests.genum_in(GIMarshallingTests.GEnum.VALUE3)
+        GIMarshallingTests.genum_in(42)
 
-        self.assertRaises(TypeError, GIMarshallingTests.genum_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.genum_in, 43)
         self.assertRaises(TypeError, GIMarshallingTests.genum_in, 'GIMarshallingTests.GEnum.VALUE3')
 
     def test_genum_out(self):
@@ -1076,7 +1053,7 @@ class TestStructure(unittest.TestCase):
         self.assertEquals(None, struct.pointer)
 
     def test_simple_struct_return(self):
-        struct = GIMarshallingTests.simple_struct_return()
+        struct = GIMarshallingTests.simple_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.SimpleStruct))
         self.assertEquals(6, struct.long_)
@@ -1089,40 +1066,17 @@ class TestStructure(unittest.TestCase):
         struct.long_ = 6
         struct.int8 = 7
 
-        GIMarshallingTests.simple_struct_in(struct)
+        GIMarshallingTests.SimpleStruct.inv(struct)
 
         del struct
 
         struct = GIMarshallingTests.NestedStruct()
 
-        self.assertRaises(TypeError, GIMarshallingTests.simple_struct_in, struct)
+        self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.inv, struct)
 
         del struct
 
-        self.assertRaises(TypeError, GIMarshallingTests.simple_struct_in, None)
-
-    def test_simple_struct_out(self):
-        struct = GIMarshallingTests.simple_struct_out()
-
-        self.assertTrue(isinstance(struct, GIMarshallingTests.SimpleStruct))
-        self.assertEquals(6, struct.long_)
-        self.assertEquals(7, struct.int8)
-
-        del struct
-
-    def test_simple_struct_inout(self):
-        in_struct = GIMarshallingTests.SimpleStruct()
-        in_struct.long_ = 6
-        in_struct.int8 = 7
-
-        out_struct = GIMarshallingTests.simple_struct_inout(in_struct)
-
-        self.assertTrue(isinstance(out_struct, GIMarshallingTests.SimpleStruct))
-        self.assertEquals(7, out_struct.long_)
-        self.assertEquals(6, out_struct.int8)
-
-        del in_struct
-        del out_struct
+        self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.inv, None)
 
     def test_simple_struct_method(self):
         struct = GIMarshallingTests.SimpleStruct()
@@ -1145,7 +1099,7 @@ class TestStructure(unittest.TestCase):
         del struct
 
     def test_pointer_struct_return(self):
-        struct = GIMarshallingTests.pointer_struct_return()
+        struct = GIMarshallingTests.pointer_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.PointerStruct))
         self.assertEquals(42, struct.long_)
@@ -1156,30 +1110,10 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.PointerStruct()
         struct.long_ = 42
 
-        GIMarshallingTests.pointer_struct_in(struct)
-
-        del struct
-
-    def test_pointer_struct_out(self):
-        struct = GIMarshallingTests.pointer_struct_out()
-
-        self.assertTrue(isinstance(struct, GIMarshallingTests.PointerStruct))
-        self.assertEquals(42, struct.long_)
+        struct.inv()
 
         del struct
 
-    def test_pointer_struct_inout(self):
-        in_struct = GIMarshallingTests.PointerStruct()
-        in_struct.long_ = 42
-
-        out_struct = GIMarshallingTests.pointer_struct_inout(in_struct)
-
-        self.assertTrue(isinstance(out_struct, GIMarshallingTests.PointerStruct))
-        self.assertEquals(0, out_struct.long_)
-
-        del in_struct
-        del out_struct
-
     def test_boxed_struct(self):
         self.assertTrue(issubclass(GIMarshallingTests.BoxedStruct, GObject.GBoxed))
 
@@ -1207,7 +1141,7 @@ class TestStructure(unittest.TestCase):
         del struct
 
     def test_boxed_struct_return(self):
-        struct = GIMarshallingTests.boxed_struct_return()
+        struct = GIMarshallingTests.boxed_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
         self.assertEquals(42, struct.long_)
@@ -1219,7 +1153,7 @@ class TestStructure(unittest.TestCase):
         struct = GIMarshallingTests.BoxedStruct()
         struct.long_ = 42
 
-        GIMarshallingTests.boxed_struct_in(struct)
+        struct.inv()
 
         del struct
 
@@ -1255,7 +1189,7 @@ class TestStructure(unittest.TestCase):
         del new_union
 
     def test_union_return(self):
-        union = GIMarshallingTests.union_return()
+        union = GIMarshallingTests.union_returnv()
 
         self.assertTrue(isinstance(union, GIMarshallingTests.Union))
         self.assertEquals(42, union.long_)
@@ -1266,30 +1200,10 @@ class TestStructure(unittest.TestCase):
         union = GIMarshallingTests.Union()
         union.long_ = 42
 
-        GIMarshallingTests.union_in(union)
+        union.inv()
 
         del union
 
-    def test_union_out(self):
-        union = GIMarshallingTests.union_out()
-
-        self.assertTrue(isinstance(union, GIMarshallingTests.Union))
-        self.assertEquals(42, union.long_)
-
-        del union
-
-    def test_union_inout(self):
-        in_union = GIMarshallingTests.Union()
-        in_union.long_ = 42
-
-        out_union = GIMarshallingTests.union_inout(in_union)
-
-        self.assertTrue(isinstance(out_union, GIMarshallingTests.Union))
-        self.assertEquals(0, out_union.long_)
-
-        del in_union
-        del out_union
-
     def test_union_method(self):
         union = GIMarshallingTests.Union()
         union.long_ = 42
@@ -1365,49 +1279,44 @@ class TestGObject(unittest.TestCase):
 #        self.assertEquals(object_.int_, 42)
 
     def test_object_none_return(self):
-        object_ = GIMarshallingTests.object_none_return()
+        object_ = GIMarshallingTests.Object.none_return()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
         self.assertEquals(object_.__grefcount__, 2)
 
     def test_object_full_return(self):
-        object_ = GIMarshallingTests.object_full_return()
+        object_ = GIMarshallingTests.Object.full_return()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
         self.assertEquals(object_.__grefcount__, 1)
 
     def test_object_none_in(self):
         object_ = GIMarshallingTests.Object(int = 42)
-        GIMarshallingTests.object_none_in(object_)
+        GIMarshallingTests.Object.none_in(object_)
         self.assertEquals(object_.__grefcount__, 1)
 
         object_ = GIMarshallingTests.SubObject(int = 42)
-        GIMarshallingTests.object_none_in(object_)
+        GIMarshallingTests.Object.none_in(object_)
 
         object_ = GObject.GObject()
-        self.assertRaises(TypeError, GIMarshallingTests.object_none_in, object_)
-
-        self.assertRaises(TypeError, GIMarshallingTests.object_none_in, None)
+        self.assertRaises(TypeError, GIMarshallingTests.Object.none_in, object_)
 
-    def test_object_full_in(self):
-        object_ = GIMarshallingTests.Object(int = 42)
-        GIMarshallingTests.object_full_in(object_)
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertRaises(TypeError, GIMarshallingTests.Object.none_in, None)
 
     def test_object_none_out(self):
-        object_ = GIMarshallingTests.object_none_out()
+        object_ = GIMarshallingTests.Object.none_out()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
         self.assertEquals(object_.__grefcount__, 2)
 
-        new_object = GIMarshallingTests.object_none_out()
+        new_object = GIMarshallingTests.Object.none_out()
         self.assertTrue(new_object is object_)
 
     def test_object_full_out(self):
-        object_ = GIMarshallingTests.object_full_out()
+        object_ = GIMarshallingTests.Object.full_out()
         self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
         self.assertEquals(object_.__grefcount__, 1)
 
     def test_object_none_inout(self):
         object_ = GIMarshallingTests.Object(int = 42)
-        new_object = GIMarshallingTests.object_none_inout(object_)
+        new_object = GIMarshallingTests.Object.none_inout(object_)
 
         self.assertTrue(isinstance(new_object, GIMarshallingTests.Object))
 
@@ -1416,20 +1325,20 @@ class TestGObject(unittest.TestCase):
         self.assertEquals(object_.__grefcount__, 1)
         self.assertEquals(new_object.__grefcount__, 2)
 
-        new_new_object = GIMarshallingTests.object_none_inout(object_)
+        new_new_object = GIMarshallingTests.Object.none_inout(object_)
         self.assertTrue(new_new_object is new_object)
 
-        GIMarshallingTests.object_none_inout(GIMarshallingTests.SubObject(int = 42))
+        GIMarshallingTests.Object.none_inout(GIMarshallingTests.SubObject(int = 42))
 
     def test_object_full_inout(self):
         object_ = GIMarshallingTests.Object(int = 42)
-        new_object = GIMarshallingTests.object_full_inout(object_)
+        new_object = GIMarshallingTests.Object.full_inout(object_)
 
         self.assertTrue(isinstance(new_object, GIMarshallingTests.Object))
 
         self.assertFalse(object_ is new_object)
 
-        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEquals(object_.__grefcount__, 2)
         self.assertEquals(new_object.__grefcount__, 1)
 
 # FIXME: Doesn't actually return the same object.
@@ -1573,7 +1482,7 @@ class TestOverrides(unittest.TestCase):
         del struct
 
         # Test that the overrides wrapper has been registered.
-        struct = GIMarshallingTests.overrides_struct_return()
+        struct = GIMarshallingTests.overrides_struct_returnv()
 
         self.assertTrue(isinstance(struct, GIMarshallingTests.OverridesStruct))
 
@@ -1594,7 +1503,7 @@ class TestOverrides(unittest.TestCase):
         self.assertEquals(6, object_.method())
 
         # Test that the overrides wrapper has been registered.
-        object_ = GIMarshallingTests.overrides_object_return()
+        object_ = GIMarshallingTests.OverridesObject.returnv()
 
         self.assertTrue(isinstance(object_, GIMarshallingTests.OverridesObject))
 
index 5ce7ece771ce91c11ba2c7f22cb411c0535dc9f4..b9af6ff0dda88647e9472916110ea1bfa4a3133f 100644 (file)
@@ -3,7 +3,8 @@
 import os
 import unittest
 
-from common import gio, glib
+import glib
+import gio
 
 
 class TestIcon(unittest.TestCase):
index feafc700b1a01965e86a47ff175a6537c11a2ccf..7c8251eaf3e71238a51657fd14f256c9d4f68fbd 100644 (file)
@@ -3,7 +3,8 @@
 import os
 import unittest
 
-from common import gio, glib
+import glib
+import gio
 
 
 class TestFile(unittest.TestCase):
index d91f3ad84df2a748adceb049b8a1be80adcfec0e..f3cdf293c653d38503ec7e94e1f00bbac04251c8 100644 (file)
@@ -2,7 +2,8 @@
 
 import unittest
 
-from common import gobject, testhelper
+import gobject
+import testhelper
 
 
 class TestGObjectAPI(unittest.TestCase):
diff --git a/tests/test_gresolver.py b/tests/test_gresolver.py
new file mode 100644 (file)
index 0000000..ef8585c
--- /dev/null
@@ -0,0 +1,65 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+import gio
+
+
+class TestResolver(unittest.TestCase):
+    def setUp(self):
+        self.resolver = gio.resolver_get_default()
+
+    def test_resolver_lookup_by_name(self):
+        addresses = self.resolver.lookup_by_name("pygtk.org", cancellable=None)
+        self.failUnless(isinstance(addresses[0], gio.InetAddress))
+
+    def test_resolver_lookup_by_address(self):
+        address = gio.inet_address_new_from_string("8.8.8.8")
+        dns = self.resolver.lookup_by_address(address, cancellable=None)
+        self.failUnlessEqual(dns, "google-public-dns-a.google.com")
+    
+    def test_resolver_lookup_by_name_async(self):
+        def callback(resolver, result):
+            try:
+                addresses = resolver.lookup_by_name_finish(result)
+                self.failUnless(isinstance(addresses[0], gio.InetAddress))
+            finally:
+                loop.quit()
+
+        self.resolver.lookup_by_name_async(callback, "pygtk.org")
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_resolver_lookup_by_address_async(self):
+        def callback(resolver, result):
+            try:
+                dns = resolver.lookup_by_address_finish(result)
+                self.failUnlessEqual(dns, "google-public-dns-b.google.com")
+            finally:
+                loop.quit()
+
+        address = gio.inet_address_new_from_string("8.8.4.4")
+        self.resolver.lookup_by_address_async(callback, address)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_resolver_lookup_service(self):
+        targets = self.resolver.lookup_service("xmpp-client", "tcp", "google.com")
+        self.failUnless(isinstance(targets[0], gio.SrvTarget))
+
+    def test_resolver_lookup_service_async(self):
+        def callback(resolver, result):
+            try:
+                targets = resolver.lookup_service_finish(result)
+                self.failUnless(isinstance(targets[0], gio.SrvTarget))
+            finally:
+                loop.quit()
+
+        self.resolver.lookup_service_async(callback, "xmpp-client", "tcp", "google.com")
+
+        loop = glib.MainLoop()
+        loop.run()
+
diff --git a/tests/test_gsocket.py b/tests/test_gsocket.py
new file mode 100644 (file)
index 0000000..627f6fd
--- /dev/null
@@ -0,0 +1,126 @@
+# -*- Mode: Python -*-
+
+import os
+import unittest
+
+import glib
+import gobject
+import gio
+
+
+class TestSocket(unittest.TestCase):
+    def setUp(self):
+        self.sock = gio.Socket(gio.SOCKET_FAMILY_IPV4,
+                               gio.SOCKET_TYPE_STREAM,
+                               gio.SOCKET_PROTOCOL_TCP)
+
+    def test_socket_condition_check(self):
+        check = self.sock.condition_check(glib.IO_OUT)
+        self.failUnless(isinstance(check, gobject.GFlags))
+        self.failUnlessEqual(check, glib.IO_OUT | glib.IO_HUP)
+
+    def test_socket_condition_wait(self):
+        res = self.sock.condition_wait(glib.IO_OUT)
+        self.failUnless(res)
+
+    def tearDown(self):
+        self.sock.close()
+
+class TestSocketAddress(unittest.TestCase):
+    def test_socket_address_enumerator_next_async(self):
+        def callback(enumerator, result):
+            try:
+                address = enumerator.next_finish(result)
+                self.failUnless(isinstance(address, gio.SocketAddress))
+            finally:
+                loop.quit()
+
+        socket = gio.NetworkAddress("www.pygtk.org", 80)
+        enumerator = socket.enumerate()
+        enumerator.next_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestSocketListener(unittest.TestCase):
+    def test_socket_listener_add_address(self):
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+        
+        listener = gio.SocketListener()
+        effective = listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+        self.failUnless(isinstance(effective, gio.InetSocketAddress))
+
+    def test_socket_listener_accept(self):
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+
+        listener = gio.SocketListener()
+        listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+
+        connection, source = listener.accept(cancellable=None)
+        self.failUnless(isinstance(connection, gio.TcpConnection))
+
+    def test_socket_listener_accept_socket(self):
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+
+        listener = gio.SocketListener()
+        listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+
+        socket, source = listener.accept_socket(cancellable=None)
+        self.failUnless(isinstance(socket, gio.Socket))
+
+    def test_socket_listener_accept_async(self):
+        def callback(listener, result):
+            try:
+                connection, source = listener.accept_finish(result)
+                self.failUnless(isinstance(connection, gio.TcpConnection))
+            finally:
+                loop.quit()
+
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+        
+        listener = gio.SocketListener()
+        listener.add_address(inetsock,
+                             gio.SOCKET_TYPE_STREAM,
+                             gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+        
+        listener.accept_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_socket_listener_accept_socket_async(self):
+        def callback(listener, result):
+            try:
+                socket, source = listener.accept_socket_finish(result)
+                self.failUnless(isinstance(socket, gio.Socket))
+            finally:
+                loop.quit()
+
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+        
+        listener = gio.SocketListener()
+        listener.add_address(inetsock,
+                             gio.SOCKET_TYPE_STREAM,
+                             gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+        
+        listener.accept_socket_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
index d95979170bf9fd759291d9561ed0d1d8d7e14c7e..fbc05860f27ddcd145f80e509c7864e076955c9d 100644 (file)
@@ -1,6 +1,10 @@
+# -*- Mode: Python -*-
+
 import unittest
 
-from common import gobject, testhelper
+import gobject
+import testhelper
+
 
 GUnknown = gobject.type_from_name("TestUnknown")
 Unknown = GUnknown.pytype
index 95e5f7891f34e9367423fb09eddfc7fd6763aff0..80e2aec05a3164b0adc7b4befb25568aa110abb6 100644 (file)
@@ -1,12 +1,13 @@
-#!/usr/bin/env python
+# -*- Mode: Python -*-
 
-import exceptions
 import os
 import sys
 import select
 import unittest
 
-from common import glib
+import glib
+
+from compathelper import _bytes
 
 class TestMainLoop(unittest.TestCase):
     def testExceptionHandling(self):
@@ -27,11 +28,11 @@ class TestMainLoop(unittest.TestCase):
         glib.child_watch_add(pid, child_died, loop)
 
         os.close(pipe_r)
-        os.write(pipe_w, "Y")
+        os.write(pipe_w, _bytes("Y"))
         os.close(pipe_w)
 
         def excepthook(type, value, traceback):
-            assert type is exceptions.Exception
+            assert type is Exception
             assert value.args[0] == "deadbabe"
         sys.excepthook = excepthook
 
@@ -48,6 +49,3 @@ class TestMainLoop(unittest.TestCase):
         #
         sys.excepthook = sys.__excepthook__
         assert not got_exception
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/tests/test_option.py b/tests/test_option.py
new file mode 100644 (file)
index 0000000..a6ecc98
--- /dev/null
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+
+import unittest
+import sys
+
+# py3k has StringIO in a different module
+try:
+    from StringIO import StringIO
+except ImportError:
+    from io import StringIO
+
+from glib.option import OptionParser, OptionGroup, OptionValueError, \
+     make_option, BadOptionError
+
+from compathelper import _bytes
+
+class TestOption(unittest.TestCase):
+    EXCEPTION_MESSAGE = "This callback fails"
+
+    def setUp(self):
+        self.parser = OptionParser("NAMES...",
+                                     description="Option unit test")
+        self.parser.add_option("-t", "--test", help="Unit test option",
+                          action="store_false", dest="test", default=True)
+        self.parser.add_option("--g-fatal-warnings",
+                               action="store_true",
+                               dest="fatal_warnings",
+                               help="dummy"),
+
+    def _create_group(self):
+        def option_callback(option, opt, value, parser):
+            raise Exception(self.EXCEPTION_MESSAGE)
+
+        group = OptionGroup(
+            "unittest", "Unit test options", "Show all unittest options",
+            option_list = [
+                make_option("-f", "-u", "--file", "--unit-file",
+                                   type="filename",
+                                   dest="unit_file",
+                                   help="Unit test option"),
+                make_option("--test-integer",
+                                   type="int",
+                                   dest="test_integer",
+                                   help="Unit integer option"),
+                make_option("--callback-failure-test",
+                                   action="callback",
+                                   callback=option_callback,
+                                   dest="test_integer",
+                                   help="Unit integer option"),
+            ])
+        group.add_option("-t", "--test",
+                         action="store_false",
+                         dest="test",
+                         default=True,
+                         help="Unit test option")
+        self.parser.add_option_group(group)
+        return group
+
+    def testParseArgs(self):
+        options, args = self.parser.parse_args(
+            ["test_option.py"])
+        self.failIf(args)
+
+        options, args = self.parser.parse_args(
+            ["test_option.py", "foo"])
+        self.assertEquals(args, ["foo"])
+
+        options, args = self.parser.parse_args(
+            ["test_option.py", "foo", "bar"])
+        self.assertEquals(args, ["foo", "bar"])
+
+    def testParseArgsDoubleDash(self):
+        options, args = self.parser.parse_args(
+            ["test_option.py", "--", "-xxx"])
+        #self.assertEquals(args, ["-xxx"])
+
+    def testParseArgs(self):
+        options, args = self.parser.parse_args()
+
+    def testParseArgsGroup(self):
+        group = self._create_group()
+
+        options, args = self.parser.parse_args(
+            ["test_option.py", "--test", "-f", "test"])
+
+        self.failIf(options.test)
+        self.assertEqual(options.unit_file, "test")
+
+        self.failUnless(group.values.test)
+        self.failIf(self.parser.values.test)
+        self.assertEqual(group.values.unit_file, "test")
+        self.failIf(args)
+
+    def testOptionValueError(self):
+        self._create_group()
+        self.assertRaises(OptionValueError, self.parser.parse_args,
+                          ["test_option.py", "--test-integer=text"])
+
+    def testBadOptionError(self):
+        self.assertRaises(BadOptionError,
+                          self.parser.parse_args,
+                          ["test_option.py", "--unknwon-option"])
+
+    def testOptionGroupConstructor(self):
+        self.assertRaises(TypeError, OptionGroup)
+
+    def testStandardError(self):
+        self._create_group()
+        sio = StringIO()
+        old_stderr = sys.stderr
+        sys.stderr = sio
+        try:
+            self.parser.parse_args(
+                ["test_option.py", "--callback-failure-test"])
+        finally:
+            sys.stderr = old_stderr
+
+        assert (sio.getvalue().split('\n')[-2] ==
+                "Exception: " + self.EXCEPTION_MESSAGE)
+
index 0a665874b3accd4010cccdd96882848036fd3043..b1e3617d51cbf2fab672c1b95746240e75dfb9ec 100644 (file)
@@ -9,11 +9,36 @@ import unittest
 import sys
 sys.path.insert(0, "../")
 
+from gi.repository import GLib
 from gi.repository import GObject
 from gi.repository import Gdk
 from gi.repository import Gtk
 import gi.overrides as overrides
 
+class TestGLib(unittest.TestCase):
+
+    def test_gvariant(self):
+        variant = GLib.Variant('i', 42)
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEquals(variant.get_int32(), 42)
+
+        variant = GLib.Variant('(ss)', 'mec', 'mac')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
+        self.assertEquals(variant.get_child_value(0).get_string(), 'mec')
+        self.assertEquals(variant.get_child_value(1).get_string(), 'mac')
+
+        variant = GLib.Variant('a{si}', {'key1': 1, 'key2': 2})
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
+        # Looks like order is not preserved
+        self.assertEquals(variant.get_child_value(1).get_child_value(0).get_string(), 'key1')
+        self.assertEquals(variant.get_child_value(1).get_child_value(1).get_int32(), 1)
+        self.assertEquals(variant.get_child_value(0).get_child_value(0).get_string(), 'key2')
+        self.assertEquals(variant.get_child_value(0).get_child_value(1).get_int32(), 2)
+
 class TestGdk(unittest.TestCase):
 
     def test_color(self):
@@ -22,6 +47,16 @@ class TestGdk(unittest.TestCase):
         self.assertEquals(color.green, 200)
         self.assertEquals(color.blue, 300)
 
+    def test_event(self):
+        event = Gdk.Event.new(Gdk.EventType.CONFIGURE)
+        self.assertEquals(event.type, Gdk.EventType.CONFIGURE)
+        self.assertEquals(event.send_event, 0)
+
+        event = Gdk.Event.new(Gdk.EventType.DRAG_MOTION)
+        event.x_root, event.y_root = 0, 5
+        self.assertEquals(event.x_root, 0)
+        self.assertEquals(event.y_root, 5)
+
 class TestGtk(unittest.TestCase):
     def test_uimanager(self):
         self.assertEquals(Gtk.UIManager, overrides.Gtk.UIManager)
@@ -156,32 +191,30 @@ class TestGtk(unittest.TestCase):
         button = dialog.get_widget_for_response (Gtk.ResponseType.CLOSE)
         self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
 
-    def test_tree_api(self):
+    class TestClass(GObject.GObject):
+        __gtype_name__ = "GIOverrideTreeAPITest"
+
+        def __init__(self, tester, int_value, string_value):
+            super(TestGtk.TestClass, self).__init__()
+            self.tester = tester
+            self.int_value = int_value
+            self.string_value = string_value
+
+        def check(self, int_value, string_value):
+            self.tester.assertEquals(int_value, self.int_value)
+            self.tester.assertEquals(string_value, self.string_value)
+
+    def test_tree_store(self):
         self.assertEquals(Gtk.TreeStore, overrides.Gtk.TreeStore)
         self.assertEquals(Gtk.ListStore, overrides.Gtk.ListStore)
         self.assertEquals(Gtk.TreeModel, overrides.Gtk.TreeModel)
         self.assertEquals(Gtk.TreeViewColumn, overrides.Gtk.TreeViewColumn)
 
-        class TestClass(GObject.GObject):
-            __gtype_name__ = "GIOverrideTreeAPITest"
-
-            def __init__(self, tester, int_value, string_value):
-                super(TestClass, self).__init__()
-                self.tester = tester
-                self.int_value = int_value
-                self.string_value = string_value
-
-            def check(self, int_value, string_value):
-                self.tester.assertEquals(int_value, self.int_value)
-                self.tester.assertEquals(string_value, self.string_value)
-
-        # check TreeStore
-        # FIXME: we should be able to pass strings like 'TestClass'
-        tree_store = Gtk.TreeStore(int, str, TestClass)
+        tree_store = Gtk.TreeStore(int, 'gchararray', TestGtk.TestClass)
         parent = None
-        for i in xrange(100):
+        for i in range(100):
             label = 'this is child #%d' % i
-            testobj = TestClass(self, i, label)
+            testobj = TestGtk.TestClass(self, i, label)
             parent = tree_store.append(parent, (i, label, testobj))
 
         # len gets the number of children in the root node
@@ -204,12 +237,11 @@ class TestGtk(unittest.TestCase):
 
         self.assertEquals(i, 99)
 
-        # check ListStore
-        # FIXME: we should be able to pass strings like 'TestClass'
-        list_store = Gtk.ListStore(int, str, TestClass)
-        for i in xrange(100):
+    def test_list_store(self):
+        list_store = Gtk.ListStore(int, str, 'GIOverrideTreeAPITest')
+        for i in range(100):
             label = 'this is row #%d' % i
-            testobj = TestClass(self, i, label)
+            testobj = TestGtk.TestClass(self, i, label)
             parent = list_store.append((i, label, testobj))
 
         self.assertEquals(len(list_store), 100)
@@ -227,7 +259,7 @@ class TestGtk(unittest.TestCase):
 
         self.assertEquals(i, 99)
 
-        # check to see that we can instantiate a TreeViewColumn
+    def test_tree_view_column(self):
         cell = Gtk.CellRendererText()
         column = Gtk.TreeViewColumn(title='This is just a test',
                                     cell_renderer=cell,
@@ -256,3 +288,13 @@ class TestGtk(unittest.TestCase):
         text = buffer.get_text(start, end, False)
 
         self.assertEquals(text, 'Hello Jane Hello Bob')
+
+    def test_buttons(self):
+        self.assertEquals(Gtk.Button, overrides.Gtk.Button)
+
+        # test Gtk.Button
+        button = Gtk.Button()
+        button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
+        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertTrue(button.get_use_stock())
+        self.assertTrue(button.get_use_underline())
index ccfcb3477956b7e6dbad1532270c5e5751422e2f..19e1136dd6dd352c76a55afb7ad6f765980c05ca 100644 (file)
@@ -1,4 +1,5 @@
 
+import sys
 import struct
 import unittest
 
@@ -12,6 +13,8 @@ from gobject.constants import \
      G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
      G_MAXULONG
 
+from compathelper import _long
+
 class PropertyObject(GObject):
     normal = gobject.property(type=str)
     construct = gobject.property(
@@ -80,12 +83,12 @@ class TestProperties(unittest.TestCase):
     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 = _long(1)
+        self.assertEqual(obj.props.uint64, _long(1))
         obj.props.uint64 = 1
-        self.assertEqual(obj.props.uint64, 1L)
+        self.assertEqual(obj.props.uint64, _long(1))
 
-        self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", -1L)
+        self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", _long(-1))
         self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", -1)
 
     def testUInt64DefaultValue(self):
@@ -93,10 +96,11 @@ class TestProperties(unittest.TestCase):
             class TimeControl(GObject):
                 __gproperties__ = {
                     'time': (TYPE_UINT64, 'Time', 'Time',
-                             0L, (1<<64) - 1, 0L,
+                             _long(0), (1<<64) - 1, _long(0),
                              PARAM_READABLE)
                     }
-        except OverflowError, ex:
+        except OverflowError:
+            (etype, ex) = sys.exc_info()[2:]
             self.fail(str(ex))
 
     def testRange(self):
@@ -182,7 +186,7 @@ class TestProperty(unittest.TestCase):
             str = gobject.property(type=str)
             int = gobject.property(type=int)
             float = gobject.property(type=float)
-            long = gobject.property(type=long)
+            long = gobject.property(type=_long)
 
         self.failUnless(hasattr(C.props, 'str'))
         self.failUnless(hasattr(C.props, 'int'))
@@ -202,9 +206,9 @@ class TestProperty(unittest.TestCase):
         o.float = 3.14
         self.assertEqual(o.float, 3.14)
 
-        self.assertEqual(o.long, 0L)
-        o.long = 100L
-        self.assertEqual(o.long, 100L)
+        self.assertEqual(o.long, _long(0))
+        o.long = _long(100)
+        self.assertEqual(o.long, _long(100))
 
     def testCustomGetter(self):
         class C(gobject.GObject):
index 96e07312b89eb9a797e980a15b49bd16ecf8db8e..d68cb5bf595f17e8981e92c3908abb8ab0f925af 100644 (file)
@@ -4,7 +4,9 @@ import gc
 import unittest
 import sys
 
-from common import gobject, testhelper
+import gobject
+import testhelper
+from compathelper import _long
 
 class C(gobject.GObject):
     __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
@@ -302,7 +304,7 @@ class SigPropClass(gobject.GObject):
         if pspec.name == 'foo':
             self._foo = value
         else:
-            raise AttributeError, 'unknown property %s' % pspec.name
+            raise AttributeError('unknown property %s' % pspec.name)
         try:
             self.emit("my-signal", 1)
         except TypeError:
@@ -326,7 +328,7 @@ class CM(gobject.GObject):
         test1=(f, None, ()),
         test2=(l, None, (str,)),
         test3=(l, int, (double,)),
-        test4=(f, None, (bool, long, float, double, int, uint, ulong)),
+        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, )),
@@ -349,7 +351,7 @@ class _TestCMarshaller:
         self.assertEqual(rv, 20)
 
     def testTest4(self):
-        self.obj.emit("test4", True, 10L, 3.14, 1.78, 20, 30L, 31L)
+        self.obj.emit("test4", True, _long(10), 3.14, 1.78, 20, _long(30), _long(31))
 
     def testTestReturnFloat(self):
         rv = self.obj.emit("test-float", 1.234)
@@ -371,9 +373,9 @@ if 'generic-c-marshaller' in gobject.features:
     class TestCMarshaller(_TestCMarshaller, unittest.TestCase):
         pass
 else:
-    print
-    print '** WARNING: LIBFFI disabled, not testing'
-    print
+    print()
+    print('** WARNING: LIBFFI disabled, not testing')
+    print()
 
 # Test for 374653
 class TestPyGValue(unittest.TestCase):
index abe2f695067eb5b6b2c496e44a0d614337c5d4cb..339fb32872db5953124d960573ca5054483432ea 100644 (file)
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+# -*- Mode: Python -*-
 
 import unittest
 
-from common import glib
+import glib
 
 
 class Idle(glib.Idle):
@@ -92,8 +92,8 @@ class TestSource(unittest.TestCase):
 
 class TestTimeout(unittest.TestCase):
      def test504337(self):
-       timeout_source = glib.Timeout(20)
-       idle_source = glib.Idle()
+        timeout_source = glib.Timeout(20)
+        idle_source = glib.Idle()
 
 
 if __name__ == '__main__':
index 1522edb903d1ab89e40e46289bab45144f43e7d0..c90d1d69b998071b2cd198488bc9028a311b7b37 100644 (file)
@@ -3,7 +3,7 @@
 import sys
 import unittest
 
-from common import glib
+import glib
 
 
 class TestProcess(unittest.TestCase):
@@ -22,6 +22,3 @@ class TestProcess(unittest.TestCase):
         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_thread.py b/tests/test_thread.py
new file mode 100644 (file)
index 0000000..be746a4
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+import testhelper
+
+
+class TestThread(unittest.TestCase):
+    def setUp(self):
+        self.main = glib.MainLoop()
+
+    def from_thread_cb(self, test, enum):
+        assert test == self.obj
+        assert int(enum) == 0
+        assert type(enum) != int
+
+    def idle_cb(self):
+        self.obj = testhelper.get_test_thread()
+        self.obj.connect('from-thread', self.from_thread_cb)
+        self.obj.emit('emit-signal')
+
+    def testExtensionModule(self):
+        glib.idle_add(self.idle_cb)
+        glib.timeout_add(50, self.timeout_cb)
+        self.main.run()
+
+    def timeout_cb(self):
+        self.main.quit()
diff --git a/tests/test_unknown.py b/tests/test_unknown.py
deleted file mode 100644 (file)
index d65bb89..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-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/test_uris.py b/tests/test_uris.py
new file mode 100644 (file)
index 0000000..ee24215
--- /dev/null
@@ -0,0 +1,15 @@
+import unittest
+
+import glib
+
+class TestUris(unittest.TestCase):
+    def testExtractUris(self):
+        uri_list_text = "# urn:isbn:0-201-08372-8\n" + \
+                        "http://www.huh.org/books/foo.html\n" + \
+                        "http://www.huh.org/books/foo.pdf\n" + \
+                        "ftp://ftp.foo.org/books/foo.txt\n"
+        uri_list = glib.uri_list_extract_uris(uri_list_text)
+        assert uri_list[0] == "http://www.huh.org/books/foo.html"
+        assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
+        assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"
+
index 21679bc7cb9f99ed780fae76741d72f30efda23c..5610a5d2315c1b21c35438370ffbc59a74e9b53e 100644 (file)
@@ -5,6 +5,8 @@
 #include "test-unknown.h"
 #include "test-floating.h"
 
+#include <pyglib-python-compat.h>
+
 static PyTypeObject *_PyGObject_Type;
 #define PyGObject_Type (*_PyGObject_Type)
 
@@ -83,7 +85,7 @@ _wrap_test_g_object_new (PyObject * self)
     PyObject *rv;
 
     obj = g_object_new(g_type_from_name("PyGObject"), NULL);
-    rv = PyInt_FromLong(obj->ref_count); /* should be == 2 at this point */
+    rv = PYGLIB_PyLong_FromLong(obj->ref_count); /* should be == 2 at this point */
     g_object_unref(obj);
     return rv;
 }
@@ -112,53 +114,7 @@ static const PyMethodDef _PyTestInterface_methods[] = {
 };
 
 /* 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 */
-
-
-    
-};
+PYGLIB_DEFINE_TYPE("test.Interface", PyTestInterface_Type, PyObject);
 
 static PyObject *
 _wrap_TestInterface__do_iface_method(PyObject *cls, PyObject *args, PyObject *kwargs)
@@ -183,51 +139,7 @@ _wrap_TestInterface__do_iface_method(PyObject *cls, PyObject *args, PyObject *kw
   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 */
-};
-
+PYGLIB_DEFINE_TYPE("testhelper.Unknown", PyTestUnknown_Type, PyGObject);
 
 static void
 _wrap_TestInterface__proxy_do_iface_method(TestInterface *self)
@@ -313,98 +225,10 @@ static const GInterfaceInfo __TestInterface__iinfo = {
 };
 
 /* 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 */
-};
+PYGLIB_DEFINE_TYPE("testhelper.FloatingWithSinkFunc", PyTestFloatingWithSinkFunc_Type, PyGObject);
 
 /* 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 */
-};
+PYGLIB_DEFINE_TYPE("testhelper.FloatingWithoutSinkFunc", PyTestFloatingWithoutSinkFunc_Type, PyGObject);
 
 #include <string.h>
 #include <glib-object.h>
@@ -447,7 +271,7 @@ test4_callback (GObject *object,
   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 (d <= 1.78001 && d >= 1.77999);
   g_return_if_fail (uint == 20);
   g_return_if_fail (ulong == 30L);
 }
@@ -619,20 +443,17 @@ static PyMethodDef testhelper_functions[] = {
     { NULL, NULL }
 };
 
-void 
-inittesthelper ()
+PYGLIB_MODULE_START(testhelper, "testhelper")
 {
   PyObject *m, *d;
-  PyObject *module;
   
   g_thread_init(NULL);
   init_pygobject();
-  m = Py_InitModule ("testhelper", testhelper_functions);
 
-  d = PyModule_GetDict(m);
+  d = PyModule_GetDict(module);
 
-  if ((module = PyImport_ImportModule("gobject")) != NULL) {
-    PyObject *moddict = PyModule_GetDict(module);
+  if ((m = PyImport_ImportModule("gobject")) != NULL) {
+    PyObject *moddict = PyModule_GetDict(m);
     
     _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
     if (_PyGObject_Type == NULL) {
@@ -647,33 +468,45 @@ inittesthelper ()
   }
 
   /* TestInterface */
+  PyTestInterface_Type.tp_methods = (struct PyMethodDef*)_PyTestInterface_methods;
+  PyTestInterface_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);  
   pyg_register_interface(d, "Interface", TEST_TYPE_INTERFACE,
                         &PyTestInterface_Type);
   pyg_register_interface_info(TEST_TYPE_INTERFACE, &__TestInterface__iinfo);
 
 
   /* TestUnknown */
+  PyTestUnknown_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestUnknown_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestUnknown_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
   pygobject_register_class(d, "Unknown", TEST_TYPE_UNKNOWN,
                           &PyTestUnknown_Type,
                           Py_BuildValue("(O)",
-                                        &PyGObject_Type,
-                                        &PyTestInterface_Type));
+                           &PyGObject_Type,
+                           &PyTestInterface_Type));
   pyg_set_object_has_new_constructor(TEST_TYPE_UNKNOWN);
   //pyg_register_class_init(TEST_TYPE_UNKNOWN, __GtkUIManager_class_init);
 
   /* TestFloatingWithSinkFunc */
+  PyTestFloatingWithSinkFunc_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestFloatingWithSinkFunc_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestFloatingWithSinkFunc_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
   pygobject_register_class(d, "FloatingWithSinkFunc", TEST_TYPE_FLOATING_WITH_SINK_FUNC,
                           &PyTestFloatingWithSinkFunc_Type,
                           Py_BuildValue("(O)",
-                                        &PyGObject_Type));
+                           &PyGObject_Type));
   pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_WITH_SINK_FUNC);
   pygobject_register_sinkfunc(TEST_TYPE_FLOATING_WITH_SINK_FUNC, sink_test_floating_with_sink_func);
 
   /* TestFloatingWithoutSinkFunc */
+  PyTestFloatingWithoutSinkFunc_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestFloatingWithoutSinkFunc_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestFloatingWithoutSinkFunc_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
   pygobject_register_class(d, "FloatingWithoutSinkFunc", TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC,
                           &PyTestFloatingWithoutSinkFunc_Type,
                           Py_BuildValue("(O)",
-                                        &PyGObject_Type));
+                           &PyGObject_Type));
   pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC);
 }
+PYGLIB_MODULE_END