summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4339
-rw-r--r--Makefile.am15
-rw-r--r--Makefile.in91
-rw-r--r--NEWS254
-rw-r--r--PKG-INFO6
-rw-r--r--PKG-INFO.in2
-rw-r--r--README3
-rw-r--r--codegen/Makefile.am33
-rw-r--r--codegen/Makefile.in576
-rw-r--r--codegen/README.defs351
-rw-r--r--codegen/__init__.py16
-rw-r--r--codegen/argtypes.py1043
-rwxr-xr-xcodegen/code-coverage.py44
-rwxr-xr-xcodegen/codegen.py1722
-rwxr-xr-xcodegen/createdefs.py17
-rw-r--r--codegen/definitions.py575
-rwxr-xr-xcodegen/defsconvert.py132
-rwxr-xr-xcodegen/defsgen.py737
-rw-r--r--codegen/defsparser.py153
-rw-r--r--codegen/docextract.py448
-rwxr-xr-xcodegen/docextract_to_xml.py139
-rwxr-xr-xcodegen/docgen.py766
-rwxr-xr-xcodegen/h2def.py631
-rwxr-xr-xcodegen/mergedefs.py26
-rwxr-xr-xcodegen/missingdefs.py17
-rwxr-xr-xcodegen/mkskel.py89
-rw-r--r--codegen/override.py285
-rw-r--r--codegen/pygobject-codegen-2.0.in11
-rw-r--r--codegen/reversewrapper.py912
-rwxr-xr-xcodegen/scanvirtuals.py54
-rwxr-xr-xcodegen/scmexpr.py143
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure319
-rw-r--r--configure.ac80
-rw-r--r--docs/Makefile.am82
-rw-r--r--docs/Makefile.in85
-rw-r--r--docs/html/class-gioappinfo.html210
-rw-r--r--docs/html/class-gioapplaunchcontext.html44
-rw-r--r--docs/html/class-gioasyncresult.html44
-rw-r--r--docs/html/class-giobufferedinputstream.html133
-rw-r--r--docs/html/class-giobufferedoutputstream.html62
-rw-r--r--docs/html/class-giocancellable.html61
-rw-r--r--docs/html/class-giodatainputstream.html223
-rw-r--r--docs/html/class-giodataoutputstream.html118
-rw-r--r--docs/html/class-giodrive.html117
-rw-r--r--docs/html/class-gioemblem.html46
-rw-r--r--docs/html/class-gioemblemedicon.html38
-rw-r--r--docs/html/class-giofile.html1436
-rw-r--r--docs/html/class-giofileattributeinfo.html11
-rw-r--r--docs/html/class-giofileenumerator.html126
-rw-r--r--docs/html/class-giofileicon.html21
-rw-r--r--docs/html/class-giofileinfo.html42
-rw-r--r--docs/html/class-giofileinputstream.html65
-rw-r--r--docs/html/class-giofilemonitor.html21
-rw-r--r--docs/html/class-giofileoutputstream.html84
-rw-r--r--docs/html/class-giofilterinputstream.html22
-rw-r--r--docs/html/class-giofilteroutputstream.html22
-rw-r--r--docs/html/class-gioicon.html81
-rw-r--r--docs/html/class-gioinputstream.html242
-rw-r--r--docs/html/class-gioloadableicon.html51
-rw-r--r--docs/html/class-giomemoryinputstream.html32
-rw-r--r--docs/html/class-giomemoryoutputstream.html40
-rw-r--r--docs/html/class-giomount.html242
-rw-r--r--docs/html/class-giomountoperation.html123
-rw-r--r--docs/html/class-giooutputstream.html19
-rw-r--r--docs/html/class-gioseekable.html55
-rw-r--r--docs/html/class-giosimpleasyncresult.html87
-rw-r--r--docs/html/class-giothemedicon.html42
-rw-r--r--docs/html/class-giounixinputstream.html37
-rw-r--r--docs/html/class-giounixoutputstream.html37
-rw-r--r--docs/html/class-giovolume.html176
-rw-r--r--docs/html/class-giovolumemonitor.html135
-rw-r--r--docs/html/class-glibmaincontext.html8
-rw-r--r--docs/html/class-glibmainloop.html8
-rw-r--r--docs/html/class-gobject.html12
-rw-r--r--docs/html/class-gobjectgboxed.html8
-rw-r--r--docs/html/class-gobjectginterface.html6
-rw-r--r--docs/html/class-gobjectgpointer.html6
-rw-r--r--docs/html/gio-class-reference.html1
-rw-r--r--docs/html/gio-constants.html414
-rw-r--r--docs/html/gio-functions.html74
-rw-r--r--docs/html/giounix-class-reference.html1
-rw-r--r--docs/html/glib-constants.html2
-rw-r--r--docs/html/glib-functions.html6
-rw-r--r--docs/html/gobject-constants.html4
-rw-r--r--docs/html/gobject-functions.html6
-rw-r--r--docs/html/index.html4
-rw-r--r--docs/html/index.sgml433
-rw-r--r--docs/html/pygobject.devhelp417
-rw-r--r--docs/reference/pygio-appinfo.xml894
-rw-r--r--docs/reference/pygio-applaunchcontext.xml194
-rw-r--r--docs/reference/pygio-asyncresult.xml117
-rw-r--r--docs/reference/pygio-bufferedinputstream.xml461
-rw-r--r--docs/reference/pygio-bufferedoutputstream.xml275
-rw-r--r--docs/reference/pygio-cancellable.xml290
-rw-r--r--docs/reference/pygio-classes.xml47
-rw-r--r--docs/reference/pygio-constants.xml1540
-rw-r--r--docs/reference/pygio-datainputstream.xml799
-rw-r--r--docs/reference/pygio-dataoutputstream.xml504
-rw-r--r--docs/reference/pygio-drive.xml546
-rw-r--r--docs/reference/pygio-emblem.xml232
-rw-r--r--docs/reference/pygio-emblemedicon.xml160
-rw-r--r--docs/reference/pygio-file.xml4534
-rw-r--r--docs/reference/pygio-fileattributeinfo.xml73
-rw-r--r--docs/reference/pygio-fileenumerator.xml488
-rw-r--r--docs/reference/pygio-fileicon.xml109
-rw-r--r--docs/reference/pygio-fileinfo.xml346
-rw-r--r--docs/reference/pygio-fileinputstream.xml214
-rw-r--r--docs/reference/pygio-filemonitor.xml128
-rw-r--r--docs/reference/pygio-fileoutputstream.xml257
-rw-r--r--docs/reference/pygio-filterinputstream.xml152
-rw-r--r--docs/reference/pygio-filteroutputstream.xml152
-rw-r--r--docs/reference/pygio-functions.xml395
-rw-r--r--docs/reference/pygio-icon.xml217
-rw-r--r--docs/reference/pygio-inputstream.xml730
-rw-r--r--docs/reference/pygio-loadableicon.xml198
-rw-r--r--docs/reference/pygio-memoryinputstream.xml151
-rw-r--r--docs/reference/pygio-memoryoutputstream.xml175
-rw-r--r--docs/reference/pygio-mount.xml962
-rw-r--r--docs/reference/pygio-mountoperation.xml726
-rw-r--r--docs/reference/pygio-outputstream.xml140
-rw-r--r--docs/reference/pygio-seekable.xml231
-rw-r--r--docs/reference/pygio-simpleasyncresult.xml317
-rw-r--r--docs/reference/pygio-themedicon.xml204
-rw-r--r--docs/reference/pygio-unixinputstream.xml202
-rw-r--r--docs/reference/pygio-unixoutputstream.xml202
-rw-r--r--docs/reference/pygio-volume.xml718
-rw-r--r--docs/reference/pygio-volumemonitor.xml844
-rw-r--r--docs/reference/pygiounix-classes.xml13
-rw-r--r--docs/reference/pygobject-ref.xml2
-rw-r--r--examples/Makefile.in3
-rwxr-xr-xexamples/cairo-demo.py6
-rw-r--r--gi/Makefile.am23
-rw-r--r--gi/Makefile.in94
-rw-r--r--gi/__init__.py2
-rw-r--r--gi/_glib/Makefile.am (renamed from glib/Makefile.am)15
-rw-r--r--gi/_glib/Makefile.in (renamed from glib/Makefile.in)116
-rw-r--r--gi/_glib/__init__.py (renamed from glib/__init__.py)3
-rw-r--r--gi/_glib/glibmodule.c (renamed from glib/glibmodule.c)10
-rw-r--r--gi/_glib/option.py (renamed from glib/option.py)4
-rw-r--r--gi/_glib/pygiochannel.c (renamed from glib/pygiochannel.c)38
-rw-r--r--gi/_glib/pygiochannel.h (renamed from glib/pygiochannel.h)0
-rw-r--r--gi/_glib/pyglib-private.h (renamed from glib/pyglib-private.h)0
-rw-r--r--gi/_glib/pyglib-python-compat.h (renamed from glib/pyglib-python-compat.h)0
-rw-r--r--gi/_glib/pyglib.c (renamed from glib/pyglib.c)18
-rw-r--r--gi/_glib/pyglib.h (renamed from glib/pyglib.h)0
-rw-r--r--gi/_glib/pygmaincontext.c (renamed from glib/pygmaincontext.c)2
-rw-r--r--gi/_glib/pygmaincontext.h (renamed from glib/pygmaincontext.h)0
-rw-r--r--gi/_glib/pygmainloop.c (renamed from glib/pygmainloop.c)4
-rw-r--r--gi/_glib/pygmainloop.h (renamed from glib/pygmainloop.h)0
-rw-r--r--gi/_glib/pygoptioncontext.c (renamed from glib/pygoptioncontext.c)4
-rw-r--r--gi/_glib/pygoptioncontext.h (renamed from glib/pygoptioncontext.h)0
-rw-r--r--gi/_glib/pygoptiongroup.c (renamed from glib/pygoptiongroup.c)4
-rw-r--r--gi/_glib/pygoptiongroup.h (renamed from glib/pygoptiongroup.h)0
-rw-r--r--gi/_glib/pygsource.c (renamed from glib/pygsource.c)14
-rw-r--r--gi/_glib/pygsource.h (renamed from glib/pygsource.h)0
-rw-r--r--gi/_glib/pygspawn.c (renamed from glib/pygspawn.c)14
-rw-r--r--gi/_glib/pygspawn.h (renamed from glib/pygspawn.h)0
-rw-r--r--gi/_gobject/Makefile.am (renamed from gobject/Makefile.am)16
-rw-r--r--gi/_gobject/Makefile.in (renamed from gobject/Makefile.in)83
-rw-r--r--gi/_gobject/__init__.py (renamed from gobject/__init__.py)34
-rw-r--r--gi/_gobject/constants.py (renamed from gobject/constants.py)3
-rw-r--r--gi/_gobject/ffi-marshaller.c (renamed from gobject/ffi-marshaller.c)0
-rw-r--r--gi/_gobject/ffi-marshaller.h (renamed from gobject/ffi-marshaller.h)0
-rw-r--r--gi/_gobject/gobjectmodule.c (renamed from gobject/gobjectmodule.c)4
-rw-r--r--gi/_gobject/propertyhelper.py (renamed from gobject/propertyhelper.py)30
-rw-r--r--gi/_gobject/pygboxed.c (renamed from gobject/pygboxed.c)0
-rw-r--r--gi/_gobject/pygboxed.h (renamed from gobject/pygboxed.h)0
-rw-r--r--gi/_gobject/pygenum.c (renamed from gobject/pygenum.c)0
-rw-r--r--gi/_gobject/pygenum.h (renamed from gobject/pygenum.h)0
-rw-r--r--gi/_gobject/pygflags.c (renamed from gobject/pygflags.c)0
-rw-r--r--gi/_gobject/pygflags.h (renamed from gobject/pygflags.h)0
-rw-r--r--gi/_gobject/pyginterface.c (renamed from gobject/pyginterface.c)0
-rw-r--r--gi/_gobject/pyginterface.h (renamed from gobject/pyginterface.h)0
-rw-r--r--gi/_gobject/pygobject-private.h (renamed from gobject/pygobject-private.h)1
-rw-r--r--gi/_gobject/pygobject.c (renamed from gobject/pygobject.c)52
-rw-r--r--gi/_gobject/pygobject.h (renamed from gobject/pygobject.h)2
-rw-r--r--gi/_gobject/pygparamspec.c (renamed from gobject/pygparamspec.c)0
-rw-r--r--gi/_gobject/pygparamspec.h (renamed from gobject/pygparamspec.h)0
-rw-r--r--gi/_gobject/pygpointer.c (renamed from gobject/pygpointer.c)0
-rw-r--r--gi/_gobject/pygpointer.h (renamed from gobject/pygpointer.h)0
-rw-r--r--gi/_gobject/pygtype.c (renamed from gobject/pygtype.c)13
-rw-r--r--gi/_gobject/pygtype.h (renamed from gobject/pygtype.h)0
-rw-r--r--gi/gimodule.c6
-rw-r--r--gi/importer.py14
-rw-r--r--gi/module.py123
-rw-r--r--gi/overrides/GLib.py32
-rw-r--r--gi/overrides/Gdk.py8
-rw-r--r--gi/overrides/Gtk.py159
-rw-r--r--gi/overrides/Makefile.in3
-rw-r--r--gi/overrides/__init__.py6
-rw-r--r--gi/pygi-argument.c62
-rw-r--r--gi/pygi-cache.c1443
-rw-r--r--gi/pygi-cache.h174
-rw-r--r--gi/pygi-closure.c3
-rw-r--r--gi/pygi-foreign-cairo.c19
-rw-r--r--gi/pygi-foreign-gvariant.c9
-rw-r--r--gi/pygi-foreign-gvariant.h14
-rw-r--r--gi/pygi-foreign.c30
-rw-r--r--gi/pygi-foreign.h14
-rw-r--r--gi/pygi-info.c8
-rw-r--r--gi/pygi-invoke-state-struct.h44
-rw-r--r--gi/pygi-invoke.c1358
-rw-r--r--gi/pygi-invoke.h2
-rw-r--r--gi/pygi-marshal-cleanup.c517
-rw-r--r--gi/pygi-marshal-cleanup.h97
-rw-r--r--gi/pygi-marshal-in.c1412
-rw-r--r--gi/pygi-marshal-in.h186
-rw-r--r--gi/pygi-marshal-out.c767
-rw-r--r--gi/pygi-marshal-out.h144
-rw-r--r--gi/pygi-private.h3
-rw-r--r--gi/pygi.h61
-rw-r--r--gi/pygobject-external.h2
-rw-r--r--gi/repository/Makefile.in3
-rw-r--r--gi/types.py33
-rw-r--r--gio/Makefile.am117
-rw-r--r--gio/Makefile.in848
-rw-r--r--gio/__init__.py40
-rw-r--r--gio/gappinfo.override213
-rw-r--r--gio/gapplaunchcontext.override99
-rw-r--r--gio/gbufferedinputstream.override70
-rw-r--r--gio/gcancellable.override38
-rw-r--r--gio/gdatainputstream.override250
-rw-r--r--gio/gdrive.override347
-rw-r--r--gio/gfile.override2215
-rw-r--r--gio/gfileattribute.override153
-rw-r--r--gio/gfileenumerator.override184
-rw-r--r--gio/gfileinfo.override121
-rw-r--r--gio/gfileinputstream.override68
-rw-r--r--gio/gfileiostream.override68
-rw-r--r--gio/gfileoutputstream.override68
-rw-r--r--gio/gicon.override310
-rw-r--r--gio/ginputstream.override344
-rw-r--r--gio/gio-types.defs807
-rw-r--r--gio/gio.defs7465
-rw-r--r--gio/gio.override409
-rw-r--r--gio/giomodule.c208
-rw-r--r--gio/giostream.override68
-rw-r--r--gio/gmemoryinputstream.override91
-rw-r--r--gio/gmemoryoutputstream.override45
-rw-r--r--gio/gmount.override454
-rw-r--r--gio/goutputstream.override292
-rw-r--r--gio/gresolver.override312
-rw-r--r--gio/gsocket.override575
-rw-r--r--gio/gvolume.override237
-rw-r--r--gio/gvolumemonitor.override94
-rw-r--r--gio/pygio-utils.c236
-rw-r--r--gio/pygio-utils.h49
-rw-r--r--gio/unix-types.defs55
-rw-r--r--gio/unix.defs475
-rw-r--r--gio/unix.override62
-rw-r--r--gio/unixmodule.c52
-rw-r--r--pygobject-3.0-uninstalled.pc.in (renamed from pygobject-2.0-uninstalled.pc.in)1
-rw-r--r--pygobject-3.0.pc.in (renamed from pygobject-2.0.pc.in)1
-rw-r--r--pygtk.py95
-rw-r--r--tests/Makefile.am24
-rw-r--r--tests/Makefile.in118
-rwxr-xr-x[-rw-r--r--]tests/runtests.py8
-rw-r--r--tests/te_ST@nouppera50
-rw-r--r--tests/test_everything.py9
-rw-r--r--tests/test_gcancellable.py15
-rw-r--r--tests/test_gdbus.py45
-rw-r--r--tests/test_gi.py113
-rw-r--r--tests/test_gicon.py112
-rw-r--r--tests/test_gio.py1138
-rw-r--r--tests/test_gobject.py31
-rw-r--r--tests/test_gresolver.py68
-rw-r--r--tests/test_gsocket.py126
-rw-r--r--tests/test_interface.py16
-rw-r--r--tests/test_mainloop.py6
-rw-r--r--tests/test_option.py3
-rw-r--r--tests/test_overrides.py205
-rw-r--r--tests/test_properties.py154
-rw-r--r--tests/test_signal.py98
-rw-r--r--tests/test_source.py23
-rw-r--r--tests/test_subprocess.py11
-rw-r--r--tests/test_thread.py9
-rw-r--r--tests/test_uris.py4
-rw-r--r--tests/testhelpermodule.c2
-rw-r--r--tests/testmodule.py10
280 files changed, 10195 insertions, 56100 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a72a87..126c4cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,131 +1,1309 @@
-commit 42970db5949c615078c38a039da4745eeb194ac1
-Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Fri Jun 10 14:01:32 2011 +0200
+commit d3f85a61ec4b1a1d04838f73dc8d862258150048
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Aug 14 10:13:37 2011 -0400
- closure: avoid double free crash
+ get things ready for release
- gi/pygi-closure.c | 12 ++++--------
- 1 files changed, 4 insertions(+), 8 deletions(-)
+ NEWS | 194
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 194 insertions(+), 0 deletions(-)
+
+commit ffd057649380d4249c1c52e1225e3646f3994bc6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Aug 14 05:26:18 2011 -0400
+
+ pass exta keywords to the Box constructor
+
+ gi/overrides/Gtk.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cadbd4142bd0045368b5123d4b0a1876bdd5d798
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Aug 13 11:03:07 2011 -0400
+
+ add (Tree|List)Store set method override
+
+ gi/overrides/Gtk.py | 50 +++++++++++++++++++++++
+ tests/test_overrides.py | 102
+ +++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 149 insertions(+), 3 deletions(-)
+
+commit 9ee9b22bd95e44bd2eca26e7bf3b0a9a988700c5
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Aug 13 09:19:29 2011 -0400
+
+ add test for object arrays
+
+ tests/test_everything.py | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit c9d9ffd0380878792cbdb13dec4e53be897e5fbc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Aug 13 08:46:18 2011 -0400
+
+ only support C pointer arrays for structs and objects
+
+ * There is no way to know if an array of structs or objects are
+ pointer arrays
+ or flat arrays. Since pointer arrays are the most useful and
+ prevelant
+ it has been decided to only support those arrays
+
+ gi/pygi-marshal-out.c | 2 +-
+ tests/test_gi.py | 8 --------
+ 2 files changed, 1 insertions(+), 9 deletions(-)
+
+commit b12379de1790b72d51883bf7b63c892639a892e7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Aug 13 06:31:52 2011 -0400
+
+ revert Gtk.Window override because it causes issues with subclasses
+
+ gi/overrides/Gtk.py | 9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 3e64a62d6d7f9e9d2820aad54187ef9c34710a1f
+Author: Jonathan Matthew <jonathan@d14n.org>
+Date: Thu Apr 7 21:05:32 2011 +1000
+
+ take GIL in _pygi_invoke_closure_free (bug #647016)
+
+ gi/pygi-closure.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit f8de9b8615f5dc30f492781d792aef5fc1e9ab73
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 00:41:24 2011 -0300
+
+ Add a default parameter to GtkTreeModel.filter_new
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653462
+
+ gi/overrides/Gtk.py | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 583d0b3c6b53712128d7c2d5f075000a2a76ae5f
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 00:40:12 2011 -0300
+
+ Add vbox/action_area properties
+
+ Accessing vbox/action_area directly creates segmentation fault,
+ avoid that by mapping the fields to their getters for PyGTK
+ API compatibility
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653462
+
+ gi/overrides/Gtk.py | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 017fdfc1dd06259006719e02ffa48883cee01ffd
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 00:39:41 2011 -0300
+
+ Add a couple of constructors
+
+ This is for PyGTK compatibility, so that gtk.HBox(True, 2) etc
+ works.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653462
+
+ gi/overrides/Gtk.py | 40 ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 40 insertions(+), 0 deletions(-)
+
+commit af8bc9d5cdba48a7ee728ccb7ea9039df3ecceba
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 00:38:30 2011 -0300
+
+ Do not always pass in user_data to callbacks.
+
+ This keeps API compatibility with PyGTK and avoids sending
+ in user_data if it's None.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653462
+
+ gi/overrides/Gtk.py | 15 ++++++++++++---
+ 1 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 7914d814350af1a18bdeda64f049c8e9a68d1d18
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 00:38:20 2011 -0300
+
+ Add a default detail value for Widget.render_icon
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653462
+
+ gi/overrides/Gtk.py | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5b1c875269b7979caae97e84919a690a34d92f29
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 00:36:20 2011 -0300
+
+ Add an override for Gdk.color_parse()
+
+ Change Gdk.color_parse() to not return a tuple, instead just
+ return the created color or None if it wasn't possible to parse
+ the name into a color.
+
+ This keeps compatibility with PyGTK but breaks the current API.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653462
+
+ gi/overrides/Gdk.py | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 187a2932bbf1e724f759ff3ed3392fc7341c6aa8
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date: Mon Aug 8 12:06:18 2011 +0200
+
+ Support function calling with keyword arguments in invoke.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=625596
+
+ gi/pygi-cache.c | 39 +++++++++++
+ gi/pygi-cache.h | 4 +
+ gi/pygi-invoke.c | 162
+ ++++++++++++++++++++++++++++++++++++++++++++--
+ gi/types.py | 12 ++--
+ tests/test_everything.py | 2 +-
+ tests/test_gi.py | 58 ++++++++++++++++
+ 6 files changed, 265 insertions(+), 12 deletions(-)
+
+commit e5df32ffbf37481dbb6a70c4d4e7b7b9778c5549
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Aug 13 04:13:28 2011 -0400
+
+ remove references to deprecated GI_INFO_TYPE_ERROR_DOMAIN
+
+ gi/pygi-info.c | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit 745001178fc72be5626c7211366d694f41162987
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu Aug 11 15:11:42 2011 +0200
+
+ Fix gobject vs. gi.repository warning
+
+ Check the warning earlier and fix the operator, so that it actually
+ works. Also
+ update the warning to explain how to fix the problem.
+
+ gi/_gobject/__init__.py | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 25d2d05cba05414cd4551e0e06f6286a9b97a509
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 15:46:31 2011 -0400
+
+ make GObject and GLib able to take overrides
+
+ * derive directly from DynamicModule instead of InterfaceModule
-commit 78366697d8f7fc53f20d9f52f9f39552c5e99bd1
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/importer.py | 11 ++---
+ gi/module.py | 118
+ ++++++++++++++++++++++++++++----------------------------
+ 2 files changed, 64 insertions(+), 65 deletions(-)
+
+commit 698b2284e29c0f699198cf6a22eeb0e399daba6e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Jun 10 16:48:28 2011 -0400
+Date: Fri Jul 22 15:45:09 2011 -0400
- [gi] backport of "GVariant has a GType" fe386a
+ avoid dependency issue by importing the internal gobject
- * backport the switch to using GIInterfaceInfo instead of GITypeInfo
- for foreign types to support this patch - 01596a
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
- gi/pygi-argument.c | 10 +++++-----
- gi/pygi-foreign-cairo.c | 18 ++++++++++--------
- gi/pygi-foreign-gvariant.c | 15 +++++++--------
- gi/pygi-foreign-gvariant.h | 14 ++++++--------
- gi/pygi-foreign.c | 21 +++++++++------------
- gi/pygi-foreign.h | 16 ++++++++--------
- gi/pygi-invoke.c | 26 ++++++++++++++++----------
- 7 files changed, 61 insertions(+), 59 deletions(-)
+ gi/__init__.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
-commit 0c348da3d974f63629c44e75067b8056dacc60d3
+commit 7b068ebe59884ebd9aeb4425dc80cdff73a66fb1
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Jun 10 16:46:20 2011 -0400
+Date: Fri Jul 22 14:13:02 2011 -0400
+
+ fix tests to use the new GLib module
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ tests/test_mainloop.py | 7 +++----
+ tests/test_option.py | 3 ++-
+ tests/test_source.py | 24 +++++++++++-------------
+ tests/test_subprocess.py | 12 +++++-------
+ tests/test_thread.py | 10 ++++------
+ tests/test_uris.py | 4 ++--
+ 6 files changed, 27 insertions(+), 33 deletions(-)
+
+commit 191ef79315f8a5641699536fde58da18e23ef904
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 14:11:53 2011 -0400
+
+ add DynamicGLibModule which works like DynamicGObjectModule
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/importer.py | 7 +++++--
+ gi/module.py | 32 +++++++++++++++++++++++++++++---
+ 2 files changed, 34 insertions(+), 5 deletions(-)
+
+commit fbd4a8263260c187211799454c08b1e55e2cb998
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 12:27:41 2011 -0400
+
+ refactor, add objects and types to the correct internal module
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/_glib/pygiochannel.c | 38 +++++++++++++++++++-------------------
+ gi/_glib/pygmaincontext.c | 2 +-
+ gi/_glib/pygmainloop.c | 4 ++--
+ gi/_glib/pygoptioncontext.c | 4 ++--
+ gi/_glib/pygoptiongroup.c | 4 ++--
+ gi/_glib/pygsource.c | 14 +++++++-------
+ gi/_glib/pygspawn.c | 14 +++++++-------
+ 7 files changed, 40 insertions(+), 40 deletions(-)
+
+commit 7431b49a161df9178c55b814d3adff992ac2d722
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 12:26:32 2011 -0400
+
+ rename the pyglib shared library so we don't load the old one
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/Makefile.am | 2 +-
+ gi/_glib/Makefile.am | 10 +++++-----
+ gi/_gobject/Makefile.am | 2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+commit b8700451acd4a19b59b64fc8641fca748d2189e2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 11:20:09 2011 -0400
+
+ refactor tests to only use PyGObject 3 syntax
- [gi] fixes to backport commit 6b5a65 - in older glib GVariants are
- still structs
+ * for PyGObject 3 we want to discourage the use of legacy
+ interfaces
+ * Using interfaces like from gi.repository import GObject makes
+ sure that the internal _gobject module is loaded and not
+ PyGObject 2's gobject module which would cause the application
+ to not work correctly
- gi/gimodule.c | 6 ++++--
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ tests/runtests-windows.py | 4 +-
+ tests/test_gdbus.py | 12 ++--
+ tests/test_gi.py | 4 +-
+ tests/test_gobject.py | 31 ++++++------
+ tests/test_interface.py | 16 +++---
+ tests/test_mainloop.py | 3 +-
+ tests/test_overrides.py | 8 ++--
+ tests/test_properties.py | 124
+ ++++++++++++++++++++++----------------------
+ tests/test_signal.py | 98 ++++++++++++++++++------------------
+ tests/test_source.py | 5 +-
+ tests/test_subprocess.py | 3 +-
+ tests/test_thread.py | 5 +-
+ tests/test_unknown.py | 8 ++--
+ tests/testhelpermodule.c | 2 +-
+ tests/testmodule.py | 10 ++--
+ 15 files changed, 169 insertions(+), 164 deletions(-)
+
+commit c980dae21468fe073cc8782608148c346bb90ad7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 11:16:00 2011 -0400
+
+ refactor the internal _glib module to import correct modules
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/_glib/__init__.py | 3 ++-
+ gi/_glib/glibmodule.c | 10 +++++-----
+ gi/_glib/option.py | 4 ++--
+ gi/_glib/pyglib.c | 18 +++++++++---------
+ 4 files changed, 18 insertions(+), 17 deletions(-)
+
+commit 65ac35cca8d24f4c133991e1c6ac02f49416a9a4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 11:10:46 2011 -0400
+
+ refactor to use the new internal _glib and _gobject modules
+
+ * use relative imports instead of aboslute
+ * fix the C imports to import the internal _gobject libs
+ * add a check to see if the PyGObject 2 gobject module
+ was already imported
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/_gobject/__init__.py | 20 +++++++++++++-------
+ gi/_gobject/constants.py | 3 +--
+ gi/_gobject/gobjectmodule.c | 2 +-
+ gi/_gobject/propertyhelper.py | 11 +++++------
+ gi/_gobject/pygobject.c | 16 ++++++++--------
+ gi/_gobject/pygobject.h | 2 +-
+ 6 files changed, 29 insertions(+), 25 deletions(-)
+
+commit 59ed1289f76bc287443b3974710ea0da3e2cc8cc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 11:07:10 2011 -0400
+
+ refactor gi module to import and use internal _gobject module
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ gi/importer.py | 2 --
+ gi/module.py | 31 ++++++++++++++++---------------
+ gi/overrides/Gtk.py | 2 +-
+ gi/overrides/__init__.py | 6 +++---
+ gi/pygobject-external.h | 2 +-
+ gi/types.py | 12 ++++++------
+ 6 files changed, 27 insertions(+), 28 deletions(-)
+
+commit 6b9d738d78c6ac45d49f00402c89356887555069
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 22 11:02:49 2011 -0400
+
+ move the static bits internal to gi and refactor build files
+
+ * the glib module now becomes the gi._glib module
+ * the gobject module now becomes the gi._gobject module
+ * we do this so we can install in parallel with PyGObject 2
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ Makefile.am | 2 +-
+ configure.ac | 6 +-
+ gi/Makefile.am | 8 +-
+ gi/_glib/Makefile.am | 58 +
+ gi/_glib/__init__.py | 25 +
+ gi/_glib/glibmodule.c | 969 ++++++++++++++
+ gi/_glib/option.py | 358 ++++++
+ gi/_glib/pygiochannel.c | 764 +++++++++++
+ gi/_glib/pygiochannel.h | 29 +
+ gi/_glib/pyglib-private.h | 49 +
+ gi/_glib/pyglib-python-compat.h | 245 ++++
+ gi/_glib/pyglib.c | 633 ++++++++++
+ gi/_glib/pyglib.h | 83 ++
+ gi/_glib/pygmaincontext.c | 126 ++
+ gi/_glib/pygmaincontext.h | 40 +
+ gi/_glib/pygmainloop.c | 360 ++++++
+ gi/_glib/pygmainloop.h | 36 +
+ gi/_glib/pygoptioncontext.c | 337 +++++
+ gi/_glib/pygoptioncontext.h | 39 +
+ gi/_glib/pygoptiongroup.c | 298 +++++
+ gi/_glib/pygoptiongroup.h | 42 +
+ gi/_glib/pygsource.c | 725 +++++++++++
+ gi/_glib/pygsource.h | 39 +
+ gi/_glib/pygspawn.c | 264 ++++
+ gi/_glib/pygspawn.h | 32 +
+ gi/_gobject/Makefile.am | 71 ++
+ gi/_gobject/__init__.py | 117 ++
+ gi/_gobject/constants.py | 83 ++
+ gi/_gobject/ffi-marshaller.c | 194 +++
+ gi/_gobject/ffi-marshaller.h | 31 +
+ gi/_gobject/gobjectmodule.c | 2638
+ +++++++++++++++++++++++++++++++++++++++
+ gi/_gobject/propertyhelper.py | 312 +++++
+ gi/_gobject/pygboxed.c | 234 ++++
+ gi/_gobject/pygboxed.h | 27 +
+ gi/_gobject/pygenum.c | 366 ++++++
+ gi/_gobject/pygenum.h | 27 +
+ gi/_gobject/pygflags.c | 485 +++++++
+ gi/_gobject/pygflags.h | 27 +
+ gi/_gobject/pyginterface.c | 122 ++
+ gi/_gobject/pyginterface.h | 40 +
+ gi/_gobject/pygobject-private.h | 241 ++++
+ gi/_gobject/pygobject.c | 2397
+ +++++++++++++++++++++++++++++++++++
+ gi/_gobject/pygobject.h | 667 ++++++++++
+ gi/_gobject/pygparamspec.c | 404 ++++++
+ gi/_gobject/pygparamspec.h | 31 +
+ gi/_gobject/pygpointer.c | 198 +++
+ gi/_gobject/pygpointer.h | 27 +
+ gi/_gobject/pygtype.c | 1844 +++++++++++++++++++++++++++
+ gi/_gobject/pygtype.h | 28 +
+ glib/Makefile.am | 61 -
+ glib/__init__.py | 25 -
+ glib/glibmodule.c | 969 --------------
+ glib/option.py | 358 ------
+ glib/pygiochannel.c | 764 -----------
+ glib/pygiochannel.h | 29 -
+ glib/pyglib-private.h | 49 -
+ glib/pyglib-python-compat.h | 245 ----
+ glib/pyglib.c | 633 ----------
+ glib/pyglib.h | 83 --
+ glib/pygmaincontext.c | 126 --
+ glib/pygmaincontext.h | 40 -
+ glib/pygmainloop.c | 360 ------
+ glib/pygmainloop.h | 36 -
+ glib/pygoptioncontext.c | 337 -----
+ glib/pygoptioncontext.h | 39 -
+ glib/pygoptiongroup.c | 298 -----
+ glib/pygoptiongroup.h | 42 -
+ glib/pygsource.c | 725 -----------
+ glib/pygsource.h | 39 -
+ glib/pygspawn.c | 264 ----
+ glib/pygspawn.h | 32 -
+ gobject/Makefile.am | 73 --
+ gobject/__init__.py | 117 --
+ gobject/constants.py | 83 --
+ gobject/ffi-marshaller.c | 194 ---
+ gobject/ffi-marshaller.h | 31 -
+ gobject/gobjectmodule.c | 2638
+ ---------------------------------------
+ gobject/propertyhelper.py | 312 -----
+ gobject/pygboxed.c | 234 ----
+ gobject/pygboxed.h | 27 -
+ gobject/pygenum.c | 366 ------
+ gobject/pygenum.h | 27 -
+ gobject/pygflags.c | 485 -------
+ gobject/pygflags.h | 27 -
+ gobject/pyginterface.c | 122 --
+ gobject/pyginterface.h | 40 -
+ gobject/pygobject-private.h | 241 ----
+ gobject/pygobject.c | 2397
+ -----------------------------------
+ gobject/pygobject.h | 667 ----------
+ gobject/pygparamspec.c | 404 ------
+ gobject/pygparamspec.h | 31 -
+ gobject/pygpointer.c | 198 ---
+ gobject/pygpointer.h | 27 -
+ gobject/pygtype.c | 1844 ---------------------------
+ gobject/pygtype.h | 28 -
+ tests/Makefile.am | 2 +-
+ 96 files changed, 16172 insertions(+), 16175 deletions(-)
+
+commit f0d2ddcf7e61c36f79a9adf8ccc53bf3db9349d3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 18:46:31 2011 -0400
+
+ remove pygtk.py
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ Makefile.am | 5 ---
+ pygtk.py | 95
+ -----------------------------------------------------------
+ 2 files changed, 0 insertions(+), 100 deletions(-)
+
+commit 75e9f7d80d9224c05e6063b88479f1baee48c489
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 18:41:41 2011 -0400
+
+ introspection is no longer optional
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ Makefile.am | 8 +-------
+ configure.ac | 43 +++++++++++++++++--------------------------
+ gi/pygi.h | 37 -------------------------------------
+ gobject/Makefile.am | 5 +----
+ tests/Makefile.am | 7 +------
+ 5 files changed, 20 insertions(+), 80 deletions(-)
+
+commit d862168d6a82edd59547d39f5b0ab8279b1e511c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 18:28:50 2011 -0400
+
+ up platform version to 3.0
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642048
+
+ Makefile.am | 2 +-
+ configure.ac | 4 ++--
+ pygobject-2.0-uninstalled.pc.in | 18 ------------------
+ pygobject-2.0.pc.in | 22 ----------------------
+ pygobject-3.0-uninstalled.pc.in | 18 ++++++++++++++++++
+ pygobject-3.0.pc.in | 22 ++++++++++++++++++++++
+ 6 files changed, 43 insertions(+), 43 deletions(-)
+
+commit 5189b360ccddbbaee267ce857968fbf1aafdd07a
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu Aug 11 09:53:15 2011 +0200
+
+ [gi] Handle GVariants from callback return values
+
+ Callbacks still use GIArgument, add missing GVariant support for
+ return types.
+
+ gi/pygi-argument.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
-commit 6b5a656a3b77438c9bbb897c65343634b981c0e5
-Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Mon Jun 6 19:05:07 2011 +0200
+commit 18a240cc492d2e5ebe2709a0d7155e27c8ff9e63
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Aug 10 14:11:10 2011 +0200
- GVariantType is a boxed struct
+ Handle GVariants for callback arguments
- https://bugzilla.gnome.org/show_bug.cgi?id=647509
+ Callbacks still use GIArgument, add missing GVariant support. This
+ is the
+ equivalent of what commit 9d5604220bd56 did for pygi_marshall_*().
- gi/gimodule.c | 2 +-
+ gi/pygi-argument.c | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit aa820d6ce2fee83e61e3e9de7c6b7d2452e2847d
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date: Mon Aug 8 01:58:10 2011 +0200
+
+ [gi] Fix crash: check return value of
+ _invoke_state_init_from_callable_cache() before continuing.
+
+ gi/pygi-invoke.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit eaad9f3c71cedfe28ff2d2bb05ea6c64e323715f
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date: Fri Aug 5 21:03:33 2011 +0200
+
+ [gi] Pass gtype as first parameter to vfuncs (instead of using
+ kwargs).
+
+ gi/pygi-invoke.c | 32 ++++++++++++++++++--------------
+ gi/types.py | 2 +-
+ 2 files changed, 19 insertions(+), 15 deletions(-)
+
+commit 76edfd0d5776f61c92c84fd9fb8dcc246c580e93
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 18:21:51 2011 -0400
+
+ remove codegen
+
+ Makefile.am | 2 +-
+ codegen/Makefile.am | 33 -
+ codegen/README.defs | 351 --------
+ codegen/__init__.py | 16 -
+ codegen/argtypes.py | 1043 -----------------------
+ codegen/code-coverage.py | 44 -
+ codegen/codegen.py | 1722
+ --------------------------------------
+ codegen/createdefs.py | 17 -
+ codegen/definitions.py | 575 -------------
+ codegen/defsconvert.py | 132 ---
+ codegen/defsgen.py | 737 ----------------
+ codegen/defsparser.py | 153 ----
+ codegen/docextract.py | 461 ----------
+ codegen/docextract_to_xml.py | 142 ----
+ codegen/docgen.py | 766 -----------------
+ codegen/h2def.py | 631 --------------
+ codegen/mergedefs.py | 26 -
+ codegen/missingdefs.py | 17 -
+ codegen/mkskel.py | 89 --
+ codegen/override.py | 285 -------
+ codegen/pygobject-codegen-2.0.in | 11 -
+ codegen/reversewrapper.py | 912 --------------------
+ codegen/scanvirtuals.py | 54 --
+ codegen/scmexpr.py | 143 ----
+ configure.ac | 5 -
+ pygobject-2.0-uninstalled.pc.in | 1 -
+ pygobject-2.0.pc.in | 1 -
+ 27 files changed, 1 insertions(+), 8368 deletions(-)
+
+commit bf284c7c47c3e52ab4d8700327a170903e9ebad2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 11:04:58 2011 -0400
+
+ remove some left over ifdefs to complete merge of the invoke-rewrite
+ branch
+
+ gi/pygi-cache.h | 2 --
+ gi/pygi-info.c | 2 --
+ gi/pygi-private.h | 5 +----
+ gi/pygi.h | 2 --
+ 4 files changed, 1 insertions(+), 10 deletions(-)
+
+commit 8c653ec3033fab47c4bb4071b5732a349357141f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 10:59:45 2011 -0400
+
+ rename pygi-invoke-ng to pygi-invoke
+
+ gi/Makefile.am | 3 +-
+ gi/pygi-invoke-ng.c | 464
+ ---------------------------------------------------
+ gi/pygi-invoke.c | 464
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 466 insertions(+), 465 deletions(-)
+
+commit 62d59fa2c2b31d7a3cac8996d58234d4b13bb19f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 10:56:36 2011 -0400
+
+ make invoke-ng the only invoker
+
+ configure.ac | 11 -
+ gi/Makefile.am | 10 +-
+ gi/pygi-invoke.c | 1030
+ ------------------------------------------------------
+ 3 files changed, 1 insertions(+), 1050 deletions(-)
+
+commit 2937cfe5bb7122dd3783c7919294d6a34a3dfc05
+Merge: 519e556 917ea2d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 10:45:18 2011 -0400
+
+ Merge branch 'master' into invoke-rewrite
+
+commit 519e556dc1e5874e1668bad93043fb9258c7ee79
+Merge: bab7e88 38cca3c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 10:37:20 2011 -0400
+
+ Merge branch 'master' into invoke-rewrite
+
+commit bab7e88251bffcd360186c6dedc26be8eb077084
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jul 18 10:35:10 2011 -0400
+
+ split the marshalling routines into two source files
+
+ * update copy and paste copyright info to list the correct owner
+
+ gi/Makefile.am | 6 +-
+ gi/pygi-cache.c | 3 +-
+ gi/pygi-marshal-in.c | 1412 ++++++++++++++++++++++++++++++++
+ gi/pygi-marshal-in.h | 186 +++++
+ gi/pygi-marshal-out.c | 767 ++++++++++++++++++
+ gi/pygi-marshal-out.h | 144 ++++
+ gi/pygi-marshal.c | 2145
+ -------------------------------------------------
+ gi/pygi-marshal.h | 303 -------
+ 8 files changed, 2515 insertions(+), 2451 deletions(-)
+
+commit 917ea2dfa2d097e563233145003a66b3e4423287
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu Jul 14 11:21:10 2011 +0200
+
+ Ship tests/te_ST@nouppera in release tarballs for tests to succeed
+
+ tests/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit e024e832ab9c82d3e299cc6e1cb427de44f2d16e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jul 13 15:43:02 2011 -0400
+
+ [invoke] break out caller_allocates allocating into its own function
+
+ gi/pygi-invoke-ng.c | 78
+ ++++++++++++++++++++++++++++++++-------------------
+ 1 files changed, 49 insertions(+), 29 deletions(-)
+
+commit fc8b8ce768ac780f7ed9edc63b70dd35194153c0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jul 13 15:42:26 2011 -0400
+
+ [invoke] missed a bit when removing constructor_class usage
+
+ gi/pygi-invoke-ng.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit 3f6bba909486d0ad1a27592fcf09c7ac8744fded
-Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Mon Jun 6 17:38:21 2011 +0200
+commit c94bcf4ae7e36f90c356c89712b00609f9f849bd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jul 13 15:16:17 2011 -0400
- Use _gi.Struct to wrap fundamentals
+ [invoke] don't hold on to the constructor class, just add a TODO
- https://bugzilla.gnome.org/show_bug.cgi?id=647509
+ gi/pygi-invoke-ng.c | 11 +++++------
+ gi/pygi-invoke-state-struct.h | 1 -
+ 2 files changed, 5 insertions(+), 7 deletions(-)
- gi/module.py | 4 +++-
+commit c11d3195f324ea41e86e3da7ff99b55425c2faec
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Jul 13 10:40:25 2011 +0200
+
+ [gi] Port test_properties from static gio to GI Gio
+
+ As we ripped out the static gio bindings a while ago, this test case
+ was using
+ the system installed gio bindings with Python 2, and now fails
+ completely with
+ Python 3. Rewrite it to use gi.repository.Gio.
+
+ tests/test_properties.py | 38 +++++++++++++++++++-------------------
+ 1 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 8f89ff24fcac627ce15ca93038711fded1a7c5ed
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Jul 13 08:42:22 2011 +0200
+
+ [python3] Fix maketrans import
+
+ Python3 moved the maketrans() function from the string module to a
+ str method.
+ This unbreaks gi/module.py for Python 3 again.
+
+ gi/module.py | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit 20aea4b052126fa0bface3e6e0dccfd77f9505b1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 8 14:39:22 2011 -0400
+
+ [caching] remove all inline compiler flags
+
+ gi/pygi-cache.c | 96
+ +++++++++++++++++++++++++++---------------------------
+ 1 files changed, 48 insertions(+), 48 deletions(-)
+
+commit bf7bb79b66ad406063fb443e7452d830c55986ef
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 8 14:35:20 2011 -0400
+
+ [caching] refactor function names to be less confusing
+
+ gi/pygi-cache.c | 307
+ +++++++++++++++++++++++++++----------------------------
+ 1 files changed, 150 insertions(+), 157 deletions(-)
+
+commit c167a9345b01c070bd5a84b4a4b3a53baf9e217d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 8 11:24:09 2011 -0400
+
+ [overrides] deprecate the use of type keyword MessageDialog
+ constructor
+
+ * pygtk used type to determine the "type" of message dialog to
+ display but we
+ use the proper property name "message_type" since we should not be
+ overriding a reserved word
+ * to keep compat with pygtk we check the kwds hash for the key
+ 'type' and
+ assign it to message_type while throwing a deprecation warning
+ * also add a deprication warning when trying to use the depricated
+ NO_SEPARATOR
+ flag
+
+ gi/overrides/Gtk.py | 13 ++++++++-----
+ 1 files changed, 8 insertions(+), 5 deletions(-)
+
+commit 367e4ededd4a45125157050bcc9e4e685fd4a82d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Fri Jul 8 10:15:53 2011 +0200
+
+ gdbus tests: Fix hang if test case fails
+
+ In the TestGDBusClient.test_native_calls_async() test case, the main
+ loop was
+ never quit when the call failed.
+
+ tests/test_gdbus.py | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 11b578400cbf9f7c270b662a5e8953ccd466e5ef
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jul 7 19:30:11 2011 -0400
+
+ use an enum instead of booleans to denote function type
+
+ gi/pygi-cache.c | 85
+ +++++++++++++++++++++++++++++---------------------
+ gi/pygi-cache.h | 18 ++++++++--
+ gi/pygi-invoke-ng.c | 8 ++--
+ 3 files changed, 67 insertions(+), 44 deletions(-)
+
+commit 10e31005baec26f61c0f8fca2b5c0337b0be6c70
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jul 7 15:18:03 2011 -0400
+
+ rename aux arguments to child arguments to make their purpose clearer
+
+ gi/pygi-cache.c | 64
+ +++++++++++++++++++++++++-------------------------
+ gi/pygi-cache.h | 29 ++++++++++++++++-------
+ gi/pygi-invoke-ng.c | 10 ++++----
+ gi/pygi-marshal.c | 12 ++++----
+ 4 files changed, 63 insertions(+), 52 deletions(-)
+
+commit b4ad91c40f713ebdc278ce40b011e4adf9ddbbd7
+Author: Timo Vanwynsberghe <timovwb@gmail.com>
+Date: Thu Jul 7 10:59:08 2011 +0200
+
+ Fixed the cairo example
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653844
+
+ examples/cairo-demo.py | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit a606bab1ddc605167f2e9dc7c46c8f929fdce23b
+Author: Adam Dingle <adam@yorba.org>
+Date: Tue Jul 5 14:28:20 2011 -0700
+
+ Add override binding for Gtk.ListStore.prepend().
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=654056
+
+ gi/overrides/Gtk.py | 8 ++++++++
+ tests/test_overrides.py | 13 ++++++++++++-
+ 2 files changed, 20 insertions(+), 1 deletions(-)
+
+commit fc5c869486c7f6929e285ea7a86623ec41ecd9bd
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu Jul 7 13:39:19 2011 +0200
+
+ Fix crash in Gtk.TextIter overrides
+
+ With commit 17cd0fb3 Gtk.TextIter.{forward,backward}_search()
+ returns undefined
+ pointers when the search was unsuccessful. Actually check the
+ "success" return
+ value; if it is False return None, just like PyGTK used to.
+
+ Thanks to Michael Vogt for discovering this and writing the test case!
+
+ Test case:
+
+ -------------- 8< -----------------
+ from gi.repository import Gtk
+
+ win = Gtk.Window.new(Gtk.WindowType.TOPLEVEL)
+ textview = Gtk.TextView()
+ buffer = textview.get_buffer()
+ buffer.set_text("hello world")
+ win.add(textview)
+
+ win.show_all()
+
+ iter = buffer.get_start_iter()
+ end = buffer.get_end_iter()
+ ret = iter.forward_search("foo",
+ Gtk.TextSearchFlags.VISIBLE_ONLY,
+ end)
+ print "this is my return value"
+ print ret
+ print "now I crash"
+ print ret[0].get_offset()
+
+ Gtk.main()
+ -------------- 8< -----------------
+
+ gi/overrides/Gtk.py | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 5c04fc5b2ca7e262c052426d5863d69d0c4a24da
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jul 5 15:57:23 2011 -0400
+
+ use gssize instead of int for arg indexes
+
+ gi/pygi-cache.c | 24 ++++++++++++------------
+ gi/pygi-cache.h | 6 +++---
+ gi/pygi-invoke-ng.c | 6 +++---
+ gi/pygi-marshal-cleanup.c | 6 +++---
+ 4 files changed, 21 insertions(+), 21 deletions(-)
+
+commit ecc09749c34cd4eabf47cc722d768b042dc0be9f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jul 5 14:17:30 2011 -0400
+
+ [cache] remove refrence to default value as it is not implemented yet
+
+ gi/pygi-cache.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 433e0fb259047d8c81e5949a31abb5e0feefd27b
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Thu May 12 18:53:06 2011 +0200
+
+ Handle arguments that are flags correctly
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=647581
+
+ gi/pygi-argument.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 38cca3c14e79fbc383e3fc65a120bee03714b99f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 1 05:19:15 2011 -0400
+
+ correctly initialize the _gi_cairo_functions array to be zero filled
+
+ gi/pygi-foreign-cairo.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9ae43fdbcc547eb1e3c61bf9545da40555b2e2c6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jul 1 05:19:15 2011 -0400
+
+ correctly initialize the _gi_cairo_functions array to be zero filled
+
+ gi/pygi-foreign-cairo.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d3ee40b36b1718e6fb4544dbe07e291138ea1eb9
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 29 18:14:40 2011 -0400
+
+ pass in the address of the gerror, not the gerror itself
+
+ gi/pygi-argument.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 49dc98eb9339ea64355cd752ca000c79da56f3a2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 29 18:01:44 2011 -0400
+
+ [gi] handle marshalling gerrors arguments for signals
+
+ gi/pygi-argument.c | 18 ++++++++++++++++--
+ 1 files changed, 16 insertions(+), 2 deletions(-)
+
+commit db9419fcef628e9ffee10591156007ea9c0bc1f0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 29 12:12:29 2011 -0400
+
+ [gi-invoke-ng] fix NULL check to check before we access the cache
+ struct
+
+ gi/pygi-cache.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 9027e1a20fd06df5c26edcec1893ef0814ec938a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 28 18:21:55 2011 -0400
+
+ [gi-tests] add test for PyGObject->PyObject TreeModel storage
+
+ * make sure we can store a custom GObject as a PyObject inside of
+ a TreeModel
+
+ tests/test_overrides.py | 26 +++++++++++++++-----------
+ 1 files changed, 15 insertions(+), 11 deletions(-)
+
+commit b6842e4b2a28733e143d4022864041ca82e91f7a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 28 18:13:38 2011 -0400
+
+ [gtk-overrides] special case TreeModel columns of PYGOBJECT types
+
+ * box the PYGOBJECT in a GValue so we can store PyGObjects in a
+ TreeModel row
+
+ gi/overrides/Gtk.py | 7 ++++---
+ gobject/pygtype.c | 7 ++++---
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit 7fc9d45860210fd9d333fd3769c6cf93a6a20eb6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 28 17:32:29 2011 -0400
+
+ [gi-invoke-ng] copy structs when transfer is full for array
+
+ gi/pygi-marshal.c | 21 ++++++++++++++++++---
+ 1 files changed, 18 insertions(+), 3 deletions(-)
+
+commit 8d60c0bc7b327aa757a8727f1146f02cc0b78af8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 28 13:54:48 2011 -0400
+
+ [gtk-override] print warning if user imports Gtk 2.0
+
+ * this is needed because people file bugs not realizing they are
+ importing 2.0
+ which is not supported
+
+ gi/overrides/Gtk.py | 12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit 7c589c0c1de1a786e00685afd5292b6fb1f93ed3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 28 13:08:49 2011 -0400
+
+ [gtk-overrides] allow the message_type keyword to be used for
+ MessageDialogs
+
+ * for pygtk compat we use the type keyword for message type but
+ we prefer
+ the use of message_type because it is more descriptive and does
+ not clash
+ with a python reserved word
+ * if you passed message_type into a MessageDialog constructor you
+ would get
+ an error because we also convert type to message_type when
+ calling the
+ parent constructor
+ * this patch looks to see if message_type was passed in as a
+ keyword and
+ assigns it to type while removing message_type from the keywords
+ dict
+ to avoid name clashing
+
+ gi/overrides/Gtk.py | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 2aa12267bee91aa696633a0cea2a0accae09250a
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 10:56:20 2011 -0300
+
+ Add support for enums in gobject.property
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653488
+
+ gobject/propertyhelper.py | 23 ++++++++++++++++-------
+ tests/test_properties.py | 40 ++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 52 insertions(+), 11 deletions(-)
+
+commit dc62e67b447ef526a6f2d1aa8648ad101d95024b
+Author: Johan Dahlin <jdahlin@litl.com>
+Date: Mon Jun 27 10:56:20 2011 -0300
+
+ Add support for enums in gobject.property
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653488
+
+ gobject/propertyhelper.py | 23 ++++++++++++++++-------
+ tests/test_properties.py | 40 ++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 52 insertions(+), 11 deletions(-)
+
+commit 50cfccb5801c1b9a0a42ffe2826cd245f21fd88d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jun 24 14:17:24 2011 -0400
+
+ [gi-invoke-ng] use g_slice for allocating GValues that are caller
+ allocated
+
+ gi/pygi-invoke-ng.c | 2 ++
+ gi/pygi-marshal-cleanup.c | 2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit eff65cd2ce490296865441c3c78b7846f380459c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jun 24 11:49:05 2011 -0400
+
+ [gi-invoke-ng] Convert Overflow errors to ValueErrors when marshalling
+ integers
+
+ gi/pygi-marshal.c | 56
+ +++++++++++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 44 insertions(+), 12 deletions(-)
+
+commit 05ed688d54e3ff04e961b60d0b5d3ed0b97c771d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 22 12:26:39 2011 -0400
+
+ [gi-invoke-ng] only cache caller allocates for interfaces as some
+ API are broken
+
+ gi/pygi-cache.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 4fd957a5de364c0588168dee15e1e61d4f12e173
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jun 17 17:07:56 2011 -0400
+
+ [gi-invoke-ng] handle in pointer array marshalling
+
+ gi/pygi-marshal.c | 28 ++++++++++++++++++++++------
+ 1 files changed, 22 insertions(+), 6 deletions(-)
+
+commit df3911ad2ce83af9bf9679ed1b221847b23ba2de
+Author: Alex Eftimie <alex@eftimie.ro>
+Date: Fri Jun 10 08:44:04 2011 +0300
+
+ Adding GPtrArray tests
+
+ tests/test_gi.py | 43 ++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 42 insertions(+), 1 deletions(-)
+
+commit e32c2be53175014399d89e1e85c9afc6e53c94be
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jun 17 11:32:28 2011 -0400
+
+ [gi-invoke-ng] fix array element offset calculations
+
+ * use pointer arithmetic to calculate based on element size instead of
+ relying on the size of GIArgument
+ * special case GPtrArrays
+
+ gi/pygi-marshal.c | 27 +++++++++------------------
+ 1 files changed, 9 insertions(+), 18 deletions(-)
+
+commit 6e8dc28cb261cafbfed40fc0797a0dd5f91f497b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 15 12:46:03 2011 -0400
+
+ [gi] don't clean up arguments that weren't yet processed during in
+ arg failure
+
+ gi/pygi-marshal-cleanup.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit af7c93ea98b7f492eef265e58c8b3c878805524f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 15 12:06:47 2011 -0400
+
+ [gi-overrides] use new instead of init when constructing a
+ GLib.VariantBuilder
+
+ * init is now skipped in the gir
+
+ gi/overrides/GLib.py | 18 ++++++++----------
+ tests/test_overrides.py | 6 ++----
+ 2 files changed, 10 insertions(+), 14 deletions(-)
+
+commit c6112307f29f9a850e6e9efa5f55d5d4a363c6b0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 15 11:42:45 2011 -0400
+
+ [gi-invoke-ng] actual code to import overrides
+
+ gi/pygi-cache.c | 7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+commit 902575d857beffb14e56821ea8a52f705385f6bb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jun 15 11:25:10 2011 -0400
+
+ [gi-invoke-ng] import pytypes so we get overrides
+
+ gi/pygi-marshal.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
-commit b7f5ce021bf16a422dc410b3ff44303e0757dc6e
+commit 9d5604220bd56ae2708e9b74122c14208e0a30b4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 14 16:13:37 2011 -0400
+
+ [gi-invoke-ng] handle gvariants now that they are not foreign
+
+ gi/pygi-marshal.c | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit c1f5651062687e800a52b5d8d16c88c0acde2934
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jun 14 16:12:43 2011 -0400
+
+ [gi-invoke-ng] do not try to clean up NULL arguments
+
+ gi/pygi-marshal-cleanup.c | 24 ++++++++++++++++--------
+ 1 files changed, 16 insertions(+), 8 deletions(-)
+
+commit fbf5382fbc1aed49ed491d2255d616a1643a45fc
+Merge: 499b68d 1491f62
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jun 13 17:28:23 2011 -0400
+
+ Merge branch 'master' into invoke-rewrite
+
+commit 499b68d6c9040cffc6e43dc87789d68446564a92
+Merge: 4c9bced 426c710
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jun 13 17:26:37 2011 -0400
+
+ Merge branch 'master' into invoke-rewrite
+
+commit 1491f6225b9906bd369b5a42e6369ab6884736b7
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Fri Jun 10 14:01:32 2011 +0200
+
+ closure: avoid double free crash
+
+ gi/pygi-closure.c | 12 ++++--------
+ 1 files changed, 4 insertions(+), 8 deletions(-)
+
+commit 929f4236f2b8601e7960a4a7b0a860d976ad83c6
Author: Jason Siefken <siefkenj@gmail.com>
-Date: Fri Jun 3 23:11:17 2011 -0700
+Date: Fri Jun 3 23:11:17 2011 -0700
Added __eq__ method for Gdk.Color and Gdk.RGBA
Call Gdk.Color.equal and Gdk.RGBA.equal when
== equality testing is used.
- gi/overrides/Gdk.py | 6 ++++++
+ gi/overrides/Gdk.py | 6 ++++++
tests/test_overrides.py | 4 ++++
2 files changed, 10 insertions(+), 0 deletions(-)
-commit c016c27f545f398f1b57cf31f37392c97d2b5e50
+commit dff5961ba229c7c34bd7b0a18a446b56bbe39e3a
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Jun 8 19:21:23 2011 +0200
+Date: Wed Jun 8 19:13:48 2011 +0200
- Remove useless import
+ closure: Check the out arg is not null. Fixes bug #651812
- tests/test_everything.py | 1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
+ gi/pygi-closure.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
-commit 1598047c0ddd6a1d04d41e59dd182f3c0524f3c4
-Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Jun 8 19:18:23 2011 +0200
+commit d7d178206bfbb0858556fcfd6c9ca8eefda3fdf5
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Wed Jun 8 09:47:20 2011 +0200
- Revert "[gi] Removed hack to avoid using GLib.Variant.new_variant."
+ Use constants instead of literals
- This reverts commit dfe95b9ec598b57deaabd98ab488ab054a44ec09.
+ tests/test_overrides.py | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
- gi/overrides/GLib.py | 14 +++++++++++++-
- 1 files changed, 13 insertions(+), 1 deletions(-)
+commit fe386a0ad548a23e30e9cb947bfa2198fb48ef29
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 6 19:07:22 2011 +0200
-commit ae9e098c14de3d2364c8b16c862aa77570c06a4a
-Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Jun 8 19:13:48 2011 +0200
+ GVariant has now a GType, take that into account
- closure: Check the out arg is not null. Fixes bug #651812
+ https://bugzilla.gnome.org/show_bug.cgi?id=647509
- gi/pygi-closure.c | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
+ gi/pygi-argument.c | 8 ++++----
+ gi/pygi-invoke.c | 20 +++++++++++++-------
+ 2 files changed, 17 insertions(+), 11 deletions(-)
+
+commit bd7b8d96a7420522c1fdc127ef8cfb7d6e8a1b31
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 6 19:05:07 2011 +0200
+
+ GVariantType is a boxed struct
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=647509
+
+ gi/gimodule.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
-commit eca590a3ff6bbfb78eef7b88d36cee59eb51b1d0
+commit 2d73012e5dbcc45a5782a6c119dfb272c14b5a61
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 6 17:38:21 2011 +0200
+
+ Use _gi.Struct to wrap fundamentals
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=647509
+
+ gi/module.py | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit d82e6c8d1d9f2fc48fdcc15b7d2a97e4f24cf3bf
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Mon Jun 6 17:24:28 2011 +0200
+
+ Merge gi/HACKING into /HACKING
+
+ HACKING | 16 ++++++++++++++++
+ gi/HACKING | 26 --------------------------
+ 2 files changed, 16 insertions(+), 26 deletions(-)
+
+commit 92aca4416a7930e5870b8d1a4016bae8140462ee
Author: Daniel Drake <dsd@laptop.org>
-Date: Fri Jun 3 16:59:15 2011 +0100
+Date: Fri Jun 3 16:59:15 2011 +0100
Fix GC-related crash during PyGObject deallocation
Python-2.7.1's GC source has the following comment:
- /* Python's cyclic gc should never see an incoming refcount
- * of 0: if something decref'ed to 0, it should have been
- * deallocated immediately at that time.
- * Possible cause (if the assert triggers): a tp_dealloc
- * routine left a gc-aware object tracked during its teardown
- * phase, and did something-- or allowed something to
- happen --
- * that called back into Python. gc can trigger then, and may
- * see the still-tracked dying object. Before this assert
- * was added, such mistakes went on to allow gc to try to
- * delete the object again. In a debug build, that caused
- * a mysterious segfault, when _Py_ForgetReference tried
- * to remove the object from the doubly-linked list of all
- * objects a second time. In a release build, an actual
- * double deallocation occurred, which leads to corruption
- * of the allocator's internal bookkeeping pointers. That's
- * so serious that maybe this should be a release-build
- * check instead of an assert?
- */
+ /* Python's cyclic gc should never see an incoming refcount
+ * of 0: if something decref'ed to 0, it should have been
+ * deallocated immediately at that time.
+ * Possible cause (if the assert triggers): a tp_dealloc
+ * routine left a gc-aware object tracked during its teardown
+ * phase, and did something-- or allowed something to
+ happen --
+ * that called back into Python. gc can trigger then, and may
+ * see the still-tracked dying object. Before this assert
+ * was added, such mistakes went on to allow gc to try to
+ * delete the object again. In a debug build, that caused
+ * a mysterious segfault, when _Py_ForgetReference tried
+ * to remove the object from the doubly-linked list of all
+ * objects a second time. In a release build, an actual
+ * double deallocation occurred, which leads to corruption
+ * of the allocator's internal bookkeeping pointers. That's
+ * so serious that maybe this should be a release-build
+ * check instead of an assert?
+ */
As shown in a backtrace at
https://bugzilla.redhat.com/show_bug.cgi?id=640972 , pygobject
@@ -145,13 +1323,213 @@ Date: Fri Jun 3 16:59:15 2011 +0100
Thanks to Bernie Innocenti for initial diagnosis.
- glib/pygsource.c | 6 ++++--
- gobject/pygobject.c | 8 +++++++-
+ glib/pygsource.c | 6 ++++--
+ gobject/pygobject.c | 8 +++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
-commit ad96a3f1d187a640ec0a463b766fd5e027f3c16a
+commit 4c9bcedb4e11ad66a4b86174e2425c7afcafc473
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue May 31 16:59:41 2011 -0400
+
+ [gi-invoke-ng] enable invoke-ng by default
+
+ configure.ac | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 2e4cfb85a55ff205e263591d573ee5ecf0ffff3e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue May 31 16:37:21 2011 -0400
+
+ [gi-invoke-ng] add code to clean up when input values fail to marshal
+
+ gi/pygi-marshal-cleanup.c | 30 +++++++++++++++++++++++++-----
+ 1 files changed, 25 insertions(+), 5 deletions(-)
+
+commit 508b1b6ca1b143f1e123a3ddb83e8ce146758dfc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue May 31 16:01:03 2011 -0400
+
+ [gi-invoke-ng] add hash cleanup routines
+
+ gi/pygi-cache.c | 2 +
+ gi/pygi-marshal-cleanup.c | 64
+ +++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-marshal-cleanup.h | 10 +++++-
+ 3 files changed, 74 insertions(+), 2 deletions(-)
+
+commit 1954c75b94a74259b4e5d28f5ff8d76aa4610832
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue May 31 14:47:30 2011 -0400
+
+ [gi-invoke-ng] handle arrays with transfers of GI_TRANSFER_CONTAINER
+
+ gi/pygi-marshal-cleanup.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit b626c46b4a95602c7bf1278c2a39aacb7f5027d9
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue May 31 14:40:49 2011 -0400
+
+ [gi-invoke-ng] add list cleanup routines
+
+ gi/pygi-cache.c | 8 ++--
+ gi/pygi-marshal-cleanup.c | 84
+ +++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-marshal-cleanup.h | 8 ++++
+ 3 files changed, 96 insertions(+), 4 deletions(-)
+
+commit 2e542c327cd52c1f77af28905557dd25c64175d8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu May 26 16:10:13 2011 -0400
+
+ indentation fix
+
+ gi/pygi-marshal.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 601aec11c49e821fe97dd30a2187fe3c75844712
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu May 26 16:09:38 2011 -0400
+
+ [gi-invoke-ng] add out array cleanup
+
+ gi/pygi-cache.c | 2 +-
+ gi/pygi-marshal-cleanup.c | 24 ++++++++++++++++++++++++
+ gi/pygi-marshal.c | 37 +++++++++++++++++++++++++++++++------
+ 3 files changed, 56 insertions(+), 7 deletions(-)
+
+commit e9ad4428b769f8c9ace1cdc973c684de84fb1a5e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu May 26 13:22:38 2011 -0400
+
+ [gi-invoke-ng] do not allocate null terminator for garray
+
+ * We are simply setting our own array so we don't want any allocate
+ null byte
+
+ gi/pygi-marshal.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a986b2b8e5ee37f2a330f5aabc85c73ebb0de508
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu May 26 13:21:55 2011 -0400
+
+ [gi-invoke-ng] add array cleanup for in arrays
+
+ gi/pygi-cache.c | 2 +-
+ gi/pygi-marshal-cleanup.c | 72
+ ++++++++++++++++++++++++++++++++++++++++++++-
+ gi/pygi-marshal-cleanup.h | 9 +++++
+ gi/pygi-marshal.c | 13 ++++++--
+ 4 files changed, 91 insertions(+), 5 deletions(-)
+
+commit 990c60805c8ef718eb29e2e1b24f057552c6159e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon May 23 17:06:30 2011 -0400
+
+ [gi-invoke-ng] remove remaining bits of the invoke stage state machine
+
+ gi/pygi-invoke-ng.c | 7 +------
+ gi/pygi-invoke-state-struct.h | 14 --------------
+ 2 files changed, 1 insertions(+), 20 deletions(-)
+
+commit dbbcf4a0e76fb572d85843ee31c3798df5cd5cc5
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon May 23 16:59:57 2011 -0400
+
+ [gi-invoke-ng] revamp cleanup framework to be orthogonal to cache
+ setup
+
+ * cleanup now has symmetry with setup so there are now in and out
+ cleanups
+ for each type that needs to be cleaned up
+ * no longer use state machine but instead call different cleanup
+ functions at
+ different stages of invoke, making it easier to understand what
+ happens at
+ each stage
+
+ gi/pygi-cache.c | 19 ++-
+ gi/pygi-cache.h | 7 +-
+ gi/pygi-invoke-ng.c | 10 +--
+ gi/pygi-invoke-state-struct.h | 2 +
+ gi/pygi-marshal-cleanup.c | 301
+ ++++++++++++++++-------------------------
+ gi/pygi-marshal-cleanup.h | 45 ++++---
+ gi/pygi-marshal.c | 15 +-
+ 7 files changed, 174 insertions(+), 225 deletions(-)
+
+commit 198714dc4585f7463f38929f1ca4e4b60a27dadb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu May 12 17:29:20 2011 -0400
+
+ [gi-invoke-ng] stub out a cleaner way of cleaning up after ourselves
+
+ * The state machine concept of cleaning up was getting a bit messy.
+ It was like we took a big bowl of spaghetti code and dumped it.
+ * Now we call specific cleanup functions at the point of failure (or
+ successful completion of a marshalling stage)
+
+ gi/pygi-invoke-ng.c | 59 ++++++++++++++++++++++++++++++------
+ gi/pygi-marshal-cleanup.c | 72
+ +++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-marshal-cleanup.h | 14 +++++++++
+ 3 files changed, 135 insertions(+), 10 deletions(-)
+
+commit c1389dadbf35afee3f28d90ef637efd8c1f071a5
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Thu May 12 11:53:40 2011 -0400
+
+ Doc Extractor: Correct the logic of the --no-since option.
+
+ * codegen/docextract.py (process_final_sections): If the
+ --no-since
+ option has been specified and a "Since:" is encountered during the
+ processing of the final sections, simply don't append the
+ "Since: ..."
+ instead of reading the next line. This preserves the logical
+ flow of
+ processing.
+
+ codegen/docextract.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 303d8e8ab9e60cb554de7fc0e8592cd9b2c50843
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date: Mon May 9 17:32:09 2011 -0400
+
+ Doc Extractor: Add a --no-since option.
+
+ * codegen/docextract.py:
+ * codegen/docextract_to_xml.py: Modified so that if a --no-since
+ option is specified at the command line, the "Since: ..." portion
+ of
+ the gtkdoc function block is omitted. This is useful for C++
+ modules
+ such as gstreamermm where this information would not be useful
+ as long
+ as the C API is still unstable.
+
+ codegen/docextract.py | 15 ++++++++++++++-
+ codegen/docextract_to_xml.py | 9 ++++++---
+ 2 files changed, 20 insertions(+), 4 deletions(-)
+
+commit 4f615c6e300d6f2d7551b640efa301060206ab58
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu May 5 14:04:34 2011 -0400
+
+ [gi-invoke-ng] tweek cleanup routines
+
+ gi/pygi-cache.c | 5 +++
+ gi/pygi-marshal-cleanup.c | 87
+ ++++++++++++++++++++++++++++++++++-----------
+ gi/pygi-marshal-cleanup.h | 6 ++--
+ gi/pygi-marshal.c | 11 +-----
+ 4 files changed, 76 insertions(+), 33 deletions(-)
+
+commit 63c7f17c224821cb7136d06e8ef87eab7291848d
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Mon May 2 15:49:52 2011 +0200
+Date: Mon May 2 15:49:52 2011 +0200
Fix symbol names to be locale independent
@@ -172,52 +1550,227 @@ Date: Mon May 2 15:49:52 2011 +0200
https://bugzilla.gnome.org/show_bug.cgi?id=649165
- gi/module.py | 9 ++++++++-
+ gi/module.py | 9 ++++++++-
tests/te_ST@nouppera | 50
++++++++++++++++++++++++++++++++++++++++++++++++++
tests/test_gi.py | 30 ++++++++++++++++++++++++++++++
3 files changed, 88 insertions(+), 1 deletions(-)
-commit 90530b52f6eaa30bb704e413c01bb94ee511a0bb
+commit b5e150da76c3d4de1a75f58d03c3a761e9005a63
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed May 4 08:35:27 2011 +0200
+
+ [gi] pygi-convert.sh: Convert gtk.gdk.CROSSHAIR
+
+ pygi-convert.sh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit fcc5ea201ab25da6db94ea8a37364a1d3c4d7c65
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Apr 29 17:41:08 2011 -0400
+
+ [gi-invoke-ng] handle filename cleanup with the utf8 cleanup function
+
+ gi/pygi-cache.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit dbe8c4fabc8ac19415a3be0e854d3a54c2317e0b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Apr 29 17:40:13 2011 -0400
+
+ [gi-invoke-ng] handle caller allocates cleanup
+
+ gi/pygi-invoke-ng.c | 5 +-
+ gi/pygi-marshal-cleanup.c | 104
+ ++++++++++++++++++++++++++++++++++++---------
+ gi/pygi-marshal-cleanup.h | 7 ++-
+ 3 files changed, 90 insertions(+), 26 deletions(-)
+
+commit cdbf57f3b1f041a06cf545a5557424f701ed1ec7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Apr 28 19:16:02 2011 -0400
+
+ [gi-invoke-ng] refactor the cleanup code and add utf8 cleanup as
+ initial test
+
+ gi/pygi-cache.c | 15 +----------
+ gi/pygi-invoke-ng.c | 8 ++----
+ gi/pygi-invoke-state-struct.h | 2 +
+ gi/pygi-marshal-cleanup.c | 51
+ ++++++++++++++++++++++++++++++++++++++++-
+ gi/pygi-marshal-cleanup.h | 3 ++
+ 5 files changed, 60 insertions(+), 19 deletions(-)
+
+commit d1f1f4ccc55f9ecab73b7c0ee78762c4039b2c79
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Apr 27 15:47:19 2011 -0400
+
+ use PyCapsule when importing pycairo/require pycairo 1.10.0 for
+ python3 builds
+
+ * PyCObject is deprecated and pycairo 1.10.0 is first release to
+ fix this issue
+
+ configure.ac | 15 +++++++++++----
+ gi/pygi-foreign-cairo.c | 2 +-
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+commit 83b7823a510b0b391560c6deaf9d15d8303c7b14
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Thu Apr 21 16:52:20 2011 +0200
+
+ [python3] fix build. PYcairo_IMPORT doesn't exists anymore
+
+ gi/pygi-foreign-cairo.c | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 3e933784df423757e591d703614cb700adb0bbe0
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Mon Apr 18 18:36:25 2011 +0200
+Date: Mon Apr 18 18:36:25 2011 +0200
Updated DOAP file
pygobject.doap | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
-commit 996e5676a00e8d8fc55ef7400d15ccf5a4d904eb
+commit 399d06b4b20685eb38acfd7e43226e06737ab7d2
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Mon Apr 18 18:16:42 2011 +0200
+Date: Sat Apr 16 16:02:05 2011 +0200
- Post release version bump to 2.28.5
+ [gi] Don't create variant twice
- configure.ac | 2 +-
+ gi/overrides/GLib.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit afbcc71b71343b5a16dc8873c2ac7b9ca7dd801a
+commit 8d8a84ea23d28d25851c5870f261c020d762cef4
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Mon Apr 18 18:06:56 2011 +0200
+Date: Fri Apr 15 16:14:43 2011 +0200
- Release 2.28.4
+ pygi-convert.sh: Make sure the uppercase GObject module is imported
+ instead of the lowercase
- NEWS | 11 +++++++++++
- configure.ac | 2 +-
- 2 files changed, 12 insertions(+), 1 deletions(-)
+ https://bugzilla.gnome.org/show_bug.cgi?id=647736
+
+ pygi-convert.sh | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
-commit 4643bcad5845f5ec3dd9961616e3ed3b0946001f
+commit 3b51d6426d0f59b2dd7e0dcdcded4bed43d6b9d8
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Sat Apr 16 16:02:05 2011 +0200
+Date: Fri Apr 15 15:58:53 2011 +0200
+
+ [gi] Removed hack to avoid using GLib.Variant.new_variant.
+
+ The bug in the annotations of GLib is fixed now.
+ https://bugzilla.gnome.org/show_bug.cgi?id=639952
+ https://bugzilla.gnome.org/show_bug.cgi?id=647796
+
+ gi/overrides/GLib.py | 14 +-------------
+ 1 files changed, 1 insertions(+), 13 deletions(-)
+
+commit bb4dce14ba666969815d4e56adbc38f0ac4f7ff7
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Fri Apr 15 15:58:31 2011 +0200
+
+ [gi] Added additional test case for GVariant handling
+
+ tests/test_overrides.py | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 138df2778543409752e229a09828a805f68a420d
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Mon Apr 11 18:34:31 2011 +0200
+
+ [gi] Added support for GVariant arguments
+
+ This is required in order for the "g-signal" signal of GDBusProxy
+ to work properly and thus to properly receive DBus signals with any
+ type of argument.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=647477
+
+ gi/pygi-argument.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 985f239d891c7697d76ccecb797b189669ae6ee1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 18:46:28 2011 -0400
+
+ fix static ABI for setting string gvalues from python objects
+
+ * the static bindings used to be able to set a string gvalue to
+ any python
+ object that implemented __str__, for instance when setting a
+ treemodel column
+ * this restores that code while still keeping unicode and python 3
+ compatability
+
+ gobject/pygtype.c | 28 +++++++++++++++++++---------
+ tests/test_properties.py | 8 ++++++++
+ 2 files changed, 27 insertions(+), 9 deletions(-)
+
+commit 58cfc3cd1152b4448b56a6ff597f954d8450b83e
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date: Tue Mar 22 20:47:51 2011 +0100
+
+ dsextras.py: ensure eol characters are preserved when writing template
+ files (so \n does not become \r\n)
+
+ dsextras.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 629d267478982c426ba61a639d5c9603fed856e6
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date: Tue Mar 22 11:35:44 2011 +0100
+
+ dsextras.py: remove \r as wel as \n character
+
+ dsextras.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 426c7109d4c0dbf0d56cc075f97f33b3451f79a8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Apr 27 15:47:19 2011 -0400
+
+ use PyCapsule when importing pycairo/require pycairo 1.10.0 for
+ python3 builds
+
+ * PyCObject is deprecated and pycairo 1.10.0 is first release to
+ fix this issue
+
+ configure.ac | 15 +++++++++++----
+ gi/pygi-foreign-cairo.c | 2 +-
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+commit 4e5833d0c2fe548617e5ea510f05920fd0caf73b
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Thu Apr 21 16:52:20 2011 +0200
+
+ [python3] fix build. PYcairo_IMPORT doesn't exists anymore
+
+ gi/pygi-foreign-cairo.c | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 91ec337359720839862d3f5a8a0ea98f760a0752
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Mon Apr 18 18:36:25 2011 +0200
+
+ Updated DOAP file
+
+ pygobject.doap | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 05c766044c83340c44564d0097514bfc1d1d9df7
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Sat Apr 16 16:02:05 2011 +0200
[gi] Don't create variant twice
gi/overrides/GLib.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit 0e9e4ec7c28ac4564e15283636adc8b7bc1a83be
+commit eb8f212e3687af30407cf01fcdfbf530257bcddb
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Fri Apr 15 16:14:43 2011 +0200
+Date: Fri Apr 15 16:14:43 2011 +0200
pygi-convert.sh: Make sure the uppercase GObject module is imported
instead of the lowercase
@@ -227,9 +1780,9 @@ Date: Fri Apr 15 16:14:43 2011 +0200
pygi-convert.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
-commit dfe95b9ec598b57deaabd98ab488ab054a44ec09
+commit af31729573de24161ee90563e5738187c749783c
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Fri Apr 15 15:58:53 2011 +0200
+Date: Fri Apr 15 15:58:53 2011 +0200
[gi] Removed hack to avoid using GLib.Variant.new_variant.
@@ -240,18 +1793,51 @@ Date: Fri Apr 15 15:58:53 2011 +0200
gi/overrides/GLib.py | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
-commit cfccd55128377864e3a42a64785637bd453621b2
+commit 070f6688be4afb926656038dcceac4c8b8ed97c7
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Fri Apr 15 15:58:31 2011 +0200
+Date: Fri Apr 15 15:58:31 2011 +0200
[gi] Added additional test case for GVariant handling
tests/test_overrides.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
-commit 666ec192a4369e2fae508261a7a81b34326fc227
+commit 65aa040e86d94ee6bb227a2bce09668b60208027
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Apr 12 14:51:35 2011 -0400
+
+ [gi-invoke-ng] fix prototype
+
+ gi/pygi-cache.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 12aa4e6376366ca9d758434f6544c9c70a1e5df8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Apr 12 14:48:16 2011 -0400
+
+ [gi-invoke-ng] create new framework for cleaning up args
+
+ * we now have a state machine so we know what point in the marshalling
+ process
+ we are and which args need to be cleaned up
+ * call the cleanup functions after invoking the gi callable, after
+ marshalling
+ the out parameters and at any time an error occures
+
+ gi/Makefile.am | 4 ++-
+ gi/pygi-cache.c | 25 +++++++------
+ gi/pygi-cache.h | 5 ++-
+ gi/pygi-invoke-ng.c | 34 ++++++++++++++---
+ gi/pygi-invoke-state-struct.h | 13 +++++++
+ gi/pygi-marshal-cleanup.c | 81
+ +++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-marshal-cleanup.h | 43 ++++++++++++++++++++++
+ gi/pygi-marshal.c | 1 +
+ 8 files changed, 187 insertions(+), 19 deletions(-)
+
+commit 0463295cd046bd6382ad9dc71ea1518858d63c5f
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Mon Apr 11 18:34:31 2011 +0200
+Date: Mon Apr 11 18:34:31 2011 +0200
[gi] Added support for GVariant arguments
@@ -261,122 +1847,163 @@ Date: Mon Apr 11 18:34:31 2011 +0200
https://bugzilla.gnome.org/show_bug.cgi?id=647477
- gi/pygi-argument.c | 2 ++
+ gi/pygi-argument.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
-commit cc0e8423f36486d15f751bd3c14351edda28538d
-Author: Steve Frécinaux <code@istique.net>
-Date: Mon Apr 4 21:12:18 2011 +0200
+commit 1d64c3d3db2ec17b9a48df55271f712db6c07060
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Mar 30 16:40:31 2011 -0400
- Fix ABI break in old static bindings.
+ [gi-invoke-ng] fix marshal header that is no longer part of
+ pygi-arguments.h
- Commit 84d6142c14a7ebfb7284d3db52e14d3393f93905 (Always register a new
- GType when a GObject class is subclassed) breaks the more advanced
- usage
- of PyGObject with regards to "metaclass hackery" as used in for
- example
- the kiwi and sqlkit projects. But the users of the gi-based bindings
- now rely on the new behaviour.
+ gi/pygi-marshal.h | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
- We fix this by restraining the systematical registering of new
- types to
- the new gi-based bindings, leaving the old pygtk ones untouched.
+commit 3580cd1c7222022ebeef3476f9e609c8045f12a3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Mar 30 15:53:13 2011 -0400
- https://bugzilla.gnome.org/show_bug.cgi?id=646437
+ [gi-invoke-ng] code style space fixes
- gi/types.py | 9 +++++++++
- gobject/__init__.py | 16 +++++++++-------
- 2 files changed, 18 insertions(+), 7 deletions(-)
+ gi/pygi-cache.c | 420 +++++++++++++++++++-------------------
+ gi/pygi-invoke-ng.c | 145 +++++++-------
+ gi/pygi-marshal.c | 565
+ ++++++++++++++++++++++++++-------------------------
+ 3 files changed, 566 insertions(+), 564 deletions(-)
-commit b0e499744d337adc608e2aa8996469bca2df044a
-Author: Mike Gorse <mgorse@novell.com>
-Date: Sat Apr 2 18:45:40 2011 -0500
+commit 81662fcd09f112bfffcdc5b7f01a5537b84cd9d4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 29 16:54:44 2011 -0400
- fetch size from an enum type
+ [gi-invoke-ng] don't decref value taken from a dict as it is borrowed
- Do not assume that an enum is returned as a long; treat it as an
- int if
- the type indicates that its size is that of an int.
+ gi/pygi-invoke-ng.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
- http://bugzilla.gnome.org/show_bug.cgi?id=646581
+commit a456fc0adc1f8a0754bf59cde8924f905bfc7dc1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 29 15:23:06 2011 -0400
- gi/pygi-argument.c | 25 ++++++++++++++++++++++---
- 1 files changed, 22 insertions(+), 3 deletions(-)
+ [gi-invoke-ng] return None when appropriate so we don't crash
-commit 4f59bee3a875eb71b8c9adce855b9addc965fe3b
-Author: Dieter Verfaillie <dieterv@optionexplicit.be>
-Date: Tue Mar 22 20:47:51 2011 +0100
+ gi/pygi-marshal.c | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
- dsextras.py: ensure eol characters are preserved when writing template
- files (so \n does not become \r\n)
+commit e8c8c37e5587dc7ff62519df336988a12e6f5d0a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 29 15:21:41 2011 -0400
- dsextras.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ [gi-invoke-ng] fix aux value caching
+
+ gi/pygi-cache.c | 15 ++++++++++-----
+ 1 files changed, 10 insertions(+), 5 deletions(-)
-commit b7a6f884e9ea5946691dd661b79e3094b6e1b34c
+commit 4e4c1847c713a4eb4ab34d04488e94dac24d9167
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 24 12:10:47 2011 -0400
+Date: Mon Mar 28 20:25:46 2011 -0400
- release 2.28.3
+ [gi-invoke-ng] backport handling flags with no gtype
- NEWS | 3 +++
- configure.ac | 2 +-
- 2 files changed, 4 insertions(+), 1 deletions(-)
+ gi/pygi-marshal.c | 25 ++++++++++++++++++++++++-
+ 1 files changed, 24 insertions(+), 1 deletions(-)
-commit 99689e2849a9df78980c9d25d9ddabc1e95f1252
+commit fd76423e655b3711e1ffbf9b61ea4e2c94040234
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 24 12:08:10 2011 -0400
+Date: Mon Mar 28 18:32:00 2011 -0400
- Revert "dsextras.py: ensure eol characters are preserved when writing
- template files (so \n does not become \r\n)"
+ [gi-invoke-ng] backport raw gvalue handling
- This reverts commit 27496e0e86e7d8798caf019fd09af5c6a30ec633.
+ gi/pygi-marshal.c | 23 ++++++++++++++++++-----
+ 1 files changed, 18 insertions(+), 5 deletions(-)
- dsextras.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+commit 507b5051c83f70ceae79e0fa693c86e5cbb9f442
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Mar 28 18:30:31 2011 -0400
-commit 27496e0e86e7d8798caf019fd09af5c6a30ec633
-Author: Dieter Verfaillie <dieterv@optionexplicit.be>
-Date: Tue Mar 22 20:47:51 2011 +0100
+ [gi-invoke-ng] marshal instances seperately since they differ slightly
+ from other args
- dsextras.py: ensure eol characters are preserved when writing template
- files (so \n does not become \r\n)
+ gi/pygi-cache.c | 2 +-
+ gi/pygi-marshal.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 39 insertions(+), 1 deletions(-)
- dsextras.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+commit 726a27c0e74ace3ff23d9cc4d393ae53e57f1fac
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Mar 28 18:26:09 2011 -0400
-commit b7449d63e0c1bdfb5acbd8c5ec073711441301b9
-Author: Dieter Verfaillie <dieterv@optionexplicit.be>
-Date: Tue Mar 22 11:35:44 2011 +0100
+ [gi-invoke-ng] refactor FunctionCache to be more generic CallableCache
- dsextras.py: remove \r as wel as \n character
+ gi/pygi-cache.c | 392
+ ++++++++++++++++++++++++++-------------------------
+ gi/pygi-cache.h | 12 +-
+ gi/pygi-info.c | 2 +-
+ gi/pygi-invoke-ng.c | 40 +++---
+ gi/pygi-marshal.c | 140 +++++++++---------
+ gi/pygi-marshal.h | 159 ++++++++-------------
+ gi/pygi.h | 2 +-
+ 7 files changed, 362 insertions(+), 385 deletions(-)
- dsextras.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+commit 3d5d9ff5c18a850650992bdd52e8e4c722b23396
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Mar 28 15:01:12 2011 -0400
+
+ [gi-invoke-rewrite] backport glib error handling
+
+ gi/pygi-invoke-ng.c | 14 ++++++--------
+ 1 files changed, 6 insertions(+), 8 deletions(-)
-commit 075ead0533ba311120b3ca9ac9ae75ca84ace8fb
+commit 37b14b28a5f2aec16ac7f321efbf07e1403e9531
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Mar 23 10:39:19 2011 -0400
+Date: Fri Mar 25 18:48:42 2011 -0400
- fix a typo when converting objects to strings gvalues
+ [gi-invoke-ng] backport closure passing from invoke
- gobject/pygtype.c | 4 ++--
- tests/test_properties.py | 8 ++++++++
- 2 files changed, 10 insertions(+), 2 deletions(-)
+ gi/pygi-marshal.c | 13 ++++++++++---
+ 1 files changed, 10 insertions(+), 3 deletions(-)
-commit a904f0dea4b7f04aac7c9ddd3b01ffbbd808375e
+commit cf7f97eabc9c49773c2916929b8c43ef453d0652
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 22 21:56:14 2011 -0400
+Date: Fri Mar 25 18:47:36 2011 -0400
- prep 2.28.2 release
+ [gi-invoke-ng] handle vfuncs and fix cosntrutors
- NEWS | 6 ++++++
- configure.ac | 2 +-
- 2 files changed, 7 insertions(+), 1 deletions(-)
+ gi/pygi-cache.c | 9 ++++++
+ gi/pygi-cache.h | 2 +
+ gi/pygi-invoke-ng.c | 56
+ ++++++++++++++++++++++++++++++----------
+ gi/pygi-invoke-state-struct.h | 2 +
+ 4 files changed, 55 insertions(+), 14 deletions(-)
+
+commit af2ce400fcf771ee6c9bc01aecfb59467be5a0ce
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Mar 25 18:39:06 2011 -0400
+
+ [gi-invoke-ng] handle foreign types correctly
+
+ gi/pygi-cache.c | 22 ++++++----------------
+ gi/pygi-marshal.c | 3 +++
+ 2 files changed, 9 insertions(+), 16 deletions(-)
-commit c1ee6642d4b69a8c417cf92534ba091f89c7f68c
+commit 482553ae5d863ca523be3bd1eededa5d02a4f87e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 22 18:46:28 2011 -0400
+Date: Fri Mar 25 13:14:01 2011 -0400
+
+ [gi] remove the class parameter from the argument list of constructors
+
+ * constructors pass in their class to be constructed. Since we
+ use GI
+ and g_object_new to do the construction we ignore this for now but
+ keep it around in the state for future use.
+
+ gi/pygi-invoke-ng.c | 46
+ +++++++++++++++++++++++++++++++++++-----
+ gi/pygi-invoke-state-struct.h | 1 +
+ 2 files changed, 41 insertions(+), 6 deletions(-)
+
+commit 0534eb0e843cdf09611143da184052f7e549e4dc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 18:46:28 2011 -0400
fix static ABI for setting string gvalues from python objects
@@ -387,12 +2014,123 @@ Date: Tue Mar 22 18:46:28 2011 -0400
* this restores that code while still keeping unicode and python 3
compatability
- gobject/pygtype.c | 28 +++++++++++++++++++---------
- 1 files changed, 19 insertions(+), 9 deletions(-)
+ gobject/pygtype.c | 28 +++++++++++++++++++---------
+ tests/test_properties.py | 8 ++++++++
+ 2 files changed, 27 insertions(+), 9 deletions(-)
+
+commit 5f0e130026a663a57ed1317e0fa0e1f78f9e6e0a
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date: Tue Mar 22 20:47:51 2011 +0100
-commit cd38572b9781502d3228e74c017cb7cc39a07b3d
+ dsextras.py: ensure eol characters are preserved when writing template
+ files (so \n does not become \r\n)
+
+ dsextras.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 62a6274105003ef386ddfe9ef38e8afa8c43d124
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date: Tue Mar 22 11:35:44 2011 +0100
+
+ dsextras.py: remove \r as wel as \n character
+
+ dsextras.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 86c436978c933f6ebe17627abe98325ce66f6baa
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 16:13:58 2011 -0400
+
+ [gi] make new invoke-ng codepath compile correctly
+
+ configure.ac | 4 +
+ gi/Makefile.am | 5 +-
+ gi/pygi-cache.c | 2 +-
+ gi/pygi-invoke-ng.c | 841 ----------------------
+ gi/pygi-marshal.c | 1962
+ +--------------------------------------------------
+ gi/pygi-private.h | 4 +-
+ 6 files changed, 9 insertions(+), 2809 deletions(-)
+
+commit 35619fec43f4df85edf5456f3fc9733b16f2ba90
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 15:40:02 2011 -0400
+
+ [gi] conditionalize invoke code paths
+
+ configure.ac | 7 +++++++
+ gi/Makefile.am | 20 +++++++++++++++-----
+ gi/pygi-cache.h | 2 ++
+ gi/pygi-info.c | 4 +++-
+ gi/pygi-private.h | 9 +++++++--
+ gi/pygi.h | 4 +++-
+ 6 files changed, 37 insertions(+), 9 deletions(-)
+
+commit 83c51bd2bb6ca24ce610c04cff1527bcd2689d90
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 15:37:24 2011 -0400
+
+ [gi] revert back to the type.py from master
+
+ gi/types.py | 21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+commit cb30d00d1c92e73d9bfb08cc7b600a5aa70f2fc0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 14:46:29 2011 -0400
+
+ [gi] revert pygi-argument.h and move the invoke-ng code to
+ pygi-marshal.h
+
+ gi/pygi-argument.h | 268 +-----------------------------------------
+ gi/pygi-marshal.h | 336
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 337 insertions(+), 267 deletions(-)
+
+commit 17cb714cfdaf45b6d7dd627b0189bd24e6578f74
+Merge: 7332a1b 01596a9
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 13:34:36 2011 -0400
+
+ Merge branch 'master' into invoke-rewrite
+
+ Conflicts:
+ gi/Makefile.am
+ gi/pygi-argument.c
+ gi/pygi-foreign-cairo.c
+ gi/pygi-foreign-gvariant.c
+ gi/pygi-foreign-gvariant.h
+ gi/pygi-foreign.c
+ gi/pygi-foreign.h
+ gi/pygi-private.h
+ gi/pygi.h
+
+commit 01596a9b7cc0ceef3904da5b96939140ee0732fd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Mar 22 13:20:54 2011 -0400
+
+ [gi] foreign types now take interface infos instead of type infos
+
+ * this is a prep for the invoke-rewrite branch
+ * when marshalling foreign structs we may not have the type info but
+ we will always have the interface info to pass
+ * this simplifies the code because we were simply converting the
+ type info back to an interface info anyway so there is less
+ refcounting to keep track of
+ * also fixes a bug where we were leaking PyNone ref counts
+
+ gi/pygi-argument.c | 4 ++--
+ gi/pygi-foreign-cairo.c | 16 ++++++++--------
+ gi/pygi-foreign-gvariant.c | 12 ++++++------
+ gi/pygi-foreign.c | 32 +++++++++++++-------------------
+ gi/pygi-foreign.h | 8 ++++----
+ gi/pygi-invoke.c | 6 +++---
+ gi/pygi.h | 12 ++++++------
+ 7 files changed, 42 insertions(+), 48 deletions(-)
+
+commit fbabc1fdafa1dcbd1f6aaea7b821bd1c64a546ab
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Mar 22 15:04:01 2011 +0100
+Date: Tue Mar 22 15:04:01 2011 +0100
Fix GSchema tests for separate build tree
@@ -404,45 +2142,59 @@ Date: Tue Mar 22 15:04:01 2011 +0100
prefer it
over test_overrides.py's directory.
- tests/Makefile.am | 3 ++-
+ tests/Makefile.am | 3 ++-
tests/test_overrides.py | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
-commit be81ea00d6cd92a5ae77c5bb301b6f6baeb6d89a
-Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Mar 22 14:02:46 2011 +0100
+commit 7332a1b99775519fdc5500cab6628b713e946a8c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Mar 21 19:03:29 2011 -0400
- GIO tests: Fix remaining test case for separate build tree
+ [gi] start of merge from master
- tests/test_gio.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ * move some of the modified files that will cause merge conflicts
+ to their
+ own, nonconflicting files
+ * copy the old files out of master
-commit 178df3e438835bec9b40dea243867784dee35815
-Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Mar 22 13:21:27 2011 +0100
+ gi/pygi-argument.c | 2101 +++-------------------------
+ gi/pygi-invoke-ng.c | 1179 ++++++++++++++++
+ gi/pygi-invoke.c | 421 ++----
+ gi/pygi-marshal.c | 3916
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 5389 insertions(+), 2228 deletions(-)
- GIO tests: Fix for separate build tree
+commit 62b49dae97441953452d097cb1751df14302547a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Mar 16 17:34:18 2011 -0400
- When using a separate build tree, "test_gio.py" is not in the
- current working
- dir (which is the build tree), but in the srcdir. Use __file__
- instead.
+ [gi] marshal raw closures
- tests/test_gio.py | 14 +++++++-------
- 1 files changed, 7 insertions(+), 7 deletions(-)
+ * before we were able to marshal python callables into methods
+ that took
+ GClosures but we had no way to take a GClosure returned from one
+ method and pass it to another - this enables that usecase
-commit 27dcb9b1963be0c0d18e19a0b108a4a64d5e048b
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Mar 21 12:42:36 2011 -0400
+ https://bugzilla.gnome.org/show_bug.cgi?id=644757
- prep for 2.28.1 release
+ gi/pygi-argument.c | 17 ++++++++++-------
+ tests/test_gi.py | 4 ++++
+ 2 files changed, 14 insertions(+), 7 deletions(-)
- NEWS | 15 +++++++++++++++
- 1 files changed, 15 insertions(+), 0 deletions(-)
+commit 1e70957c5470a0f4bceba38ca66a4e4274fdc8d8
+Author: John Stowers <john.stowers@gmail.com>
+Date: Sun Mar 6 23:41:01 2011 +1300
+
+ pygi-convert.sh add GObject.xxx and webkit
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=644347
+
+ pygi-convert.sh | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
-commit 072d45cbfa7b360a0e616c4c56ba75d4dc08e7df
+commit 2292673c96e7973a0732ca15bbd5b0bf7a9c7dcf
Author: John Stowers <john.stowers@gmail.com>
-Date: Sun Mar 6 23:41:30 2011 +1300
+Date: Sun Mar 6 23:41:30 2011 +1300
pygi-convert.sh remove gobject tests, GObject works now
@@ -451,37 +2203,38 @@ Date: Sun Mar 6 23:41:30 2011 +1300
pygi-convert.sh | 28 ----------------------------
1 files changed, 0 insertions(+), 28 deletions(-)
-commit 205fee1622e461c0bcbe50e8befe30f01aac81eb
-Author: John Stowers <john.stowers@gmail.com>
-Date: Sun Mar 6 23:41:01 2011 +1300
-
- pygi-convert.sh add GObject.xxx and webkit
+commit d26e5cc45f277f6b7edb32aa416520bb53bff9c2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Mar 11 14:09:02 2011 -0500
- https://bugzilla.gnome.org/show_bug.cgi?id=644347
+ [gi-demos] add pickers demo
- pygi-convert.sh | 7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
+ demos/gtk-demo/demos/pickers.py | 74
+ +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 74 insertions(+), 0 deletions(-)
-commit f5ee2924af489c17b64e56be5d2bd1c39d1293d1
+commit b8d926a458ed7d7e92719e41b5bc1c36f68882b3
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Mar 16 17:34:18 2011 -0400
+Date: Thu Mar 10 18:12:50 2011 -0500
- [gi] marshal raw closures
+ [gi-demos] add menu demo
- * before we were able to marshal python callables into methods
- that took
- GClosures but we had no way to take a GClosure returned from one
- method and pass it to another - this enables that usecase
+ demos/gtk-demo/demos/menus.py | 122
+ +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 122 insertions(+), 0 deletions(-)
- https://bugzilla.gnome.org/show_bug.cgi?id=644757
+commit 9baec8ed1c5d99c1677a75eaa1d38912f41f0b2d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Mar 9 13:02:50 2011 -0500
- gi/pygi-argument.c | 15 ++++++++++-----
- tests/test_gi.py | 4 ++++
- 2 files changed, 14 insertions(+), 5 deletions(-)
+ [gi-overrides] fix exception block so it works in Python 2.5
-commit ac11dc70b34fe077be18f7e605c9f3cce03ad3fa
+ gi/overrides/Gio.py | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 5ac534ac3ceee3cc19fe2297e3cd009817ed726f
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Mon Mar 21 13:25:12 2011 +0100
+Date: Mon Mar 21 13:19:58 2011 +0100
Revert "Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES"
@@ -495,42 +2248,24 @@ Date: Mon Mar 21 13:25:12 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=620215
- gi/Makefile.am | 4 +---
- gio/Makefile.am | 2 +-
- glib/Makefile.am | 2 +-
- m4/python.m4 | 7 ++-----
- tests/Makefile.am | 2 +-
- 5 files changed, 6 insertions(+), 11 deletions(-)
+ gi/Makefile.am | 4 +---
+ glib/Makefile.am | 2 +-
+ m4/python.m4 | 7 ++-----
+ tests/Makefile.am | 2 +-
+ 4 files changed, 5 insertions(+), 10 deletions(-)
-commit aed7582de1c0623042601c8038a7631fa41d087d
+commit cd01f8ce1373f28b1427dd847bef44f747f1e6b3
Author: Dieter Verfaillie <dieterv@optionexplicit.be>
-Date: Fri Mar 18 17:06:08 2011 +0100
+Date: Fri Mar 18 17:06:08 2011 +0100
setup.py: fix user_access_control option
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit 6f0d33101a2451854f216291813951349d5ac471
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Mar 16 15:20:43 2011 -0400
-
- [gi-overrides] fix marshalling pygobjects in treemodels
-
- * PyGObjects wern't being marshalled correctly as python objects
- when a
- treemodel column was set to take pyobjects
- * Fix this by explicetly marshalling all PyObjects as boxed gvalue
- types
- in the overrides
-
- gi/overrides/Gtk.py | 9 +++++----
- tests/test_overrides.py | 34 ++++++++++++++++++++++++++--------
- 2 files changed, 31 insertions(+), 12 deletions(-)
-
-commit adb6f0320bed9a00a96c99424d4982199dc85af2
+commit 2da60baec4f43c41f43527cbfde4e21e0eea728c
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Mar 16 10:22:35 2011 +0100
+Date: Wed Mar 16 10:22:35 2011 +0100
[gi] Respect the MessageType for Gtk.MessageDialog
@@ -538,12 +2273,12 @@ Date: Wed Mar 16 10:22:35 2011 +0100
to Tualatrix
Chou for spotting this!
- gi/overrides/Gtk.py | 1 +
+ gi/overrides/Gtk.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
-commit 115c4750f071270b648218c9678931a65a4b3e3d
+commit 029a79d1af1e0998aa6bc88ce1c1f48ce0ccd2a0
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Mar 15 10:22:39 2011 +0100
+Date: Tue Mar 15 10:22:39 2011 +0100
[gi] Do not require signature for D-BUS methods without arguments
@@ -562,124 +2297,64 @@ Date: Tue Mar 15 10:22:39 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=644260
- gi/overrides/Gio.py | 16 +++++++++++++++-
- tests/test_gdbus.py | 13 +++++++++++++
+ gi/overrides/Gio.py | 16 +++++++++++++++-
+ tests/test_gdbus.py | 13 +++++++++++++
2 files changed, 28 insertions(+), 1 deletions(-)
-commit 0df9e153812e1e5077bb906449e211ecb0af8736
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Mar 11 14:09:02 2011 -0500
-
- [gi-demos] add pickers demo
-
- demos/gtk-demo/demos/pickers.py | 74
- +++++++++++++++++++++++++++++++++++++++
- 1 files changed, 74 insertions(+), 0 deletions(-)
-
-commit 419bfdd44b566ffb88f71165c00728872987dc5e
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 10 18:12:50 2011 -0500
-
- [gi-demos] add menu demo
-
- demos/gtk-demo/demos/menus.py | 122
- +++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 122 insertions(+), 0 deletions(-)
-
-commit 0877670e184a591866cbf3ab14284fcb217b540b
+commit 5bf66ce79267b25bcc80251f9170498fa1d765f6
Author: John Stowers <john.stowers@gmail.com>
-Date: Sun Mar 6 23:05:33 2011 +1300
+Date: Sun Mar 6 23:05:33 2011 +1300
[gi-overrides] TreeViewColumn.set_cell_data_func func_data can be None
https://bugzilla.gnome.org/show_bug.cgi?id=644343
- gi/overrides/Gtk.py | 2 ++
+ gi/overrides/Gtk.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
-commit 1f69c520d95fec30094fac47cb0efa31c79da81c
+commit 8e4f86e17a1de533a93b0748fd8de3cbfa70ba62
Author: John Stowers <john.stowers@gmail.com>
-Date: Sun Mar 6 17:48:04 2011 +1300
+Date: Sun Mar 6 17:48:04 2011 +1300
[gi-demos] dont try and run demos that represent directories
- demos/gtk-demo/gtk-demo.py | 3 ++-
+ demos/gtk-demo/gtk-demo.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
-commit f06ad511725b28d821532acae45a25d0a186fc9f
+commit 097e5efab29d3d2d91d0b9fc75bf00219e9b7810
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Mar 9 13:02:50 2011 -0500
-
- [gi-overrides] fix exception block so it works in Python 2.5
-
- gi/overrides/Gio.py | 5 ++++-
- 1 files changed, 4 insertions(+), 1 deletions(-)
+Date: Mon Mar 7 18:09:18 2011 -0500
-commit a784350b6e76c6c66fb2856dd597238f4ac992e9
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 8 13:25:57 2011 -0500
-
- post release version bump
-
- configure.ac | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-commit aa745352bb99862c360dc56e2fececc4b2968cbc
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 8 13:20:31 2011 -0500
-
- prep 2.28.0 release
+ [gi-demos] some python 3 compat fixes
- NEWS | 25 +++++++++++++++++++++++++
- configure.ac | 4 ++--
- 2 files changed, 27 insertions(+), 2 deletions(-)
+ demos/gtk-demo/demos/Icon View/iconviewbasics.py | 6 ++++++
+ demos/gtk-demo/demos/Tree View/liststore.py | 2 +-
+ demos/gtk-demo/demos/rotatedtext.py | 4 ++--
+ demos/gtk-demo/gtk-demo.py | 4 ++--
+ 4 files changed, 11 insertions(+), 5 deletions(-)
-commit d3bafc0a8bacf99e22b18c978012ab719e70954e
+commit fd5d5ef3abc947d3c6066eea6378514f87b7f0ce
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Mar 7 18:09:18 2011 -0500
+Date: Tue Feb 22 15:07:40 2011 -0500
- [gi-demos] some python 3 compat fixes
+ [gi-demos] add liststore demo
- demos/gtk-demo/demos/Icon View/iconviewbasics.py | 6 ++++++
- demos/gtk-demo/demos/Tree View/liststore.py | 2 +-
- demos/gtk-demo/demos/rotatedtext.py | 4 ++--
- demos/gtk-demo/gtk-demo.py | 4 ++--
- 4 files changed, 11 insertions(+), 5 deletions(-)
+ demos/gtk-demo/demos/Tree View/liststore.py | 205
+ +++++++++++++++++++++++++++
+ 1 files changed, 205 insertions(+), 0 deletions(-)
-commit eaafff23d397852b08384b4e15d68e3888e99b48
+commit 09de5cf99474fc8a34b5f4a61cede1fb47353ebb
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Mar 7 18:08:40 2011 -0500
+Date: Mon Mar 7 18:08:40 2011 -0500
[gi-demos] catch the correct error class
demos/gtk-demo/demos/images.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
-commit b113540b452638601945f63297e68b7564c3d4df
-Author: Steve Frécinaux <code@istique.net>
-Date: Mon Mar 7 01:58:36 2011 +0100
-
- Try not to sink objects returned by C functions.
-
- When creating a wrapper around an object to call a python function, we
- try to avoid calling pygobject_sink() when the object was not
- created by
- pygobject or the static bindings because otherwise we can end
- up leaking
- one reference for GInitiallyUnowned subclasses if the object was
- already
- owned by someone else.
-
- https://bugzilla.gnome.org/show_bug.cgi?id=644067
-
- gobject/pygobject-private.h | 1 +
- gobject/pygobject.c | 7 +++++++
- gobject/pygtype.c | 6 +++---
- 3 files changed, 11 insertions(+), 3 deletions(-)
-
-commit 7bece91e83e3c72a7bd04d2096dcf9b31aa9d366
+commit 7284d2d4622978fc9ddfd00f2714b3a572b7ab56
Author: Steve Frécinaux <code@istique.net>
-Date: Sun Mar 6 21:18:36 2011 +0100
+Date: Sun Mar 6 21:18:36 2011 +0100
Do not leak python references when using the gobject.property()
helper.
@@ -691,25 +2366,13 @@ Date: Sun Mar 6 21:18:36 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=644039
- gobject/propertyhelper.py | 5 ++---
+ gobject/propertyhelper.py | 5 ++---
tests/test_properties.py | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+), 3 deletions(-)
-commit 030695cb4306d915044aea4fae7c7122ccde31b4
+commit 618dbb0ee15b47e5e7cb16a34ffce0937d7fa26d
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Mar 7 11:13:12 2011 -0500
-
- [gi] fix try except blocks so they work in Python 2.5
-
- * use etype, e = sys.exc_info[:2] to extract error details instead of
- except Exception as e or except Exception, e
-
- tests/test_gdbus.py | 27 ++++++++++++++++++++-------
- 1 files changed, 20 insertions(+), 7 deletions(-)
-
-commit 7e6d833c7f74031b010b45b635214cde5d85f7ae
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Mar 4 12:25:49 2011 -0500
+Date: Fri Mar 4 12:25:49 2011 -0500
handle uchar as bytes, not strings in python 3
@@ -721,31 +2384,31 @@ Date: Fri Mar 4 12:25:49 2011 -0500
* PYGLIB_PyBytes_FromStringAndSize evaluates to a PyString in Python 2
and a PyBytes object in Python 3
- gobject/pygtype.c | 2 +-
+ gobject/pygtype.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit aae4ce5d9e9b7747bf5847071a72a6cdd1371a3e
+commit 7e9483ff75b7a63ddda0fa9a9847f9f22ad71240
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Mar 4 12:24:35 2011 -0500
+Date: Fri Mar 4 12:24:35 2011 -0500
[gi-overrides] handle unichar gvalues when setting treemodels
- gi/overrides/Gtk.py | 10 ++++++++++
+ gi/overrides/Gtk.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
-commit 0d65223992abec46eee7b2b3c76f68da67de4905
+commit 6367bffa006e94dc667d7008fccad8d47d8d3646
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Mar 4 11:43:51 2011 -0500
+Date: Fri Mar 4 11:43:51 2011 -0500
[gi-overrides] special case python 2 keywords that crept in
- gi/overrides/Gtk.py | 6 +++++-
+ gi/overrides/Gtk.py | 6 +++++-
tests/test_overrides.py | 8 ++++----
2 files changed, 9 insertions(+), 5 deletions(-)
-commit 094b355a785fbe7ebc776cbbd059e6a3d9241ce2
+commit 83b0f8a37d5f3236780d87a1ca466c5e44ae2bc0
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Mar 4 11:10:16 2011 -0500
+Date: Fri Mar 4 11:10:16 2011 -0500
check for the py3 _thread module in configure.ac if thread is
not found
@@ -753,9 +2416,9 @@ Date: Fri Mar 4 11:10:16 2011 -0500
configure.ac | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
-commit b0d537c58e6997b546a9a367860abb3b93ce3440
+commit 4645af87d3c587f535404867dab56608719e5c7b
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Mar 4 00:39:23 2011 -0500
+Date: Fri Mar 4 00:39:23 2011 -0500
[gi-demos] add iconview demo
@@ -763,9 +2426,9 @@ Date: Fri Mar 4 00:39:23 2011 -0500
++++++++++++++++++++++
1 files changed, 212 insertions(+), 0 deletions(-)
-commit e5aa7268c2a0fc285d60b30e135fd79d039b9ae5
+commit 761dcb516a04f7a89b3c7d68e88fff23055e2a80
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 3 18:39:16 2011 -0500
+Date: Thu Mar 3 18:39:16 2011 -0500
[gi] wrap the keyword argument in a dict so we don't break Python 2.5
@@ -773,12 +2436,12 @@ Date: Thu Mar 3 18:39:16 2011 -0500
sending in
*args. You can only send in **kwds.
- gi/types.py | 2 +-
+ gi/types.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit 79d03b40b2395874556860e7e39e0c607b6a676a
+commit f9604e90af12a1b9dbe7d7f311308e87cd0ed7dd
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 3 18:30:40 2011 -0500
+Date: Thu Mar 3 18:30:40 2011 -0500
[gi-demos] add the combobox with string ids section to the demos
@@ -786,29 +2449,29 @@ Date: Thu Mar 3 18:30:40 2011 -0500
+++++++++++++++++++++++++++++++++++++-
1 files changed, 48 insertions(+), 1 deletions(-)
-commit 1b4ac8bef90ed1d3d51d45dafa61bfd70c6f9eb7
+commit b70f4daf071cf77a4561b57f5521eb928f66d1ce
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 3 16:47:51 2011 -0500
+Date: Thu Mar 3 16:47:51 2011 -0500
[gi-overrides] add an override for Gdk.RGBA
- gi/overrides/Gdk.py | 18 ++++++++++++++++++
+ gi/overrides/Gdk.py | 18 ++++++++++++++++++
tests/test_overrides.py | 10 ++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
-commit c1c491c8cb4684a10404fee59b2706bec6b8606b
+commit ee2b63f60f350332ed21927721ed9ddff3a8034e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Mar 3 16:10:17 2011 -0500
+Date: Thu Mar 3 16:10:17 2011 -0500
[gi-demos] fix up search-entry to reflect annotations fixed in Gtk+
master
- demos/gtk-demo/demos/Entry/search_entry.py | 23 +++++++++--------------
+ demos/gtk-demo/demos/Entry/search_entry.py | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
-commit 9687fbcf75582986e95188c5b2a24d0fe6b855db
+commit cd046e4c355706ead5f512b810a2a48317f8c32e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Mar 2 18:13:43 2011 -0500
+Date: Wed Mar 2 18:13:43 2011 -0500
[gi-demos] add search entry demo
@@ -816,76 +2479,54 @@ Date: Wed Mar 2 18:13:43 2011 -0500
++++++++++++++++++++++++++++
1 files changed, 257 insertions(+), 0 deletions(-)
-commit 28fbd6a11bda726fecfd7322f4acf41d06c54ec3
+commit d5ddaa92e6349c2f52b67317326060973cb69661
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Mar 2 15:37:27 2011 -0500
+Date: Wed Mar 2 15:37:27 2011 -0500
[gi] wrap map in a list for Python 3 compat
- gi/types.py | 2 +-
+ gi/types.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit d71224aa5b329cbb7116d35b8f98027fc27e630d
+commit 3e5ab72a2e1fa2d8c4c2864137c6251f264ff4af
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 1 14:52:00 2011 -0500
+Date: Tue Mar 1 14:52:00 2011 -0500
[gi-demos] fix up the validation combobox
demos/gtk-demo/demos/combobox.py | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
-commit d7d2f9c185773b35a6b89379be9bd96d04be79fb
+commit 08af5f99f0838b3584f6a3b210d0a0304811e8ff
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 1 12:31:35 2011 -0500
+Date: Tue Mar 1 12:31:35 2011 -0500
add overridesdir variable in the .pc file for 3rd party overrides
- pygobject-2.0.pc.in | 1 +
+ pygobject-2.0.pc.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
-commit c2cfdfa6c08b9da6bff9fc9d479e441a83cbf60a
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Mar 1 12:19:28 2011 -0500
-
- [gi] remove unref for closures since they are floating objects that
- get sunk
-
- * right now we trust that the containers we send the closures into
- will sink
- them
- * we should research this a bit more to see if there is a better
- way to handle
- floating closures once we are free to break static binding ABI
- * for now this is the least invasive of all the options
- * don't assert on transfer != GI_TRANSFER_NONE since the behavior for
- closures is always the same (and should actually be
- GI_TRANSFER_FULL)
-
- gi/pygi-argument.c | 6 ------
- tests/test_overrides.py | 8 ++++++++
- 2 files changed, 8 insertions(+), 6 deletions(-)
-
-commit e016486cbb24f696ebfc0cf1f457ec4e37a123cb
+commit 4a6b14a92a687a2311516b2c16c355216b5270a7
Author: Dieter Verfaillie <dieterv@optionexplicit.be>
-Date: Fri Feb 11 17:14:11 2011 +0100
+Date: Fri Feb 11 17:14:11 2011 +0100
setup.py: Set bdist_wininst user-access-control property
setup.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
-commit 2923f26c7850d12ece67b3ef96054721d38f888f
+commit ad3ab659b83cb985730e19a83651da319d4bcb9c
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Mar 2 16:29:00 2011 +0100
+Date: Wed Mar 2 16:29:00 2011 +0100
Fix uninitialized variable in gi.require_version()
gi/__init__.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
-commit aaaa00bb4027432503efee88622d9289319b1983
+commit 6e7606ee8830f6f51b777f41f6df2f6ea1784e89
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Mar 1 23:26:07 2011 +0100
+Date: Tue Mar 1 23:26:07 2011 +0100
Run tests with LC_MESSAGES="C"
@@ -894,40 +2535,32 @@ Date: Tue Mar 1 23:26:07 2011 +0100
visible strings. Ensure that these do not get translated in the
test suite.
- tests/runtests.py | 2 ++
+ tests/runtests.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
-commit 3aa089668f9ff3de86d2ca28e72c206c16c3403a
+commit 0461e05174637ae02f34029b85ba217d5ae48c53
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 28 18:21:43 2011 -0500
+Date: Mon Feb 28 18:21:43 2011 -0500
[gi-overrides] override Gtk.stock_lookup to not return success
demos/gtk-demo/demos/combobox.py | 2 +-
- gi/overrides/Gtk.py | 9 +++++++++
+ gi/overrides/Gtk.py | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
-commit 9614680269a267f8cf32a2d5534c50fb76ec48ec
+commit 40decf3501823004a6e4d3acbbf204c4d4d0a7ec
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 28 14:23:04 2011 -0500
+Date: Mon Feb 28 14:16:00 2011 -0500
- post release bump
-
- configure.ac | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-commit 093334ee29b5846ff57b4e9f74380efc9ed591e7
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 28 14:16:00 2011 -0500
-
- prep for 2.27.91 release
+ update NEWS to reflect changes in the 2.27.91 release (PYGOBJECT_2_28
+ branch)
NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
-commit 4b49a4f6123f0bbd5a36eba65b00142e3df7e595
+commit c2d5122b8e3cf51ec52418f90f1788895b842b6a
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 28 14:08:05 2011 -0500
+Date: Mon Feb 28 14:08:05 2011 -0500
[gi-tests] use Gdk.test_simulate_button instead of emitting event
ourselves
@@ -939,9 +2572,9 @@ Date: Mon Feb 28 14:08:05 2011 -0500
tests/test_overrides.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
-commit baa9865e6ff8b4eee4b16235b8dcc5dc48d2634d
+commit 1be1a2ea2787dffeb71ab4a38233fb71e761bd21
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Thu Feb 24 19:30:32 2011 +0100
+Date: Thu Feb 24 19:30:32 2011 +0100
[gi-tests] tests for EventButton override.
@@ -953,34 +2586,21 @@ Date: Thu Feb 24 19:30:32 2011 +0100
tests/test_overrides.py | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
-commit 6366307ba020a40f6dfa22e64fd6345b118fd2e5
-Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Wed Feb 16 09:44:12 2011 +0100
-
- Skip interfaces when checking for conflicts in the MRO
-
- https://bugzilla.gnome.org/show_bug.cgi?id=642437
-
- gi/types.py | 40 ++++++++++++++++++++++++++++++++++++++++
- gobject/gobjectmodule.c | 9 +++++++--
- tests/test_gi.py | 16 ++++++++++++++++
- 3 files changed, 63 insertions(+), 2 deletions(-)
-
-commit 14c787541966be8f497905d33d554343dabf8b73
+commit 99044a4860dd65c97f52b41b7cd3f216f4a97cd4
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 23 18:43:27 2011 -0500
+Date: Wed Feb 23 18:43:27 2011 -0500
[gi-overrides] Add event methods to all event union members
https://bugzilla.gnome.org/show_bug.cgi?id=642554
- gi/overrides/Gdk.py | 70
+ gi/overrides/Gdk.py | 70
+++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 70 insertions(+), 0 deletions(-)
-commit 7f013383063c1d1e5a95cf4c056ff152d4aa2645
+commit 6e30c69d38fd382414eb820097c297a80be547ac
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 23 14:14:16 2011 -0500
+Date: Wed Feb 23 14:14:16 2011 -0500
[gi] check to see if object is a member of a union when validating
paramaters
@@ -1000,23 +2620,36 @@ Date: Wed Feb 23 14:14:16 2011 -0500
https://bugzilla.gnome.org/show_bug.cgi?id=642554
- gi/pygi-argument.c | 38 ++++++++++++++++++++++++++++++++++++++
+ gi/pygi-argument.c | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
-commit 284e775b6caa86ef6465d17c87ec77376e66931c
+commit 525f21d1365c24488b768955362085bf82512dee
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Wed Feb 16 09:44:12 2011 +0100
+
+ Skip interfaces when checking for conflicts in the MRO
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642437
+
+ gi/types.py | 40 ++++++++++++++++++++++++++++++++++++++++
+ gobject/gobjectmodule.c | 9 +++++++--
+ tests/test_gi.py | 16 ++++++++++++++++
+ 3 files changed, 63 insertions(+), 2 deletions(-)
+
+commit da212024772a7a0c32f04f3589bfb24d2eb5706f
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Thu Feb 24 18:46:15 2011 +0100
+Date: Thu Feb 24 18:46:15 2011 +0100
[gi] Remove DyanmicModule.load() to _load() to prevent overriding
GI attrs.
gi/importer.py | 2 +-
- gi/module.py | 2 +-
+ gi/module.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
-commit 6d6d4fcf4678b512558c2c0e44c0c2e235c810f4
+commit 2ce6b58c7427cf67ba4f55731ba0a4c04703e495
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Feb 23 12:05:03 2011 +0100
+Date: Wed Feb 23 12:05:03 2011 +0100
Test case with John's fix for crash with C arrays and a GError is set.
@@ -1028,35 +2661,35 @@ Date: Wed Feb 23 12:05:03 2011 +0100
* This is a hack and there is really no way around it without
ripping out
- the current array handling code which spans between pygi-invoke.c
- and
- pygi-argument.c and completely rewriting it.
+ the current array handling code which spans between pygi-invoke.c
+ and
+ pygi-argument.c and completely rewriting it.
* The is no time before our stable release
* This patch trades a segfault for a leak in the very unusual
case where
- an error occures inside an interface that takes one or more C
- arrays. Since
- we wrap C arrays in GArrays internally but have to unwrap them
- to send them
- to the introspected C function, there is a period of time where
- an error
- can occure with the C array in an unknown state (some being true
- C arrays
- and others still wrapped in a GArray)
+ an error occures inside an interface that takes one or more C
+ arrays. Since
+ we wrap C arrays in GArrays internally but have to unwrap them
+ to send them
+ to the introspected C function, there is a period of time where
+ an error
+ can occure with the C array in an unknown state (some being true
+ C arrays
+ and others still wrapped in a GArray)
* This patch adds a c_arrays_are_wrapped state to signal that it
is safe to
- free them. However since c_arrays_are_wrapped can only track
- arrays
- as a group, not individually, if it is set to FALSE we can
- not assume
- that every array is a pure C array, so instead we will simply
- leak them
- to avoid incorrectly freeing one and causing a segfault.
+ free them. However since c_arrays_are_wrapped can only track
+ arrays
+ as a group, not individually, if it is set to FALSE we can
+ not assume
+ that every array is a pure C array, so instead we will simply
+ leak them
+ to avoid incorrectly freeing one and causing a segfault.
* This issue is fixed in the invoke rewrite branch as it treats
C arrays and
- GArrays separately, however that branch is not yet ready to be
- merged and
- won't be until the next release.
+ GArrays separately, however that branch is not yet ready to be
+ merged and
+ won't be until the next release.
https://bugzilla.gnome.org/show_bug.cgi?id=642708
@@ -1065,47 +2698,32 @@ Date: Wed Feb 23 12:05:03 2011 +0100
tests/test_gi.py | 9 +++++++++
2 files changed, 59 insertions(+), 4 deletions(-)
-commit 3534c1d4babefd4ee63e46119b279126058b7a71
+commit 702a89beca92cab6b0142829b20281b9245f28b8
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 23 15:11:59 2011 -0500
+Date: Wed Feb 23 15:11:59 2011 -0500
[gi-overrides] fix setting rows in treeview to accept None as a value
* as done in PyGTK None indicates the column should not be set
- gi/overrides/Gtk.py | 3 +++
+ gi/overrides/Gtk.py | 3 +++
tests/test_overrides.py | 18 +++++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
-commit ecbfaf60914a87f29ff0529614db9b6afca94c82
+commit 498f0d9c903131aca5efe27ffaad7620e40f72ea
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Feb 23 14:23:19 2011 +0100
+Date: Wed Feb 23 14:23:19 2011 +0100
[gi] Add value_name for enum and flags from introspection
"c:identifier" (if attr is available).
- gi/gimodule.c | 22 ++++++++++++++++++----
+ gi/gimodule.c | 22 ++++++++++++++++++----
tests/test_gi.py | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 4 deletions(-)
-commit e5ae620ad772f62cb14ab7c049ba0ce00cc501f2
+commit 824aeb7fab17d6590e5babf2d1f64298f2d0e16b
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Tue Feb 22 21:37:33 2011 +0100
-
- Don't force loading of DynamicModule until set in sys.modules
-
- This fixes Tomeu's previous commit, which removed lazy loading.
- Forcing the loading of a module before it is installed in sys.modules
- prevents some overrides from being registered (namely Gtk.main_quit).
-
- https://bugzilla.gnome.org/show_bug.cgi?id=642305
-
- gi/importer.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-commit 992c0c1096c77bc299a40a34ec30a2ac0c562ed4
-Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Feb 23 11:40:55 2011 +0100
+Date: Wed Feb 23 11:40:55 2011 +0100
Fix flags with multiple names for the same value.
@@ -1118,55 +2736,27 @@ Date: Wed Feb 23 11:40:55 2011 +0100
of duplicate instances we keep, because if an instance is not
found in the dict, a new one is created anyway.
- gobject/pygflags.c | 2 +-
+ gobject/pygflags.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit 8bf3f6ed075994eb3e29950670395bcf1b9dc2a0
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 22 15:07:40 2011 -0500
-
- [gi-demos] add liststore demo
-
- demos/gtk-demo/demos/Tree View/liststore.py | 205
- +++++++++++++++++++++++++++
- 1 files changed, 205 insertions(+), 0 deletions(-)
-
-commit 788fc96771046fc64cede392e748b2d1b6b3aa1c
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 22 14:35:44 2011 -0500
-
- [gi-demos] run through the demos and remove the FIXMEs that have
- been fixed
-
- demos/gtk-demo/demos/appwindow.py | 18 ++++++------------
- demos/gtk-demo/demos/assistant.py | 3 ---
- demos/gtk-demo/demos/builder.py | 3 ---
- demos/gtk-demo/demos/button_box.py | 10 +++-------
- demos/gtk-demo/demos/clipboard.py | 8 ++------
- demos/gtk-demo/demos/colorselector.py | 2 --
- demos/gtk-demo/demos/combobox.py | 4 +---
- demos/gtk-demo/demos/drawingarea.py | 3 ---
- 8 files changed, 12 insertions(+), 39 deletions(-)
-
-commit adf7aec853878681b450c3ef1f89bfe9ba85fec1
-Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Wed Feb 16 11:53:18 2011 +0100
+commit 3afbebeee486e14fd3f48552368903eb78f6b10c
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date: Tue Feb 22 21:37:33 2011 +0100
- Load typelibs at import time, add gi.require_version()
+ Don't force loading of DynamicModule until set in sys.modules
- also adds Repository.get_loaded_namespaces()
+ This fixes Tomeu's previous commit, which removed lazy loading.
+ Forcing the loading of a module before it is installed in sys.modules
+ prevents some overrides from being registered (namely Gtk.main_quit).
https://bugzilla.gnome.org/show_bug.cgi?id=642305
- gi/__init__.py | 29 ++++++++++++++++++++++++++++-
- gi/importer.py | 1 +
- gi/module.py | 21 ++++-----------------
- gi/pygi-repository.c | 23 +++++++++++++++++++++++
- 4 files changed, 56 insertions(+), 18 deletions(-)
+ gi/importer.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
-commit 6fe7783b96366f380f9168909932a87e35d994b3
+commit 2a9cbfb435b47dc646e2c6ffe630464b560229a6
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 21 17:20:57 2011 -0500
+Date: Mon Feb 21 17:20:57 2011 -0500
use GValue support to marshal GtkTreeModel values correctly
@@ -1174,14 +2764,14 @@ Date: Mon Feb 21 17:20:57 2011 -0500
https://bugzilla.gnome.org/show_bug.cgi?id=642921
- gi/overrides/Gtk.py | 37 ++++++++++++++++++--
+ gi/overrides/Gtk.py | 37 ++++++++++++++++++--
tests/test_overrides.py | 87
++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 107 insertions(+), 17 deletions(-)
-commit bc4a570bcc0a02029d746fbbcfdf4cc14c37f2ad
+commit 9e4ce7dc0f03ea407654c4af028122f57cbc4c5e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 21 16:14:20 2011 -0500
+Date: Mon Feb 21 16:14:20 2011 -0500
[gi] pass raw GValues instead of trying to marshal them
@@ -1194,9 +2784,9 @@ Date: Mon Feb 21 16:14:20 2011 -0500
the raw GValue interfaces and expect paramaters that take
GValues to
marshal them correctly e.g.:
- value = GObject.Value()
- value.int(GObject.TYPE_UINT)
- value.set_uint(1234)
+ value = GObject.Value()
+ value.int(GObject.TYPE_UINT)
+ value.set_uint(1234)
* The objective here is to not for users to use this API but for
overrides
to be able to utilize them. For instance in the TreeModel API
@@ -1207,13 +2797,13 @@ Date: Mon Feb 21 16:14:20 2011 -0500
https://bugzilla.gnome.org/show_bug.cgi?id=642914
- gi/pygi-argument.c | 24 ++++++++++++++++++------
- tests/test_gi.py | 9 ++++++++-
+ gi/pygi-argument.c | 24 ++++++++++++++++++------
+ tests/test_gi.py | 9 ++++++++-
2 files changed, 26 insertions(+), 7 deletions(-)
-commit 428fc90eb12f26ceb7c868879ad05788890d32a3
+commit b458f6f3424a04f6ceece09d443009372d70544c
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Sat Feb 19 19:42:41 2011 -0500
+Date: Sat Feb 19 19:42:41 2011 -0500
[gi-demos] add icon view edit and drag-and-drop demo
@@ -1221,9 +2811,35 @@ Date: Sat Feb 19 19:42:41 2011 -0500
++++++++++++++++++++++++
1 files changed, 101 insertions(+), 0 deletions(-)
-commit eb0e179bff167303db1c20412f4bc9c8baa94582
+commit 7b47289e25d1dd57ce15556ccfbb3ede1c4bfe8b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Feb 19 17:26:42 2011 -0500
+
+ [gi-demos] add info bars demo
+
+ demos/gtk-demo/demos/infobars.py | 99
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 99 insertions(+), 0 deletions(-)
+
+commit 76758efb6579752237a0dc4d56cf9518de6c6e55
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date: Wed Feb 16 11:53:18 2011 +0100
+
+ Load typelibs at import time, add gi.require_version()
+
+ also adds Repository.get_loaded_namespaces()
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=642305
+
+ gi/__init__.py | 29 ++++++++++++++++++++++++++++-
+ gi/importer.py | 1 +
+ gi/module.py | 21 ++++-----------------
+ gi/pygi-repository.c | 23 +++++++++++++++++++++++
+ 4 files changed, 56 insertions(+), 18 deletions(-)
+
+commit 96f7d1aed732db09a74cd463ed894b7347dbcb15
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Sat Feb 19 23:11:25 2011 +0100
+Date: Sat Feb 19 23:11:25 2011 +0100
[gi] Register GType for non-GType enums and flags at runtime.
@@ -1240,39 +2856,18 @@ Date: Sat Feb 19 23:11:25 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=642607
- gi/gimodule.c | 117
+ gi/gimodule.c | 117
++++++++++++++++++++++++++++++++++++++++++++++++++++
- gi/module.py | 24 +++++++----
- gi/pygi-info.c | 15 +++++++
- gi/types.py | 16 -------
- gobject/pygflags.c | 13 ++++--
- tests/test_gi.py | 35 +++++++++++++++
+ gi/module.py | 24 +++++++----
+ gi/pygi-info.c | 15 +++++++
+ gi/types.py | 16 -------
+ gobject/pygflags.c | 13 ++++--
+ tests/test_gi.py | 35 +++++++++++++++
6 files changed, 191 insertions(+), 29 deletions(-)
-commit d5e67257361609036d2bbfa47ea85a6c759b332a
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Sat Feb 19 17:26:42 2011 -0500
-
- [gi-demos] add info bars demo
-
- demos/gtk-demo/demos/infobars.py | 99
- ++++++++++++++++++++++++++++++++++++++
- 1 files changed, 99 insertions(+), 0 deletions(-)
-
-commit 372f480b078d1befb30532a0ebe0ad9c90e78df0
+commit 63a60bcc20e724f96ea8d565ee0cf13a228b72b9
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Sat Feb 19 15:44:52 2011 +0100
-
- tests/runtests.py: Add missing "import sys"
-
- master already has this.
-
- tests/runtests.py | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-commit c1b35fc49680ad25e996de57e3e020bd43d9186c
-Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Feb 8 15:38:21 2011 +0100
+Date: Tue Feb 8 15:38:21 2011 +0100
[gi] Add Pythonic gdbus method invocation
@@ -1292,15 +2887,15 @@ Date: Tue Feb 8 15:38:21 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640181
- gi/overrides/Gio.py | 99
+ gi/overrides/Gio.py | 99
+++++++++++++++++++++++++++++++++++++++++++++++++
- tests/test_gdbus.py | 102
+ tests/test_gdbus.py | 102
++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 199 insertions(+), 2 deletions(-)
-commit 2737e1c2c506cd324a0aa2abfdfeb3ad4f08e678
+commit ed5cdbb6f52bdbd13521a814516b15687955d6f7
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Fri Feb 18 22:48:59 2011 +0100
+Date: Fri Feb 18 22:48:59 2011 +0100
Skip GError out parameters in Python closure.
@@ -1311,24 +2906,33 @@ Date: Fri Feb 18 22:48:59 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=642715
- gi/pygi-closure.c | 8 ++++++++
+ gi/pygi-closure.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
-commit 93677502c12a3ee123dd565bf1b404ef47ec1c47
+commit 5a5ee3877e22939a697772a7f0630ef8cae3d52f
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date: Fri Feb 18 10:15:59 2011 +0100
+
+ Fix runtests.py to work with Python3 (print function syntax error).
+
+ tests/runtests.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ad5d3fccff9433e2dadac89d731dac5cafb0eac3
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Feb 17 19:46:49 2011 -0500
+Date: Thu Feb 17 19:46:49 2011 -0500
[gi-demos] added rotate text demo
* needs some Pango Attr fixes to be 100% done, See FIXME
- demos/gtk-demo/demos/rotatedtext.py | 196
+ demos/gtk-demo/demos/rotatedtext.py | 196
+++++++++++++++++++++++++++++++++++
1 files changed, 196 insertions(+), 0 deletions(-)
-commit 8495ab57f49fb507a8004a9cf967d6fe91bb4ef0
+commit 9ac11c3c3b1c0399c85ece57c0983ed60d419d7a
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Feb 17 17:25:00 2011 -0500
+Date: Thu Feb 17 17:25:00 2011 -0500
[gi-demos] add images demo
@@ -1338,9 +2942,9 @@ Date: Thu Feb 17 17:25:00 2011 -0500
++++++++++++++++++++++++++++++++++++++++
1 files changed, 311 insertions(+), 0 deletions(-)
-commit 60b9dd8d021e550089f44dc489ffeb77af6976ee
+commit 13b06170b89b3468e6255be32af4833ffc675c9d
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Feb 17 14:48:24 2011 -0500
+Date: Thu Feb 17 14:48:24 2011 -0500
[gi-demos] add pixbuf demo
@@ -1348,18 +2952,18 @@ Date: Thu Feb 17 14:48:24 2011 -0500
++++++++++++++++++++++++++++++++++++++++
1 files changed, 183 insertions(+), 0 deletions(-)
-commit f57153dd6786858ff2ab79c28227cd021755d693
+commit 7abcfd5b4db99bb0f50c5a47d346a2de3836f994
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Feb 17 14:47:12 2011 -0500
+Date: Thu Feb 17 14:47:12 2011 -0500
[gi-demos] remove fixmes from print demo, fixed in pango
demos/gtk-demo/demos/printing.py | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
-commit b8345be15c7f65e97f6bc148ad6c35ff80ff3870
+commit 9b13f49356da7d71c69b82da2a59d92f456a6913
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 16 19:39:30 2011 -0500
+Date: Wed Feb 16 19:39:30 2011 -0500
[gi-demos] add printing demo
@@ -1369,21 +2973,21 @@ Date: Wed Feb 16 19:39:30 2011 -0500
++++++++++++++++++++++++++++++++++++++
1 files changed, 177 insertions(+), 0 deletions(-)
-commit 123877715145038a5877b8c538a48a1285f1ed54
+commit 6025b62ee662af347e48b6752e6d5be74b4a8215
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 16 17:52:38 2011 -0500
+Date: Wed Feb 16 17:52:38 2011 -0500
[gi-overrides] add cursor overrides
https://bugzilla.gnome.org/show_bug.cgi?id=635947
- gi/overrides/Gdk.py | 41 +++++++++++++++++++++++++++++++++++++++++
+ gi/overrides/Gdk.py | 41 +++++++++++++++++++++++++++++++++++++++++
tests/test_overrides.py | 23 +++++++++++++++++++++++
2 files changed, 64 insertions(+), 0 deletions(-)
-commit 68d72e015997da8d5732527c7ab96dd8c61fa664
+commit 03c0aa498470037ef2aa6a8233198ff521f8d42f
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 16 16:18:24 2011 -0500
+Date: Wed Feb 16 16:18:24 2011 -0500
[gi-demos] add the links demo
@@ -1391,9 +2995,9 @@ Date: Wed Feb 16 16:18:24 2011 -0500
+++++++++++++++++++++++++++++++++++++++++
1 files changed, 74 insertions(+), 0 deletions(-)
-commit 00505a9a5445b85a091650a777a47f632ddc9d6d
+commit 79ecddf8d54b3f4f8b5ef05d302675152622c832
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 16 15:48:40 2011 -0500
+Date: Wed Feb 16 15:48:40 2011 -0500
[gi-demos] add expander demo
@@ -1401,20 +3005,20 @@ Date: Wed Feb 16 15:48:40 2011 -0500
++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
-commit ed8710c7aa05cc0c919366536c94bf43955f1b71
+commit 76cdb13ab872f91f8384d26b0f2932087a746117
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Feb 16 15:14:35 2011 -0500
+Date: Wed Feb 16 15:14:35 2011 -0500
[gi-overrides] use pop instead of del and add extra tests for
Gtk.Table kwargs
- gi/overrides/Gtk.py | 6 ++----
+ gi/overrides/Gtk.py | 6 ++----
tests/test_overrides.py | 8 ++++++++
2 files changed, 10 insertions(+), 4 deletions(-)
-commit 888675f85c895a60d4432b992961ec3067da6e20
+commit 6ef83c049735689c42f085ca9d7b8e1f251c410f
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Tue Feb 15 20:07:42 2011 +0100
+Date: Tue Feb 15 20:07:42 2011 +0100
[tests] Separate processes for GI and static binding tests.
@@ -1429,40 +3033,13 @@ Date: Tue Feb 15 20:07:42 2011 +0100
so that make does not continue. Otherwise you might miss the
failures from the first batch of tests in the scrollback.
- tests/Makefile.am | 29 ++++++++++++-----------------
- tests/runtests.py | 4 +++-
- 2 files changed, 15 insertions(+), 18 deletions(-)
+ tests/Makefile.am | 19 +++++++++++--------
+ tests/runtests.py | 4 +++-
+ 2 files changed, 14 insertions(+), 9 deletions(-)
-commit 71b0dd93d524afce9f4a4b0b393c8a16a1f70e2f
-Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Tue Feb 15 16:26:24 2011 +0100
-
- [GI] Remove implicit loading of gi module preserve the code path
- for static bindings.
-
- Previously type lookups (as well as property accesses and signal
- connects would trigger an import of the gi module). Now we make
- those paths fail, and fallback to the old static binding code
- paths *unless* the gi module is already in sys.modules.
-
- So if Python code calls:
- from gi.repository import Gtk
-
- or even just:
- import gi
-
- then everything will work just like it did without this patch. If gi
- is not explicitly imported, the code skips the introspection code
- and acts like the old static bindings did.
-
- https://bugzilla.gnome.org/show_bug.cgi?id=642387
-
- gi/pygi.h | 10 ++++++++--
- 1 files changed, 8 insertions(+), 2 deletions(-)
-
-commit 97e78181813f15f693e650df5a8901bd2fe71541
+commit e0896b45f60f37097ec521f1bc38778383b78dd8
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 14:47:10 2011 -0500
+Date: Tue Feb 15 14:47:10 2011 -0500
[gi-demos] add dialogs demo
@@ -1470,46 +3047,46 @@ Date: Tue Feb 15 14:47:10 2011 -0500
+++++++++++++++++++++++++++++++++++++++
1 files changed, 153 insertions(+), 0 deletions(-)
-commit a23a48edafb9d08fec5411b828d1e0c6763e84af
+commit 2dea743e82f6b18697950c34f116b2d0f1d6b1dd
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 14:46:41 2011 -0500
+Date: Tue Feb 15 14:46:41 2011 -0500
[gi-overrides] fix typo in GtkTable constructor
- gi/overrides/Gtk.py | 8 ++++----
+ gi/overrides/Gtk.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
-commit bcccff3b2ad9c8054a4d5462c62cde566587eba6
+commit 9c277e1782c5a9d672d91fabf5289c5415891682
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 13:26:38 2011 -0500
+Date: Tue Feb 15 13:26:38 2011 -0500
[gi-demos] keep popup menu from destroying itself by holding a ref
in app class
- demos/gtk-demo/demos/clipboard.py | 8 ++++----
+ demos/gtk-demo/demos/clipboard.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
-commit 9dc0979ba7d35b6ff9bb219a21926c2fd88451c7
+commit 18800c4db0e1faea38fd84f635d26a7ded5d10de
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 13:25:13 2011 -0500
+Date: Tue Feb 15 13:25:13 2011 -0500
[gi-overrides] add a Gtk.Menu override for the popup method
- gi/overrides/Gtk.py | 7 +++++++
+ gi/overrides/Gtk.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
-commit 317278a3ddf15f1f9da53051295a0b533b1b1a11
+commit ad93386ba9f73ef4c3826544b3868cf03c01225e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 13:24:33 2011 -0500
+Date: Tue Feb 15 13:24:33 2011 -0500
[gi-demos] fix the about dialog in appwindow demo
demos/gtk-demo/demos/appwindow.py | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
-commit cb2d2aad023789991b20036e22cae5ad3eee9b36
+commit d0c45c80974f05b6adfd3bb01d785be268a53a98
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 11:21:13 2011 -0500
+Date: Tue Feb 15 11:21:13 2011 -0500
[gi-demos] fix clipboard demo so DnD works
@@ -1520,18 +3097,18 @@ Date: Tue Feb 15 11:21:13 2011 -0500
demos/gtk-demo/demos/clipboard.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
-commit 5434b7aac323170ea9469afbda520b801462c246
+commit 02d0327508234ab2e3b7dc6de506d70e6fcaaa17
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Tue Feb 15 10:18:53 2011 -0500
+Date: Tue Feb 15 10:18:53 2011 -0500
[gi-demos] fix clipboard demo to reflect new API
- demos/gtk-demo/demos/clipboard.py | 6 +++---
+ demos/gtk-demo/demos/clipboard.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
-commit b6c97de9680f3d5d629132415c1f7a9c42e558f8
+commit aa006cad6990eff0cbb68fa9550e428f2bc96473
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 18:17:20 2011 -0500
+Date: Mon Feb 14 18:17:20 2011 -0500
[gi-demo] Fix color dialog demo to run with new draw, style and
color apis
@@ -1540,9 +3117,9 @@ Date: Mon Feb 14 18:17:20 2011 -0500
++++++++++++--------------------
1 files changed, 17 insertions(+), 27 deletions(-)
-commit 7147bd635fb03439a5f9edbce56c5558d092428c
+commit f94a96c53e9432ac085bd05acee7ebdd2803fbad
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 17:58:25 2011 -0500
+Date: Mon Feb 14 17:58:25 2011 -0500
[gi-demos] fix most of the combobox app
@@ -1551,9 +3128,9 @@ Date: Mon Feb 14 17:58:25 2011 -0500
demos/gtk-demo/demos/combobox.py | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
-commit a64b8fe89492ae47172979f1900686455cd1f9a8
+commit 3606eb20ad1651af621bf1aa429ec102082565eb
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Mon Feb 14 19:36:27 2011 +0100
+Date: Mon Feb 14 19:36:27 2011 +0100
Use PyGI type conversion (to fix foreign types) for signal callbacks.
@@ -1562,31 +3139,31 @@ Date: Mon Feb 14 19:36:27 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=637601
- gi/Makefile.am | 2 +
- gi/gimodule.c | 1 +
- gi/pygi-argument.c | 91 +++++++++++++++++
- gi/pygi-argument.h | 2 +
- gi/pygi-private.h | 1 +
+ gi/Makefile.am | 2 +
+ gi/gimodule.c | 1 +
+ gi/pygi-argument.c | 91 +++++++++++++++++
+ gi/pygi-argument.h | 2 +
+ gi/pygi-private.h | 1 +
gi/pygi-signal-closure.c | 245
++++++++++++++++++++++++++++++++++++++++++++++
gi/pygi-signal-closure.h | 46 +++++++++
- gi/pygi.h | 28 +++++
- gobject/pygobject.c | 24 ++++-
+ gi/pygi.h | 28 +++++
+ gobject/pygobject.c | 24 ++++-
9 files changed, 436 insertions(+), 4 deletions(-)
-commit 36ddad6af4a579c070171fd0522d7ffd93d5d73e
+commit 2e39d5e8f96be2253acb2f34a0d0b5b9c9adb8ff
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 16:47:03 2011 -0500
+Date: Mon Feb 14 16:47:03 2011 -0500
[gi-demos] fix drawingarea app to use the new draw api
- demos/gtk-demo/demos/drawingarea.py | 144
+ demos/gtk-demo/demos/drawingarea.py | 144
++++++++++++-----------------------
1 files changed, 50 insertions(+), 94 deletions(-)
-commit ddde83ebd4dbb179aa5388057a14faf32ece26ae
+commit 8385afbbc5df295d9b7cd3b5d19c90faa1f7ea8e
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 16:43:35 2011 -0500
+Date: Mon Feb 14 16:43:35 2011 -0500
[gi-overrides] for Gtk 3 alias Gdk.Rectangle to cairo.RectangleInt
@@ -1595,12 +3172,12 @@ Date: Mon Feb 14 16:43:35 2011 -0500
bindings
* we alias this so people do not get confused
- gi/overrides/Gdk.py | 5 +++++
+ gi/overrides/Gdk.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
-commit 8617d0e2a63771eba04983c7319f18638aa6d81e
+commit d491c369e049ab726f09002af0462391d5c2f3ec
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 15:07:11 2011 -0500
+Date: Mon Feb 14 15:07:11 2011 -0500
[gi-overrides] let user set the proper property names in Gtk.Table
@@ -1610,193 +3187,153 @@ Date: Mon Feb 14 15:07:11 2011 -0500
* The GTK properties are n_columns and n_rows
* support both
- gi/overrides/Gtk.py | 8 ++++++++
+ gi/overrides/Gtk.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
-commit 09c0534e4ac673ffdbfb41bc0aa34353be3b88e2
+commit 95bc2b2b025d659725d701c3b759c0c4d9681a36
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 15:06:38 2011 -0500
+Date: Mon Feb 14 15:06:38 2011 -0500
[gi-demos] get appwindow demo working again
demos/gtk-demo/demos/appwindow.py | 24 ++++--------------------
1 files changed, 4 insertions(+), 20 deletions(-)
-commit 1944349cc59ddaf4fd7308ffce10b521c885c88b
+commit 015185f502c498c21cb108d3bb288c5b6dbf202f
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Mon Feb 14 15:05:44 2011 -0500
+Date: Mon Feb 14 15:05:44 2011 -0500
[gi-demos] fixed use of tree_iter_get
- demos/gtk-demo/gtk-demo.py | 2 +-
+ demos/gtk-demo/gtk-demo.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-commit 29efc5a31c2879cefcf31d1d9bdbab65052d3b24
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Feb 11 11:18:24 2011 -0500
+commit 0c20977e4598e5447dd07c069e91226efacb1160
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date: Fri Feb 11 22:02:03 2011 +0100
- pre-release version bump
+ Remove last GIO-related bits
- configure.ac | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ https://bugzilla.gnome.org/show_bug.cgi?id=638899
-commit 5dae6386ef74b6334daa3d0baf7c2e43d93a7e40
-Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Fri Feb 11 11:05:04 2011 -0500
+ PKG-INFO.in | 2 +-
+ README | 3 +-
+ configure.ac | 3 --
+ examples/gio/directory-async.py | 33 -----------------
+ examples/gio/downloader.py | 77
+ ---------------------------------------
+ pygobject.doap | 2 +-
+ 6 files changed, 3 insertions(+), 117 deletions(-)
+
+commit e4ebbd7de5570af1abf41bdf9469d4ce3edd48cb
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date: Fri Feb 11 18:38:27 2011 +0100
- bump version and edit NEWS for release
+ Remove GIO documentation
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=638899
- NEWS | 289
+ docs/Makefile.am | 82 +-
+ docs/reference/pygio-appinfo.xml | 894 -----
+ docs/reference/pygio-applaunchcontext.xml | 194 --
+ docs/reference/pygio-asyncresult.xml | 117 -
+ docs/reference/pygio-bufferedinputstream.xml | 461 ---
+ docs/reference/pygio-bufferedoutputstream.xml | 275 --
+ docs/reference/pygio-cancellable.xml | 290 --
+ docs/reference/pygio-classes.xml | 47 -
+ docs/reference/pygio-constants.xml | 1540 ---------
+ docs/reference/pygio-datainputstream.xml | 799 -----
+ docs/reference/pygio-dataoutputstream.xml | 504 ---
+ docs/reference/pygio-drive.xml | 546 ---
+ docs/reference/pygio-emblem.xml | 232 --
+ docs/reference/pygio-emblemedicon.xml | 160 -
+ docs/reference/pygio-file.xml | 4534
+ -------------------------
+ docs/reference/pygio-fileattributeinfo.xml | 73 -
+ docs/reference/pygio-fileenumerator.xml | 488 ---
+ docs/reference/pygio-fileicon.xml | 109 -
+ docs/reference/pygio-fileinfo.xml | 346 --
+ docs/reference/pygio-fileinputstream.xml | 214 --
+ docs/reference/pygio-filemonitor.xml | 128 -
+ docs/reference/pygio-fileoutputstream.xml | 257 --
+ docs/reference/pygio-filterinputstream.xml | 152 -
+ docs/reference/pygio-filteroutputstream.xml | 152 -
+ docs/reference/pygio-functions.xml | 395 ---
+ docs/reference/pygio-icon.xml | 217 --
+ docs/reference/pygio-inputstream.xml | 730 ----
+ docs/reference/pygio-loadableicon.xml | 198 --
+ docs/reference/pygio-memoryinputstream.xml | 151 -
+ docs/reference/pygio-memoryoutputstream.xml | 175 -
+ docs/reference/pygio-mount.xml | 962 ------
+ docs/reference/pygio-mountoperation.xml | 726 ----
+ docs/reference/pygio-outputstream.xml | 140 -
+ docs/reference/pygio-seekable.xml | 231 --
+ docs/reference/pygio-simpleasyncresult.xml | 317 --
+ docs/reference/pygio-themedicon.xml | 204 --
+ docs/reference/pygio-unixinputstream.xml | 202 --
+ docs/reference/pygio-unixoutputstream.xml | 202 --
+ docs/reference/pygio-volume.xml | 718 ----
+ docs/reference/pygio-volumemonitor.xml | 844 -----
+ docs/reference/pygiounix-classes.xml | 13 -
+ docs/reference/pygobject-ref.xml | 2 -
+ 42 files changed, 1 insertions(+), 19020 deletions(-)
+
+commit abdebc7f6515f9658812c0355d8ad0892e5371e4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Feb 11 11:05:04 2011 -0500
+
+ bump version to reflect the master branch moving towards pygobject 3.0
+
+ * added NEWS file from branch pygobject-2-28
+ * bump to 2.90.1
+ * this branch will drop support for the static binding
+ * use the pygobject-2-28 branch for static binding fixes
+
+ NEWS | 289
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- configure.ac | 2 +-
- 2 files changed, 290 insertions(+), 1 deletions(-)
+ configure.ac | 4 +-
+ 2 files changed, 291 insertions(+), 2 deletions(-)
-commit e12097a3fc006f435ae01156e55cacd7622a6e06
+commit 16140237aa45b4f188923da9f95b9d2af971011b
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Thu Feb 10 16:46:08 2011 -0500
+Date: Thu Feb 10 16:46:08 2011 -0500
fix build to correctly use python-config
- autogen.sh | 3 +++
- configure.ac | 6 ------
- m4/python.m4 | 9 +++++----
- tests/runtests.py | 1 +
+ autogen.sh | 3 +++
+ configure.ac | 6 ------
+ m4/python.m4 | 9 +++++----
+ tests/runtests.py | 1 +
4 files changed, 9 insertions(+), 10 deletions(-)
-commit 5ec107f805e32d4183b3c1a015d411992fc46a48
-Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Feb 9 18:00:34 2011 +0100
-
- Run gio tests separately when enabled
-
- As we can't load both gio and gi.repository.Gio at the same time,
- run the gio
- tests separately when gio is enabled.
-
- tests/Makefile.am | 13 ++++++++++++-
- 1 files changed, 12 insertions(+), 1 deletions(-)
-
-commit 02ac041ba001bdda506f749e90aebc86a414d7c1
-Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Feb 2 13:33:55 2011 +0100
-
- Revert "Remove gio static bindings"
-
- This reverts commit bca5834fc8fa342149e0eec7b396877a2abe6d33.
-
- We still need the static gio bindings for now.
-
- https://bugzilla.gnome.org/show_bug.cgi?id=638899
-
- Makefile.am | 2 +-
- configure.ac | 22 +-
- gio/.gitignore | 3 +
- gio/Makefile.am | 117 +
- gio/__init__.py | 40 +
- gio/gappinfo.override | 213 ++
- gio/gapplaunchcontext.override | 99 +
- gio/gbufferedinputstream.override | 70 +
- gio/gcancellable.override | 38 +
- gio/gdatainputstream.override | 250 ++
- gio/gdrive.override | 347 ++
- gio/gfile.override | 2215 +++++++++++
- gio/gfileattribute.override | 153 +
- gio/gfileenumerator.override | 184 +
- gio/gfileinfo.override | 121 +
- gio/gfileinputstream.override | 68 +
- gio/gfileiostream.override | 68 +
- gio/gfileoutputstream.override | 68 +
- gio/gicon.override | 310 ++
- gio/ginputstream.override | 344 ++
- gio/gio-types.defs | 807 ++++
- gio/gio.defs | 7465
- +++++++++++++++++++++++++++++++++++++
- gio/gio.override | 409 ++
- gio/giomodule.c | 208 +
- gio/giostream.override | 68 +
- gio/gmemoryinputstream.override | 91 +
- gio/gmemoryoutputstream.override | 45 +
- gio/gmount.override | 454 +++
- gio/goutputstream.override | 292 ++
- gio/gresolver.override | 312 ++
- gio/gsocket.override | 575 +++
- gio/gvolume.override | 237 ++
- gio/gvolumemonitor.override | 94 +
- gio/pygio-utils.c | 236 ++
- gio/pygio-utils.h | 49 +
- gio/unix-types.defs | 55 +
- gio/unix.defs | 475 +++
- gio/unix.override | 62 +
- gio/unixmodule.c | 52 +
- tests/Makefile.am | 9 +
- tests/runtests-windows.py | 3 +
- tests/test_gcancellable.py | 15 +
- tests/test_gicon.py | 112 +
- tests/test_gio.py | 1138 ++++++
- tests/test_gresolver.py | 68 +
- tests/test_gsocket.py | 126 +
- 46 files changed, 18187 insertions(+), 2 deletions(-)
-
-commit a535e4af7c38fd7917d804470e8c46da4c2a86ea
-Author: Steve Frécinaux <code@istique.net>
-Date: Wed Feb 9 17:32:03 2011 +0100
-
- Decrease the refcount for GInitiallyUnowned constructors.
-
- This mimicks the weird legacy pygtk behaviour and makes all the tests
- pass despite the proper fixes having been reverted.
-
- https://bugzilla.gnome.org/show_bug.cgi?id=641525
-
- gi/pygi-invoke.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-commit 657d113c766c5ff9c5e7285ff5309283333983e4
-Author: Steve Frécinaux <code@istique.net>
-Date: Wed Feb 9 17:03:30 2011 +0100
-
- Ensure the sink functions are only ran once.
-
- This mitigates in a not-so-clean way the leak experienced in pygobject
- for wrappers created multiple times, without breaking pygtk.
-
- https://bugzilla.gnome.org/show_bug.cgi?id=641525
-
- gobject/pygobject.c | 23 +++++++++++++++--------
- 1 files changed, 15 insertions(+), 8 deletions(-)
-
-commit d32c0ecc6cde743047054e65355cbbfbf808d5ce
-Author: Steve Frécinaux <code@istique.net>
-Date: Wed Feb 9 17:15:41 2011 +0100
-
- Revert "Fix wrong refcount when calling introspected widget
- constructors"
-
- This reverts commit 7bc4122897d9d05172a2bd5b56bded87e2afaec4.
+commit c2079f415638ef892b1e51f25eaafa3e1621667f
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date: Thu Feb 10 22:26:00 2011 +0100
- https://bugzilla.gnome.org/show_bug.cgi?id=641525
+ Add missing libraries to link against
- gobject/pygobject.c | 4 +---
- 1 files changed, 1 insertions(+), 3 deletions(-)
+ glib/Makefile.am | 2 +-
+ gobject/Makefile.am | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
-commit 4c9715b29f8883e23027cca10157ea96013b0dbc
+commit 3cca62a9e7afd3d3d302c66f4fafe253f7743d4e
Author: Steve Frécinaux <code@istique.net>
-Date: Wed Feb 9 16:33:42 2011 +0100
+Date: Wed Jan 19 15:00:56 2011 +0100
- Revert "Fix reference leaks for GInitiallyUnowned objects"
+ Make runtests.py able to run command-line provided test files
- This reverts commit f0a0b6c2eda89622de2b1e5ebb6a48103ad72a42.
- The test cases have been kept.
+ With this patch we are now able to run ./runtests.py <somefile>, which
+ is more friendly than defining an environment variable to run some
+ specific tests.
- https://bugzilla.gnome.org/show_bug.cgi?id=641525
+ https://bugzilla.gnome.org/show_bug.cgi?id=639948
- gobject/gobjectmodule.c | 2 --
- gobject/pygobject.c | 14 +++++++-------
- 2 files changed, 7 insertions(+), 9 deletions(-)
+ tests/runtests.py | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
commit 14c4cf8e6edae893538680964380d543bde4a14d
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Feb 9 11:34:59 2011 +0100
+Date: Wed Feb 9 11:34:59 2011 +0100
Run test suite under dbus-launch
@@ -1806,24 +3343,24 @@ Date: Wed Feb 9 11:34:59 2011 +0100
session
D-BUS (such as distribution package builds).
- tests/Makefile.am | 3 ++-
+ tests/Makefile.am | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
commit 0858f550e2b6f75e3f583f963f5952f5ddae4e0e
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Feb 8 15:46:36 2011 +0100
+Date: Tue Feb 8 15:46:36 2011 +0100
Fix test_gdbus.py to be Python3 friendly
- TestCase.assert_() has been deprecated by assertTrue().
- Exceptions don't have a message attribute any more, use str(e)
- tests/test_gdbus.py | 34 +++++++++++++++-------------------
+ tests/test_gdbus.py | 34 +++++++++++++++-------------------
1 files changed, 15 insertions(+), 19 deletions(-)
commit b7f32e4cca0cef201489b55653f96ac64a8f9ab9
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Sat Jan 29 12:20:50 2011 +0100
+Date: Sat Jan 29 12:20:50 2011 +0100
[gi] Provide comfortable GSettings API
@@ -1833,15 +3370,15 @@ Date: Sat Jan 29 12:20:50 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640838
- gi/overrides/Gio.py | 54 ++++++++++++++++++++++++++++
+ gi/overrides/Gio.py | 54 ++++++++++++++++++++++++++++
tests/org.gnome.test.gschema.xml | 9 +++++
- tests/test_overrides.py | 73
+ tests/test_overrides.py | 73
++++++++++++++++++++++++++++++-------
3 files changed, 122 insertions(+), 14 deletions(-)
commit 8dad0eaed60a9de26e9a729a48a1f6bc74be486e
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Fri Feb 4 16:36:07 2011 +0100
+Date: Fri Feb 4 16:36:07 2011 +0100
Fix vfunc search bug when using GInterfaces and a do_* method.
@@ -1852,13 +3389,13 @@ Date: Fri Feb 4 16:36:07 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=641493
- gi/types.py | 4 +++-
+ gi/types.py | 4 +++-
tests/test_gi.py | 8 ++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
commit 2660be1f227be7a53092483bc9d8ead1bd1fb266
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Thu Feb 3 15:31:42 2011 +0100
+Date: Thu Feb 3 15:31:42 2011 +0100
[GI] Add tests for Gtk.Widget.drag_* methods.
@@ -1872,20 +3409,40 @@ Date: Thu Feb 3 15:31:42 2011 +0100
tests/test_overrides.py | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
+commit d57500537014b3da624be33b40401ba289fa22b8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Feb 3 09:02:16 2011 -0500
+
+ [gi] make caller allocates work again
+
+ gi/pygi-cache.c | 18 +++---------------
+ gi/pygi-invoke.c | 37 ++++++++++++++++++++++++++++++++++---
+ 2 files changed, 37 insertions(+), 18 deletions(-)
+
+commit 99d6e6c8d806e6f9e48c3c2380024fb3511d110a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Feb 2 19:27:40 2011 -0500
+
+ [gi] fix container object reffing
+
+ gi/pygi-argument.c | 7 +++----
+ gi/pygi-cache.c | 12 ++++--------
+ 2 files changed, 7 insertions(+), 12 deletions(-)
+
commit 09acaff29dfaabc77477cffca2c7137f68991e7f
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Feb 2 21:00:48 2011 +0100
+Date: Wed Feb 2 21:00:48 2011 +0100
[python 3] use the right syntaxis to raise exceptions
- codegen/argtypes.py | 8 ++++----
+ codegen/argtypes.py | 8 ++++----
codegen/definitions.py | 14 +++++++-------
- gi/overrides/Gtk.py | 2 +-
+ gi/overrides/Gtk.py | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
commit 36094e5982d3e05d5662843b6d401f0974f5235f
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Feb 2 20:50:12 2011 +0100
+Date: Wed Feb 2 20:50:12 2011 +0100
[gi] return PYGLIB_MODULE_ERROR_RETURN on error and use pygobject_init
@@ -1894,7 +3451,7 @@ Date: Wed Feb 2 20:50:12 2011 +0100
commit c913c1789296310c2cf27554ce719d7f6e9c94cd
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Feb 2 20:37:21 2011 +0100
+Date: Wed Feb 2 20:37:21 2011 +0100
[gi] return PYGLIB_MODULE_ERROR_RETURN on error
@@ -1905,7 +3462,7 @@ Date: Wed Feb 2 20:37:21 2011 +0100
commit 7bc4122897d9d05172a2bd5b56bded87e2afaec4
Author: Steve Frécinaux <code@istique.net>
-Date: Sat Jan 29 00:16:50 2011 +0100
+Date: Sat Jan 29 00:16:50 2011 +0100
Fix wrong refcount when calling introspected widget constructors
@@ -1921,13 +3478,13 @@ Date: Sat Jan 29 00:16:50 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640868
- gobject/pygobject.c | 4 +++-
+ gobject/pygobject.c | 4 +++-
tests/test_everything.py | 9 ++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
commit afeaaa126f7cd6556fb855ecd0facc174c0f946c
Author: Simon Schampijer <simon@laptop.org>
-Date: Wed Jan 19 16:19:46 2011 +0100
+Date: Wed Jan 19 16:19:46 2011 +0100
Gdk.Window: Map the standard constructor to the *new* constructor
@@ -1939,22 +3496,117 @@ Date: Wed Jan 19 16:19:46 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639936
- gi/overrides/Gdk.py | 6 ++++++
+ gi/overrides/Gdk.py | 6 ++++++
tests/test_overrides.py | 8 ++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
+commit 4a67f45880433905de33632fe0c32a13b44c0b33
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jan 31 16:51:37 2011 -0500
+
+ [gi] handle hash being NULL
+
+ gi/pygi-argument.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 2fbfe410f4b4394a2018ada0e538585c1bec23ae
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jan 31 16:50:52 2011 -0500
+
+ [gi] handle the situation where an aux arg comes before its parent
+
+ gi/pygi-cache.c | 70
+ ++++++++++++++++++++++++++++++++++++++---------------
+ gi/pygi-invoke.c | 2 +-
+ 2 files changed, 51 insertions(+), 21 deletions(-)
+
commit 858669f92c9907dd70b4966d6a8521ed122225be
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Mon Jan 31 17:38:52 2011 +0100
+Date: Mon Jan 31 17:38:52 2011 +0100
Ship tests/org.gnome.test.gschema.xml in dist tarballs
- tests/Makefile.am | 3 ++-
+ tests/Makefile.am | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
+commit 77d76df59606e470808085e977fb199cc76e8251
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 30 18:21:24 2011 -0500
+
+ [gi] allow caching and marshalling of ghash out
+
+ gi/pygi-argument.c | 155
+ ++++++++++++++++++++++++++++++++++++++++++++++++---
+ gi/pygi-cache.c | 27 ++++++---
+ 2 files changed, 162 insertions(+), 20 deletions(-)
+
+commit bd66af67f248a3ca90d2fa2626605263c2392e16
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 30 17:06:44 2011 -0500
+
+ [gi] whitespace fixes
+
+ gi/pygi-cache.c | 60
+ +++++++++++++++++++++++++++---------------------------
+ 1 files changed, 30 insertions(+), 30 deletions(-)
+
+commit 1cdbd4be9b015f792c2c02afa5ac7e24edbdae86
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 30 17:04:13 2011 -0500
+
+ [gi] added ugly aux arg counters
+
+ * we need to simplify the ffi invoke so we can simply reference args
+ at their position in the C parameter list
+ * this works for now but is fragile if new aux values are added in
+ the future
+
+ gi/pygi-argument.c | 12 ++++++++-
+ gi/pygi-cache.c | 66
+ +++++++++++++++++++++++++++++++++++----------------
+ gi/pygi-cache.h | 2 +
+ gi/pygi-invoke.c | 12 +++++++--
+ 4 files changed, 66 insertions(+), 26 deletions(-)
+
+commit c51447f4efde2ce4caf39c1ffac905ec428d1d64
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 30 11:30:54 2011 -0500
+
+ [gi] make inout marshalling work
+
+ * refactor cache generation so we can create caches and then fill
+ in their
+ values based on if they are in, out or inout
+ * in invoke we order the pointers based on their direction
+
+ gi/pygi-cache.c | 1445
+ ++++++++++++++++++++++++++----------------------------
+ gi/pygi-invoke.c | 19 +-
+ 2 files changed, 711 insertions(+), 753 deletions(-)
+
+commit 2b185362de45f46ce0f0b8816499aef06ab1ad1e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Jan 29 13:49:36 2011 -0500
+
+ [gi] marshal arrays out
+
+ gi/pygi-argument.c | 101
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 99 insertions(+), 2 deletions(-)
+
+commit e62e7062d5cfd782eac64852f681c63e2776b8d4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Jan 29 13:48:23 2011 -0500
+
+ [gi] fix sequence caching to support out
+
+ gi/pygi-cache.c | 111
+ +++++++++++++++++++++++++++++++++++++++++++------------
+ 1 files changed, 87 insertions(+), 24 deletions(-)
+
commit 69207910209ebfe450df616aeb8fa4cc2e7eccf3
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Fri Jan 28 17:14:19 2011 +0100
+Date: Fri Jan 28 17:14:19 2011 +0100
[gi] Add GSettings tests
@@ -1962,14 +3614,14 @@ Date: Fri Jan 28 17:14:19 2011 +0100
so let's
first make sure that the canonical GLib API works.
- tests/Makefile.am | 7 +++++--
+ tests/Makefile.am | 7 +++++--
tests/org.gnome.test.gschema.xml | 16 ++++++++++++++++
- tests/test_overrides.py | 31 +++++++++++++++++++++++++++++++
+ tests/test_overrides.py | 31 +++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 2 deletions(-)
commit 488478a83640d50baee963337fcc870fec76b784
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Fri Jan 28 07:20:26 2011 +0100
+Date: Fri Jan 28 07:20:26 2011 +0100
[gi] Provide GtkTextBuffer.insert_with_tags_by_name()
@@ -1978,13 +3630,13 @@ Date: Fri Jan 28 07:20:26 2011 +0100
consistent
with the actual GTK API.
- gi/overrides/Gtk.py | 19 ++++++++++++++-----
+ gi/overrides/Gtk.py | 19 ++++++++++++++-----
tests/test_overrides.py | 4 ++--
2 files changed, 16 insertions(+), 7 deletions(-)
commit dace1a553793fb7fb054b60760f02c9e5cf00b38
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 27 13:37:18 2011 +0100
+Date: Thu Jan 27 13:37:18 2011 +0100
[gi] Support tag names in GtkTextBuffer.insert_with_tags()
@@ -1993,55 +3645,55 @@ Date: Thu Jan 27 13:37:18 2011 +0100
due to using varargs. As both are useful, support both cases in
the override.
- gi/overrides/Gtk.py | 5 +++++
+ gi/overrides/Gtk.py | 5 +++++
tests/test_overrides.py | 9 +++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
commit 91d34124b2a5128e93e13c7fee8693d5edc4e9bb
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Thu Jan 27 12:23:18 2011 +0100
+Date: Thu Jan 27 12:23:18 2011 +0100
Add MAINTAINERCLEANFILES
This var behaves like .gitignore and allows us to skip some specific
files.
- Makefile.am | 27 +++++++++++++++++++++++++++
+ Makefile.am | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
commit 8a98d26981ce68809a21c64cac4962e58c927905
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Thu Jan 27 12:15:30 2011 +0100
+Date: Thu Jan 27 12:15:30 2011 +0100
Remove .gitignore files and use git.mk
git.mk is a script maintained in pango. From time to time we must
check if it was updated and update it here.
- .gitignore | 46 ----------
- Makefile.am | 2 +
- codegen/.gitignore | 2 -
- codegen/Makefile.am | 2 +
- docs/.gitignore | 7 --
- docs/Makefile.am | 2 +
- examples/Makefile.am | 2 +
- gi/.gitignore | 40 ---------
- gi/Makefile.am | 2 +
- gi/overrides/Makefile.am | 2 +
- gi/repository/Makefile.am | 2 +
- gi/tests/Makefile.am | 2 +
- git.mk | 200
+ .gitignore | 46 ----------
+ Makefile.am | 2 +
+ codegen/.gitignore | 2 -
+ codegen/Makefile.am | 2 +
+ docs/.gitignore | 7 --
+ docs/Makefile.am | 2 +
+ examples/Makefile.am | 2 +
+ gi/.gitignore | 40 ---------
+ gi/Makefile.am | 2 +
+ gi/overrides/Makefile.am | 2 +
+ gi/repository/Makefile.am | 2 +
+ gi/tests/Makefile.am | 2 +
+ git.mk | 200
+++++++++++++++++++++++++++++++++++++++++++++
- glib/Makefile.am | 2 +
- gobject/.gitignore | 3 -
- gobject/Makefile.am | 2 +
- tests/.gitignore | 2 -
- tests/Makefile.am | 2 +
+ glib/Makefile.am | 2 +
+ gobject/.gitignore | 3 -
+ gobject/Makefile.am | 2 +
+ tests/.gitignore | 2 -
+ tests/Makefile.am | 2 +
18 files changed, 222 insertions(+), 100 deletions(-)
commit 331c42b63bc60a3b906fa21e1c0a7c1b9428f347
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 27 12:04:19 2011 +0100
+Date: Thu Jan 27 12:04:19 2011 +0100
pygi-convert.sh: Convert Pango.TabAlign.*
@@ -2050,7 +3702,7 @@ Date: Thu Jan 27 12:04:19 2011 +0100
commit be1a2959fa0a3d8682e0e8aef389d73dacab0689
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 27 12:02:39 2011 +0100
+Date: Thu Jan 27 12:02:39 2011 +0100
pygi-convert.sh: Drop window -> get_window() conversion
@@ -2062,7 +3714,7 @@ Date: Thu Jan 27 12:02:39 2011 +0100
commit dd7deb4b658c56857c26b1a278a3d688f2ea6a2a
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 27 11:58:26 2011 +0100
+Date: Thu Jan 27 11:58:26 2011 +0100
pygi-convert.sh: Don't convert self.window assignments
@@ -2071,19 +3723,19 @@ Date: Thu Jan 27 11:58:26 2011 +0100
commit 975341a26772966d4afc87a88a6a566d61237fa0
Author: Steve Frécinaux <code@istique.net>
-Date: Fri Jan 21 18:41:54 2011 +0100
+Date: Fri Jan 21 18:41:54 2011 +0100
Fix leaked python reference in python-defined subclasses
https://bugzilla.gnome.org/show_bug.cgi?id=640184
gobject/gobjectmodule.c | 1 +
- tests/test_gobject.py | 4 ++++
+ tests/test_gobject.py | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
commit a59e2d58bdb3f31a4f415dbe14b7d9988ac28ce3
Author: Steve Frécinaux <code@istique.net>
-Date: Fri Jan 21 15:54:43 2011 +0100
+Date: Fri Jan 21 15:54:43 2011 +0100
Add some tests for the number of python refs held at creation time
@@ -2094,21 +3746,21 @@ Date: Fri Jan 21 15:54:43 2011 +0100
commit 7d70105eb324ea4b6a58c2d3fb3f2dda36e7ab33
Author: Steve Frécinaux <code@istique.net>
-Date: Fri Jan 21 17:24:49 2011 +0100
+Date: Fri Jan 21 17:24:49 2011 +0100
Factor out parameter marshalling from construction functions.
https://bugzilla.gnome.org/show_bug.cgi?id=640197
- gobject/gobjectmodule.c | 35 ++-------------------
- gobject/pygobject-private.h | 5 +++
- gobject/pygobject.c | 71
+ gobject/gobjectmodule.c | 35 ++-------------------
+ gobject/pygobject-private.h | 5 +++
+ gobject/pygobject.c | 71
+++++++++++++++++++++++++-----------------
3 files changed, 50 insertions(+), 61 deletions(-)
commit a3e0cfe8924887ecd1e07cedd2cfb999c853ac62
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Jan 26 15:34:24 2011 -0500
+Date: Wed Jan 26 15:34:24 2011 -0500
[gi] in python 3 an array of uint8 can be bytes but not string
@@ -2117,22 +3769,22 @@ Date: Wed Jan 26 15:34:24 2011 -0500
commit 843553ea958eddec185bb660851a310dc050a14b
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Jan 26 15:30:06 2011 -0500
+Date: Wed Jan 26 15:30:06 2011 -0500
[gi] fix Gio.FileEnumerator to reflect the Python 3 iter protocol
- gi/overrides/Gio.py | 6 +++++-
+ gi/overrides/Gio.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
commit 6ff357839feb39930a5f3175de3d0ed35f24d3f4
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Jan 26 15:17:03 2011 -0500
+Date: Wed Jan 26 15:17:03 2011 -0500
[gi] python 3 fixes
Patches need to work in Python 3 - here are some of the issues I
fixed up.
- Patch submitters should keep this in mind. When I note to only
+ Patch submitters should keep this in mind. When I note to only
use something
in tests it means that there is a compat module that is only available
to the
@@ -2149,9 +3801,9 @@ Date: Wed Jan 26 15:17:03 2011 -0500
issue
* callable does not exist in 3.x, use hasattr(obj, '__call__') or
- if sys.version_info > (3, 0):
- def callable(obj):
- return hasattr(obj, '__call__')
+ if sys.version_info > (3, 0):
+ def callable(obj):
+ return hasattr(obj, '__call__')
* using unicode in tests is tricky, you can't use u'' even in
a versioned
@@ -2159,43 +3811,43 @@ Date: Wed Jan 26 15:17:03 2011 -0500
(and only i
in tests):
- from compathelper import _unicode
- unicode_string = _unicode('this is a unicode string')
+ from compathelper import _unicode
+ unicode_string = _unicode('this is a unicode string')
* exception caching changed in 2.7, instead of except Exception,
e we now use
except Exception as e. Do this to be compatible with older
versions:
- except Exception:
- etype, e = sys.exc_info()[:2]
+ except Exception:
+ etype, e = sys.exc_info()[:2]
* Unbound methods with an im_func attribute no longer exits in 3.x.
Unbound methods are now just functions so class.method in 3.x is
equivalent to class.method.im_func in 2.x. If you have to go this
low level do this:
- func = class1.method
- if sys.version_info < (3,0):
- func = func.im_func
+ func = class1.method
+ if sys.version_info < (3,0):
+ func = func.im_func
* all numbers are long in 3.x so 42L is invalid in 3.x. In tests (and
only in tests) do this:
- from compathelper import _long
- l = _long(42)
+ from compathelper import _long
+ l = _long(42)
- gi/overrides/GLib.py | 16 ++++++++--------
- gi/types.py | 5 ++++-
- tests/compathelper.py | 19 +++++++++++++++++++
- tests/test_gdbus.py | 12 ++++++++----
- tests/test_gi.py | 19 ++++++++++++-------
+ gi/overrides/GLib.py | 16 ++++++++--------
+ gi/types.py | 5 ++++-
+ tests/compathelper.py | 19 +++++++++++++++++++
+ tests/test_gdbus.py | 12 ++++++++----
+ tests/test_gi.py | 19 ++++++++++++-------
tests/test_overrides.py | 8 +++++---
6 files changed, 56 insertions(+), 23 deletions(-)
commit 832d662b9f90f5762bbf28b3cca73f947c1f83ce
Author: John (J5) Palmieri <johnp@redhat.com>
-Date: Wed Jan 26 14:00:08 2011 -0500
+Date: Wed Jan 26 14:00:08 2011 -0500
[gi] fix try/except blocks using depricated raise format
@@ -2205,7 +3857,7 @@ Date: Wed Jan 26 14:00:08 2011 -0500
commit d3e30e240fed6ef1dd40fd29fd13dc2effc6c7b1
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 26 19:03:48 2011 +0100
+Date: Wed Jan 26 19:03:48 2011 +0100
[gi] Add docstring to GLib.Variant constructor
@@ -2214,16 +3866,16 @@ Date: Wed Jan 26 19:03:48 2011 +0100
commit 963cd52fec26f7a4fb34414f8ac6662932ede322
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 26 18:45:38 2011 +0100
+Date: Wed Jan 26 18:45:38 2011 +0100
[gi] update gdbus test cases for previous GVariant change
- tests/test_gdbus.py | 4 ++--
+ tests/test_gdbus.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 27e3a6276ff5f2cdc03ddf69ee80d44c3bf2c094
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 26 18:39:17 2011 +0100
+Date: Wed Jan 26 18:39:17 2011 +0100
[gi] Accept only a single object in GLib.Variant constructor
@@ -2243,13 +3895,13 @@ Date: Wed Jan 26 18:39:17 2011 +0100
Thanks to Ryan Lortie for pointing this out!
- gi/overrides/GLib.py | 25 ++++++++++---------------
+ gi/overrides/GLib.py | 25 ++++++++++---------------
tests/test_overrides.py | 32 +++++++++++++-------------------
2 files changed, 23 insertions(+), 34 deletions(-)
commit b15e8e2c0c933d0f827a70280faf875ac383d81b
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Jan 26 00:40:49 2011 +0100
+Date: Wed Jan 26 00:40:49 2011 +0100
Speed up _setup_native_vfuncs()
@@ -2271,13 +3923,13 @@ Date: Wed Jan 26 00:40:49 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640629
- gi/types.py | 26 +++++++++++++-------------
+ gi/types.py | 26 +++++++++++++-------------
tests/test_gi.py | 13 +++++++++++++
2 files changed, 26 insertions(+), 13 deletions(-)
commit 569d42ac2f50fb706ef289ff631db743483f40ee
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Thu Jan 20 16:26:18 2011 +0100
+Date: Thu Jan 20 16:26:18 2011 +0100
Speed up class creation: rewrite _setup_vfuncs() to be much more
efficient.
@@ -2305,14 +3957,14 @@ Date: Thu Jan 20 16:26:18 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640073
- gi/types.py | 104
+ gi/types.py | 104
+++++++++++++++++++++++++++++++++---------------------
tests/test_gi.py | 13 +++++++
2 files changed, 77 insertions(+), 40 deletions(-)
commit 8f4e6536f3c2edf38a45632d1c23eb7c6681c3be
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Mon Jan 24 19:23:19 2011 +0100
+Date: Mon Jan 24 19:23:19 2011 +0100
pygi-convert.sh: Convert gtk.UI_MANAGER_*
@@ -2321,7 +3973,7 @@ Date: Mon Jan 24 19:23:19 2011 +0100
commit 1f473b5164407a178203eb8cc7f3c786e0d0e5c2
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Fri Jan 21 18:41:54 2011 +0100
+Date: Fri Jan 21 18:41:54 2011 +0100
pygi-convert.sh: Convert gdk.GRAB_*
@@ -2330,40 +3982,114 @@ Date: Fri Jan 21 18:41:54 2011 +0100
commit f5d0b7b9d189f65503c0bf66d8bda4186ca3223a
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Fri Jan 21 16:45:07 2011 +0100
+Date: Fri Jan 21 16:45:07 2011 +0100
[gi] set the gtype GValue correctly
- gi/pygi-property.c | 4 ++--
+ gi/pygi-property.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit ce521011d7f6d7f082aaea76fa05c5af9f6e93f5
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Fri Jan 21 16:20:23 2011 +0100
+Date: Fri Jan 21 16:20:23 2011 +0100
[gi] use the right argument type for callback
- gi/pygi-foreign-cairo.c | 8 ++++----
- gi/pygi-foreign-gvariant.c | 4 ++--
- gi/pygi-foreign-gvariant.h | 2 +-
- gi/pygi-foreign.c | 2 +-
- gi/pygi.h | 2 +-
+ gi/pygi-foreign-cairo.c | 8 ++++----
+ gi/pygi-foreign-gvariant.c | 4 ++--
+ gi/pygi-foreign-gvariant.h | 2 +-
+ gi/pygi-foreign.c | 2 +-
+ gi/pygi.h | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
+commit 9f101baaa63a75acf62f955cfc4b311ff0dd5464
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jan 21 09:23:54 2011 -0500
+
+ [gi] marshal out flags and enum
+
+ gi/pygi-argument.c | 14 +++++++++-----
+ gi/pygi-cache.c | 24 ++++++++++++------------
+ 2 files changed, 21 insertions(+), 17 deletions(-)
+
+commit 4c93bdeae76830aa4029dfc86e32e6f277d5271d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jan 21 08:18:37 2011 -0500
+
+ [gi] marshal unions
+
+ gi/pygi-cache.c | 27 +++++++++++++--------------
+ 1 files changed, 13 insertions(+), 14 deletions(-)
+
commit a060287d1a6d190acb9d344f08fd5662e3296da5
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Fri Jan 21 11:00:27 2011 +0100
+Date: Fri Jan 21 11:00:27 2011 +0100
[gi] Add test cases for GDBus client operations
- tests/Makefile.am | 1 +
- tests/test_gdbus.py | 94
+ tests/Makefile.am | 1 +
+ tests/test_gdbus.py | 94
+++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 95 insertions(+), 0 deletions(-)
+commit e7699d9af41f8c374326b8a4ec0939ef1426e386
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jan 21 04:28:15 2011 -0500
+
+ [gi] error out if the constructor returns NULL
+
+ gi/pygi-invoke.c | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 58ff2b2c38c1004861083ca88633be76767229f0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jan 21 04:26:45 2011 -0500
+
+ [gi] throw error for caller allocates until we can write code to
+ support it
+
+ gi/pygi-cache.c | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 5eb779439daa8bf1e86df689377dc10ef1430eab
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jan 21 04:26:11 2011 -0500
+
+ [gi] support struct out
+
+ gi/pygi-argument.c | 30 ++++++++++++++++++++++++++----
+ gi/pygi-cache.c | 15 ++-------------
+ 2 files changed, 28 insertions(+), 17 deletions(-)
+
+commit 3133dc595adf44279397d30712c0f8595f0e1acc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Jan 21 04:22:06 2011 -0500
+
+ [gi] move to using type_info and interface_info instead of arg_info
+
+ * only arguments have arg_infos, not return types and instances so
+ type_info is much better to pass. In fact most API that took an
+ arg_info simply converted it to a type_info
+ * In the case of instances for methods we don't even have a type_info.
+ Since all instances are interfaces, we also attach the
+ interface_info
+ to the interface cache
+
+ gi/pygi-argument.c | 20 ++++----------------
+ gi/pygi-cache.c | 43
+ ++++++++++++++++++++++++++++++++-----------
+ gi/pygi-cache.h | 4 +++-
+ gi/pygi-foreign-cairo.c | 24 ++++++++++++------------
+ gi/pygi-foreign-gvariant.c | 11 +++++------
+ gi/pygi-foreign-gvariant.h | 10 +++++-----
+ gi/pygi-foreign.c | 21 +++++++++------------
+ gi/pygi-foreign.h | 6 +++---
+ gi/pygi.h | 8 ++++----
+ 9 files changed, 77 insertions(+), 70 deletions(-)
+
commit e97e28048efb966ecc1a03277d36cbaa81b8db7d
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Fri Jan 21 09:54:14 2011 +0100
+Date: Fri Jan 21 09:54:14 2011 +0100
[gi] Add Variant construction/unpack support for boxed Variants
@@ -2372,20 +4098,20 @@ Date: Fri Jan 21 09:54:14 2011 +0100
currently does not work (see
https://bugzilla.gnome.org/show_bug.cgi?id=639952)
- gi/overrides/GLib.py | 18 +++++++++++++++++-
+ gi/overrides/GLib.py | 18 +++++++++++++++++-
tests/test_overrides.py | 26 ++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletions(-)
commit 71dd03261fc06b8180c14cd31b54d8e4b200be3a
Merge: bc29600 bd002c7
Author: Dieter Verfaillie <dieterv@optionexplicit.be>
-Date: Fri Jan 21 09:33:16 2011 +0100
+Date: Fri Jan 21 09:33:16 2011 +0100
Merge branch 'windows-setup-fixes'
commit bc29600a2a04c972ceab7ef8d3292e8633977591
Author: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
-Date: Thu Jan 20 19:48:23 2011 +0100
+Date: Thu Jan 20 19:48:23 2011 +0100
pygi-convert.sh: GdkPixbuf methods
@@ -2396,7 +4122,7 @@ Date: Thu Jan 20 19:48:23 2011 +0100
commit d1b0fa501cc431baa530d96fb50f4c35590890ac
Author: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
-Date: Thu Jan 20 19:45:01 2011 +0100
+Date: Thu Jan 20 19:45:01 2011 +0100
pygi-convert.sh: Gdk.COLORSPACE_RGB
@@ -2407,7 +4133,7 @@ Date: Thu Jan 20 19:45:01 2011 +0100
commit 6d8ff4d5bdda5480089543869535cc3ee83da2f5
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 11:41:11 2011 +0100
+Date: Wed Jan 19 11:41:11 2011 +0100
[gi] Support nested objects and empty sequences in GLib.Variant
building
@@ -2427,23 +4153,34 @@ Date: Wed Jan 19 11:41:11 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639939
- gi/overrides/GLib.py | 229
+ gi/overrides/GLib.py | 229
+++++++++++++++++++++++++----------------------
tests/test_overrides.py | 159 +++++++++++++++++++++++++++++++--
2 files changed, 273 insertions(+), 115 deletions(-)
commit ac095f5435f106e175fa3297cb273e63c85d2809
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Thu Jan 20 15:55:45 2011 +0100
+Date: Thu Jan 20 15:55:45 2011 +0100
Uncomment test_gi.TestInterfaceClash
tests/test_gi.py | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
+commit 1239f3709ba257c404dda72b7067b77b19c240fa
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jan 20 09:05:02 2011 -0500
+
+ [gi] add support for enum and flags
+
+ gi/pygi-argument.c | 121
+ ++++++++++++++++++++++++++++++++++++++++-----------
+ gi/pygi-cache.c | 30 +++++++------
+ 2 files changed, 111 insertions(+), 40 deletions(-)
+
commit f0a0b6c2eda89622de2b1e5ebb6a48103ad72a42
Author: Steve Frécinaux <code@istique.net>
-Date: Thu Jan 20 14:14:15 2011 +0100
+Date: Thu Jan 20 14:14:15 2011 +0100
Fix reference leaks for GInitiallyUnowned objects
@@ -2454,17 +4191,17 @@ Date: Thu Jan 20 14:14:15 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639949
gobject/gobjectmodule.c | 2 +
- gobject/pygobject.c | 14 +++++-----
- tests/test-floating.c | 36 ++++++++++++++++++++++++++
- tests/test-floating.h | 21 +++++++++++++++
- tests/test_gobject.py | 63
+ gobject/pygobject.c | 14 +++++-----
+ tests/test-floating.c | 36 ++++++++++++++++++++++++++
+ tests/test-floating.h | 21 +++++++++++++++
+ tests/test_gobject.py | 63
++++++++++++++++++++++++++++++++++++++++++++++
tests/testhelpermodule.c | 50 ++++++++++++++++++++++++++++++++++++
6 files changed, 179 insertions(+), 7 deletions(-)
commit cae2cf3d4fb049c94389bf8f84d7d97a544d7a3f
Author: Steve Frécinaux <code@istique.net>
-Date: Wed Jan 19 16:57:57 2011 +0100
+Date: Wed Jan 19 16:57:57 2011 +0100
Add tests for refcount of a GObject owned by a library
@@ -2474,16 +4211,16 @@ Date: Wed Jan 19 16:57:57 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639949
- tests/test-floating.c | 30 ++++++++++++++++++++++
- tests/test-floating.h | 20 +++++++++++++++
- tests/test_gobject.py | 62
+ tests/test-floating.c | 30 ++++++++++++++++++++++
+ tests/test-floating.h | 20 +++++++++++++++
+ tests/test_gobject.py | 62
++++++++++++++++++++++++++++++++++++++++++++++
tests/testhelpermodule.c | 51 +++++++++++++++++++++++++++++++++++++
4 files changed, 163 insertions(+), 0 deletions(-)
commit b6737b91938d527872eff1d645a205cacf94e15d
Author: Steve Frécinaux <code@istique.net>
-Date: Wed Jan 19 14:52:41 2011 +0100
+Date: Wed Jan 19 14:52:41 2011 +0100
Add a test to check for regular object reference count
@@ -2494,7 +4231,7 @@ Date: Wed Jan 19 14:52:41 2011 +0100
commit 2b0f1ede820414ef1cfd6b37569fcb946d2031fc
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 20 14:15:52 2011 +0100
+Date: Thu Jan 20 14:15:52 2011 +0100
[gi] Update TreeView.enable_model_drag_{source,dest} to current GTK
@@ -2504,12 +4241,12 @@ Date: Thu Jan 20 14:15:52 2011 +0100
Gtk.TreeView.enable_model_drag_{source,dest}(). Thus
drop the explicit array length argument from the call in the override.
- gi/overrides/Gtk.py | 2 --
+ gi/overrides/Gtk.py | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
commit b59edf4f0f7cab44033f9d704d476e10ee0d0c0a
Author: Steve Frécinaux <code@istique.net>
-Date: Wed Jan 19 18:04:10 2011 +0100
+Date: Wed Jan 19 18:04:10 2011 +0100
Fix a typo in a private symbol name.
@@ -2518,7 +4255,7 @@ Date: Wed Jan 19 18:04:10 2011 +0100
commit 6447688e283a8fb22de3ab68cbc06e34ad23d198
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 20 11:49:08 2011 +0100
+Date: Thu Jan 20 11:49:08 2011 +0100
pygi-convert.sh: Convert glib.source_remove()
@@ -2527,7 +4264,7 @@ Date: Thu Jan 20 11:49:08 2011 +0100
commit 84ee8de4bc00a8f901926cc6386d73c12dbd0b0b
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 20 11:42:34 2011 +0100
+Date: Thu Jan 20 11:42:34 2011 +0100
Fix typo in previous commit to actually convert glib.GError
@@ -2536,7 +4273,7 @@ Date: Thu Jan 20 11:42:34 2011 +0100
commit b238cb614338f46e6feb7935cca0a55c7a929418
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Thu Jan 20 11:40:14 2011 +0100
+Date: Thu Jan 20 11:40:14 2011 +0100
pygi-convert.sh: Move some glib bits which are better handled
by gobject
@@ -2546,7 +4283,7 @@ Date: Thu Jan 20 11:40:14 2011 +0100
commit 21c09a7ee294b59abb3eca6f64f13bf5c8a2fa0e
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Jan 19 12:00:02 2011 +0100
+Date: Wed Jan 19 12:00:02 2011 +0100
Modify override for Gtk.Adjustment to allow position or keyword
arguments in __init__().
@@ -2559,13 +4296,13 @@ Date: Wed Jan 19 12:00:02 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639934
- gi/overrides/Gtk.py | 14 ++++++++++++--
+ gi/overrides/Gtk.py | 14 ++++++++++++--
tests/test_overrides.py | 34 +++++++++++++++++++++++++++-------
2 files changed, 39 insertions(+), 9 deletions(-)
commit d465e25297ad6589ff2cd0c00e11e8bd8ffe3f78
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 22:52:51 2011 +0100
+Date: Wed Jan 19 22:52:51 2011 +0100
[gi] Fix small typo in previous commit
@@ -2580,19 +4317,39 @@ Date: Wed Jan 19 22:52:51 2011 +0100
commit 2b8e1d0531dcb8f57dc9f2fddf25970bee3daa90
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 20:18:19 2011 +0100
+Date: Wed Jan 19 20:18:19 2011 +0100
[gi] Add pythonic iterator and indexing for string GVariants
This extends commit b1a98083c to also work for strings.
- gi/overrides/GLib.py | 8 +++++++-
+ gi/overrides/GLib.py | 8 +++++++-
tests/test_overrides.py | 13 +++++++++++++
2 files changed, 20 insertions(+), 1 deletions(-)
+commit 8efd14c87b35072cdd039bf223f8ced8f51be9bb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 14:08:03 2011 -0500
+
+ [gi] return NULL if out_marshaller fails
+
+ gi/pygi-invoke.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 5b1db41d60204c8021f47f43b85dac126c389c8d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 13:57:54 2011 -0500
+
+ [gi] fix some transfer issues and test case failures
+
+ gi/pygi-argument.c | 4 ++++
+ gi/pygi-cache.c | 11 ++++++++---
+ gi/pygi-invoke.c | 17 +++++++++--------
+ 3 files changed, 21 insertions(+), 11 deletions(-)
+
commit 7c2f48bb6d67ec9a1ee5ac03a5aee34b54c6ebdd
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Wed Jan 19 18:09:23 2011 +0100
+Date: Wed Jan 19 18:09:23 2011 +0100
Construct structs using default API constructor
@@ -2603,12 +4360,12 @@ Date: Wed Jan 19 18:09:23 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=627444
gi/pygi-info.c | 37 +++++++++++++++++++++++++++++++++++++
- gi/types.py | 7 +++++++
+ gi/types.py | 7 +++++++
2 files changed, 44 insertions(+), 0 deletions(-)
commit db7300e173388d9557dcd2333781bfaa6b021605
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 18:54:39 2011 +0100
+Date: Wed Jan 19 18:54:39 2011 +0100
pygi-convert.sh: Migrate Gdk.Cursor constructor, and some cursor names
@@ -2617,7 +4374,7 @@ Date: Wed Jan 19 18:54:39 2011 +0100
commit 4c1d4faddf1c9cb233c484da3eadd8e31c231f70
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 18:43:29 2011 +0100
+Date: Wed Jan 19 18:43:29 2011 +0100
pygi-convert.sh: Handle .window attributes
@@ -2630,7 +4387,7 @@ Date: Wed Jan 19 18:43:29 2011 +0100
commit b1049b947d073fb569ba900a4d5c8519482d831e
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Wed Jan 19 17:35:09 2011 +0100
+Date: Wed Jan 19 17:35:09 2011 +0100
Also deal with foreign boxed structs
@@ -2638,12 +4395,12 @@ Date: Wed Jan 19 17:35:09 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639967
- gi/pygi-argument.c | 4 ++--
+ gi/pygi-argument.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 25b69ae257a12b6dc97ed3f2f7ea54b166ddbba1
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Jan 19 17:45:11 2011 +0100
+Date: Wed Jan 19 17:45:11 2011 +0100
[gi] Convert GErrors to GObject.GError exceptions, and throw them
upon returning from calling the C function.
@@ -2663,9 +4420,31 @@ Date: Wed Jan 19 17:45:11 2011 +0100
tests/test_gi.py | 10 ++++++++++
3 files changed, 15 insertions(+), 10 deletions(-)
+commit 18b84767db1d66e3d6f09067ab19ffd4b82539ca
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 12:05:45 2011 -0500
+
+ [gi] fix out marshalling for a couple of int types
+
+ gi/pygi-argument.c | 2 +-
+ gi/pygi-cache.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c5d7c730008275b2c585b2609fc2ff5e051cce47
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 11:59:09 2011 -0500
+
+ [gi] fixed range checking and type conversion with unsigned and
+ large numbers
+
+ gi/pygi-argument.c | 90
+ +++++++++++++++++++++++++++++++++++++++++++---------
+ gi/pygi-cache.c | 2 +-
+ 2 files changed, 76 insertions(+), 16 deletions(-)
+
commit e6fcafc6179e963cbae7774e7ee50415bde2c523
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 17:03:06 2011 +0100
+Date: Wed Jan 19 17:03:06 2011 +0100
pygi-convert.sh: Don't convert glib -> GLib for now
@@ -2683,7 +4462,7 @@ Date: Wed Jan 19 17:03:06 2011 +0100
commit 167261d556eab0d2e448c7ed28eef540a024ba1d
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Wed Jan 19 16:47:08 2011 +0100
+Date: Wed Jan 19 16:47:08 2011 +0100
Link libregress.so to GIO_LIBS again
@@ -2692,7 +4471,7 @@ Date: Wed Jan 19 16:47:08 2011 +0100
commit d143afa6da4f5b5f47be8df11fa41d7b47ab1794
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Wed Jan 19 16:14:42 2011 +0100
+Date: Wed Jan 19 16:14:42 2011 +0100
Fix attributes 2BUTTON_PRESS and 3BUTTON_PRESS of Gdk.EventType.
@@ -2700,30 +4479,88 @@ Date: Wed Jan 19 16:14:42 2011 +0100
because in Python attributes starting with a numeral causes a
syntax error.
- gi/overrides/Gdk.py | 7 +++++--
+ gi/overrides/Gdk.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
+commit 4f5d20966d4a8c649e5fae584039621edab178f3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 10:02:40 2011 -0500
+
+ [gi] use correct format stings when setting errors
+
+ gi/pygi-argument.c | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 7f08fd5c33ee5c9907f5becbe2f21fb7122d6e19
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 09:45:09 2011 -0500
+
+ [gi] allow marshalling strings as None
+
+ gi/pygi-argument.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 093242a9e125998cd07bf66fc4b2880f532a2e4d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 09:41:56 2011 -0500
+
+ [gi] make error messages more detailed
+
+ gi/pygi-argument.c | 2 +-
+ gi/pygi-cache.c | 18 +++++++++---------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+commit f0b17605ed2eb917b350654b070984beb553eae3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 09:41:13 2011 -0500
+
+ [gi] allow marshalling None for hashes
+
+ gi/pygi-argument.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 93f1b787ab8420300d1064c0237a0c2d8a2ac98f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 09:40:37 2011 -0500
+
+ [gi] add marshalling to some out values
+
+ gi/pygi-argument.c | 50
+ +++++++++++++++++++++++++++++++++++++++++---------
+ 1 files changed, 41 insertions(+), 9 deletions(-)
+
commit 614b6ca7f45c4acbee088fe74fecf279ed50cc0c
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Wed Jan 19 15:27:33 2011 +0100
+Date: Wed Jan 19 15:27:33 2011 +0100
[gi] Fixed typo in exception
- gi/overrides/Gtk.py | 2 +-
+ gi/overrides/Gtk.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
+commit 5f16df31b5a5a9f45f702eee48c3a18899ea3f71
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 09:13:44 2011 -0500
+
+ [gi] fix marshalling structs
+
+ gi/pygi-argument.c | 47 +++++++++++++++++++++++++++++++++++------------
+ gi/pygi-foreign.c | 18 ++++++++++++------
+ gi/pygi-foreign.h | 8 ++++----
+ 3 files changed, 51 insertions(+), 22 deletions(-)
+
commit b2189424f9dd6d3a4a5b9792f0d5843fc27657d1
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Wed Jan 19 15:12:25 2011 +0100
+Date: Wed Jan 19 15:12:25 2011 +0100
[gi] Enable handling of Gdk.EventType.2BUTTON_PRESS and 3BUTTON_PRESS
- gi/overrides/Gdk.py | 4 ++--
+ gi/overrides/Gdk.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
commit 5eca5ff2c9509ec96158fe43b29f0fd951243efe
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Wed Jan 19 14:54:57 2011 +0100
+Date: Wed Jan 19 14:54:57 2011 +0100
Revert "Fix Pango FontDescription override"
@@ -2741,91 +4578,132 @@ Date: Wed Jan 19 14:54:57 2011 +0100
This reverts commit 8878c57676091c08e66bc6cbe735d898cb420582.
- gi/overrides/Pango.py | 5 ++++-
+ gi/overrides/Pango.py | 5 ++++-
tests/test_overrides.py | 5 +++++
2 files changed, 9 insertions(+), 1 deletions(-)
commit 9e7b95b3676a1b502662523a9bd4ebe40ccb4845
Author: Tony Young <rofflwaffls@gmail.com>
-Date: Thu Dec 16 23:39:33 2010 +0000
+Date: Thu Dec 16 23:39:33 2010 +0000
Python iterator interface support for GFileEnumerator.
- gi/overrides/Gio.py | 41 +++++++++++++++++++++++++++++++++++++++++
+ gi/overrides/Gio.py | 41 +++++++++++++++++++++++++++++++++++++++++
gi/overrides/Makefile.am | 1 +
tests/test_overrides.py | 20 ++++++++++++++++++++
3 files changed, 62 insertions(+), 0 deletions(-)
commit bca5834fc8fa342149e0eec7b396877a2abe6d33
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Fri Jan 7 12:10:37 2011 +0100
+Date: Fri Jan 7 12:10:37 2011 +0100
Remove gio static bindings
https://bugzilla.gnome.org/show_bug.cgi?id=638899
- Makefile.am | 2 +-
- configure.ac | 25 -
- gio/.gitignore | 3 -
- gio/Makefile.am | 117 -
- gio/__init__.py | 40 -
- gio/gappinfo.override | 213 --
+ Makefile.am | 2 +-
+ configure.ac | 25 -
+ gio/.gitignore | 3 -
+ gio/Makefile.am | 117 -
+ gio/__init__.py | 40 -
+ gio/gappinfo.override | 213 --
gio/gapplaunchcontext.override | 99 -
gio/gbufferedinputstream.override | 70 -
- gio/gcancellable.override | 38 -
- gio/gdatainputstream.override | 250 --
- gio/gdrive.override | 347 --
- gio/gfile.override | 2215 -----------
- gio/gfileattribute.override | 153 -
- gio/gfileenumerator.override | 184 -
- gio/gfileinfo.override | 121 -
- gio/gfileinputstream.override | 68 -
- gio/gfileiostream.override | 68 -
+ gio/gcancellable.override | 38 -
+ gio/gdatainputstream.override | 250 --
+ gio/gdrive.override | 347 --
+ gio/gfile.override | 2215 -----------
+ gio/gfileattribute.override | 153 -
+ gio/gfileenumerator.override | 184 -
+ gio/gfileinfo.override | 121 -
+ gio/gfileinputstream.override | 68 -
+ gio/gfileiostream.override | 68 -
gio/gfileoutputstream.override | 68 -
- gio/gicon.override | 310 --
- gio/ginputstream.override | 344 --
- gio/gio-types.defs | 807 ----
- gio/gio.defs | 7465
+ gio/gicon.override | 310 --
+ gio/ginputstream.override | 344 --
+ gio/gio-types.defs | 807 ----
+ gio/gio.defs | 7465
-------------------------------------
- gio/gio.override | 409 --
- gio/giomodule.c | 208 -
- gio/giostream.override | 68 -
+ gio/gio.override | 409 --
+ gio/giomodule.c | 208 -
+ gio/giostream.override | 68 -
gio/gmemoryinputstream.override | 91 -
gio/gmemoryoutputstream.override | 45 -
- gio/gmount.override | 454 ---
- gio/goutputstream.override | 292 --
- gio/gresolver.override | 312 --
- gio/gsocket.override | 575 ---
- gio/gvolume.override | 237 --
- gio/gvolumemonitor.override | 94 -
- gio/pygio-utils.c | 236 --
- gio/pygio-utils.h | 49 -
- gio/unix-types.defs | 55 -
- gio/unix.defs | 475 ---
- gio/unix.override | 62 -
- gio/unixmodule.c | 52 -
- tests/Makefile.am | 9 -
- tests/runtests-windows.py | 3 -
- tests/test_gcancellable.py | 15 -
- tests/test_gicon.py | 112 -
- tests/test_gio.py | 1138 ------
- tests/test_gresolver.py | 68 -
- tests/test_gsocket.py | 126 -
+ gio/gmount.override | 454 ---
+ gio/goutputstream.override | 292 --
+ gio/gresolver.override | 312 --
+ gio/gsocket.override | 575 ---
+ gio/gvolume.override | 237 --
+ gio/gvolumemonitor.override | 94 -
+ gio/pygio-utils.c | 236 --
+ gio/pygio-utils.h | 49 -
+ gio/unix-types.defs | 55 -
+ gio/unix.defs | 475 ---
+ gio/unix.override | 62 -
+ gio/unixmodule.c | 52 -
+ tests/Makefile.am | 9 -
+ tests/runtests-windows.py | 3 -
+ tests/test_gcancellable.py | 15 -
+ tests/test_gicon.py | 112 -
+ tests/test_gio.py | 1138 ------
+ tests/test_gresolver.py | 68 -
+ tests/test_gsocket.py | 126 -
46 files changed, 1 insertions(+), 18191 deletions(-)
+commit 6ab3d8d286573289cf8e41eee31eb806621f6f43
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 07:56:16 2011 -0500
+
+ [gi] switch from using (*arg). to arg-> when referencing union
+ memebers
+
+ gi/pygi-argument.c | 54
+ ++++++++++++++++++++++++++--------------------------
+ 1 files changed, 27 insertions(+), 27 deletions(-)
+
+commit 762ccb3d2620ea22023446b6ae79f3a111d8b56a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 07:49:52 2011 -0500
+
+ [gi] return FALSE when setting errors in the marshaller
+
+ gi/pygi-argument.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit cbaba6357937cbed3ebd34d2db1cdd59d37df118
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 07:14:18 2011 -0500
+
+ [gi] do arg counting in new invoke
+
+ gi/pygi-cache.c | 2 ++
+ gi/pygi-cache.h | 14 ++++++++------
+ gi/pygi-invoke-state-struct.h | 2 +-
+ gi/pygi-invoke.c | 20 +++++++++++++++++++-
+ 4 files changed, 30 insertions(+), 8 deletions(-)
+
+commit f45033858bed70d7defec3f71f26aa5b3999d680
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 19 06:35:45 2011 -0500
+
+ [gi] set length for uint8 in arrays in new invoke marshaller
+
+ gi/pygi-argument.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
commit 09f7ca7e2378e6679002677ac3f4802f4cc7d9d5
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Wed Jan 19 12:04:15 2011 +0100
+Date: Wed Jan 19 12:04:15 2011 +0100
[gi] set length when marshalling guint8 erases
- gi/pygi-argument.c | 1 +
- tests/test_gi.py | 4 ++++
+ gi/pygi-argument.c | 1 +
+ tests/test_gi.py | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
commit 22eee43e50a150ace80694213fb87be9f0c72f51
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Wed Jan 19 10:27:47 2011 +0100
+Date: Wed Jan 19 10:27:47 2011 +0100
Convert Gdk.Pixbuf to GdkPixbuf.Pixbuf
@@ -2834,7 +4712,7 @@ Date: Wed Jan 19 10:27:47 2011 +0100
commit a4b210d69c832629894090b7154ae194209b0c60
Author: Arnaud Charlet <charlet@adacore.com>
-Date: Tue Jan 18 18:31:29 2011 +0100
+Date: Tue Jan 18 18:31:29 2011 +0100
Disable calls to PyGILState_* when threads are disabled
@@ -2844,13 +4722,24 @@ Date: Tue Jan 18 18:31:29 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=374603
- glib/pyglib.c | 12 ++++++++++++
- gobject/pygobject-private.h | 6 ++++++
+ glib/pyglib.c | 12 ++++++++++++
+ gobject/pygobject-private.h | 6 ++++++
2 files changed, 18 insertions(+), 0 deletions(-)
+commit 329afb6fb1b3c325a6a9de2b6aca91c64d51dd9f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 18 12:31:57 2011 -0500
+
+ [gi] fix handling of garrays vs c arrays
+
+ gi/pygi-argument.c | 9 +++++++--
+ gi/pygi-cache.c | 2 ++
+ gi/pygi-cache.h | 1 +
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
commit a000627ec3904b9414ce375aec8d144fc0c26248
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 18:29:50 2011 +0100
+Date: Tue Jan 18 18:29:50 2011 +0100
pygi-convert.sh: Do not comment out set_cell_data_func() calls;
these should be ported properly
@@ -2860,7 +4749,7 @@ Date: Tue Jan 18 18:29:50 2011 +0100
commit 99ff4610fb5ece2fc8d2f9eba13e661968adf3f0
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 18:26:01 2011 +0100
+Date: Tue Jan 18 18:26:01 2011 +0100
pygi-convert.sh: Fix match for adding missing imports
@@ -2869,7 +4758,7 @@ Date: Tue Jan 18 18:26:01 2011 +0100
commit 3aa95011fad67df20370e92bf25236a34d7d08d3
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 18:09:30 2011 +0100
+Date: Tue Jan 18 18:09:30 2011 +0100
pygi-convert.sh: Fix Gtk.Label handling to be idempotent
@@ -2881,18 +4770,45 @@ Date: Tue Jan 18 18:09:30 2011 +0100
pygi-convert.sh | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
+commit f66051380c0432bf142774542ade2144adcd455e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 18 11:44:27 2011 -0500
+
+ [gi] use correct union memeber when marshalling floats
+
+ gi/pygi-argument.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
commit 36bc1c17e7d4189059337cc6a73c64edd819ec12
Author: Laszlo Pandy <lpandy@src.gnome.org>
-Date: Tue Jan 18 17:29:52 2011 +0100
+Date: Tue Jan 18 17:29:52 2011 +0100
Remove trailing whitespace from gi/overrides/Gtk.py
- gi/overrides/Gtk.py | 10 +++++-----
+ gi/overrides/Gtk.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
+commit 1006df1929a667716c25e74b35b8f14643358732
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 18 11:24:06 2011 -0500
+
+ [gi] fix constructor invoking and add some support for interface
+ out values
+
+ * constructors are now simplified and are treated like normal
+ static methods
+ which happen to return an instance
+
+ gi/pygi-argument.c | 8 +--
+ gi/pygi-cache.c | 132
+ ++++++++++++++++++++++++++++++++++++++++++++++++++--
+ gi/pygi-invoke.c | 9 ++--
+ gi/types.py | 21 ++------
+ 4 files changed, 142 insertions(+), 28 deletions(-)
+
commit 8878c57676091c08e66bc6cbe735d898cb420582
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 16:47:10 2011 +0100
+Date: Tue Jan 18 16:47:10 2011 +0100
Fix Pango FontDescription override
@@ -2907,36 +4823,50 @@ Date: Tue Jan 18 16:47:10 2011 +0100
commit efbbe71634037fa100b17327389b883b259cca54
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 16:23:39 2011 +0100
+Date: Tue Jan 18 16:23:39 2011 +0100
tests: Respect existing $GI_TYPELIB_PATH
This allows us to run the test suite against local typelibs.
- tests/Makefile.am | 2 +-
+ tests/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
+commit c96ca383350e5b9b079d9a86464922314939c006
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 18 07:16:40 2011 -0500
+
+ [gi] fix aux value offsets for methods and element size crashers
+
+ * if the callable is a method we need to add 1 to the aux index
+ for in values so we grab the right argument cache
+ * use _pygi_g_type_info_size instead of _pygi_g_type_tag_size to
+ support all types
+
+ gi/pygi-cache.c | 42 ++++++++++++++++++++++++------------------
+ 1 files changed, 24 insertions(+), 18 deletions(-)
+
commit f56d85a7f39c2088bf9fd50b1b1e5b67c03104d3
Merge: 84d6142 7d997b6
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Tue Jan 18 13:14:45 2011 +0100
+Date: Tue Jan 18 13:14:45 2011 +0100
Merge branch 'value'
commit 7d997b6fe88343776c4d67a9f3437ba0c4122da0
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Tue Jan 18 13:12:36 2011 +0100
+Date: Tue Jan 18 13:12:36 2011 +0100
GTK overrides: Do type conversion to column types of ListStore and
TreeStore in set_value
- gi/overrides/Gtk.py | 28 ++++++++++++++++++----------
+ gi/overrides/Gtk.py | 28 ++++++++++++++++++----------
tests/test_overrides.py | 12 +++++++++++-
2 files changed, 29 insertions(+), 11 deletions(-)
commit 84d6142c14a7ebfb7284d3db52e14d3393f93905
Author: Steve Frécinaux <code@istique.net>
-Date: Mon Jan 17 18:57:58 2011 +0100
+Date: Mon Jan 17 18:57:58 2011 +0100
Always register a new GType when a GObject class is subclassed
@@ -2954,13 +4884,13 @@ Date: Mon Jan 17 18:57:58 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=543056
- gobject/__init__.py | 6 +++---
- tests/test_gi.py | 21 ++-------------------
+ gobject/__init__.py | 6 +++---
+ tests/test_gi.py | 21 ++-------------------
2 files changed, 5 insertions(+), 22 deletions(-)
commit 30750ccef31e6c864628f418fc00e8c573d29a1b
Author: Simon van der Linden <svdlinden@gnome.org>
-Date: Tue Jan 18 12:57:13 2011 +0100
+Date: Tue Jan 18 12:57:13 2011 +0100
Raise required versions of GLib and GObject-Introspection
@@ -2971,7 +4901,7 @@ Date: Tue Jan 18 12:57:13 2011 +0100
commit 761e98d32729f5894f4c75a54c65ed11329dc9d5
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 12:52:32 2011 +0100
+Date: Tue Jan 18 12:52:32 2011 +0100
pygi-convert.sh: Handle keysyms
@@ -2980,7 +4910,7 @@ Date: Tue Jan 18 12:52:32 2011 +0100
commit d62cdfa38a675c1daf3bc12d5cd769434eea5dc8
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 12:14:09 2011 +0100
+Date: Tue Jan 18 12:14:09 2011 +0100
GLib overrides: Add test case for array variant building
@@ -2989,7 +4919,7 @@ Date: Tue Jan 18 12:14:09 2011 +0100
commit 69a78307f3762e3f54d28d98514cec7d31ff20db
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Tue Jan 18 10:21:03 2011 +0100
+Date: Tue Jan 18 10:21:03 2011 +0100
Remove cairo.RectangleInt from the foreign module
@@ -3001,7 +4931,7 @@ Date: Tue Jan 18 10:21:03 2011 +0100
commit 017680c9a5e163021628bf29543598861a3b600a
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-Date: Tue Jan 18 10:20:25 2011 +0100
+Date: Tue Jan 18 10:20:25 2011 +0100
Dont try to guess the transfer if its a boxed
@@ -3012,16 +4942,16 @@ Date: Tue Jan 18 10:20:25 2011 +0100
commit 771ef76574690eb98926249f38661d741d1ebbb0
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Tue Jan 18 12:02:01 2011 +0100
+Date: Tue Jan 18 12:02:01 2011 +0100
The tags can be Empty not None.
- gi/overrides/Gtk.py | 2 +-
+ gi/overrides/Gtk.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit b1a98083cdc50653e1d7bfb809bdf089f833df3d
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 12:01:28 2011 +0100
+Date: Tue Jan 18 12:01:28 2011 +0100
Add Pythonic iterators and indexing to GVariant
@@ -3031,14 +4961,14 @@ Date: Tue Jan 18 12:01:28 2011 +0100
Add corresponding test cases.
- gi/overrides/GLib.py | 50 ++++++++++++++++++++++++++++++++++++++++++
+ gi/overrides/GLib.py | 50 ++++++++++++++++++++++++++++++++++++++++++
tests/test_overrides.py | 55
+++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+), 0 deletions(-)
commit ecb9f824c503c529d43e585b4cdb4c1c9ab14593
Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Tue Jan 18 10:48:03 2011 +0100
+Date: Tue Jan 18 10:48:03 2011 +0100
Add GLib.Variant.unpack()
@@ -3050,39 +4980,39 @@ Date: Tue Jan 18 10:48:03 2011 +0100
Add appropriate test case.
- gi/overrides/GLib.py | 45
+ gi/overrides/GLib.py | 45
+++++++++++++++++++++++++++++++++++++++++++++
tests/test_overrides.py | 33 ++++++++++++++++++++++++++++++++-
2 files changed, 77 insertions(+), 1 deletions(-)
commit 31c73dee34a52fd22b5ff3a23adce92cea5ddc3d
Author: Ignacio Casal Quinteiro <icq@gnome.org>
-Date: Tue Jan 18 10:56:18 2011 +0100
+Date: Tue Jan 18 10:56:18 2011 +0100
Add override for gtk_text_buffer_insert_with_tags
- gi/overrides/Gtk.py | 12 ++++++++++++
+ gi/overrides/Gtk.py | 12 ++++++++++++
tests/test_overrides.py | 6 ++++++
2 files changed, 18 insertions(+), 0 deletions(-)
commit fc7d7f7f153d57ff3866b7bfd5e6479d702cc4d9
Author: Simon van der Linden <svdlinden@gnome.org>
-Date: Mon Jan 17 14:35:14 2011 +0100
+Date: Mon Jan 17 14:35:14 2011 +0100
Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES
https://bugzilla.gnome.org/show_bug.cgi?id=620215
- gi/Makefile.am | 6 ++++--
- gio/Makefile.am | 2 +-
- glib/Makefile.am | 2 +-
- m4/python.m4 | 7 +++++--
- tests/Makefile.am | 2 +-
+ gi/Makefile.am | 6 ++++--
+ gio/Makefile.am | 2 +-
+ glib/Makefile.am | 2 +-
+ m4/python.m4 | 7 +++++--
+ tests/Makefile.am | 2 +-
5 files changed, 12 insertions(+), 7 deletions(-)
commit bceec758b27e6c396d17a79424633b5dc9116f54
Author: Simon van der Linden <svdlinden@gnome.org>
-Date: Mon Jan 17 14:20:55 2011 +0100
+Date: Mon Jan 17 14:20:55 2011 +0100
Kill JD_CHECK_PYTHON_HEADERS
@@ -3096,7 +5026,7 @@ Date: Mon Jan 17 14:20:55 2011 +0100
commit e2dea065da94d17a915abe1ce4671b1dc48e02c0
Author: Sebastian Pölsterl <sebp@k-d-w.org>
-Date: Mon Jan 17 19:09:27 2011 +0100
+Date: Mon Jan 17 19:09:27 2011 +0100
Revert "Override Gtk.Box.pack_start and pack_end to set default
values to be compliant with pygtk"
@@ -3143,6 +5073,19 @@ Date: Mon Jan 17 18:54:10 2011 +0100
pygi-convert.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
+commit 0586a83212a9f9234fe00659ae744ab04e7ccc67
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jan 17 12:31:03 2011 -0500
+
+ support callbacks
+
+ gi/pygi-argument.c | 68 ++++++++++++++++++++++++++++++++++++++++++--
+ gi/pygi-cache.c | 80
+ +++++++++++++++++++++++++++++++++++++++------------
+ gi/pygi-cache.h | 13 +++++++-
+ gi/pygi-invoke.c | 2 +-
+ 4 files changed, 138 insertions(+), 25 deletions(-)
+
commit 914d3a0a29680f4d3aa0e1f8afdd625b017b013a
Author: Sebastian Pölsterl <sebp@k-d-w.org>
Date: Mon Jan 17 16:57:53 2011 +0100
@@ -3426,6 +5369,29 @@ Date: Sat Jan 15 11:17:09 2011 -0600
pygi-convert.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
+commit 9be0f1f2dfb89150faf1827ef482feea03645149
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jan 13 23:56:19 2011 -0500
+
+ [gi] implement aux arg handling for array lengths
+
+ gi/pygi-argument.c | 8 ++++++++
+ gi/pygi-cache.c | 36 ++++++++++++++++++++++++++++--------
+ gi/pygi-cache.h | 1 -
+ gi/pygi-invoke.c | 8 ++++++--
+ 4 files changed, 42 insertions(+), 11 deletions(-)
+
+commit cfca2f0a53a5c29f543875ca4cb83a2e18d3bc72
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jan 13 21:07:25 2011 -0500
+
+ [gi] marshal in hashes
+
+ gi/pygi-argument.c | 93 ++++++++++++++++++++++++++++++++++++++-
+ gi/pygi-cache.c | 122
+ ++++++++++++++++++++++++++++++++++++---------------
+ 2 files changed, 176 insertions(+), 39 deletions(-)
+
commit c36fbf4918c8557a8e274a12004a412da3b22b2c
Author: Laszlo Pandy <git@laszlopandy.com>
Date: Tue Jan 11 21:41:47 2011 +0100
@@ -3457,6 +5423,52 @@ Date: Thu Jan 13 00:02:20 2011 +0100
pygi-convert.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
+commit e9166ba5d19f2b586f65a3b83a671a5afd486d8f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 12 16:50:30 2011 -0500
+
+ [gi] support for GList and GSList in
+
+ gi/pygi-argument.c | 122
+ +++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 116 insertions(+), 6 deletions(-)
+
+commit 9baf3240fbac103823ad0feaaf1c82e46d276722
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 12 16:24:17 2011 -0500
+
+ [gi] handle allow_none for all args
+
+ gi/pygi-cache.c | 3 ++-
+ gi/pygi-cache.h | 1 +
+ gi/pygi-invoke.c | 7 +++++++
+ 3 files changed, 10 insertions(+), 1 deletions(-)
+
+commit d54d12c66226910952b0dc44c8d9514a7edaa6f2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Wed Jan 12 16:23:02 2011 -0500
+
+ [gi] fix marshalling fixed arrays
+
+ * get the correct item_size and pass the GArray data not the GArray
+
+ gi/pygi-argument.c | 39 ++++++++++++++++++++++-----------------
+ gi/pygi-cache.c | 3 ++-
+ 2 files changed, 24 insertions(+), 18 deletions(-)
+
+commit 3b0eff80d2ee35e0417476f0a170b9e178e3d1ee
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 11 17:20:43 2011 -0500
+
+ [gi] implement out arg handling
+
+ gi/pygi-argument.c | 43 +++++++++--------------------------
+ gi/pygi-cache.c | 22 ++++++++++++++----
+ gi/pygi-invoke-state-struct.h | 13 ++++++++++
+ gi/pygi-invoke.c | 50
+ +++++++++++++++++++++++++++++++++++++++-
+ 4 files changed, 89 insertions(+), 39 deletions(-)
+
commit bd002c72675d35b5e60ab773181e7c36c30d2625
Author: Dieter Verfaillie <dieterv@optionexplicit.be>
Date: Tue Jan 11 22:21:18 2011 +0100
@@ -3475,6 +5487,33 @@ Date: Tue Jan 11 22:19:18 2011 +0100
setup.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
+commit c5c149be171895d292852df364541f14f0ec423a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 11 15:39:09 2011 -0500
+
+ [gi] implemented return marshalling and started on out marshalling
+
+ gi/pygi-argument.c | 387
+ +++++++++++++++++++++++++++++++++++++++++++++++++++-
+ gi/pygi-argument.h | 117 ++++++++++++++++
+ gi/pygi-cache.c | 316 ++++++++++++++++++++++++++++++++++++++++++-
+ gi/pygi-cache.h | 8 +-
+ gi/pygi-invoke.c | 12 ++-
+ 5 files changed, 829 insertions(+), 11 deletions(-)
+
+commit 4fcca8518774ab89607196dfc52037e3da30ac8a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 11 13:49:58 2011 -0500
+
+ [gi] flesh out interface in marshalling a bit more
+
+ gi/pygi-argument.c | 74
+ +++++++++++++++++++++++++++++++++++++++---------
+ gi/pygi-cache.c | 79
+ ++++++++++++++++++++++++++++++++++++++++-----------
+ gi/pygi-cache.h | 1 +
+ 3 files changed, 123 insertions(+), 31 deletions(-)
+
commit 4992dca9f5cea68d85eb2ed86105c9c6b8311d79
Author: Laszlo Pandy <laszlok2@gmail.com>
Date: Tue Jan 11 19:30:38 2011 +0100
@@ -3527,6 +5566,123 @@ Date: Tue Jan 11 19:26:50 2011 +0100
gi/module.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
+commit 369a75ba5fb64ff7a7c95d21f8bfe359e639e9ff
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jan 10 17:55:03 2011 -0500
+
+ [gi] add object and interface in marshalling
+
+ * also remove the PyGIArgCleanup sinature as GDestroyNotify works
+ just fine
+
+ gi/pygi-argument.c | 15 +++-
+ gi/pygi-cache.c | 182
+ +++++++++++++++++++++++++++++++++++++++++++++++-----
+ gi/pygi-cache.h | 1 -
+ gi/pygi-invoke.c | 1 +
+ 4 files changed, 178 insertions(+), 21 deletions(-)
+
+commit 88531c58d0491a31dd319387237a03df5c9edc07
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jan 10 15:33:56 2011 -0500
+
+ [gi] fix casting when marshaling a char to uint8
+
+ gi/pygi-argument.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 441da4a7346ca059630dbc820c5b46e4d0222f4b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Mon Jan 10 15:07:16 2011 -0500
+
+ [gi] hook up invoke to the cache
+
+ * We now can invoke with in values
+ * out, constructors and returns still don't work along with numerous
+ complex
+ in types
+
+ gi/Makefile.am | 1 +
+ gi/pygi-argument.c | 60 +++++++++--------
+ gi/pygi-argument.h | 60 ++++++++--------
+ gi/pygi-cache.h | 6 +-
+ gi/pygi-invoke-state-struct.h | 26 +++++++
+ gi/pygi-invoke.c | 149
+ +++++++++++++++++++++++++++++++---------
+ gi/pygi-invoke.h | 2 +-
+ gi/pygi-private.h | 1 +
+ 8 files changed, 208 insertions(+), 97 deletions(-)
+
+commit f32b1f494aa5d09b9b198f607722c819c6bbd808
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 9 19:37:55 2011 -0500
+
+ hooked up caching stage and fixed segfaults
+
+ * caching stage is hooked up but not used yet
+ * throws exceptions for everything that can not be cached yet
+
+ gi/pygi-cache.c | 59
+ ++++++++++++++++++++++++++++++++++++++++++-----------
+ gi/pygi-info.c | 3 ++
+ gi/pygi-invoke.c | 5 ++++
+ gi/pygi.h | 2 +
+ 4 files changed, 56 insertions(+), 13 deletions(-)
+
+commit c2bf1d4d9cf2e9f8e313528fe717f6279dad5da1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 9 18:05:31 2011 -0500
+
+ [gi] fix some function names
+
+ gi/pygi-cache.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 2ec4230a5180f048c26c2e4234b2a098d42f030b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sun Jan 9 15:58:06 2011 -0500
+
+ [gi] refactor cache structs so they inherit from ArgCache
+
+ gi/pygi-argument.c | 122 ++++++++++---------
+ gi/pygi-cache.c | 344
+ ++++++++++++++++++++++++++++------------------------
+ gi/pygi-cache.h | 50 ++++----
+ 3 files changed, 273 insertions(+), 243 deletions(-)
+
+commit f4cdf0c0321285da015686fcb7115bd91bfd5c7c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Jan 8 20:45:11 2011 -0500
+
+ [gi]fix cache compile error - now compiles but cache still not
+ hooked up
+
+ gi/Makefile.am | 2 +
+ gi/pygi-argument.c | 100 +++++++++++++++---------------
+ gi/pygi-argument.h | 174
+ +++++++++++++++++++++++++++++++++++++++++++---------
+ gi/pygi-cache.c | 169
+ ++++++++++++++++++++++++--------------------------
+ gi/pygi-cache.h | 25 ++++---
+ 5 files changed, 293 insertions(+), 177 deletions(-)
+
+commit 5f8f3044dd8085b2e8ce0bf70e9d52f05abf909d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Sat Jan 8 19:10:29 2011 -0500
+
+ add sequence caching and array marshalling w/ item marshalling
+
+ * simplify what we pass into the arg cache generators so we may
+ use them
+ for geneating marshalling caches for container items, not just
+ arguments
+
+ gi/pygi-argument.c | 76 ++++++++++++++++-
+ gi/pygi-cache.c | 242
+ ++++++++++++++++++++++------------------------------
+ gi/pygi-cache.h | 4 +-
+ 3 files changed, 175 insertions(+), 147 deletions(-)
+
commit 202a268db7f98f5a3c525c6e65ec4bff1917257e
Author: Emilio Pozuelo Monfort <pochu27@gmail.com>
Date: Sat Jan 8 02:19:52 2011 +0000
@@ -3592,6 +5748,45 @@ Date: Fri Jan 7 09:07:35 2011 +0100
gi/pygi-argument.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
+commit 43849c51391fc9cd239697065c3d40fa02fb6783
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jan 6 17:30:14 2011 -0500
+
+ whitespace fixes
+
+ gi/pygi-cache.c | 24 ++++++++++++------------
+ gi/pygi-cache.h | 42 +++++++++++++++++++++---------------------
+ 2 files changed, 33 insertions(+), 33 deletions(-)
+
+commit 8b5b3d2bbbbdf5d26c83e9a6fe67121cbd77ebe1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Thu Jan 6 17:29:00 2011 -0500
+
+ add marshalling for basic types and add more skeleton code
+
+ * still doesn't compile
+
+ gi/pygi-argument.c | 708
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-argument.h | 35 +++-
+ gi/pygi-cache.c | 82 +++++--
+ gi/pygi-cache.h | 41 +++-
+ 4 files changed, 832 insertions(+), 34 deletions(-)
+
+commit f554cf62848104d31518138ae85bc51acaafda67
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Jan 4 18:49:53 2011 -0500
+
+ first checkin of the new caching branch
+
+ * this does not compile and is not hooked up to the build system
+ * lays out the caching data structures and some skeleton functions
+
+ gi/pygi-cache.c | 480
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-cache.h | 104 ++++++++++++
+ 2 files changed, 584 insertions(+), 0 deletions(-)
+
commit 8d5a7857876669f56bb03bf618bcfdcc290721c0
Author: Eitan Isaacson <eitan@monotonous.org>
Date: Wed Dec 22 12:34:10 2010 -0800
diff --git a/Makefile.am b/Makefile.am
index b9b9ed3..3b8b6fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,15 +1,9 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = 1.7
-SUBDIRS = docs codegen glib gobject gio examples
+SUBDIRS = docs examples gi tests
-if ENABLE_INTROSPECTION
-SUBDIRS += gi
-endif
-
-SUBDIRS += tests
-
-PLATFORM_VERSION = 2.0
+PLATFORM_VERSION = 3.0
CLEANFILES =
EXTRA_DIST = \
@@ -20,7 +14,6 @@ EXTRA_DIST = \
PKG-INFO.in \
setup.py \
pygobject_postinstall.py \
- pygtk.py \
dsextras.py \
ChangeLog.pre-2.18 \
m4/as-ac-expand.m4 \
@@ -69,7 +62,6 @@ pkgpyexec_PYTHON = dsextras.py
pkgpyexec_LTLIBRARIES =
# python
-pyexec_PYTHON = pygtk.py
pyexec_LTLIBRARIES =
# linker flags
@@ -81,12 +73,9 @@ endif
# install pth file.
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pythondir)
- echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
- echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
uninstall-local:
- rm -f $(DESTDIR)$(pythondir)/pygtk.pth $(DESTDIR)$(pyexecdir)/pygtk.pth
EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM).egg
diff --git a/Makefile.in b/Makefile.in
index e20eeca..1637831 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -35,14 +35,13 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@ENABLE_INTROSPECTION_TRUE@am__append_1 = gi
-@PLATFORM_WIN32_TRUE@am__append_2 = -no-undefined
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
subdir = .
DIST_COMMON = README $(am__configure_deps) $(pkgpyexec_PYTHON) \
- $(pyexec_PYTHON) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/PKG-INFO.in $(srcdir)/config.h.in \
- $(srcdir)/pygobject-2.0-uninstalled.pc.in \
- $(srcdir)/pygobject-2.0.pc.in $(top_srcdir)/configure \
+ $(srcdir)/pygobject-3.0-uninstalled.pc.in \
+ $(srcdir)/pygobject-3.0.pc.in $(top_srcdir)/configure \
$(top_srcdir)/docs/reference/entities.docbook.in \
$(top_srcdir)/docs/xsl/fixxref.py.in AUTHORS COPYING ChangeLog \
INSTALL NEWS compile config.guess config.sub depcomp \
@@ -59,7 +58,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = pygobject-2.0.pc pygobject-2.0-uninstalled.pc \
+CONFIG_CLEAN_FILES = pygobject-3.0.pc pygobject-3.0-uninstalled.pc \
docs/reference/entities.docbook docs/xsl/fixxref.py PKG-INFO
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -84,8 +83,7 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
- "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
- "$(DESTDIR)$(pkgconfigdir)"
+ "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pkgconfigdir)"
LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
@@ -111,7 +109,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = docs codegen glib gobject gio examples gi tests
+DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -178,8 +176,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -298,7 +294,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
@@ -309,8 +304,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
-SUBDIRS = docs codegen glib gobject gio examples $(am__append_1) tests
-PLATFORM_VERSION = 2.0
+SUBDIRS = docs examples gi tests
+PLATFORM_VERSION = 3.0
CLEANFILES =
EXTRA_DIST = \
MANIFEST.in \
@@ -320,7 +315,6 @@ EXTRA_DIST = \
PKG-INFO.in \
setup.py \
pygobject_postinstall.py \
- pygtk.py \
dsextras.py \
ChangeLog.pre-2.18 \
m4/as-ac-expand.m4 \
@@ -366,11 +360,10 @@ pkgpyexec_PYTHON = dsextras.py
pkgpyexec_LTLIBRARIES =
# python
-pyexec_PYTHON = pygtk.py
pyexec_LTLIBRARIES =
# linker flags
-common_ldflags = -module -avoid-version $(am__append_2)
+common_ldflags = -module -avoid-version $(am__append_1)
EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM).egg
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -427,9 +420,9 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
-pygobject-2.0.pc: $(top_builddir)/config.status $(srcdir)/pygobject-2.0.pc.in
+pygobject-3.0.pc: $(top_builddir)/config.status $(srcdir)/pygobject-3.0.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-pygobject-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pygobject-2.0-uninstalled.pc.in
+pygobject-3.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pygobject-3.0-uninstalled.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
docs/reference/entities.docbook: $(top_builddir)/config.status $(top_srcdir)/docs/reference/entities.docbook.in
cd $(top_builddir) && $(SHELL) ./config.status $@
@@ -546,44 +539,6 @@ uninstall-pkgpyexecPYTHON:
cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$filesc || exit $$?; \
echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$fileso ")"; \
cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$fileso
-install-pyexecPYTHON: $(pyexec_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
- @list='$(pyexec_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- $(am__strip_dir) \
- dlist="$$dlist $$f"; \
- list2="$$list2 $$b$$p"; \
- else :; fi; \
- done; \
- for file in $$list2; do echo $$file; done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \
- done || exit $$?; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyexecdir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyexecdir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-pyexecPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(pyexec_PYTHON)'; test -n "$(pyexecdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- fileso=`echo "$$files" | sed 's|$$|o|'`; \
- echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pyexecdir)" && rm -f $$files || exit $$?; \
- echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$filesc ")"; \
- cd "$(DESTDIR)$(pyexecdir)" && rm -f $$filesc || exit $$?; \
- echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$fileso ")"; \
- cd "$(DESTDIR)$(pyexecdir)" && rm -f $$fileso
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@@ -923,7 +878,7 @@ check: check-recursive
all-am: Makefile $(LTLIBRARIES) $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+ for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
@@ -983,8 +938,7 @@ install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-exec-local install-pkgpyexecLTLIBRARIES \
- install-pkgpyexecPYTHON install-pyexecLTLIBRARIES \
- install-pyexecPYTHON
+ install-pkgpyexecPYTHON install-pyexecLTLIBRARIES
install-html: install-html-recursive
@@ -1026,7 +980,7 @@ ps-am:
uninstall-am: uninstall-local uninstall-pkgconfigDATA \
uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
- uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON
+ uninstall-pyexecLTLIBRARIES
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
ctags-recursive install-am install-strip tags-recursive
@@ -1046,24 +1000,21 @@ uninstall-am: uninstall-local uninstall-pkgconfigDATA \
install-pdf install-pdf-am install-pkgconfigDATA \
install-pkgpyexecLTLIBRARIES install-pkgpyexecPYTHON \
install-ps install-ps-am install-pyexecLTLIBRARIES \
- install-pyexecPYTHON install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-local uninstall-pkgconfigDATA \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-local uninstall-pkgconfigDATA \
uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
- uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON
+ uninstall-pyexecLTLIBRARIES
# install pth file.
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pythondir)
- echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(pyexecdir)
- echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
uninstall-local:
- rm -f $(DESTDIR)$(pythondir)/pygtk.pth $(DESTDIR)$(pyexecdir)/pygtk.pth
egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
diff --git a/NEWS b/NEWS
index eeae929..c0ce9f3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,77 +1,197 @@
-2.28.6 11-Jun-1011
+2.90.1 14-Aug-2011 (3.0 pre-release)
+ - pass exta keywords to the Box constructor (John (J5) Palmieri)
+ - add (Tree|List)Store set method override (John (J5) Palmieri)
+ - add test for object arrays (John (J5) Palmieri)
+ - only support C pointer arrays for structs and objects (John (J5) Palmieri)
+ - revert Gtk.Window override because it causes issues with subclasses (John (J5) Palmieri)
+ - take GIL in _pygi_invoke_closure_free (bug #647016) (Jonathan Matthew)
+ - Add a default parameter to GtkTreeModel.filter_new (Johan Dahlin)
+ - Add vbox/action_area properties (Johan Dahlin)
+ - Add a couple of constructors (Johan Dahlin)
+ - Do not always pass in user_data to callbacks. (Johan Dahlin)
+ - Add a default detail value for Widget.render_icon (Johan Dahlin)
+ - Add an override for Gdk.color_parse() (Johan Dahlin)
+ - Support function calling with keyword arguments in invoke. (Laszlo Pandy)
+ - remove references to deprecated GI_INFO_TYPE_ERROR_DOMAIN (John (J5) Palmieri)
+ - Fix gobject vs. gi.repository warning (Martin Pitt)
+ - make GObject and GLib able to take overrides (John (J5) Palmieri)
+ - avoid dependency issue by importing the internal gobject (John (J5) Palmieri)
+ - fix tests to use the new GLib module (John (J5) Palmieri)
+ - add DynamicGLibModule which works like DynamicGObjectModule (John (J5) Palmieri)
+ - refactor, add objects and types to the correct internal module (John (J5) Palmieri)
+ - rename the pyglib shared library so we don't load the old one (John (J5) Palmieri)
+ - refactor tests to only use PyGObject 3 syntax (John (J5) Palmieri)
+ - refactor the internal _glib module to import correct modules (John (J5) Palmieri)
+ - refactor to use the new internal _glib and _gobject modules (John (J5) Palmieri)
+ - refactor gi module to import and use internal _gobject module (John (J5) Palmieri)
+ - move the static bits internal to gi and refactor build files (John (J5) Palmieri)
+ - remove pygtk.py (John (J5) Palmieri)
+ - introspection is no longer optional (John (J5) Palmieri)
+ - up platform version to 3.0 (John (J5) Palmieri)
+ - [gi] Handle GVariants from callback return values (Martin Pitt)
+ - Handle GVariants for callback arguments (Martin Pitt)
+ - [gi] Fix crash: check return value of _invoke_state_init_from_callable_cache() before continuing. (Laszlo Pandy)
+ - [gi] Pass gtype as first parameter to vfuncs (instead of using kwargs). (Laszlo Pandy)
+ - remove codegen (John (J5) Palmieri)
+ - remove some left over ifdefs to complete merge of the invoke-rewrite branch (John (J5) Palmieri)
+ - rename pygi-invoke-ng to pygi-invoke (John (J5) Palmieri)
+ - make invoke-ng the only invoker (John (J5) Palmieri)
+ - Merge branch 'master' into invoke-rewrite (John (J5) Palmieri)
+ - Merge branch 'master' into invoke-rewrite (John (J5) Palmieri)
+ - split the marshalling routines into two source files (John (J5) Palmieri)
+ - Ship tests/te_ST@nouppera in release tarballs for tests to succeed (Martin Pitt)
+ - [invoke] break out caller_allocates allocating into its own function (John (J5) Palmieri)
+ - [invoke] missed a bit when removing constructor_class usage (John (J5) Palmieri)
+ - [invoke] don't hold on to the constructor class, just add a TODO (John (J5) Palmieri)
+ - [gi] Port test_properties from static gio to GI Gio (Martin Pitt)
+ - [python3] Fix maketrans import (Martin Pitt)
+ - [caching] remove all inline compiler flags (John (J5) Palmieri)
+ - [caching] refactor function names to be less confusing (John (J5) Palmieri)
+ - [overrides] deprecate the use of type keyword MessageDialog constructor (John (J5) Palmieri)
+ - gdbus tests: Fix hang if test case fails (Martin Pitt)
+ - use an enum instead of booleans to denote function type (John (J5) Palmieri)
+ - rename aux arguments to child arguments to make their purpose clearer (John (J5) Palmieri)
+ - Fixed the cairo example (Timo Vanwynsberghe)
+ - Add override binding for Gtk.ListStore.prepend(). (Adam Dingle)
+ - Fix crash in Gtk.TextIter overrides (Martin Pitt)
+ - use gssize instead of int for arg indexes (John (J5) Palmieri)
+ - [cache] remove refrence to default value as it is not implemented yet (John (J5) Palmieri)
+ - Handle arguments that are flags correctly (Sebastian Pölsterl)
+ - correctly initialize the _gi_cairo_functions array to be zero filled (John (J5) Palmieri)
+ - correctly initialize the _gi_cairo_functions array to be zero filled (John (J5) Palmieri)
+ - pass in the address of the gerror, not the gerror itself (John (J5) Palmieri)
+ - [gi] handle marshalling gerrors arguments for signals (John (J5) Palmieri)
+ - [gi-invoke-ng] fix NULL check to check before we access the cache struct (John (J5) Palmieri)
+ - [gi-tests] add test for PyGObject->PyObject TreeModel storage (John (J5) Palmieri)
+ - [gtk-overrides] special case TreeModel columns of PYGOBJECT types (John (J5) Palmieri)
+ - [gi-invoke-ng] copy structs when transfer is full for array (John (J5) Palmieri)
+ - [gtk-override] print warning if user imports Gtk 2.0 (John (J5) Palmieri)
+ - [gtk-overrides] allow the message_type keyword to be used for MessageDialogs (John (J5) Palmieri)
+ - Add support for enums in gobject.property (Johan Dahlin)
+ - Add support for enums in gobject.property (Johan Dahlin)
+ - [gi-invoke-ng] use g_slice for allocating GValues that are caller allocated (John (J5) Palmieri)
+ - [gi-invoke-ng] Convert Overflow errors to ValueErrors when marshalling integers (John (J5) Palmieri)
+ - [gi-invoke-ng] only cache caller allocates for interfaces as some API are broken (John (J5) Palmieri)
+ - [gi-invoke-ng] handle in pointer array marshalling (John (J5) Palmieri)
+ - Adding GPtrArray tests (Alex Eftimie)
+ - [gi-invoke-ng] fix array element offset calculations (John (J5) Palmieri)
+ - [gi] don't clean up arguments that weren't yet processed during in arg failure (John (J5) Palmieri)
+ - [gi-overrides] use new instead of init when constructing a GLib.VariantBuilder (John (J5) Palmieri)
+ - [gi-invoke-ng] actual code to import overrides (John (J5) Palmieri)
+ - [gi-invoke-ng] import pytypes so we get overrides (John (J5) Palmieri)
+ - [gi-invoke-ng] handle gvariants now that they are not foreign (John (J5) Palmieri)
+ - [gi-invoke-ng] do not try to clean up NULL arguments (John (J5) Palmieri)
+ - Merge branch 'master' into invoke-rewrite (John (J5) Palmieri)
+ - Merge branch 'master' into invoke-rewrite (John (J5) Palmieri)
- closure: avoid double free crash (Ignacio Casal Quinteiro)
- - [gi] backport of "GVariant has a GType" fe386a (John (J5) Palmieri)
- - [gi] fixes to backport commit 6b5a65 - in older glib GVariants are still structs (John (J5) Palmieri)
- - GVariantType is a boxed struct (Tomeu Vizoso)
- - Use _gi.Struct to wrap fundamentals (Tomeu Vizoso)
- Added __eq__ method for Gdk.Color and Gdk.RGBA (Jason Siefken)
- - Remove useless import (Ignacio Casal Quinteiro)
- - Revert "[gi] Removed hack to avoid using GLib.Variant.new_variant." (Ignacio Casal Quinteiro)
- closure: Check the out arg is not null. Fixes bug #651812 (Ignacio Casal Quinteiro)
+ - Use constants instead of literals (Tomeu Vizoso)
+ - GVariant has now a GType, take that into account (Tomeu Vizoso)
+ - GVariantType is a boxed struct (Tomeu Vizoso)
+ - Use _gi.Struct to wrap fundamentals (Tomeu Vizoso)
+ - Merge gi/HACKING into /HACKING (Tomeu Vizoso)
- Fix GC-related crash during PyGObject deallocation (Daniel Drake)
+ - [gi-invoke-ng] enable invoke-ng by default (John (J5) Palmieri)
+ - [gi-invoke-ng] add code to clean up when input values fail to marshal (John (J5) Palmieri)
+ - [gi-invoke-ng] add hash cleanup routines (John (J5) Palmieri)
+ - [gi-invoke-ng] handle arrays with transfers of GI_TRANSFER_CONTAINER (John (J5) Palmieri)
+ - [gi-invoke-ng] add list cleanup routines (John (J5) Palmieri)
+ - indentation fix (John (J5) Palmieri)
+ - [gi-invoke-ng] add out array cleanup (John (J5) Palmieri)
+ - [gi-invoke-ng] do not allocate null terminator for garray (John (J5) Palmieri)
+ - [gi-invoke-ng] add array cleanup for in arrays (John (J5) Palmieri)
+ - [gi-invoke-ng] remove remaining bits of the invoke stage state machine (John (J5) Palmieri)
+ - [gi-invoke-ng] revamp cleanup framework to be orthogonal to cache setup (John (J5) Palmieri)
+ - [gi-invoke-ng] stub out a cleaner way of cleaning up after ourselves (John (J5) Palmieri)
+ - Doc Extractor: Correct the logic of the --no-since option. (José Alburquerque)
+ - Doc Extractor: Add a --no-since option. (José Alburquerque)
+ - [gi-invoke-ng] tweek cleanup routines (John (J5) Palmieri)
- Fix symbol names to be locale independent (Martin Pitt)
- - Updated DOAP file (Sebastian Pölsterl)
-
-2.28.4 18-Apr-2011
- - Version bump to 2.24.4 (Sebastian Pölsterl)
- - [gi] Don't create variant twice (Sebastian Pölsterl)
- - pygi-convert.sh: Make sure the uppercase GObject module is imported instead of the lowercase (Sebastian Pölsterl)
- - [gi] Removed hack to avoid using GLib.Variant.new_variant. (Sebastian Pölsterl)
- - [gi] Added additional test case for GVariant handling (Sebastian Pölsterl)
- - [gi] Added support for GVariant arguments (Sebastian Pölsterl)
- - Fix ABI break in old static bindings. (Steve Frécinaux)
- - fetch size from an enum type (Mike Gorse)
+ - [gi] pygi-convert.sh: Convert gtk.gdk.CROSSHAIR (Martin Pitt)
+ - [gi-invoke-ng] handle filename cleanup with the utf8 cleanup function (John (J5) Palmieri)
+ - [gi-invoke-ng] handle caller allocates cleanup (John (J5) Palmieri)
+ - [gi-invoke-ng] refactor the cleanup code and add utf8 cleanup as initial test (John (J5) Palmieri)
+ - use PyCapsule when importing pycairo/require pycairo 1.10.0 for python3 builds (John (J5) Palmieri)
+ - [python3] fix build. PYcairo_IMPORT doesn't exists anymore (Ignacio Casal Quinteiro)
+ - Updated DOAP file (Sebastian Pölsterl)
+ - [gi] Don't create variant twice (Sebastian Pölsterl)
+ - pygi-convert.sh: Make sure the uppercase GObject module is imported instead of the lowercase (Sebastian Pölsterl)
+ - [gi] Removed hack to avoid using GLib.Variant.new_variant. (Sebastian Pölsterl)
+ - [gi] Added additional test case for GVariant handling (Sebastian Pölsterl)
+ - [gi] Added support for GVariant arguments (Sebastian Pölsterl)
+ - fix static ABI for setting string gvalues from python objects (John (J5) Palmieri)
- dsextras.py: ensure eol characters are preserved when writing template files (so \n does not become \r\n) (Dieter Verfaillie)
+ - dsextras.py: remove \r as wel as \n character (Dieter Verfaillie)
+ - use PyCapsule when importing pycairo/require pycairo 1.10.0 for python3 builds (John (J5) Palmieri)
+ - [python3] fix build. PYcairo_IMPORT doesn't exists anymore (Ignacio Casal Quinteiro)
+ - Updated DOAP file (Sebastian Pölsterl)
+ - [gi] Don't create variant twice (Sebastian Pölsterl)
+ - pygi-convert.sh: Make sure the uppercase GObject module is imported instead of the lowercase (Sebastian Pölsterl)
+ - [gi] Removed hack to avoid using GLib.Variant.new_variant. (Sebastian Pölsterl)
+ - [gi] Added additional test case for GVariant handling (Sebastian Pölsterl)
+ - [gi-invoke-ng] fix prototype (John (J5) Palmieri)
+ - [gi-invoke-ng] create new framework for cleaning up args (John (J5) Palmieri)
+ - [gi] Added support for GVariant arguments (Sebastian Pölsterl)
+ - [gi-invoke-ng] fix marshal header that is no longer part of pygi-arguments.h (John (J5) Palmieri)
+ - [gi-invoke-ng] code style space fixes (John (J5) Palmieri)
+ - [gi-invoke-ng] don't decref value taken from a dict as it is borrowed (John (J5) Palmieri)
+ - [gi-invoke-ng] return None when appropriate so we don't crash (John (J5) Palmieri)
+ - [gi-invoke-ng] fix aux value caching (John (J5) Palmieri)
+ - [gi-invoke-ng] backport handling flags with no gtype (John (J5) Palmieri)
+ - [gi-invoke-ng] backport raw gvalue handling (John (J5) Palmieri)
+ - [gi-invoke-ng] marshal instances seperately since they differ slightly from other args (John (J5) Palmieri)
+ - [gi-invoke-ng] refactor FunctionCache to be more generic CallableCache (John (J5) Palmieri)
+ - [gi-invoke-rewrite] backport glib error handling (John (J5) Palmieri)
+ - [gi-invoke-ng] backport closure passing from invoke (John (J5) Palmieri)
+ - [gi-invoke-ng] handle vfuncs and fix cosntrutors (John (J5) Palmieri)
+ - [gi-invoke-ng] handle foreign types correctly (John (J5) Palmieri)
+ - [gi] remove the class parameter from the argument list of constructors (John (J5) Palmieri)
+ - fix static ABI for setting string gvalues from python objects (John (J5) Palmieri)
+ - dsextras.py: ensure eol characters are preserved when writing template files (so \n does not become \r\n) (Dieter Verfaillie)
+ - dsextras.py: remove \r as wel as \n character (Dieter Verfaillie)
+ - [gi] make new invoke-ng codepath compile correctly (John (J5) Palmieri)
+ - [gi] conditionalize invoke code paths (John (J5) Palmieri)
+ - [gi] revert back to the type.py from master (John (J5) Palmieri)
+ - [gi] revert pygi-argument.h and move the invoke-ng code to pygi-marshal.h (John (J5) Palmieri)
+ - Merge branch 'master' into invoke-rewrite (John (J5) Palmieri)
+ - [gi] foreign types now take interface infos instead of type infos (John (J5) Palmieri)
+ - Fix GSchema tests for separate build tree (Martin Pitt)
+ - [gi] start of merge from master (John (J5) Palmieri)
+ - [gi] marshal raw closures (John (J5) Palmieri)
+ - pygi-convert.sh add GObject.xxx and webkit (John Stowers)
+ - pygi-convert.sh remove gobject tests, GObject works now (John Stowers)
+ - [gi-demos] add pickers demo (John (J5) Palmieri)
+ - [gi-demos] add menu demo (John (J5) Palmieri)
+ - [gi-overrides] fix exception block so it works in Python 2.5 (John (J5) Palmieri)
+ - Revert "Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES" (Martin Pitt)
+ - setup.py: fix user_access_control option (Dieter Verfaillie)
+ - [gi] Respect the MessageType for Gtk.MessageDialog (Martin Pitt)
+ - [gi] Do not require signature for D-BUS methods without arguments (Martin Pitt)
+ - [gi-overrides] TreeViewColumn.set_cell_data_func func_data can be None (John Stowers)
+ - [gi-demos] dont try and run demos that represent directories (John Stowers)
+ - [gi-demos] some python 3 compat fixes (John (J5) Palmieri)
+ - [gi-demos] add liststore demo (John (J5) Palmieri)
+ - [gi-demos] catch the correct error class (John (J5) Palmieri)
+ - Do not leak python references when using the gobject.property() helper. (Steve Frécinaux)
+ - handle uchar as bytes, not strings in python 3 (John (J5) Palmieri)
+ - [gi-overrides] handle unichar gvalues when setting treemodels (John (J5) Palmieri)
+ - [gi-overrides] special case python 2 keywords that crept in (John (J5) Palmieri)
+ - check for the py3 _thread module in configure.ac if thread is not found (John (J5) Palmieri)
+ - [gi-demos] add iconview demo (John (J5) Palmieri)
+ - [gi] wrap the keyword argument in a dict so we don't break Python 2.5 (John (J5) Palmieri)
+ - [gi-demos] add the combobox with string ids section to the demos (John (J5) Palmieri)
+ - [gi-overrides] add an override for Gdk.RGBA (John (J5) Palmieri)
+ - [gi-demos] fix up search-entry to reflect annotations fixed in Gtk+ master (John (J5) Palmieri)
+ - [gi-demos] add search entry demo (John (J5) Palmieri)
+ - [gi] wrap map in a list for Python 3 compat (John (J5) Palmieri)
+ - [gi-demos] fix up the validation combobox (John (J5) Palmieri)
+ - add overridesdir variable in the .pc file for 3rd party overrides (John (J5) Palmieri)
+ - setup.py: Set bdist_wininst user-access-control property (Dieter Verfaillie)
+ - Fix uninitialized variable in gi.require_version() (Martin Pitt)
+ - Run tests with LC_MESSAGES="C" (Martin Pitt)
+ - [gi-overrides] override Gtk.stock_lookup to not return success (John (J5) Palmieri)
-2.28.3 23-Mar-2011
- - fix a typo when converting objects to strings gvalues (John (J5) Palmieri)
-
-2.28.2 22-Mar-2011
- - fix static ABI for setting string gvalues from python objects (John (J
- - Fix GSchema tests for separate build tree (Martin Pitt)
- - GIO tests: Fix remaining test case for separate build tree (Martin Pit
- - GIO tests: Fix for separate build tree (Martin Pitt)
-
-2.28.1 21-Mar-2011
- - pygi-convert.sh remove gobject tests, GObject works now (John Stowers)
- - pygi-convert.sh add GObject.xxx and webkit (John Stowers)
- - [gi] marshal raw closures (John (J5) Palmieri)
- - Revert "Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES" (Martin Pit
- - setup.py: fix user_access_control option (Dieter Verfaillie)
- - [gi-overrides] fix marshalling pygobjects in treemodels (John (J5) Pal
- - [gi] Respect the MessageType for Gtk.MessageDialog (Martin Pitt)
- - [gi] Do not require signature for D-BUS methods without arguments (Mar
- - [gi-demos] add pickers demo (John (J5) Palmieri)
- - [gi-demos] add menu demo (John (J5) Palmieri)
- - [gi-overrides] TreeViewColumn.set_cell_data_func func_data can be None
- - [gi-demos] dont try and run demos that represent directories (John Sto
- - [gi-overrides] fix exception block so it works in Python 2.5 (John (J5
-
-2.28.0 08-Mar-2011 (stable)
- - [gi-demos] some python 3 compat fixes (John (J5) Palmieri)
- - [gi-demos] catch the correct error class (John (J5) Palmieri)
- - Try not to sink objects returned by C functions. (Steve Frécinaux)
- - Do not leak python references when using the gobject.property() helper. (Steve Frécinaux)
- - [gi] fix try except blocks so they work in Python 2.5 (John (J5) Palmieri)
- - handle uchar as bytes, not strings in python 3 (John (J5) Palmieri)
- - [gi-overrides] handle unichar gvalues when setting treemodels (John (J5) Palmieri)
- - [gi-overrides] special case python 2 keywords that crept in (John (J5) Palmieri)
- - check for the py3 _thread module in configure.ac if thread is not found (John (J5) Palmieri)
- - [gi-demos] add iconview demo (John (J5) Palmieri)
- - [gi] wrap the keyword argument in a dict so we don't break Python 2.5 (John (J5) Palmieri)
- - [gi-demos] add the combobox with string ids section to the demos (John (J5) Palmieri)
- - [gi-overrides] add an override for Gdk.RGBA (John (J5) Palmieri)
- - [gi-demos] fix up search-entry to reflect annotations fixed in Gtk+ master (John (J5) Palmieri)
- - [gi-demos] add search entry demo (John (J5) Palmieri)
- - [gi] wrap map in a list for Python 3 compat (John (J5) Palmieri)
- - [gi-demos] fix up the validation combobox (John (J5) Palmieri)
- - add overridesdir variable in the .pc file for 3rd party overrides (John (J5) Palmieri)
- - [gi] remove unref for closures since they are floating objects that get sunk (John (J5) Palmieri)
- - setup.py: Set bdist_wininst user-access-control property (Dieter Verfaillie)
- - Fix uninitialized variable in gi.require_version() (Martin Pitt)
- - Run tests with LC_MESSAGES="C" (Martin Pitt)
- - [gi-overrides] override Gtk.stock_lookup to not return success (John (J5) Palmieri)
-
2.27.91 28-Feb-2011 (2.28 pre-release)
- [gi-tests] use Gdk.test_simulate_button instead of emitting event ourselves (John (J5) Palmieri)
- [gi-tests] tests for EventButton override. (Laszlo Pandy)
diff --git a/PKG-INFO b/PKG-INFO
index bfad894..9bd4bca 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: PyGObject
-Version: 2.28.6
+Version: 2.90.1
Summary: Python bindings for GObject
Home-page: http://www.pygtk.org/
Author: James Henstridge
@@ -8,8 +8,8 @@ Author-email: james@daa.com.au
Maintainer: Johan Dahlin
Maintainer-email: johan@gnome.org
License: GNU LGPL
-Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.tar.gz
-Description: Python bindings for GLib, GObject and GIO
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.90/pygobject-2.90.1.tar.gz
+Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Linux
diff --git a/PKG-INFO.in b/PKG-INFO.in
index ac0e2e6..5cffe13 100644
--- a/PKG-INFO.in
+++ b/PKG-INFO.in
@@ -9,7 +9,7 @@ Maintainer: Johan Dahlin
Maintainer-email: johan@gnome.org
License: GNU LGPL
Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/@PYGOBJECT_MAJOR_VERSION@.@PYGOBJECT_MINOR_VERSION@/pygobject-@VERSION@.tar.gz
-Description: Python bindings for GLib, GObject and GIO
+Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Linux
diff --git a/README b/README
index c5a7089..24dae6c 100644
--- a/README
+++ b/README
@@ -8,7 +8,7 @@ Current maintainers: Gustavo J A M Carneiro <gjc@gnome.org>
Gian Mario Tagliaretti <gianmt@gnome.org>
Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
-This archive contains bindings for the GLib, GObject and GIO,
+This archive contains bindings for the GLib, and GObject,
to be used in Python. It is a fairly complete set of bindings,
it's already rather useful, and is usable to write moderately
complex programs. (see the examples directory for some examples
@@ -45,7 +45,6 @@ Requirements
* Python 2.3.5 or higher
* Glib 2.22.4 or higher
* GIO 2.22.4 or higher
- * GIO-unix 2.22.4 or higher
* libffi (optional)
Copyright Information
diff --git a/codegen/Makefile.am b/codegen/Makefile.am
deleted file mode 100644
index f9886eb..0000000
--- a/codegen/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-PLATFORM_VERSION = 2.0
-
-bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
-
-codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
-
-codegen_SCRIPTS = \
- code-coverage.py \
- codegen.py \
- createdefs.py \
- defsconvert.py \
- defsgen.py \
- docextract_to_xml.py \
- docgen.py \
- h2def.py \
- mergedefs.py \
- missingdefs.py \
- mkskel.py \
- scanvirtuals.py \
- scmexpr.py
-
-codegen_PYTHON = \
- __init__.py \
- argtypes.py \
- definitions.py \
- defsparser.py \
- docextract.py \
- override.py \
- reversewrapper.py
-
-EXTRA_DIST = $(codegen_SCRIPTS) README.defs pygobject-codegen-$(PLATFORM_VERSION).in
-
--include $(top_srcdir)/git.mk
diff --git a/codegen/Makefile.in b/codegen/Makefile.in
deleted file mode 100644
index 12a8cf9..0000000
--- a/codegen/Makefile.in
+++ /dev/null
@@ -1,576 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = codegen
-DIST_COMMON = $(codegen_PYTHON) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/pygobject-codegen-2.0.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
- $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = pygobject-codegen-2.0
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" \
- "$(DESTDIR)$(codegendir)"
-SCRIPTS = $(bin_SCRIPTS) $(codegen_SCRIPTS)
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-SOURCES =
-DIST_SOURCES =
-py_compile = $(top_srcdir)/py-compile
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIR = @DATADIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FFI_CFLAGS = @FFI_CFLAGS@
-FFI_LIBS = @FFI_LIBS@
-FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
-GIO_CFLAGS = @GIO_CFLAGS@
-GIO_LIBS = @GIO_LIBS@
-GI_CFLAGS = @GI_CFLAGS@
-GI_DATADIR = @GI_DATADIR@
-GI_LIBS = @GI_LIBS@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
-GLIB_LIBS = @GLIB_LIBS@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GOBJECT_QUERY = @GOBJECT_QUERY@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
-INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBFFI_PC = @LIBFFI_PC@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PLATFORM = @PLATFORM@
-PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
-PYCAIRO_LIBS = @PYCAIRO_LIBS@
-PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
-PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
-PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
-PYTHON = @PYTHON@
-PYTHON_BASENAME = @PYTHON_BASENAME@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_INCLUDES = @PYTHON_INCLUDES@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-THREADING_CFLAGS = @THREADING_CFLAGS@
-VERSION = @VERSION@
-XSLTPROC = @XSLTPROC@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-PLATFORM_VERSION = 2.0
-bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
-codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
-codegen_SCRIPTS = \
- code-coverage.py \
- codegen.py \
- createdefs.py \
- defsconvert.py \
- defsgen.py \
- docextract_to_xml.py \
- docgen.py \
- h2def.py \
- mergedefs.py \
- missingdefs.py \
- mkskel.py \
- scanvirtuals.py \
- scmexpr.py
-
-codegen_PYTHON = \
- __init__.py \
- argtypes.py \
- definitions.py \
- defsparser.py \
- docextract.py \
- override.py \
- reversewrapper.py
-
-EXTRA_DIST = $(codegen_SCRIPTS) README.defs pygobject-codegen-$(PLATFORM_VERSION).in
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign codegen/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign codegen/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-pygobject-codegen-2.0: $(top_builddir)/config.status $(srcdir)/pygobject-codegen-2.0.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-binSCRIPTS: $(bin_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binSCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-install-codegenSCRIPTS: $(codegen_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)"
- @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(codegendir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(codegendir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-codegenSCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(codegendir)" && rm -f $$files
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-codegenPYTHON: $(codegen_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)"
- @list='$(codegen_PYTHON)'; dlist=; list2=; test -n "$(codegendir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- $(am__strip_dir) \
- dlist="$$dlist $$f"; \
- list2="$$list2 $$b$$p"; \
- else :; fi; \
- done; \
- for file in $$list2; do echo $$file; done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(codegendir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(codegendir)" || exit $$?; \
- done || exit $$?; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(codegendir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(codegendir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-codegenPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(codegen_PYTHON)'; test -n "$(codegendir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- fileso=`echo "$$files" | sed 's|$$|o|'`; \
- echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(codegendir)" && rm -f $$files || exit $$?; \
- echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$filesc ")"; \
- cd "$(DESTDIR)$(codegendir)" && rm -f $$filesc || exit $$?; \
- echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$fileso ")"; \
- cd "$(DESTDIR)$(codegendir)" && rm -f $$fileso
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(SCRIPTS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" "$(DESTDIR)$(codegendir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-codegenPYTHON install-codegenSCRIPTS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binSCRIPTS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binSCRIPTS uninstall-codegenPYTHON \
- uninstall-codegenSCRIPTS
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binSCRIPTS install-codegenPYTHON \
- install-codegenSCRIPTS install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
- uninstall-codegenPYTHON uninstall-codegenSCRIPTS
-
-
--include $(top_srcdir)/git.mk
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/codegen/README.defs b/codegen/README.defs
deleted file mode 100644
index 5f7957e..0000000
--- a/codegen/README.defs
+++ /dev/null
@@ -1,351 +0,0 @@
- ChangeLog for this draft:
- - caller-owns-return attribute on functions/methods
- - include gtk-type-id in the type alias system
- - c-name for types converted to in-c-name out-c-name inout-c-name
- - merge unref-func and destroy-func for boxed types into release-func
-
- - split structs out of boxed types
- - c-declaration field
- - special "native" type alias; bail and use C declaration when
- necessary
- - defined objects and boxeds automatically create a module
- - make constructors functions and not methods, in appropriate
- object/boxed module
-
- Draft =========================
-
- The overall syntax is:
-
- (type-of-thing-being-defined name-used-to-refer-to-this-thing
- (attribute-name attribute-value-depending-on-the-attribute)
- (attribute-name attribute-value-depending-on-the-attribute)
- (attribute-name attribute-value-depending-on-the-attribute))
-
- Some definitions can have a c-declaration field that gives the C code
- we parsed to arrive at the definition. The c-declaration is a quoted
- string because it can contain parentheses and such.
-
- Defined types and their attributes:
-
- ===
- (module module-name
- (submodule-of module-name)) ;; submodule is optional
-
- Ex: (module Gtk)
- Ex: (module Rgb
- (submodule-of Gdk))
-
- modules are later referred to with a list of module names, like
- (Gdk Rgb) or (Gtk)
-
- Object and boxed type definitions automatically create a submodule.
- For example, GtkCList creates the module (module CList (submodule-of
- (Gtk))) which is referred to as module (Gtk CList).
-
- ===
-
- (type
- (alias some-unique-identifier)
- (in-module module-name) ;; optional, gchar* is not in a module
- (gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
- ;; in the type system
- (in-c-name name-of-symbol-in-C)
- (out-c-name name-of-symbol-in-C)
- (inout-c-name name-of-symbol-in-C))
-
- Ex: (type
- (alias string)
- (gtk-type-id GTK_TYPE_STRING)
- (in-c-name const-gchar*)
- (out-c-name gchar**) ;; actually I'm not sure how strings work
- out/inout
- (inout-c-name gchar*))
-
- ;; This one would be implied by the (object) def for GtkWidget I
- ;; think - (type) is only required for types that are not implied
- ;; by other definitions, such as int/boolean/etc.
-
- (type
- (alias GtkWidget)
- (in-module (Gtk))
- (gtk-type-id GTK_TYPE_WIDGET)
- (in-c-name GtkWidget*)
- (inout-c-name GtkWidget*)
- (out-c-name GtkWidget**))
-
- "Type" bindings are automatically assumed for objects, boxed types,
- etc. as defined below.
-
- The alias field is used to refer to the type later on.
-
- If the C type has spaces they are converted to hyphens after
- compressing all syntactically significant whitespace to a single
- space:
- (type
- (alias const-gchar*
- (c-name const-gchar*)))
-
- So hyphens have to go back to spaces for binding generators that
- output C code.
-
- Whenever a type alias can be used, it is also possible to use the
- keyword "native", which implies that the type in question is too
- C-specific to represent. Then a c-declaration will typically be
- available for use.
-
- C types containing [] or () are function pointers or arrays. For
- arrays that don't specify a size, we just treat them as pointers. For
- function pointers, we need special (type) syntax/attributes of some
- kind, but since there basically aren't any of these right now in the
- libs we care about we can just ignore them. For arrays that specify a
- size ditto, you would handle them by adding an (array-size) attribute
- or something or using the "native" keyword and skipping the (type)
- stuff.
-
- ===
- (object object-name
- (in-module module-name-list)
- (parent object-name optional-module-name-if-different)
- (abstract boolean-is-abstract-class) ;; omit for default of #f
- (c-name name-of-the-object-in-C)
- (field (type-and-name type-alias-of-struct-field
- name-of-struct-field)
- (access read-or-write-or-readwrite)))
-
-
- Ex: (object Widget
- (in-module (Gtk))
- (parent Object) ;; could say (parent Object (Gtk))
- (abstract #t)
- (c-name GtkWidget)
- (field (type-and-name GdkWindow* window) (access read)))
-
- An "object" declaration automatically implies the type definition:
-
- (type
- (alias concat-module-elements-and-object-name)
- (in-c-name pointer-to-c-name)
- (out-c-name pointer-to-pointer-to-c-name)
- (inout-c-name pointer-to-c-name))
-
- Ex:
- (type (alias GtkWidget)
- (in-c-name GtkWidget*)
- (out-c-name GtkWidget**)
- (inout-c-name GtkWidget*))
-
- It also implies a module that is the name broken into parts:
- (module CTree
- (submodule-of Gtk))
-
- ===
-
- (function function-name
- (in-module module-name-list) ;; "static methods" go in their
- ;; object's module
- (is-constructor-of object-type-alias) ;; optional, marks a
- constructor
- (c-name function-name)
- (return-type return-value-type) ;; defaults to void
- (caller-owns-return boolean-value) ;; defaults to #f
- (parameter in-or-out-or-inout
- (type-and-name parameter-type-alias parameter-name)
- (c-declaration "c-type-and-name")) ;; c-declaration only
- required
- ;; if the type alias is
- "native"
- (varargs #t) ;; has varargs at the end
- )
-
- Ex:
- (function init
- (in-module (Gdk Rgb)
- (c-name gdk_rgb_init)))
-
- Ex:
- (function new
- (in-module (Gdk Rgb Cmap))
- (is-constructor-of GdkRgbCmap)
- (c-name gdk_rgb_cmap_new)
- (return-type GdkRgbCmap)
- (caller-owns-return #t) ;; perhaps this could be implied by
- is-constructor-of
- (parameter in (type-and-name array-of-guint32 colors))
- (parameter in (type-and-name gint n_colors)))
-
- Ex:
- (function config_set_set_handler
- (in-module (Gnome))
- (c-name gnome_config_set_set_handler)
- (parameter in (type-and-name native func)
- (c-declaration "void (*func)(void*)"))
- (parameter in (type-and-name gpointer data)))
-
- ===
- (method method-name
- (of-object object-name module-name)
- ;; retval/arg attributes as for (function), but with first parameter
-
- ;; omitted for non-constructors
- )
-
- Ex:
- (method set_text
- (of-object Label (Gtk))
- (parameter (type-and-name const-gchar* str)))
-
- ===
- (object-argument arg-name
- (of-object object-we-are-an-argument-of optional-objects-module)
- (type argument-type) ;; not sure what to put for type
- ;; flags all default to #f
- (readable bool-value)
- (writeable bool-value)
- (run-action bool-value)
- (construct-only bool-value))
-
- Ex:
- (object-argument label
- (of-object Label (Gtk))
- (type gchar*) ;; ????
- (readable #t)
- (writeable #t))
-
- ===
- (signal signal-name
- (of-object object-we-are-a-signal-of optional-objects-module)
- ;; return value and parameters as for a function, omitting the
- object
- ;; and user data parameters
-
- ;; what other properties matter for a signal?
- )
-
- Ex:
- (signal select_row
- (of-object CList (Gtk))
- ;; return type defaults to void
- (parameter in (type-and-name gint row))
- (parameter in (type-and-name gint column))
- (parameter in (type-and-name GdkEvent* event)))
-
- ===
- (enum enum-name
- (in-module modname)
- (c-name name-in-c)
- (value (name value-name-noprefixes-hyphen-lowercase) (c-name
- value-c-name)))
-
- Ex:
-
- (enum DirectionType
- (in-module Gtk)
- (c-name GtkDirectionType)
- (value (name tab-forward) (c-name GTK_DIR_TAB_FORWARD))
- (value (name tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
- (value (name up) (c-name GTK_DIR_UP))
- (value (name down) (c-name GTK_DIR_DOWN))
- (value (name left) (c-name GTK_DIR_LEFT))
- (value (name right) (c-name GTK_DIR_RIGHT)))
-
- (enum Pos
- (in-module (Gtk CTree))
- (c-name GtkCTreePos)
- (value (name before) (c-name GTK_CTREE_POS_BEFORE))
- (value (name as-child) (c-name GTK_CTREE_POS_AS_CHILD))
- (value (name after) (c-name GTK_CTREE_POS_AFTER)))
-
- ===
- (flags) is just like enum, but some bindings may wrap enums and flags
- differently.
-
- ===
-
- (boxed boxed-name
- (in-module modname)
- (c-name c-name)
- (ref-func func-to-increase-refcount)
- (copy-func func-to-copy)
- (release-func func-to-destroy-or-decrement-refcount)
- (field (type-and-name type-alias-of-struct-field
- name-of-struct-field) (access access-rule)))
-
- It is never OK to use memcpy() to copy a boxed type, or use
- malloc()/free() to alloc/free one.
-
- Ex:
-
- (boxed Pixmap
- (in-module (Gdk))
- (c-name GdkPixmap)
- (ref-func pixmap_ref)
- (unref-func pixmap_unref))
-
- An "object" declaration automatically implies the type definition:
-
- (type
- (alias concat-module-elements-and-boxed-name)
- (in-c-name pointer-to-c-name)
- (out-c-name pointer-to-pointer-to-c-name)
- (inout-c-name pointer-to-c-name))
-
- Ex:
- (type (alias GdkPixmap)
- (in-c-name GdkPixmap*)
- (out-c-name GdkPixmap**)
- (inout-c-name GdkPixmap*))
-
- ===
-
- (struct struct-name
- (in-module modname)
- (c-name c-name)
- (field (type-and-name type-alias-of-struct-field
- name-of-struct-field) (access access-rule)))
-
- Ex:
- (struct Rectangle
- (in-module (Gdk))
- (c-name GdkRectangle)
- (field (type-and-name gint16 x) (access readwrite))
- (field (type-and-name gint16 y) (access readwrite))
- (field (type-and-name guint16 width) (access readwrite))
- (field (type-and-name guint16 height) (access readwrite)))
-
- Implies GdkRectangle type alias:
-
- (type (alias GdkRectangle)
- (in-c-name GdkRectangle*)
- (out-c-name GdkRectangle*) ;; note - not the same as boxed
- types
- (inout-c-name GdkRectangle*))
-
- ===
-
- (user-function name
- (in-module module)
- (c-name c-typedef-name)
- ;; return-type and parameters as for (function)
- )
-
- Ex:
-
- (user-function PrintFunc
- (in-module (Gtk))
- (parameter in (type-and-name gpointer func_data))
- (parameter in (type-and-name gchar* str)))
-
- ===
-
- (typedef new-name
- (in-module module)
- (c-name c-full-name)
- (orig-type alias-of-orig-type))
-
- Ex:
-
- (typedef Type
- (in-module (Gtk))
- (c-name GtkType)
- (orig-type guint))
-
diff --git a/codegen/__init__.py b/codegen/__init__.py
deleted file mode 100644
index 86188f9..0000000
--- a/codegen/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-
-__all__ = [
- 'argtypes',
- 'codegen',
- 'definitions',
- 'defsparser',
- 'docextract',
- 'docgen',
- 'h2def',
- 'defsgen'
- 'mergedefs',
- 'mkskel',
- 'override',
- 'scmexpr'
-]
diff --git a/codegen/argtypes.py b/codegen/argtypes.py
deleted file mode 100644
index 46e868e..0000000
--- a/codegen/argtypes.py
+++ /dev/null
@@ -1,1043 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-import string
-import keyword
-import struct
-
-py_ssize_t_clean = False
-
-class ArgTypeError(Exception):
- pass
-
-class ArgTypeNotFoundError(ArgTypeError):
- pass
-
-class ArgTypeConfigurationError(ArgTypeError):
- pass
-
-
-class VarList:
- """Nicely format a C variable list"""
- def __init__(self):
- self.vars = {}
- def add(self, ctype, name):
- if self.vars.has_key(ctype):
- self.vars[ctype] = self.vars[ctype] + (name,)
- else:
- self.vars[ctype] = (name,)
- def __str__(self):
- ret = []
- for type in self.vars.keys():
- ret.append(' ')
- ret.append(type)
- ret.append(' ')
- ret.append(string.join(self.vars[type], ', '))
- ret.append(';\n')
- if ret:
- ret.append('\n')
- return string.join(ret, '')
- return ''
-
-class WrapperInfo:
- """A class that holds information about variable defs, code
- snippets, etcd for use in writing out the function/method
- wrapper."""
- def __init__(self):
- self.varlist = VarList()
- self.parsestr = ''
- self.parselist = ['', 'kwlist']
- self.codebefore = []
- self.codeafter = []
- self.arglist = []
- self.kwlist = []
- def get_parselist(self):
- return string.join(self.parselist, ', ')
- def get_codebefore(self):
- return string.join(self.codebefore, '')
- def get_codeafter(self):
- return string.join(self.codeafter, '')
- def get_arglist(self):
- return string.join(self.arglist, ', ')
- def get_varlist(self):
- return str(self.varlist)
- def get_kwlist(self):
- ret = ' static char *kwlist[] = { %s };\n' % \
- string.join(self.kwlist + [ 'NULL' ], ', ')
- if not self.get_varlist():
- ret = ret + '\n'
- return ret
-
- def add_parselist(self, codes, parseargs, keywords):
- self.parsestr = self.parsestr + codes
- for arg in parseargs:
- self.parselist.append(arg)
- for kw in keywords:
- if keyword.iskeyword(kw):
- kw = kw + '_'
- self.kwlist.append('"%s"' % kw)
-
-class ArgType:
- def write_param(self, ptype, pname, pdflt, pnull, info):
- """Add code to the WrapperInfo instance to handle
- parameter."""
- raise RuntimeError("write_param not implemented for %s"
- % self.__class__.__name__)
- def write_return(self, ptype, ownsreturn, info):
- """Adds a variable named ret of the return type to
- info.varlist, and add any required code to info.codeafter to
- convert the return value to a python object."""
- raise RuntimeError("write_return not implemented for %s"
- % self.__class__.__name__)
-
-class NoneArg(ArgType):
- def write_return(self, ptype, ownsreturn, info):
- info.codeafter.append(' Py_INCREF(Py_None);\n' +
- ' return Py_None;')
-
-class StringArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt != None:
- if pdflt != 'NULL': pdflt = '"' + pdflt + '"'
- info.varlist.add('char', '*' + pname + ' = ' + pdflt)
- else:
- info.varlist.add('char', '*' + pname)
- info.arglist.append(pname)
- if pnull:
- info.add_parselist('z', ['&' + pname], [pname])
- else:
- info.add_parselist('s', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- if ownsreturn:
- # have to free result ...
- info.varlist.add('gchar', '*ret')
- info.codeafter.append(' if (ret) {\n' +
- ' PyObject *py_ret = PyString_FromString(ret);\n' +
- ' g_free(ret);\n' +
- ' return py_ret;\n' +
- ' }\n' +
- ' Py_INCREF(Py_None);\n' +
- ' return Py_None;')
- else:
- info.varlist.add('const gchar', '*ret')
- info.codeafter.append(' if (ret)\n' +
- ' return PyString_FromString(ret);\n'+
- ' Py_INCREF(Py_None);\n' +
- ' return Py_None;')
-
-class UCharArg(ArgType):
- # allows strings with embedded NULLs.
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('guchar', '*' + pname + ' = "' + pdflt + '"')
- else:
- info.varlist.add('guchar', '*' + pname)
- if py_ssize_t_clean:
- info.varlist.add('Py_ssize_t', pname + '_len')
- else:
- info.varlist.add('int', pname + '_len')
- info.arglist.append(pname)
- if pnull:
- info.add_parselist('z#', ['&' + pname, '&' + pname + '_len'],
- [pname])
- else:
- info.add_parselist('s#', ['&' + pname, '&' + pname + '_len'],
- [pname])
-
-class CharArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('char', pname + " = '" + pdflt + "'")
- else:
- info.varlist.add('char', pname)
- info.arglist.append(pname)
- info.add_parselist('c', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('gchar', 'ret')
- info.codeafter.append(' return PyString_FromStringAndSize(&ret, 1);')
-class GUniCharArg(ArgType):
- ret_tmpl = ('#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2\n'
- ' if (ret > 0xffff) {\n'
- ' PyErr_SetString(PyExc_RuntimeError, "returned character can not be represented in 16-bit unicode");\n'
- ' return NULL;\n'
- ' }\n'
- '#endif\n'
- ' py_ret = (Py_UNICODE)ret;\n'
- ' return PyUnicode_FromUnicode(&py_ret, 1);\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('gunichar', pname + " = '" + pdflt + "'")
- else:
- info.varlist.add('gunichar', pname)
- info.arglist.append(pname)
- info.add_parselist('O&', ['pyg_pyobj_to_unichar_conv', '&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('gunichar', 'ret')
- info.varlist.add('Py_UNICODE', 'py_ret')
- info.codeafter.append(self.ret_tmpl)
-
-
-class IntArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('int', pname + ' = ' + pdflt)
- else:
- info.varlist.add('int', pname)
- info.arglist.append(pname)
- info.add_parselist('i', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('int', 'ret')
- info.codeafter.append(' return PyInt_FromLong(ret);')
-
-class UIntArg(ArgType):
- dflt = (' if (py_%(name)s) {\n'
- ' if (PyLong_Check(py_%(name)s))\n'
- ' %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n'
- ' else if (PyInt_Check(py_%(name)s))\n'
- ' %(name)s = PyInt_AsLong(py_%(name)s);\n'
- ' else\n'
- ' PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n'
- ' if (PyErr_Occurred())\n'
- ' return NULL;\n'
- ' }\n')
- before = (' if (PyLong_Check(py_%(name)s))\n'
- ' %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n'
- ' else if (PyInt_Check(py_%(name)s))\n'
- ' %(name)s = PyInt_AsLong(py_%(name)s);\n'
- ' else\n'
- ' PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n'
- ' if (PyErr_Occurred())\n'
- ' return NULL;\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if not pdflt:
- pdflt = '0';
-
- info.varlist.add(ptype, pname + ' = ' + pdflt)
- info.codebefore.append(self.dflt % {'name':pname})
- info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add(ptype, 'ret')
- info.codeafter.append(' return PyLong_FromUnsignedLong(ret);')
-
-class SizeArg(ArgType):
-
- if struct.calcsize('P') <= struct.calcsize('l'):
- llp64 = True
- else:
- llp64 = False
-
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add(ptype, pname + ' = ' + pdflt)
- else:
- info.varlist.add(ptype, pname)
- info.arglist.append(pname)
- if self.llp64:
- info.add_parselist('k', ['&' + pname], [pname])
- else:
- info.add_parselist('K', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add(ptype, 'ret')
- if self.llp64:
- info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);\n')
- else:
- info.codeafter.append(' return PyLong_FromUnsignedLong(ret);\n')
-
-class SSizeArg(ArgType):
-
- if struct.calcsize('P') <= struct.calcsize('l'):
- llp64 = True
- else:
- llp64 = False
-
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add(ptype, pname + ' = ' + pdflt)
- else:
- info.varlist.add(ptype, pname)
- info.arglist.append(pname)
- if self.llp64:
- info.add_parselist('l', ['&' + pname], [pname])
- else:
- info.add_parselist('L', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add(ptype, 'ret')
- if self.llp64:
- info.codeafter.append(' return PyLong_FromLongLong(ret);\n')
- else:
- info.codeafter.append(' return PyLong_FromLong(ret);\n')
-
-class LongArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add(ptype, pname + ' = ' + pdflt)
- else:
- info.varlist.add(ptype, pname)
- info.arglist.append(pname)
- info.add_parselist('l', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add(ptype, 'ret')
- info.codeafter.append(' return PyInt_FromLong(ret);\n')
-
-class BoolArg(IntArg):
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('int', 'ret')
- info.codeafter.append(' return PyBool_FromLong(ret);\n')
-
-class TimeTArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('time_t', pname + ' = ' + pdflt)
- else:
- info.varlist.add('time_t', pname)
- info.arglist.append(pname)
- info.add_parselist('i', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('time_t', 'ret')
- info.codeafter.append(' return PyInt_FromLong(ret);')
-
-class ULongArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('unsigned long', pname + ' = ' + pdflt)
- else:
- info.varlist.add('unsigned long', pname)
- info.arglist.append(pname)
- info.add_parselist('k', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add(ptype, 'ret')
- info.codeafter.append(' return PyLong_FromUnsignedLong(ret);\n')
-
-class UInt32Arg(ULongArg):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- ULongArg.write_param(self, ptype, pname, pdflt, pnull, info)
- ## if sizeof(unsigned long) > sizeof(unsigned int), we need to
- ## check the value is within guint32 range
- if struct.calcsize('L') > struct.calcsize('I'):
- info.codebefore.append((
- ' if (%(pname)s > G_MAXUINT32) {\n'
- ' PyErr_SetString(PyExc_ValueError,\n'
- ' "Value out of range in conversion of"\n'
- ' " %(pname)s parameter to unsigned 32 bit integer");\n'
- ' return NULL;\n'
- ' }\n') % vars())
-
-class Int64Arg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('gint64', pname + ' = ' + pdflt)
- else:
- info.varlist.add('gint64', pname)
- info.arglist.append(pname)
- info.add_parselist('L', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('gint64', 'ret')
- info.codeafter.append(' return PyLong_FromLongLong(ret);')
-
-class UInt64Arg(ArgType):
- dflt = ' if (py_%(name)s)\n' \
- ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
- before = ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n'
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('guint64', pname + ' = ' + pdflt)
- info.codebefore.append(self.dflt % {'name':pname})
- else:
- info.varlist.add('guint64', pname)
- info.codebefore.append(self.before % {'name':pname})
- info.varlist.add('PyObject', "*py_" + pname + ' = NULL')
- info.arglist.append(pname)
- info.add_parselist('O!', ['&PyLong_Type', '&py_' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('guint64', 'ret')
- info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);')
-
-
-class DoubleArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('double', pname + ' = ' + pdflt)
- else:
- info.varlist.add('double', pname)
- info.arglist.append(pname)
- info.add_parselist('d', ['&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('double', 'ret')
- info.codeafter.append(' return PyFloat_FromDouble(ret);')
-
-class FileArg(ArgType):
- nulldflt = (' if (py_%(name)s == Py_None)\n'
- ' %(name)s = NULL;\n'
- ' else if (py_%(name)s && PyFile_Check(py_%(name)s)\n'
- ' %s = PyFile_AsFile(py_%(name)s);\n'
- ' else if (py_%(name)s) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n'
- ' return NULL;\n'
- ' }')
- null = (' if (py_%(name)s && PyFile_Check(py_%(name)s)\n'
- ' %(name)s = PyFile_AsFile(py_%(name)s);\n'
- ' else if (py_%(name)s != Py_None) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n'
- ' return NULL;\n'
- ' }\n')
- dflt = (' if (py_%(name)s)\n'
- ' %(name)s = PyFile_AsFile(py_%(name)s);\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- if pdflt:
- info.varlist.add('FILE', '*' + pname + ' = ' + pdflt)
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.nulldflt % {'name':pname})
- else:
- info.varlist.add('FILE', '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname)
- info.codebefore.append(self.null & {'name':pname})
- info.arglist.appned(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- else:
- if pdflt:
- info.varlist.add('FILE', '*' + pname + ' = ' + pdflt)
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.dflt % {'name':pname})
- info.arglist.append(pname)
- else:
- info.varlist.add('PyObject', '*' + pname)
- info.arglist.append('PyFile_AsFile(' + pname + ')')
- info.add_parselist('O!', ['&PyFile_Type', '&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('FILE', '*ret')
- info.codeafter.append(' if (ret)\n' +
- ' return PyFile_FromFile(ret, "", "", fclose);\n' +
- ' Py_INCREF(Py_None);\n' +
- ' return Py_None;')
-
-class EnumArg(ArgType):
- enum = (' if (pyg_enum_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n'
- ' return NULL;\n')
- def __init__(self, enumname, typecode):
- self.enumname = enumname
- self.typecode = typecode
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add(self.enumname, pname + ' = ' + pdflt)
- else:
- info.varlist.add(self.enumname, pname)
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.enum % { 'typecode': self.typecode,
- 'name': pname})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname]);
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('gint', 'ret')
- info.codeafter.append(' return pyg_enum_from_gtype(%s, ret);' % self.typecode)
-
-class FlagsArg(ArgType):
- flag = (' if (%(default)spyg_flags_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n'
- ' return NULL;\n')
- def __init__(self, flagname, typecode):
- self.flagname = flagname
- self.typecode = typecode
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add(self.flagname, pname + ' = ' + pdflt)
- default = "py_%s && " % (pname,)
- else:
- info.varlist.add(self.flagname, pname)
- default = ""
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.flag % {'default':default,
- 'typecode':self.typecode,
- 'name':pname})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('guint', 'ret')
- info.codeafter.append(' return pyg_flags_from_gtype(%s, ret);' % self.typecode)
-
-class ObjectArg(ArgType):
- # should change these checks to more typesafe versions that check
- # a little further down in the class heirachy.
- nulldflt = (' if ((PyObject *)py_%(name)s == Py_None)\n'
- ' %(name)s = NULL;\n'
- ' else if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n'
- ' %(name)s = %(cast)s(py_%(name)s->obj);\n'
- ' else if (py_%(name)s) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
- ' return NULL;\n'
- ' }\n')
- null = (' if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n'
- ' %(name)s = %(cast)s(py_%(name)s->obj);\n'
- ' else if ((PyObject *)py_%(name)s != Py_None) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
- ' return NULL;\n'
- ' }\n')
- dflt = ' if (py_%(name)s)\n' \
- ' %(name)s = %(cast)s(py_%(name)s->obj);\n'
- def __init__(self, objname, parent, typecode):
- self.objname = objname
- self.cast = string.replace(typecode, '_TYPE_', '_', 1)
- self.parent = parent
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- if pdflt:
- info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt)
- info.varlist.add('PyGObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.nulldflt % {'name':pname,
- 'cast':self.cast,
- 'type':self.objname})
- else:
- info.varlist.add(self.objname, '*' + pname + ' = NULL')
- info.varlist.add('PyGObject', '*py_' + pname)
- info.codebefore.append(self.null % {'name':pname,
- 'cast':self.cast,
- 'type':self.objname})
- if ptype.endswith('*'):
- typename = ptype[:-1]
- try:
- const, typename = typename.split('const-')
- except ValueError:
- const = ''
- if typename != ptype:
- info.arglist.append('(%s *) %s' % (ptype[:-1], pname))
- else:
- info.arglist.append(pname)
-
- info.add_parselist('O', ['&py_' + pname], [pname])
- else:
- if pdflt:
- info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt)
- info.varlist.add('PyGObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.dflt % {'name':pname,
- 'cast':self.cast})
- info.arglist.append(pname)
- info.add_parselist('O!', ['&Py%s_Type' % self.objname,
- '&py_' + pname], [pname])
- else:
- info.varlist.add('PyGObject', '*' + pname)
- info.arglist.append('%s(%s->obj)' % (self.cast, pname))
- info.add_parselist('O!', ['&Py%s_Type' % self.objname,
- '&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- if ptype.endswith('*'):
- typename = ptype[:-1]
- try:
- const, typename = typename.split('const-')
- except ValueError:
- const = ''
- info.varlist.add(typename, '*ret')
- if ownsreturn:
- info.varlist.add('PyObject', '*py_ret')
- info.codeafter.append(' py_ret = pygobject_new((GObject *)ret);\n'
- ' if (ret != NULL)\n'
- ' g_object_unref(ret);\n'
- ' return py_ret;')
- else:
- info.codeafter.append(' /* pygobject_new handles NULL checking */\n' +
- ' return pygobject_new((GObject *)ret);')
-
-class BoxedArg(ArgType):
- # haven't done support for default args. Is it needed?
- check = (' if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n'
- ' %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n'
- ' else {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n'
- ' return NULL;\n'
- ' }\n')
- null = (' if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n'
- ' %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n'
- ' else if (py_%(name)s != Py_None) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n'
- ' return NULL;\n'
- ' }\n')
- def __init__(self, ptype, typecode):
- self.typename = ptype
- self.typecode = typecode
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- info.varlist.add(self.typename, '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
- info.codebefore.append(self.null % {'name': pname,
- 'typename': self.typename,
- 'typecode': self.typecode})
- else:
- info.varlist.add(self.typename, '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname)
- info.codebefore.append(self.check % {'name': pname,
- 'typename': self.typename,
- 'typecode': self.typecode})
- if ptype[-1] == '*':
- typename = ptype[:-1]
- if typename[:6] == 'const-': typename = typename[6:]
- if typename != self.typename:
- info.arglist.append('(%s *)%s' % (ptype[:-1], pname))
- else:
- info.arglist.append(pname)
- else:
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- ret_tmpl = ' /* pyg_boxed_new handles NULL checking */\n' \
- ' return pyg_boxed_new(%(typecode)s, %(ret)s, %(copy)s, TRUE);'
- def write_return(self, ptype, ownsreturn, info):
- if ptype[-1] == '*':
- decl_type = self.typename
- ret = 'ret'
- if ptype[:6] == 'const-':
- decl_type = 'const ' + self.typename
- ret = '(%s*) ret' % (self.typename,)
- info.varlist.add(decl_type, '*ret')
- else:
- info.varlist.add(self.typename, 'ret')
- ret = '&ret'
- ownsreturn = 0 # of course it can't own a ref to a local var ...
- info.codeafter.append(self.ret_tmpl %
- { 'typecode': self.typecode,
- 'ret': ret,
- 'copy': ownsreturn and 'FALSE' or 'TRUE'})
-
-class CustomBoxedArg(ArgType):
- # haven't done support for default args. Is it needed?
- null = (' if (%(check)s(py_%(name)s))\n'
- ' %(name)s = %(get)s(py_%(name)s);\n'
- ' else if (py_%(name)s != Py_None) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n'
- ' return NULL;\n'
- ' }\n')
- def __init__(self, ptype, pytype, getter, new):
- self.pytype = pytype
- self.getter = getter
- self.checker = 'Py' + ptype + '_Check'
- self.new = new
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- info.varlist.add(ptype[:-1], '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
- info.codebefore.append(self.null % {'name': pname,
- 'get': self.getter,
- 'check': self.checker,
- 'type': ptype[:-1]})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- else:
- info.varlist.add('PyObject', '*' + pname)
- info.arglist.append(self.getter + '(' + pname + ')')
- info.add_parselist('O!', ['&' + self.pytype, '&' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add(ptype[:-1], '*ret')
- info.codeafter.append(' if (ret)\n' +
- ' return ' + self.new + '(ret);\n' +
- ' Py_INCREF(Py_None);\n' +
- ' return Py_None;')
-
-class PointerArg(ArgType):
- # haven't done support for default args. Is it needed?
- check = (' if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n'
- ' %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n'
- ' else {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n'
- ' return NULL;\n'
- ' }\n')
- null = (' if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n'
- ' %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n'
- ' else if (py_%(name)s != Py_None) {\n'
- ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n'
- ' return NULL;\n'
- ' }\n')
- def __init__(self, ptype, typecode):
- self.typename = ptype
- self.typecode = typecode
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- info.varlist.add(self.typename, '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
- info.codebefore.append(self.null % {'name': pname,
- 'typename': self.typename,
- 'typecode': self.typecode})
- else:
- info.varlist.add(self.typename, '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname)
- info.codebefore.append(self.check % {'name': pname,
- 'typename': self.typename,
- 'typecode': self.typecode})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- if ptype[-1] == '*':
- info.varlist.add(self.typename, '*ret')
- info.codeafter.append(' /* pyg_pointer_new handles NULL checking */\n' +
- ' return pyg_pointer_new(' + self.typecode + ', ret);')
- else:
- info.varlist.add(self.typename, 'ret')
- info.codeafter.append(' /* pyg_pointer_new handles NULL checking */\n' +
- ' return pyg_pointer_new(' + self.typecode + ', &ret);')
-
-class AtomArg(IntArg):
- dflt = ' if (py_%(name)s) {\n' \
- ' %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n' \
- ' if (PyErr_Occurred())\n' \
- ' return NULL;\n' \
- ' }\n'
- atom = (' %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n'
- ' if (PyErr_Occurred())\n'
- ' return NULL;\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pdflt:
- info.varlist.add('GdkAtom', pname + ' = ' + pdflt)
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.dflt % {'name': pname})
- else:
- info.varlist.add('GdkAtom', pname)
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.atom % {'name': pname})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('GdkAtom', 'ret')
- info.varlist.add('PyObject *', 'py_ret')
- info.varlist.add('gchar *', 'name')
- info.codeafter.append(' name = gdk_atom_name(ret);\n'
- ' py_ret = PyString_FromString(name);\n'
- ' g_free(name);\n'
- ' return py_ret;')
-
-class GTypeArg(ArgType):
- gtype = (' if ((%(name)s = pyg_type_from_object(py_%(name)s)) == 0)\n'
- ' return NULL;\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- info.varlist.add('GType', pname)
- info.varlist.add('PyObject', '*py_' + pname + ' = NULL')
- info.codebefore.append(self.gtype % {'name': pname})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('GType', 'ret')
- info.codeafter.append(' return pyg_type_wrapper_new(ret);')
-
-# simple GError handler.
-class GErrorArg(ArgType):
- handleerror = (' if (pyg_error_check(&%(name)s))\n'
- ' return NULL;\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- info.varlist.add('GError', '*' + pname + ' = NULL')
- info.arglist.append('&' + pname)
- info.codeafter.append(self.handleerror % { 'name': pname })
-
-class GtkTreePathArg(ArgType):
- # haven't done support for default args. Is it needed?
- normal = (' %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n'
- ' if (!%(name)s) {\n'
- ' PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n'
- ' return NULL;\n'
- ' }\n')
- null = (' if (py_%(name)s != Py_None) {\n'
- ' %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n'
- ' if (!%(name)s) {\n'
- ' PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n'
- ' return NULL;\n'
- ' }\n'
- ' }\n')
- freepath = (' if (%(name)s)\n'
- ' gtk_tree_path_free(%(name)s);\n')
- def __init__(self):
- pass
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- info.varlist.add('GtkTreePath', '*' + pname + ' = NULL')
- info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
- info.codebefore.append(self.null % {'name': pname})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- else:
- info.varlist.add('GtkTreePath', '*' + pname)
- info.varlist.add('PyObject', '*py_' + pname)
- info.codebefore.append(self.normal % {'name': pname})
- info.arglist.append(pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- info.codeafter.append(self.freepath % {'name': pname})
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('GtkTreePath', '*ret')
- if ownsreturn:
- info.codeafter.append(' if (ret) {\n'
- ' PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n'
- ' gtk_tree_path_free(ret);\n'
- ' return py_ret;\n'
- ' }\n'
- ' Py_INCREF(Py_None);\n'
- ' return Py_None;')
- else:
- info.codeafter.append(' if (ret) {\n'
- ' PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n'
- ' return py_ret;\n'
- ' }\n'
- ' Py_INCREF(Py_None);\n'
- ' return Py_None;')
-
-class GdkRectanglePtrArg(ArgType):
- normal = (' if (!pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s))\n'
- ' return NULL;\n')
- null = (' if (py_%(name)s == Py_None)\n'
- ' %(name)s = NULL;\n'
- ' else if (pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s_rect))\n'
- ' %(name)s = &%(name)s_rect;\n'
- ' else\n'
- ' return NULL;\n')
- def write_param(self, ptype, pname, pdflt, pnull, info):
- if pnull:
- info.varlist.add('GdkRectangle', pname + '_rect = { 0, 0, 0, 0 }')
- info.varlist.add('GdkRectangle', '*' + pname)
- info.varlist.add('PyObject', '*py_' + pname + ' = Py_None')
- info.add_parselist('O', ['&py_' + pname], [pname])
- info.arglist.append(pname)
- info.codebefore.append(self.null % {'name': pname})
- else:
- info.varlist.add('GdkRectangle', pname + ' = { 0, 0, 0, 0 }')
- info.varlist.add('PyObject', '*py_' + pname)
- info.add_parselist('O', ['&py_' + pname], [pname])
- info.arglist.append('&' + pname)
- info.codebefore.append(self.normal % {'name': pname})
-
-class GdkRectangleArg(ArgType):
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add('GdkRectangle', 'ret')
- info.codeafter.append(' return pyg_boxed_new(GDK_TYPE_RECTANGLE, &ret, TRUE, TRUE);')
-
-class PyObjectArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- info.varlist.add('PyObject', '*' + pname)
- info.add_parselist('O', ['&' + pname], [pname])
- info.arglist.append(pname)
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add("PyObject", "*ret")
- if ownsreturn:
- info.codeafter.append(' if (ret) {\n'
- ' return ret;\n'
- ' }\n'
- ' Py_INCREF(Py_None);\n'
- ' return Py_None;')
- else:
- info.codeafter.append(' if (!ret) ret = Py_None;\n'
- ' Py_INCREF(ret);\n'
- ' return ret;')
-
-class CairoArg(ArgType):
- def write_param(self, ptype, pname, pdflt, pnull, info):
- info.varlist.add('PycairoContext', '*' + pname)
- info.add_parselist('O!', ['&PycairoContext_Type', '&' + pname], [pname])
- info.arglist.append('%s->ctx' % pname)
- def write_return(self, ptype, ownsreturn, info):
- info.varlist.add("cairo_t", "*ret")
- if ownsreturn:
- info.codeafter.append(' return PycairoContext_FromContext(ret, NULL, NULL);')
- else:
- info.codeafter.append(' cairo_reference(ret);\n'
- ' return PycairoContext_FromContext(ret, NULL, NULL);')
-
-
-class ArgMatcher:
- def __init__(self):
- self.argtypes = {}
- self.reverse_argtypes = {}
- self.reverse_rettypes = {}
-
- def register(self, ptype, handler, overwrite=False):
- if not overwrite and ptype in self.argtypes:
- return
- self.argtypes[ptype] = handler
- def register_reverse(self, ptype, handler):
- self.reverse_argtypes[ptype] = handler
- def register_reverse_ret(self, ptype, handler):
- self.reverse_rettypes[ptype] = handler
-
- def register_enum(self, ptype, typecode):
- if typecode is None:
- self.register(ptype, IntArg())
- else:
- self.register(ptype, EnumArg(ptype, typecode))
- def register_flag(self, ptype, typecode):
- if typecode is None:
- self.register(ptype, IntArg())
- else:
- self.register(ptype, FlagsArg(ptype, typecode))
- def register_object(self, ptype, parent, typecode):
- oa = ObjectArg(ptype, parent, typecode)
- self.register(ptype, oa) # in case I forget the * in the .defs
- self.register(ptype+'*', oa)
- self.register('const-'+ptype+'*', oa)
- if ptype == 'GdkPixmap':
- # hack to handle GdkBitmap synonym.
- self.register('GdkBitmap', oa)
- self.register('GdkBitmap*', oa)
- def register_boxed(self, ptype, typecode):
- if self.argtypes.has_key(ptype): return
- arg = BoxedArg(ptype, typecode)
- self.register(ptype, arg)
- self.register(ptype+'*', arg)
- self.register('const-'+ptype+'*', arg)
- def register_custom_boxed(self, ptype, pytype, getter, new):
- arg = CustomBoxedArg(ptype, pytype, getter, new)
- self.register(ptype+'*', arg)
- self.register('const-'+ptype+'*', arg)
- def register_pointer(self, ptype, typecode):
- arg = PointerArg(ptype, typecode)
- self.register(ptype, arg)
- self.register(ptype+'*', arg)
- self.register('const-'+ptype+'*', arg)
-
- def get(self, ptype):
- try:
- return self.argtypes[ptype]
- except KeyError:
- if ptype[:8] == 'GdkEvent' and ptype[-1] == '*':
- return self.argtypes['GdkEvent*']
- raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
- def _get_reverse_common(self, ptype, registry):
- props = dict(c_type=ptype)
- try:
- return registry[ptype], props
- except KeyError:
- try:
- handler = self.argtypes[ptype]
- except KeyError:
- if ptype.startswith('GdkEvent') and ptype.endswith('*'):
- handler = self.argtypes['GdkEvent*']
- else:
- raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
- if isinstance(handler, ObjectArg):
- return registry['GObject*'], props
- elif isinstance(handler, EnumArg):
- props['typecode'] = handler.typecode
- props['enumname'] = handler.enumname
- return registry['GEnum'], props
- elif isinstance(handler, FlagsArg):
- props['typecode'] = handler.typecode
- props['flagname'] = handler.flagname
- return registry['GFlags'], props
- elif isinstance(handler, BoxedArg):
- props['typecode'] = handler.typecode
- props['typename'] = handler.typename
- return registry['GBoxed'], props
- else:
- raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,))
-
- def get_reverse(self, ptype):
- return self._get_reverse_common(ptype, self.reverse_argtypes)
-
- def get_reverse_ret(self, ptype):
- ret, props = self._get_reverse_common(ptype, self.reverse_rettypes)
- if hasattr(ptype, 'optional') and ptype.optional:
- if ret.supports_optional:
- props['optional'] = True
- else:
- raise ArgTypeNotFoundError("Unsupported 'optional' for %s"
- % (ptype,))
- return ret, props
-
- def object_is_a(self, otype, parent):
- if otype == None: return 0
- if otype == parent: return 1
- if not self.argtypes.has_key(otype): return 0
- return self.object_is_a(self.get(otype).parent, parent)
-
-matcher = ArgMatcher()
-
-arg = NoneArg()
-matcher.register(None, arg)
-matcher.register('none', arg)
-
-arg = StringArg()
-matcher.register('char*', arg)
-matcher.register('gchar*', arg)
-matcher.register('const-char*', arg)
-matcher.register('char-const*', arg)
-matcher.register('const-gchar*', arg)
-matcher.register('gchar-const*', arg)
-matcher.register('string', arg)
-matcher.register('static_string', arg)
-
-arg = UCharArg()
-matcher.register('unsigned-char*', arg)
-matcher.register('const-guchar*', arg)
-matcher.register('const-guint8*', arg)
-matcher.register('guchar*', arg)
-
-arg = CharArg()
-matcher.register('char', arg)
-matcher.register('gchar', arg)
-matcher.register('guchar', arg)
-
-arg = GUniCharArg()
-matcher.register('gunichar', arg)
-
-arg = IntArg()
-matcher.register('int', arg)
-matcher.register('gint', arg)
-matcher.register('short', arg)
-matcher.register('gshort', arg)
-matcher.register('gushort', arg)
-matcher.register('gsize', SizeArg())
-matcher.register('gssize', SSizeArg())
-matcher.register('guint8', arg)
-matcher.register('gint8', arg)
-matcher.register('guint16', arg)
-matcher.register('gint16', arg)
-matcher.register('gint32', arg)
-matcher.register('GTime', arg)
-matcher.register('GSeekType', arg) # Hack, but we have no python wrapper
-
-arg = LongArg()
-matcher.register('long', arg)
-matcher.register('glong', arg)
-
-arg = UIntArg()
-matcher.register('guint', arg)
-
-arg = BoolArg()
-matcher.register('gboolean', arg)
-
-arg = TimeTArg()
-matcher.register('time_t', arg)
-
-matcher.register('guint32', UInt32Arg())
-
-arg = ULongArg()
-matcher.register('gulong', arg)
-
-arg = Int64Arg()
-matcher.register('gint64', arg)
-matcher.register('long-long', arg)
-matcher.register('goffset', arg)
-
-arg = UInt64Arg()
-matcher.register('guint64', arg)
-matcher.register('unsigned-long-long', arg)
-
-arg = DoubleArg()
-matcher.register('double', arg)
-matcher.register('gdouble', arg)
-matcher.register('float', arg)
-matcher.register('gfloat', arg)
-
-arg = FileArg()
-matcher.register('FILE*', arg)
-
-# enums, flags, objects
-
-matcher.register('GdkAtom', AtomArg())
-
-matcher.register('GType', GTypeArg())
-matcher.register('GtkType', GTypeArg())
-
-matcher.register('GError**', GErrorArg())
-matcher.register('GtkTreePath*', GtkTreePathArg())
-matcher.register('GdkRectangle*', GdkRectanglePtrArg())
-matcher.register('GtkAllocation*', GdkRectanglePtrArg())
-matcher.register('GdkRectangle', GdkRectangleArg())
-matcher.register('PyObject*', PyObjectArg())
-
-matcher.register('GdkNativeWindow', ULongArg())
-
-matcher.register_object('GObject', None, 'G_TYPE_OBJECT')
-
-del arg
-
-matcher.register('cairo_t*', CairoArg())
-matcher.register_boxed("GClosure", "G_TYPE_CLOSURE")
diff --git a/codegen/code-coverage.py b/codegen/code-coverage.py
deleted file mode 100755
index 1dc54c3..0000000
--- a/codegen/code-coverage.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /usr/bin/env python
-
-from __future__ import generators
-import sys, os
-
-def read_symbols(file, type=None, dynamic=0):
- if dynamic:
- cmd = 'nm -D %s' % file
- else:
- cmd = 'nm %s' % file
- for line in os.popen(cmd, 'r'):
- if line[0] != ' ': # has an address as first bit of line
- while line[0] != ' ':
- line = line[1:]
- while line[0] == ' ':
- line = line[1:]
- # we should be up to "type symbolname" now
- sym_type = line[0]
- symbol = line[1:].strip()
-
- if not type or type == sym_type:
- yield symbol
-
-def main():
- if len(sys.argv) != 3:
- sys.stderr.write('usage: coverage-check library.so wrapper.so\n')
- sys.exit(1)
- library = sys.argv[1]
- wrapper = sys.argv[2]
-
- # first create a dict with all referenced symbols in the wrapper
- # should really be a set, but a dict will do ...
- wrapper_symbols = {}
- for symbol in read_symbols(wrapper, type='U', dynamic=1):
- wrapper_symbols[symbol] = 1
-
- # now go through the library looking for matches on the defined symbols:
- for symbol in read_symbols(library, type='T', dynamic=1):
- if symbol[0] == '_': continue
- if symbol not in wrapper_symbols:
- print symbol
-
-if __name__ == '__main__':
- main()
diff --git a/codegen/codegen.py b/codegen/codegen.py
deleted file mode 100755
index 008f01c..0000000
--- a/codegen/codegen.py
+++ /dev/null
@@ -1,1722 +0,0 @@
-#! /usr/bin/env python
-
-import getopt
-import keyword
-import os
-import string
-import sys
-
-import argtypes
-import definitions
-import defsparser
-import override
-import reversewrapper
-import warnings
-
-class Coverage(object):
- def __init__(self, name):
- self.name = name
- self.wrapped = 0
- self.not_wrapped = 0
-
- def declare_wrapped(self):
- self.wrapped += 1
-
- def declare_not_wrapped(self):
- self.not_wrapped += 1
-
- def printstats(self):
- total = self.wrapped + self.not_wrapped
- fd = sys.stderr
- if total:
- fd.write("***INFO*** The coverage of %s is %.2f%% (%i/%i)\n" %
- (self.name,
- float(self.wrapped*100)/total,
- self.wrapped,
- total))
- else:
- fd.write("***INFO*** There are no declared %s.\n" % self.name)
-
-functions_coverage = Coverage("global functions")
-methods_coverage = Coverage("methods")
-vproxies_coverage = Coverage("virtual proxies")
-vaccessors_coverage = Coverage("virtual accessors")
-iproxies_coverage = Coverage("interface proxies")
-
-def exc_info():
- warnings.warn("deprecated", DeprecationWarning, stacklevel=2)
- #traceback.print_exc()
- etype, value, tb = sys.exc_info()
- ret = ""
- try:
- sval = str(value)
- if etype == argtypes.ArgTypeError:
- ret = "No ArgType for %s" % (sval,)
- else:
- ret = sval
- finally:
- del etype, value, tb
- return ret
-
-def fixname(name):
- if keyword.iskeyword(name):
- return name + '_'
- return name
-
-class FileOutput:
- '''Simple wrapper for file object, that makes writing #line
- statements easier.''' # "
- def __init__(self, fp, filename=None):
- self.fp = fp
- self.lineno = 1
- if filename:
- self.filename = filename
- else:
- self.filename = self.fp.name
- # handle writing to the file, and keep track of the line number ...
- def write(self, str):
- self.fp.write(str)
- self.lineno = self.lineno + string.count(str, '\n')
- def writelines(self, sequence):
- for line in sequence:
- self.write(line)
- def close(self):
- self.fp.close()
- def flush(self):
- self.fp.flush()
-
- def setline(self, linenum, filename):
- '''writes out a #line statement, for use by the C
- preprocessor.''' # "
- self.write('#line %d "%s"\n' % (linenum, filename))
- def resetline(self):
- '''resets line numbering to the original file'''
- self.setline(self.lineno + 1, self.filename)
-
-class Wrapper:
- type_tmpl = (
- 'PyTypeObject G_GNUC_INTERNAL Py%(typename)s_Type = {\n'
- ' PyObject_HEAD_INIT(NULL)\n'
- ' 0, /* ob_size */\n'
- ' "%(classname)s", /* tp_name */\n'
- ' sizeof(%(tp_basicsize)s), /* tp_basicsize */\n'
- ' 0, /* tp_itemsize */\n'
- ' /* methods */\n'
- ' (destructor)%(tp_dealloc)s, /* tp_dealloc */\n'
- ' (printfunc)0, /* tp_print */\n'
- ' (getattrfunc)%(tp_getattr)s, /* tp_getattr */\n'
- ' (setattrfunc)%(tp_setattr)s, /* tp_setattr */\n'
- ' (cmpfunc)%(tp_compare)s, /* tp_compare */\n'
- ' (reprfunc)%(tp_repr)s, /* tp_repr */\n'
- ' (PyNumberMethods*)%(tp_as_number)s, /* tp_as_number */\n'
- ' (PySequenceMethods*)%(tp_as_sequence)s, /* tp_as_sequence */\n'
- ' (PyMappingMethods*)%(tp_as_mapping)s, /* tp_as_mapping */\n'
- ' (hashfunc)%(tp_hash)s, /* tp_hash */\n'
- ' (ternaryfunc)%(tp_call)s, /* tp_call */\n'
- ' (reprfunc)%(tp_str)s, /* tp_str */\n'
- ' (getattrofunc)%(tp_getattro)s, /* tp_getattro */\n'
- ' (setattrofunc)%(tp_setattro)s, /* tp_setattro */\n'
- ' (PyBufferProcs*)%(tp_as_buffer)s, /* tp_as_buffer */\n'
- ' %(tp_flags)s, /* tp_flags */\n'
- ' %(tp_doc)s, /* Documentation string */\n'
- ' (traverseproc)%(tp_traverse)s, /* tp_traverse */\n'
- ' (inquiry)%(tp_clear)s, /* tp_clear */\n'
- ' (richcmpfunc)%(tp_richcompare)s, /* tp_richcompare */\n'
- ' %(tp_weaklistoffset)s, /* tp_weaklistoffset */\n'
- ' (getiterfunc)%(tp_iter)s, /* tp_iter */\n'
- ' (iternextfunc)%(tp_iternext)s, /* tp_iternext */\n'
- ' (struct PyMethodDef*)%(tp_methods)s, /* tp_methods */\n'
- ' (struct PyMemberDef*)0, /* tp_members */\n'
- ' (struct PyGetSetDef*)%(tp_getset)s, /* tp_getset */\n'
- ' NULL, /* tp_base */\n'
- ' NULL, /* tp_dict */\n'
- ' (descrgetfunc)%(tp_descr_get)s, /* tp_descr_get */\n'
- ' (descrsetfunc)%(tp_descr_set)s, /* tp_descr_set */\n'
- ' %(tp_dictoffset)s, /* tp_dictoffset */\n'
- ' (initproc)%(tp_init)s, /* tp_init */\n'
- ' (allocfunc)%(tp_alloc)s, /* tp_alloc */\n'
- ' (newfunc)%(tp_new)s, /* tp_new */\n'
- ' (freefunc)%(tp_free)s, /* tp_free */\n'
- ' (inquiry)%(tp_is_gc)s /* tp_is_gc */\n'
- '};\n\n'
- )
-
- slots_list = [
- 'tp_getattr', 'tp_setattr', 'tp_getattro', 'tp_setattro',
- 'tp_compare', 'tp_repr',
- 'tp_as_number', 'tp_as_sequence', 'tp_as_mapping', 'tp_hash',
- 'tp_call', 'tp_str', 'tp_as_buffer', 'tp_richcompare', 'tp_iter',
- 'tp_iternext', 'tp_descr_get', 'tp_descr_set', 'tp_init',
- 'tp_alloc', 'tp_new', 'tp_free', 'tp_is_gc',
- 'tp_traverse', 'tp_clear', 'tp_dealloc', 'tp_flags', 'tp_doc'
- ]
-
- getter_tmpl = (
- 'static PyObject *\n'
- '%(funcname)s(PyObject *self, void *closure)\n'
- '{\n'
- '%(varlist)s'
- ' ret = %(field)s;\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
-
- parse_tmpl = (
- ' if (!PyArg_ParseTupleAndKeywords(args, kwargs,'
- '"%(typecodes)s:%(name)s"%(parselist)s))\n'
- ' return %(errorreturn)s;\n'
- )
-
- deprecated_tmpl = (
- ' if (PyErr_Warn(PyExc_DeprecationWarning, '
- '"%(deprecationmsg)s") < 0)\n'
- ' return %(errorreturn)s;\n'
- )
-
- methdef_tmpl = (
- ' { "%(name)s", (PyCFunction)%(cname)s, %(flags)s,\n'
- ' %(docstring)s },\n'
- )
-
- noconstructor = (
- 'static int\n'
- 'pygobject_no_constructor(PyObject *self, PyObject *args, '
- 'PyObject *kwargs)\n'
- '{\n'
- ' gchar buf[512];\n'
- '\n'
- ' g_snprintf(buf, sizeof(buf), "%s is an abstract widget", '
- 'self->ob_type->tp_name);\n'
- ' PyErr_SetString(PyExc_NotImplementedError, buf);\n'
- ' return -1;\n'
- '}\n\n'
- )
-
- function_tmpl = (
- 'static PyObject *\n'
- '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' %(begin_allow_threads)s\n'
- ' %(setreturn)s%(cname)s(%(arglist)s);\n'
- ' %(end_allow_threads)s\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
-
- virtual_accessor_tmpl = (
- 'static PyObject *\n'
- '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n'
- '{\n'
- ' gpointer klass;\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' klass = g_type_class_ref(pyg_type_from_object(cls));\n'
- ' if (%(class_cast_macro)s(klass)->%(virtual)s)\n'
- ' %(setreturn)s%(class_cast_macro)s(klass)->'
- '%(virtual)s(%(arglist)s);\n'
- ' else {\n'
- ' PyErr_SetString(PyExc_NotImplementedError, '
- '"virtual method %(name)s not implemented");\n'
- ' g_type_class_unref(klass);\n'
- ' return NULL;\n'
- ' }\n'
- ' g_type_class_unref(klass);\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
-
- # template for method calls
- constructor_tmpl = None
- method_tmpl = None
-
- def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)):
- self.parser = parser
- self.objinfo = objinfo
- self.overrides = overrides
- self.fp = fp
-
- def get_lower_name(self):
- return string.lower(string.replace(self.objinfo.typecode,
- '_TYPE_', '_', 1))
-
- def get_field_accessor(self, fieldname):
- raise NotImplementedError
-
- def get_initial_class_substdict(self): return {}
-
- def get_initial_constructor_substdict(self, constructor):
- return { 'name': '%s.__init__' % self.objinfo.py_name,
- 'errorreturn': '-1' }
-
- def get_initial_method_substdict(self, method):
- substdict = { 'name': '%s.%s' % (self.objinfo.py_name, method.name) }
- if method.unblock_threads:
- substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
- substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
- else:
- substdict['begin_allow_threads'] = ''
- substdict['end_allow_threads'] = ''
- return substdict
-
- def write_class(self):
- if self.overrides.is_type_ignored(self.objinfo.c_name):
- return
- self.fp.write('\n/* ----------- %s ----------- */\n\n' %
- self.objinfo.c_name)
- substdict = self.get_initial_class_substdict()
- if not substdict.has_key('tp_flags'):
- substdict['tp_flags'] = 'Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE'
- substdict['typename'] = self.objinfo.c_name
- if self.overrides.modulename:
- substdict['classname'] = '%s.%s' % (self.overrides.modulename,
- self.objinfo.name)
- else:
- substdict['classname'] = self.objinfo.name
- substdict['tp_doc'] = self.objinfo.docstring
-
- # Maybe this could be done in a nicer way, but I'll leave it as it is
- # for now: -- Johan
- if not self.overrides.slot_is_overriden('%s.tp_init' %
- self.objinfo.c_name):
- substdict['tp_init'] = self.write_constructor()
- substdict['tp_methods'] = self.write_methods()
- substdict['tp_getset'] = self.write_getsets()
-
- # handle slots ...
- for slot in self.slots_list:
-
- slotname = '%s.%s' % (self.objinfo.c_name, slot)
- slotfunc = '_wrap_%s_%s' % (self.get_lower_name(), slot)
- if slot[:6] == 'tp_as_':
- slotfunc = '&' + slotfunc
- if self.overrides.slot_is_overriden(slotname):
- data = self.overrides.slot_override(slotname)
- self.write_function(slotname, data)
- substdict[slot] = slotfunc
- else:
- if not substdict.has_key(slot):
- substdict[slot] = '0'
-
- self.fp.write(self.type_tmpl % substdict)
-
- self.write_virtuals()
-
- def write_function_wrapper(self, function_obj, template,
- handle_return=0, is_method=0, kwargs_needed=0,
- substdict=None):
- '''This function is the guts of all functions that generate
- wrappers for functions, methods and constructors.'''
- if not substdict: substdict = {}
-
- info = argtypes.WrapperInfo()
-
- substdict.setdefault('errorreturn', 'NULL')
-
- # for methods, we want the leading comma
- if is_method:
- info.arglist.append('')
-
- if function_obj.varargs:
- raise argtypes.ArgTypeNotFoundError("varargs functions not supported")
-
- for param in function_obj.params:
- if param.pdflt != None and '|' not in info.parsestr:
- info.add_parselist('|', [], [])
- handler = argtypes.matcher.get(param.ptype)
- handler.write_param(param.ptype, param.pname, param.pdflt,
- param.pnull, info)
-
- substdict['setreturn'] = ''
- if handle_return:
- if function_obj.ret not in ('none', None):
- substdict['setreturn'] = 'ret = '
- handler = argtypes.matcher.get(function_obj.ret)
- handler.write_return(function_obj.ret,
- function_obj.caller_owns_return, info)
-
- if function_obj.deprecated != None:
- deprecated = self.deprecated_tmpl % {
- 'deprecationmsg': function_obj.deprecated,
- 'errorreturn': substdict['errorreturn'] }
- else:
- deprecated = ''
-
- # if name isn't set, set it to function_obj.name
- substdict.setdefault('name', function_obj.name)
-
- if function_obj.unblock_threads:
- substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;'
- substdict['end_allow_threads'] = 'pyg_end_allow_threads;'
- else:
- substdict['begin_allow_threads'] = ''
- substdict['end_allow_threads'] = ''
-
- if self.objinfo:
- substdict['typename'] = self.objinfo.c_name
- substdict.setdefault('cname', function_obj.c_name)
- substdict['varlist'] = info.get_varlist()
- substdict['typecodes'] = info.parsestr
- substdict['parselist'] = info.get_parselist()
- substdict['arglist'] = info.get_arglist()
- substdict['codebefore'] = deprecated + (
- string.replace(info.get_codebefore(),
- 'return NULL', 'return ' + substdict['errorreturn'])
- )
- substdict['codeafter'] = (
- string.replace(info.get_codeafter(),
- 'return NULL',
- 'return ' + substdict['errorreturn']))
-
- if info.parsestr or kwargs_needed:
- substdict['parseargs'] = self.parse_tmpl % substdict
- substdict['extraparams'] = ', PyObject *args, PyObject *kwargs'
- flags = 'METH_VARARGS|METH_KEYWORDS'
-
- # prepend the keyword list to the variable list
- substdict['varlist'] = info.get_kwlist() + substdict['varlist']
- else:
- substdict['parseargs'] = ''
- substdict['extraparams'] = ''
- flags = 'METH_NOARGS'
-
- return template % substdict, flags
-
- def write_constructor(self):
- initfunc = '0'
- constructor = self.parser.find_constructor(self.objinfo,self.overrides)
- if not constructor:
- return self.write_default_constructor()
-
- funcname = constructor.c_name
- try:
- if self.overrides.is_overriden(funcname):
- data = self.overrides.override(funcname)
- self.write_function(funcname, data)
- self.objinfo.has_new_constructor_api = (
- self.objinfo.typecode in
- self.overrides.newstyle_constructors)
- else:
- # ok, a hack to determine if we should use
- # new-style constructores :P
- property_based = getattr(self,
- 'write_property_based_constructor',
- None)
- if property_based:
- if (len(constructor.params) == 0 or
- isinstance(constructor.params[0],
- definitions.Property)):
- # write_property_based_constructor is only
- # implemented in GObjectWrapper
- return self.write_property_based_constructor(
- constructor)
- else:
- sys.stderr.write(
- "Warning: generating old-style constructor for:" +
- constructor.c_name + '\n')
-
- # write constructor from template ...
- code = self.write_function_wrapper(constructor,
- self.constructor_tmpl,
- handle_return=0, is_method=0, kwargs_needed=1,
- substdict=self.get_initial_constructor_substdict(
- constructor))[0]
- self.fp.write(code)
- initfunc = '_wrap_' + funcname
- except argtypes.ArgTypeError, ex:
- sys.stderr.write('Could not write constructor for %s: %s\n'
- % (self.objinfo.c_name, str(ex)))
-
- initfunc = self.write_noconstructor()
- return initfunc
-
- def write_noconstructor(self):
- # this is a hack ...
- if not hasattr(self.overrides, 'no_constructor_written'):
- self.fp.write(self.noconstructor)
- self.overrides.no_constructor_written = 1
- initfunc = 'pygobject_no_constructor'
- return initfunc
-
- def write_default_constructor(self):
- return self.write_noconstructor()
-
- def get_methflags(self, funcname):
- if self.overrides.wants_kwargs(funcname):
- flags = 'METH_VARARGS|METH_KEYWORDS'
- elif self.overrides.wants_noargs(funcname):
- flags = 'METH_NOARGS'
- elif self.overrides.wants_onearg(funcname):
- flags = 'METH_O'
- else:
- flags = 'METH_VARARGS'
- if self.overrides.is_staticmethod(funcname):
- flags += '|METH_STATIC'
- elif self.overrides.is_classmethod(funcname):
- flags += '|METH_CLASS'
- return flags
-
- def write_function(self, funcname, data):
- lineno, filename = self.overrides.getstartline(funcname)
- self.fp.setline(lineno, filename)
- self.fp.write(data)
- self.fp.resetline()
- self.fp.write('\n\n')
-
- def _get_class_virtual_substdict(self, meth, cname, parent):
- substdict = self.get_initial_method_substdict(meth)
- substdict['virtual'] = meth.name
- substdict['cname'] = cname
- substdict['class_cast_macro'] = parent.typecode.replace(
- '_TYPE_', '_', 1) + "_CLASS"
- substdict['typecode'] = self.objinfo.typecode
- substdict['cast'] = string.replace(parent.typecode, '_TYPE_', '_', 1)
- return substdict
-
- def write_methods(self):
- methods = []
- klass = self.objinfo.c_name
- # First, get methods from the defs files
- for meth in self.parser.find_methods(self.objinfo):
- method_name = meth.c_name
- if self.overrides.is_ignored(method_name):
- continue
- try:
- if self.overrides.is_overriden(method_name):
- if not self.overrides.is_already_included(method_name):
- data = self.overrides.override(method_name)
- self.write_function(method_name, data)
-
- methflags = self.get_methflags(method_name)
- else:
- # write constructor from template ...
- code, methflags = self.write_function_wrapper(meth,
- self.method_tmpl, handle_return=1, is_method=1,
- substdict=self.get_initial_method_substdict(meth))
- self.fp.write(code)
- methods.append(self.methdef_tmpl %
- { 'name': fixname(meth.name),
- 'cname': '_wrap_' + method_name,
- 'flags': methflags,
- 'docstring': meth.docstring })
- methods_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- methods_coverage.declare_not_wrapped()
- sys.stderr.write('Could not write method %s.%s: %s\n'
- % (klass, meth.name, str(ex)))
-
- # Now try to see if there are any defined in the override
- for method_name in self.overrides.get_defines_for(klass):
- c_name = override.class2cname(klass, method_name)
- if self.overrides.is_already_included(method_name):
- continue
-
- try:
- data = self.overrides.define(klass, method_name)
- self.write_function(method_name, data)
- methflags = self.get_methflags(method_name)
-
- methods.append(self.methdef_tmpl %
- { 'name': method_name,
- 'cname': '_wrap_' + c_name,
- 'flags': methflags,
- 'docstring': 'NULL' })
- methods_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- methods_coverage.declare_not_wrapped()
- sys.stderr.write('Could not write method %s.%s: %s\n'
- % (klass, method_name, str(ex)))
-
- # Add GObject virtual method accessors, for chaining to parent
- # virtuals from subclasses
- methods += self.write_virtual_accessors()
-
- if methods:
- methoddefs = '_Py%s_methods' % self.objinfo.c_name
- # write the PyMethodDef structure
- methods.append(' { NULL, NULL, 0, NULL }\n')
- self.fp.write('static const PyMethodDef %s[] = {\n' % methoddefs)
- self.fp.write(string.join(methods, ''))
- self.fp.write('};\n\n')
- else:
- methoddefs = 'NULL'
- return methoddefs
-
- def write_virtual_accessors(self):
- klass = self.objinfo.c_name
- methods = []
- for meth in self.parser.find_virtuals(self.objinfo):
- method_name = self.objinfo.c_name + "__do_" + meth.name
- if self.overrides.is_ignored(method_name):
- continue
- try:
- if self.overrides.is_overriden(method_name):
- if not self.overrides.is_already_included(method_name):
- data = self.overrides.override(method_name)
- self.write_function(method_name, data)
- methflags = self.get_methflags(method_name)
- else:
- # temporarily add a 'self' parameter as first argument
- meth.params.insert(0, definitions.Parameter(
- ptype=(self.objinfo.c_name + '*'),
- pname='self', pdflt=None, pnull=None))
- try:
- # write method from template ...
- code, methflags = self.write_function_wrapper(
- meth, self.virtual_accessor_tmpl,
- handle_return=True, is_method=False,
- substdict=self._get_class_virtual_substdict(
- meth, method_name, self.objinfo))
- self.fp.write(code)
- finally:
- del meth.params[0]
- methods.append(self.methdef_tmpl %
- { 'name': "do_" + fixname(meth.name),
- 'cname': '_wrap_' + method_name,
- 'flags': methflags + '|METH_CLASS',
- 'docstring': 'NULL'})
- vaccessors_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- vaccessors_coverage.declare_not_wrapped()
- sys.stderr.write(
- 'Could not write virtual accessor method %s.%s: %s\n'
- % (klass, meth.name, str(ex)))
- return methods
-
- def write_virtuals(self):
- '''
- Write _wrap_FooBar__proxy_do_zbr() reverse wrapers for
- GObject virtuals
- '''
- klass = self.objinfo.c_name
- virtuals = []
- for meth in self.parser.find_virtuals(self.objinfo):
- method_name = self.objinfo.c_name + "__proxy_do_" + meth.name
- if self.overrides.is_ignored(method_name):
- continue
- try:
- if self.overrides.is_overriden(method_name):
- if not self.overrides.is_already_included(method_name):
- data = self.overrides.override(method_name)
- self.write_function(method_name, data)
- else:
- # write virtual proxy ...
- ret, props = argtypes.matcher.get_reverse_ret(meth.ret)
- wrapper = reversewrapper.ReverseWrapper(
- '_wrap_' + method_name, is_static=True)
- wrapper.set_return_type(ret(wrapper, **props))
- wrapper.add_parameter(reversewrapper.PyGObjectMethodParam(
- wrapper, "self", method_name="do_" + meth.name,
- c_type=(klass + ' *')))
- for param in meth.params:
- handler, props = argtypes.matcher.get_reverse(
- param.ptype)
- props["direction"] = param.pdir
- props["nullok"] = param.pnull
- wrapper.add_parameter(handler(wrapper,
- param.pname, **props))
- buf = reversewrapper.MemoryCodeSink()
- wrapper.generate(buf)
- self.fp.write(buf.flush())
- virtuals.append((fixname(meth.name), '_wrap_' + method_name))
- vproxies_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- vproxies_coverage.declare_not_wrapped()
- virtuals.append((fixname(meth.name), None))
- sys.stderr.write('Could not write virtual proxy %s.%s: %s\n'
- % (klass, meth.name, str(ex)))
- if virtuals:
- # Write a 'pygtk class init' function for this object,
- # except when the object type is explicitly ignored (like
- # GtkPlug and GtkSocket on win32).
- if self.overrides.is_ignored(self.objinfo.typecode):
- return
- class_cast_macro = self.objinfo.typecode.replace(
- '_TYPE_', '_', 1) + "_CLASS"
- cast_macro = self.objinfo.typecode.replace('_TYPE_', '_', 1)
- funcname = "__%s_class_init" % klass
- self.objinfo.class_init_func = funcname
- have_implemented_virtuals = not not [True
- for name, cname in virtuals
- if cname is not None]
- self.fp.write(
- ('\nstatic int\n'
- '%(funcname)s(gpointer gclass, PyTypeObject *pyclass)\n'
- '{\n') % vars())
-
- if have_implemented_virtuals:
- self.fp.write(' PyObject *o;\n')
- self.fp.write(
- ' %(klass)sClass *klass = '
- '%(class_cast_macro)s(gclass);\n'
- ' PyObject *gsignals = '
- 'PyDict_GetItemString(pyclass->tp_dict, "__gsignals__");\n'
- % vars())
-
- for name, cname in virtuals:
- do_name = 'do_' + name
- if cname is None:
- self.fp.write('\n /* overriding %(do_name)s '
- 'is currently not supported */\n' % vars())
- else:
- self.fp.write('''
- o = PyObject_GetAttrString((PyObject *) pyclass, "%(do_name)s");
- if (o == NULL)
- PyErr_Clear();
- else {
- if (!PyObject_TypeCheck(o, &PyCFunction_Type)
- && !(gsignals && PyDict_GetItemString(gsignals, "%(name)s")))
- klass->%(name)s = %(cname)s;
- Py_DECREF(o);
- }
-''' % vars())
- self.fp.write(' return 0;\n}\n')
-
- def write_getsets(self):
- lower_name = self.get_lower_name()
- getsets_name = lower_name + '_getsets'
- getterprefix = '_wrap_' + lower_name + '__get_'
- setterprefix = '_wrap_' + lower_name + '__set_'
-
- # no overrides for the whole function. If no fields,
- # don't write a func
- if not self.objinfo.fields:
- return '0'
- getsets = []
- for ftype, cfname in self.objinfo.fields:
- fname = cfname.replace('.', '_')
- gettername = '0'
- settername = '0'
- attrname = self.objinfo.c_name + '.' + fname
- if self.overrides.attr_is_overriden(attrname):
- code = self.overrides.attr_override(attrname)
- self.write_function(attrname, code)
- if string.find(code, getterprefix + fname) >= 0:
- gettername = getterprefix + fname
- if string.find(code, setterprefix + fname) >= 0:
- settername = setterprefix + fname
- if gettername == '0':
- try:
- funcname = getterprefix + fname
- info = argtypes.WrapperInfo()
- handler = argtypes.matcher.get(ftype)
- # for attributes, we don't own the "return value"
- handler.write_return(ftype, 0, info)
- self.fp.write(self.getter_tmpl %
- { 'funcname': funcname,
- 'varlist': info.varlist,
- 'field': self.get_field_accessor(cfname),
- 'codeafter': info.get_codeafter() })
- gettername = funcname
- except argtypes.ArgTypeError, ex:
- sys.stderr.write(
- "Could not write getter for %s.%s: %s\n"
- % (self.objinfo.c_name, fname, str(ex)))
- if gettername != '0' or settername != '0':
- getsets.append(' { "%s", (getter)%s, (setter)%s },\n' %
- (fixname(fname), gettername, settername))
-
- if not getsets:
- return '0'
- self.fp.write('static const PyGetSetDef %s[] = {\n' % getsets_name)
- for getset in getsets:
- self.fp.write(getset)
- self.fp.write(' { NULL, (getter)0, (setter)0 },\n')
- self.fp.write('};\n\n')
-
- return getsets_name
-
- def _write_get_symbol_names(self, writer, functions):
- self.fp.write("""static PyObject *
-_wrap__get_symbol_names(PyObject *self)
-{
- PyObject *pylist = PyList_New(0);
-
-""")
- for obj, bases in writer.get_classes():
- self.fp.write(' PyList_Append(pylist, '
- 'PyString_FromString("%s"));\n' % (obj.name))
-
- for name, cname, flags, docstring in functions:
- self.fp.write(' PyList_Append(pylist, '
- 'PyString_FromString("%s"));\n' % (name))
-
- for enum in writer.get_enums():
- self.fp.write(' PyList_Append(pylist, '
- 'PyString_FromString("%s"));\n' % (enum.name))
- for nick, value in enum.values:
- name = value[len(self.overrides.modulename)+1:]
- self.fp.write(' PyList_Append(pylist, '
- 'PyString_FromString("%s"));\n' % (name))
-
- self.fp.write(" return pylist;\n}\n\n");
-
- def _write_get_symbol(self, writer, functions):
- self.fp.write("""static PyObject *
-_wrap__get_symbol(PyObject *self, PyObject *args)
-{
- PyObject *d;
- char *name;
- static PyObject *modulename = NULL;
- static PyObject *module = NULL;
- static char *strip_prefix = "%s";
-
- if (!PyArg_ParseTuple(args, "Os", &d, &name))
- return NULL;
-
- if (!modulename)
- modulename = PyString_FromString("%s");
-
- if (!module)
- module = PyDict_GetItemString(d, "__module__");
-
-""" % (self.overrides.modulename.upper() + '_',
- self.overrides.modulename))
-
- first = True
- # Classes / GObjects
- for obj, bases in writer.get_classes():
- if first:
- self.fp.write(' if (!strcmp(name, "%s")) {\n' % obj.name)
- first = False
- else:
- self.fp.write(' } else if (!strcmp(name, "%s")) {\n' % obj.name)
- self.fp.write(
- ' return (PyObject*)pygobject_lookup_class(%s);\n' %
- obj.typecode)
- self.fp.write(' }\n')
-
- # Functions
- for name, cname, flags, docstring in functions:
- self.fp.write(' else if (!strcmp(name, "%s")) {\n' % name)
- self.fp.write(' static PyMethodDef ml = { '
- '"%s", (PyCFunction)%s, %s, "%s"};\n' % (
- name, cname, flags, docstring))
- self.fp.write(' return PyCFunction_NewEx(&ml, NULL, modulename);\n')
- self.fp.write(' }\n')
-
- # Enums
- def write_enum(enum, returnobj=False):
- if returnobj:
- ret = 'return '
- else:
- ret = ''
- if enum.deftype == 'enum':
- self.fp.write(
- ' %spyg_enum_add(module, "%s", strip_prefix, %s);\n'
- % (ret, enum.name, enum.typecode))
- else:
- self.fp.write(
- ' %spyg_flags_add(module, "%s", strip_prefix, %s);\n'
- % (ret, enum.name, enum.typecode))
-
- strip_len = len(self.overrides.modulename)+1 # GTK_
- for enum in writer.get_enums():
- # XXX: Implement without typecodes
- self.fp.write(' else if (!strcmp(name, "%s")) {\n' % enum.name)
- write_enum(enum, returnobj=True)
- self.fp.write(' }\n')
-
- for nick, value in enum.values:
- value = value[strip_len:]
- self.fp.write(' else if (!strcmp(name, "%s")) {\n' % value)
- write_enum(enum)
- self.fp.write(' return PyObject_GetAttrString(module, "%s");\n' %
- value)
- self.fp.write(' }\n')
-
- self.fp.write(' return Py_None;\n}\n\n');
-
- def _write_function_bodies(self):
- functions = []
- # First, get methods from the defs files
- for func in self.parser.find_functions():
- funcname = func.c_name
- if self.overrides.is_ignored(funcname):
- continue
- try:
- if self.overrides.is_overriden(funcname):
- data = self.overrides.override(funcname)
- self.write_function(funcname, data)
-
- methflags = self.get_methflags(funcname)
- else:
- # write constructor from template ...
- code, methflags = self.write_function_wrapper(func,
- self.function_tmpl, handle_return=1, is_method=0)
- self.fp.write(code)
- functions.append((func.name, '_wrap_' + funcname,
- methflags, func.docstring))
- functions_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- functions_coverage.declare_not_wrapped()
- sys.stderr.write('Could not write function %s: %s\n'
- % (func.name, str(ex)))
-
- # Now try to see if there are any defined in the override
- for funcname in self.overrides.get_functions():
- try:
- data = self.overrides.function(funcname)
- self.write_function(funcname, data)
- methflags = self.get_methflags(funcname)
- functions.append((funcname, '_wrap_' + funcname,
- methflags, 'NULL'))
- functions_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- functions_coverage.declare_not_wrapped()
- sys.stderr.write('Could not write function %s: %s\n'
- % (funcname, str(ex)))
- return functions
-
- def write_functions(self, writer, prefix):
- self.fp.write('\n/* ----------- functions ----------- */\n\n')
- functions = []
- func_infos = self._write_function_bodies()
-
- # If we have a dynamic namespace, write symbol and attribute getter
- if self.overrides.dynamicnamespace:
- self._write_get_symbol_names(writer, func_infos)
- self._write_get_symbol(writer, func_infos)
- for obj, bases in writer.get_classes():
- self.fp.write("""static PyTypeObject *
-%s_register_type(const gchar *name, PyObject *unused)
-{
- PyObject *m = PyImport_ImportModule("gtk");
- PyObject *d = PyModule_GetDict(m);
-""" % obj.c_name)
- writer.write_class(obj, bases, indent=1)
- self.fp.write(
- ' return (%s)PyDict_GetItemString(d, "%s");\n' % (
- 'PyTypeObject*', obj.name))
- self.fp.write("}\n")
-
- functions.append(' { "_get_symbol_names", '
- '(PyCFunction)_wrap__get_symbol_names, '
- 'METH_NOARGS, NULL },\n')
- functions.append(' { "_get_symbol", '
- '(PyCFunction)_wrap__get_symbol, '
- 'METH_VARARGS, NULL },\n')
- else:
- for name, cname, flags, docstring in func_infos:
- functions.append(self.methdef_tmpl % dict(name=name,
- cname=cname,
- flags=flags,
- docstring=docstring))
-
- # write the PyMethodDef structure
- functions.append(' { NULL, NULL, 0, NULL }\n')
-
- self.fp.write('const PyMethodDef ' + prefix + '_functions[] = {\n')
- self.fp.write(string.join(functions, ''))
- self.fp.write('};\n\n')
-
-class GObjectWrapper(Wrapper):
- constructor_tmpl = (
- 'static int\n'
- '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' self->obj = (GObject *)%(cname)s(%(arglist)s);\n'
- '%(codeafter)s\n'
- ' if (!self->obj) {\n'
- ' PyErr_SetString(PyExc_RuntimeError, '
- '"could not create %(typename)s object");\n'
- ' return -1;\n'
- ' }\n'
- '%(aftercreate)s'
- ' pygobject_register_wrapper((PyObject *)self);\n'
- ' return 0;\n'
- '}\n\n'
- )
-
- method_tmpl = (
- 'static PyObject *\n'
- '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' %(begin_allow_threads)s\n'
- ' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n'
- ' %(end_allow_threads)s\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
- def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)):
- Wrapper.__init__(self, parser, objinfo, overrides, fp)
- if self.objinfo:
- self.castmacro = string.replace(self.objinfo.typecode,
- '_TYPE_', '_', 1)
-
- def get_initial_class_substdict(self):
- return { 'tp_basicsize' : 'PyGObject',
- 'tp_weaklistoffset' : 'offsetof(PyGObject, weakreflist)',
- 'tp_dictoffset' : 'offsetof(PyGObject, inst_dict)' }
-
- def get_field_accessor(self, fieldname):
- castmacro = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1)
- return '%s(pygobject_get(self))->%s' % (castmacro, fieldname)
-
- def get_initial_constructor_substdict(self, constructor):
- substdict = Wrapper.get_initial_constructor_substdict(self,
- constructor)
- if not constructor.caller_owns_return:
- substdict['aftercreate'] = " g_object_ref(self->obj);\n"
- else:
- substdict['aftercreate'] = ''
- return substdict
-
- def get_initial_method_substdict(self, method):
- substdict = Wrapper.get_initial_method_substdict(self, method)
- substdict['cast'] = string.replace(self.objinfo.typecode,
- '_TYPE_', '_', 1)
- return substdict
-
- def write_default_constructor(self):
- try:
- parent = self.parser.find_object(self.objinfo.parent)
- except ValueError:
- parent = None
- if parent is not None:
- ## just like the constructor is inheritted, we should
- # inherit the new API compatibility flag
- self.objinfo.has_new_constructor_api = (
- parent.has_new_constructor_api)
- elif self.objinfo.parent == 'GObject':
- self.objinfo.has_new_constructor_api = True
- return '0'
-
- def write_property_based_constructor(self, constructor):
- self.objinfo.has_new_constructor_api = True
- out = self.fp
- print >> out, "static int"
- print >> out, '_wrap_%s(PyGObject *self, PyObject *args,' \
- ' PyObject *kwargs)\n{' % constructor.c_name
- if constructor.params:
- s = " GType obj_type = pyg_type_from_object((PyObject *) self);"
- print >> out, s
-
- def py_str_list_to_c(arg):
- if arg:
- return "{" + ", ".join(
- map(lambda s: '"' + s + '"', arg)) + ", NULL }"
- else:
- return "{ NULL }"
-
- classname = '%s.%s' % (self.overrides.modulename,
- self.objinfo.name)
-
- if constructor.params:
- mandatory_arguments = [param for param in constructor.params
- if not param.optional]
- optional_arguments = [param for param in constructor.params
- if param.optional]
- arg_names = py_str_list_to_c(
- [param.argname
- for param in mandatory_arguments + optional_arguments])
-
- prop_names = py_str_list_to_c(
- [param.pname
- for param in mandatory_arguments + optional_arguments])
-
- print >> out, " GParameter params[%i];" % \
- len(constructor.params)
- print >> out, " PyObject *parsed_args[%i] = {NULL, };" % \
- len(constructor.params)
- print >> out, " char *arg_names[] = %s;" % arg_names
- print >> out, " char *prop_names[] = %s;" % prop_names
- print >> out, " guint nparams, i;"
- print >> out
- if constructor.deprecated is not None:
- out.write(
- ' if (PyErr_Warn(PyExc_DeprecationWarning, '
- '"%s") < 0)\n' %
- constructor.deprecated)
- print >> out, ' return -1;'
- print >> out
- out.write(" if (!PyArg_ParseTupleAndKeywords(args, kwargs, ")
- template = '"'
- if mandatory_arguments:
- template += "O"*len(mandatory_arguments)
- if optional_arguments:
- template += "|" + "O"*len(optional_arguments)
- template += ':%s.__init__"' % classname
- print >> out, template, ", arg_names",
- for i in range(len(constructor.params)):
- print >> out, ", &parsed_args[%i]" % i,
-
- out.write(
- "))\n"
- " return -1;\n"
- "\n"
- " memset(params, 0, sizeof(GParameter)*%i);\n"
- " if (!pyg_parse_constructor_args(obj_type, arg_names,\n"
- " prop_names, params, \n"
- " &nparams, parsed_args))\n"
- " return -1;\n"
- " pygobject_constructv(self, nparams, params);\n"
- " for (i = 0; i < nparams; ++i)\n"
- " g_value_unset(&params[i].value);\n"
- % len(constructor.params))
- else:
- out.write(
- " static char* kwlist[] = { NULL };\n"
- "\n")
-
- if constructor.deprecated is not None:
- out.write(
- ' if (PyErr_Warn(PyExc_DeprecationWarning, "%s") < 0)\n'
- ' return -1;\n'
- '\n' % constructor.deprecated)
-
- out.write(
- ' if (!PyArg_ParseTupleAndKeywords(args, kwargs,\n'
- ' ":%s.__init__",\n'
- ' kwlist))\n'
- ' return -1;\n'
- '\n'
- ' pygobject_constructv(self, 0, NULL);\n' % classname)
- out.write(
- ' if (!self->obj) {\n'
- ' PyErr_SetString(\n'
- ' PyExc_RuntimeError, \n'
- ' "could not create %s object");\n'
- ' return -1;\n'
- ' }\n' % classname)
-
- if not constructor.caller_owns_return:
- print >> out, " g_object_ref(self->obj);\n"
-
- out.write(
- ' return 0;\n'
- '}\n\n')
-
- return "_wrap_%s" % constructor.c_name
-
-
-class GInterfaceWrapper(GObjectWrapper):
- virtual_accessor_tmpl = (
- 'static PyObject *\n'
- '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n'
- '{\n'
- ' %(vtable)s *iface;\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' iface = g_type_interface_peek('
- 'g_type_class_peek(pyg_type_from_object(cls)), %(typecode)s);\n'
- ' if (iface->%(virtual)s)\n'
- ' %(setreturn)siface->%(virtual)s(%(arglist)s);\n'
- ' else {\n'
- ' PyErr_SetString(PyExc_NotImplementedError, '
- '"interface method %(name)s not implemented");\n'
- ' return NULL;\n'
- ' }\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
-
- def get_initial_class_substdict(self):
- return { 'tp_basicsize' : 'PyObject',
- 'tp_weaklistoffset' : '0',
- 'tp_dictoffset' : '0'}
-
- def write_constructor(self):
- # interfaces have no constructors ...
- return '0'
- def write_getsets(self):
- # interfaces have no fields ...
- return '0'
-
- def _get_class_virtual_substdict(self, meth, cname, parent):
- substdict = self.get_initial_method_substdict(meth)
- substdict['virtual'] = meth.name
- substdict['cname'] = cname
- substdict['typecode'] = self.objinfo.typecode
- substdict['vtable'] = self.objinfo.vtable
- return substdict
-
- def write_virtuals(self):
- ## Now write reverse method wrappers, which let python code
- ## implement interface methods.
- # First, get methods from the defs files
- klass = self.objinfo.c_name
- proxies = []
- for meth in self.parser.find_virtuals(self.objinfo):
- method_name = self.objinfo.c_name + "__proxy_do_" + meth.name
- if self.overrides.is_ignored(method_name):
- continue
- try:
- if self.overrides.is_overriden(method_name):
- if not self.overrides.is_already_included(method_name):
- data = self.overrides.override(method_name)
- self.write_function(method_name, data)
- else:
- # write proxy ...
- ret, props = argtypes.matcher.get_reverse_ret(meth.ret)
- wrapper = reversewrapper.ReverseWrapper(
- '_wrap_' + method_name, is_static=True)
- wrapper.set_return_type(ret(wrapper, **props))
- wrapper.add_parameter(reversewrapper.PyGObjectMethodParam(
- wrapper, "self", method_name="do_" + meth.name,
- c_type=(klass + ' *')))
- for param in meth.params:
- handler, props = argtypes.matcher.get_reverse(
- param.ptype)
- props["direction"] = param.pdir
- props["nullok"] = param.pnull
- wrapper.add_parameter(
- handler(wrapper, param.pname, **props))
- buf = reversewrapper.MemoryCodeSink()
- wrapper.generate(buf)
- self.fp.write(buf.flush())
- proxies.append((fixname(meth.name), '_wrap_' + method_name))
- iproxies_coverage.declare_wrapped()
- except argtypes.ArgTypeError, ex:
- iproxies_coverage.declare_not_wrapped()
- proxies.append((fixname(meth.name), None))
- sys.stderr.write('Could not write interface proxy %s.%s: %s\n'
- % (klass, meth.name, str(ex)))
-
- if not proxies or not [cname for name, cname in proxies if cname]:
- return
-
- ## Write an interface init function for this object
- funcname = "__%s__interface_init" % klass
- vtable = self.objinfo.vtable
- self.fp.write(
- '\nstatic void\n'
- '%(funcname)s(%(vtable)s *iface, PyTypeObject *pytype)\n'
- '{\n'
- ' %(vtable)s *parent_iface = '
- 'g_type_interface_peek_parent(iface);\n'
- ' PyObject *py_method;\n'
- '\n'
- % vars())
-
- for name, cname in proxies:
- do_name = 'do_' + name
- if cname is None:
- continue
-
- self.fp.write((
- ' py_method = pytype? PyObject_GetAttrString('
- '(PyObject *) pytype, "%(do_name)s") : NULL;\n'
- ' if (py_method && !PyObject_TypeCheck(py_method, '
- '&PyCFunction_Type)) {\n'
- ' iface->%(name)s = %(cname)s;\n'
- ' } else {\n'
- ' PyErr_Clear();\n'
- ' if (parent_iface) {\n'
- ' iface->%(name)s = parent_iface->%(name)s;\n'
- ' }\n'
- ' Py_XDECREF(py_method);\n'
- ' }\n'
- ) % vars())
- self.fp.write('}\n\n')
- interface_info = "__%s__iinfo" % klass
- self.fp.write('''
-static const GInterfaceInfo %s = {
- (GInterfaceInitFunc) %s,
- NULL,
- NULL
-};
-''' % (interface_info, funcname))
- self.objinfo.interface_info = interface_info
-
-class GBoxedWrapper(Wrapper):
- constructor_tmpl = (
- 'static int\n'
- '_wrap_%(cname)s(PyGBoxed *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' self->gtype = %(typecode)s;\n'
- ' self->free_on_dealloc = FALSE;\n'
- ' self->boxed = %(cname)s(%(arglist)s);\n'
- '%(codeafter)s\n'
- ' if (!self->boxed) {\n'
- ' PyErr_SetString(PyExc_RuntimeError, '
- '"could not create %(typename)s object");\n'
- ' return -1;\n'
- ' }\n'
- ' self->free_on_dealloc = TRUE;\n'
- ' return 0;\n'
- '}\n\n'
- )
-
- method_tmpl = (
- 'static PyObject *\n'
- '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' %(begin_allow_threads)s\n'
- ' %(setreturn)s%(cname)s(pyg_boxed_get(self, '
- '%(typename)s)%(arglist)s);\n'
- ' %(end_allow_threads)s\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
-
- def get_initial_class_substdict(self):
- return { 'tp_basicsize' : 'PyGBoxed',
- 'tp_weaklistoffset' : '0',
- 'tp_dictoffset' : '0' }
-
- def get_field_accessor(self, fieldname):
- return 'pyg_boxed_get(self, %s)->%s' % (self.objinfo.c_name, fieldname)
-
- def get_initial_constructor_substdict(self, constructor):
- substdict = Wrapper.get_initial_constructor_substdict(
- self, constructor)
- substdict['typecode'] = self.objinfo.typecode
- return substdict
-
-class GPointerWrapper(GBoxedWrapper):
- constructor_tmpl = (
- 'static int\n'
- '_wrap_%(cname)s(PyGPointer *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' self->gtype = %(typecode)s;\n'
- ' self->pointer = %(cname)s(%(arglist)s);\n'
- '%(codeafter)s\n'
- ' if (!self->pointer) {\n'
- ' PyErr_SetString(PyExc_RuntimeError, '
- '"could not create %(typename)s object");\n'
- ' return -1;\n'
- ' }\n'
- ' return 0;\n'
- '}\n\n'
- )
-
- method_tmpl = (
- 'static PyObject *\n'
- '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n'
- '{\n'
- '%(varlist)s'
- '%(parseargs)s'
- '%(codebefore)s'
- ' %(setreturn)s%(cname)s(pyg_pointer_get(self, '
- '%(typename)s)%(arglist)s);\n'
- '%(codeafter)s\n'
- '}\n\n'
- )
-
- def get_initial_class_substdict(self):
- return { 'tp_basicsize' : 'PyGPointer',
- 'tp_weaklistoffset' : '0',
- 'tp_dictoffset' : '0' }
-
- def get_field_accessor(self, fieldname):
- return 'pyg_pointer_get(self, %s)->%s' % (self.objinfo.c_name,
- fieldname)
-
- def get_initial_constructor_substdict(self, constructor):
- substdict = Wrapper.get_initial_constructor_substdict(
- self, constructor)
- substdict['typecode'] = self.objinfo.typecode
- return substdict
-
-class SourceWriter:
- def __init__(self, parser, overrides, prefix, fp=FileOutput(sys.stdout)):
- self.parser = parser
- self.overrides = overrides
- self.prefix = prefix
- self.fp = fp
-
- def write(self, py_ssize_t_clean=False):
- argtypes.py_ssize_t_clean = py_ssize_t_clean
-
- self.write_headers(py_ssize_t_clean)
- self.write_imports()
- self.write_type_declarations()
- self.write_body()
- self.write_classes()
-
- wrapper = Wrapper(self.parser, None, self.overrides, self.fp)
- wrapper.write_functions(self, self.prefix)
-
- if not self.overrides.dynamicnamespace:
- self.write_enums()
- self.write_extension_init()
- self.write_registers()
-
- argtypes.py_ssize_t_clean = False
-
- def write_headers(self, py_ssize_t_clean):
- self.fp.write('/* -- THIS FILE IS GENERATED - DO NOT EDIT */')
- self.fp.write('/* -*- Mode: C; c-basic-offset: 4 -*- */\n\n')
- if py_ssize_t_clean:
- self.fp.write('#define PY_SSIZE_T_CLEAN\n')
- self.fp.write('#include <Python.h>\n\n\n')
- if py_ssize_t_clean:
- self.fp.write('''
-
-#if PY_VERSION_HEX < 0x02050000
-typedef int Py_ssize_t;
-#define PY_SSIZE_T_MAX INT_MAX
-#define PY_SSIZE_T_MIN INT_MIN
-typedef inquiry lenfunc;
-typedef intargfunc ssizeargfunc;
-typedef intobjargproc ssizeobjargproc;
-#endif
-
-''')
- self.fp.write(self.overrides.get_headers())
- self.fp.resetline()
- self.fp.write('\n\n')
-
- def write_imports(self):
- self.fp.write('/* ---------- types from other modules ---------- */\n')
- for module, pyname, cname, importing_for in self.overrides.get_imports():
- if importing_for is None or is_registered_object(importing_for):
- self.fp.write('static PyTypeObject *_%s;\n' % cname)
- self.fp.write('#define %s (*_%s)\n' % (cname, cname))
- self.fp.write('\n\n')
-
- def write_type_declarations(self):
- #todo use 'static' if used only in one file
- self.fp.write('/* ---------- forward type declarations ---------- */\n')
- for obj in self.parser.boxes:
- if not self.overrides.is_type_ignored(obj.c_name):
- self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n')
- for obj in self.parser.objects:
- if not self.overrides.is_type_ignored(obj.c_name):
- self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n')
- for interface in self.parser.interfaces:
- if not self.overrides.is_type_ignored(interface.c_name):
- self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + interface.c_name + '_Type;\n')
- self.fp.write('\n')
-
- def write_body(self):
- self.fp.write(self.overrides.get_body())
- self.fp.resetline()
- self.fp.write('\n\n')
-
- def _sort_parent_children(self, objects):
- objects = list(objects)
- modified = True
- while modified:
- modified = False
- parent_index = None
- child_index = None
- for i, obj in enumerate(objects):
- if obj.parent == 'GObject':
- continue
- if obj.parent not in [info.c_name for info in objects[:i]]:
- for j, info in enumerate(objects[i+1:]):
- if info.c_name == obj.parent:
- parent_index = i + 1 + j
- child_index = i
- break
- else:
- continue
- break
- if child_index is not None and parent_index is not None:
- if child_index != parent_index:
- objects.insert(child_index, objects.pop(parent_index))
- modified = True
- return objects
-
- def write_classes(self):
- ## Sort the objects, so that we generate code for the parent types
- ## before their children.
- objects = self._sort_parent_children(self.parser.objects)
-
- for klass, items in ((GBoxedWrapper, self.parser.boxes),
- (GPointerWrapper, self.parser.pointers),
- (GObjectWrapper, objects),
- (GInterfaceWrapper, self.parser.interfaces)):
- for item in items:
- instance = klass(self.parser, item, self.overrides, self.fp)
- instance.write_class()
- self.fp.write('\n')
-
- def get_enums(self):
- enums = []
- for enum in self.parser.enums:
- if self.overrides.is_type_ignored(enum.c_name):
- continue
- enums.append(enum)
- return enums
-
- def write_enums(self):
- if not self.parser.enums:
- return
-
- self.fp.write('\n/* ----------- enums and flags ----------- */\n\n')
- self.fp.write(
- 'void\n' + self.prefix +
- '_add_constants(PyObject *module, const gchar *strip_prefix)\n{\n')
-
- self.fp.write(
- '#ifdef VERSION\n'
- ' PyModule_AddStringConstant(module, "__version__", VERSION);\n'
- '#endif\n')
-
- for enum in self.get_enums():
- if enum.typecode is None:
- for nick, value in enum.values:
- self.fp.write(
- ' PyModule_AddIntConstant(module, '
- '(char *) pyg_constant_strip_prefix("%s", strip_prefix), %s);\n'
- % (value, value))
- else:
- if enum.deftype == 'enum':
- self.fp.write(' pyg_enum_add(module, "%s", strip_prefix, %s);\n'
- % (enum.name, enum.typecode))
- else:
- self.fp.write(' pyg_flags_add(module, "%s", strip_prefix, %s);\n'
- % (enum.name, enum.typecode))
-
- self.fp.write('\n')
- self.fp.write(' if (PyErr_Occurred())\n')
- self.fp.write(' PyErr_Print();\n')
- self.fp.write('}\n\n')
-
- def write_object_imports(self, retval=''):
- imports = self.overrides.get_imports()[:]
- if not imports:
- return
-
- bymod = {}
- for module, pyname, cname, importing_for in imports:
- if importing_for is None or is_registered_object(importing_for):
- bymod.setdefault(module, []).append((pyname, cname))
- self.fp.write(' PyObject *module;\n\n')
- for module in bymod:
- self.fp.write(
- ' if ((module = PyImport_ImportModule("%s")) != NULL) {\n'
- % module)
- #self.fp.write(
- # ' PyObject *moddict = PyModule_GetDict(module);\n\n')
- for pyname, cname in bymod[module]:
- #self.fp.write(
- # ' _%s = (PyTypeObject *)PyDict_GetItemString('
- # 'moddict, "%s");\n' % (cname, pyname))
- self.fp.write(
- ' _%s = (PyTypeObject *)PyObject_GetAttrString('
- 'module, "%s");\n' % (cname, pyname))
- self.fp.write(' if (_%s == NULL) {\n' % cname)
- self.fp.write(' PyErr_SetString(PyExc_ImportError,\n')
- self.fp.write(' "cannot import name %s from %s");\n'
- % (pyname, module))
- self.fp.write(' return %s;\n' % retval)
- self.fp.write(' }\n')
- self.fp.write(' } else {\n')
- self.fp.write(' PyErr_SetString(PyExc_ImportError,\n')
- self.fp.write(' "could not import %s");\n' % module)
- self.fp.write(' return %s;\n' % retval)
- self.fp.write(' }\n')
- self.fp.write('\n')
-
- def write_extension_init(self):
- self.fp.write('/* initialise stuff extension classes */\n')
- self.fp.write('void\n' + self.prefix + '_register_classes(PyObject *d)\n{\n')
- self.write_object_imports()
- self.fp.write(self.overrides.get_init() + '\n')
- self.fp.resetline()
-
- def get_classes(self):
- objects = self.parser.objects[:]
- pos = 0
- while pos < len(objects):
- parent = objects[pos].parent
- for i in range(pos+1, len(objects)):
- if objects[i].c_name == parent:
- objects.insert(i+1, objects[pos])
- del objects[pos]
- break
- else:
- pos = pos + 1
-
- retval = []
- for obj in objects:
- if self.overrides.is_type_ignored(obj.c_name):
- continue
- bases = []
- if obj.parent != None:
- bases.append(obj.parent)
- bases = bases + obj.implements
- retval.append((obj, bases))
-
- return retval
-
- def write_registers(self):
- for boxed in self.parser.boxes:
- if not self.overrides.is_type_ignored(boxed.c_name):
- self.fp.write(' pyg_register_boxed(d, "' + boxed.name +
- '", ' + boxed.typecode +
- ', &Py' + boxed.c_name +
- '_Type);\n')
- for pointer in self.parser.pointers:
- if not self.overrides.is_type_ignored(pointer.c_name):
- self.fp.write(' pyg_register_pointer(d, "' + pointer.name +
- '", ' + pointer.typecode +
- ', &Py' + pointer.c_name + '_Type);\n')
- for interface in self.parser.interfaces:
- if not self.overrides.is_type_ignored(interface.c_name):
- self.fp.write(' pyg_register_interface(d, "'
- + interface.name + '", '+ interface.typecode
- + ', &Py' + interface.c_name + '_Type);\n')
- if interface.interface_info is not None:
- self.fp.write(' pyg_register_interface_info(%s, &%s);\n' %
- (interface.typecode, interface.interface_info))
-
- if not self.overrides.dynamicnamespace:
- for obj, bases in self.get_classes():
- self.write_class(obj, bases)
- else:
- for obj, bases in self.get_classes():
- self.fp.write(
- ' pyg_type_register_custom_callback("%s", '
- '(PyGTypeRegistrationFunction)%s_register_type, d);\n' %
- (obj.c_name, obj.c_name))
-
- self.fp.write('}\n')
-
- def _can_direct_ref(self, base):
- if not self.overrides.dynamicnamespace:
- return True
- if base == 'GObject':
- return True
- obj = get_object_by_name(base)
- if obj.module.lower() != self.overrides.modulename:
- return True
- return False
-
- def write_class(self, obj, bases, indent=1):
- indent_str = ' ' * (indent * 4)
- if bases:
- bases_str = 'Py_BuildValue("(%s)"' % (len(bases) * 'O')
-
- for base in bases:
- if self._can_direct_ref(base):
- bases_str += ', &Py%s_Type' % base
- else:
- baseobj = get_object_by_name(base)
- bases_str += ', PyObject_GetAttrString(m, "%s")' % baseobj.name
- bases_str += ')'
- else:
- bases_str = 'NULL'
-
- self.fp.write(
- '%(indent)spygobject_register_class(d, "%(c_name)s", %(typecode)s, &Py%(c_name)s_Type, %(bases)s);\n'
- % dict(indent=indent_str, c_name=obj.c_name, typecode=obj.typecode, bases=bases_str))
-
- if obj.has_new_constructor_api:
- self.fp.write(
- indent_str + 'pyg_set_object_has_new_constructor(%s);\n' %
- obj.typecode)
- else:
- print >> sys.stderr, (
- "Warning: Constructor for %s needs to be updated to new API\n"
- " See http://live.gnome.org/PyGTK_2fWhatsNew28"
- "#update-constructors") % obj.c_name
-
- if obj.class_init_func is not None:
- self.fp.write(
- indent_str + 'pyg_register_class_init(%s, %s);\n' %
- (obj.typecode, obj.class_init_func))
-
-_objects = {}
-
-def is_registered_object(c_name):
- return c_name in _objects
-
-def get_object_by_name(c_name):
- global _objects
- return _objects[c_name]
-
-def register_types(parser):
- global _objects
- for boxed in parser.boxes:
- argtypes.matcher.register_boxed(boxed.c_name, boxed.typecode)
- _objects[boxed.c_name] = boxed
- for pointer in parser.pointers:
- argtypes.matcher.register_pointer(pointer.c_name, pointer.typecode)
- for obj in parser.objects:
- argtypes.matcher.register_object(obj.c_name, obj.parent, obj.typecode)
- _objects[obj.c_name] = obj
- for iface in parser.interfaces:
- argtypes.matcher.register_object(iface.c_name, None, iface.typecode)
- _objects[iface.c_name] = iface
- for enum in parser.enums:
- if enum.deftype == 'flags':
- argtypes.matcher.register_flag(enum.c_name, enum.typecode)
- else:
- argtypes.matcher.register_enum(enum.c_name, enum.typecode)
-
-usage = 'usage: codegen.py [-o overridesfile] [-p prefix] defsfile'
-def main(argv):
- o = override.Overrides()
- prefix = 'pygtk'
- outfilename = None
- errorfilename = None
- opts, args = getopt.getopt(argv[1:], "o:p:r:t:D:I:",
- ["override=", "prefix=", "register=", "outfilename=",
- "load-types=", "errorfilename=", "py_ssize_t-clean"])
- defines = {} # -Dkey[=val] options
- py_ssize_t_clean = False
- for opt, arg in opts:
- if opt in ('-o', '--override'):
- o = override.Overrides(arg)
- elif opt in ('-p', '--prefix'):
- prefix = arg
- elif opt in ('-r', '--register'):
- # Warning: user has to make sure all -D options appear before -r
- p = defsparser.DefsParser(arg, defines)
- p.startParsing()
- register_types(p)
- del p
- elif opt == '--outfilename':
- outfilename = arg
- elif opt == '--errorfilename':
- errorfilename = arg
- elif opt in ('-t', '--load-types'):
- globals = {}
- execfile(arg, globals)
- elif opt == '-D':
- nameval = arg.split('=')
- try:
- defines[nameval[0]] = nameval[1]
- except IndexError:
- defines[nameval[0]] = None
- elif opt == '-I':
- defsparser.include_path.insert(0, arg)
- elif opt == '--py_ssize_t-clean':
- py_ssize_t_clean = True
- if len(args) < 1:
- print >> sys.stderr, usage
- return 1
- if errorfilename:
- sys.stderr = open(errorfilename, "w")
- p = defsparser.DefsParser(args[0], defines)
- if not outfilename:
- outfilename = os.path.splitext(args[0])[0] + '.c'
-
- p.startParsing()
-
- register_types(p)
- sw = SourceWriter(p, o, prefix, FileOutput(sys.stdout, outfilename))
- sw.write(py_ssize_t_clean)
-
- functions_coverage.printstats()
- methods_coverage.printstats()
- vproxies_coverage.printstats()
- vaccessors_coverage.printstats()
- iproxies_coverage.printstats()
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/codegen/createdefs.py b/codegen/createdefs.py
deleted file mode 100755
index 84d50b1..0000000
--- a/codegen/createdefs.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python
-import sys
-
-def main(args):
- output = args[1]
- input = args[2:]
- outfd = open(output, 'w')
- outfd.write(';; -*- scheme -*-\n')
- outfd.write(';; THIS FILE IS GENERATED - DO NOT EDIT\n')
- for filename in input:
- outfd.write('(include "%s")\n' % filename)
- outfd.close()
-
- return 0
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/codegen/definitions.py b/codegen/definitions.py
deleted file mode 100644
index bfb6faf..0000000
--- a/codegen/definitions.py
+++ /dev/null
@@ -1,575 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-import copy
-import sys
-
-def get_valid_scheme_definitions(defs):
- return [x for x in defs if isinstance(x, tuple) and len(x) >= 2]
-
-def unescape(s):
- s = s.replace('\r\n', '\\r\\n').replace('\t', '\\t')
- return s.replace('\r', '\\r').replace('\n', '\\n')
-
-def make_docstring(lines):
- return "(char *) " + '\n'.join(['"%s"' % unescape(s) for s in lines])
-
-# New Parameter class, wich emulates a tuple for compatibility reasons
-class Parameter(object):
- def __init__(self, ptype, pname, pdflt, pnull, pdir=None):
- self.ptype = ptype
- self.pname = pname
- self.pdflt = pdflt
- self.pnull = pnull
- self.pdir = pdir
-
- def __len__(self): return 4
- def __getitem__(self, i):
- return (self.ptype, self.pname, self.pdflt, self.pnull)[i]
-
- def merge(self, old):
- if old.pdflt is not None:
- self.pdflt = old.pdflt
- if old.pnull is not None:
- self.pnull = old.pnull
-
-# We currently subclass 'str' to make impact on the rest of codegen as
-# little as possible. Later we can subclass 'object' instead, but
-# then we must find and adapt all places which expect return types to
-# be strings.
-class ReturnType(str):
- def __new__(cls, *args, **kwds):
- return str.__new__(cls, *args[:1])
- def __init__(self, type_name, optional=False):
- str.__init__(self)
- self.optional = optional
-
-# Parameter for property based constructors
-class Property(object):
- def __init__(self, pname, optional, argname):
- self.pname = pname
- self.optional = optional
- self.argname = argname
-
- def __len__(self): return 4
- def __getitem__(self, i):
- return ('', self.pname, self.optional, self.argname)[i]
-
- def merge(self, old):
- if old.optional is not None:
- self.optional = old.optional
- if old.argname is not None:
- self.argname = old.argname
-
-
-class Definition(object):
- docstring = "NULL"
-
- def py_name(self):
- return '%s.%s' % (self.module, self.name)
-
- py_name = property(py_name)
-
- def __init__(self, *args):
- """Create a new defs object of this type. The arguments are the
- components of the definition"""
- raise RuntimeError("this is an abstract class")
-
- def merge(self, old):
- """Merge in customisations from older version of definition"""
- raise RuntimeError("this is an abstract class")
-
- def write_defs(self, fp=sys.stdout):
- """write out this definition in defs file format"""
- raise RuntimeError("this is an abstract class")
-
- def guess_return_value_ownership(self):
- "return 1 if caller owns return value"
- if getattr(self, 'is_constructor_of', False):
- self.caller_owns_return = True
- elif self.ret in ('char*', 'gchar*', 'string'):
- self.caller_owns_return = True
- else:
- self.caller_owns_return = False
-
-
-class ObjectDef(Definition):
- def __init__(self, name, *args):
- self.name = name
- self.module = None
- self.parent = None
- self.c_name = None
- self.typecode = None
- self.fields = []
- self.implements = []
- self.class_init_func = None
- self.has_new_constructor_api = False
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'in-module':
- self.module = arg[1]
- elif arg[0] == 'docstring':
- self.docstring = make_docstring(arg[1:])
- elif arg[0] == 'parent':
- self.parent = arg[1]
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'fields':
- for parg in arg[1:]:
- self.fields.append((parg[0], parg[1]))
- elif arg[0] == 'implements':
- self.implements.append(arg[1])
- def merge(self, old):
- # currently the .h parser doesn't try to work out what fields of
- # an object structure should be public, so we just copy the list
- # from the old version ...
- self.fields = old.fields
- self.implements = old.implements
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-object ' + self.name + '\n')
- if self.module:
- fp.write(' (in-module "' + self.module + '")\n')
- if self.parent != (None, None):
- fp.write(' (parent "' + self.parent + '")\n')
- for interface in self.implements:
- fp.write(' (implements "' + interface + '")\n')
- if self.c_name:
- fp.write(' (c-name "' + self.c_name + '")\n')
- if self.typecode:
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- if self.fields:
- fp.write(' (fields\n')
- for (ftype, fname) in self.fields:
- fp.write(' \'("' + ftype + '" "' + fname + '")\n')
- fp.write(' )\n')
- fp.write(')\n\n')
-
-class InterfaceDef(Definition):
- def __init__(self, name, *args):
- self.name = name
- self.module = None
- self.c_name = None
- self.typecode = None
- self.vtable = None
- self.fields = []
- self.interface_info = None
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'in-module':
- self.module = arg[1]
- elif arg[0] == 'docstring':
- self.docstring = make_docstring(arg[1:])
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'vtable':
- self.vtable = arg[1]
- if self.vtable is None:
- self.vtable = self.c_name + "Iface"
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-interface ' + self.name + '\n')
- if self.module:
- fp.write(' (in-module "' + self.module + '")\n')
- if self.c_name:
- fp.write(' (c-name "' + self.c_name + '")\n')
- if self.typecode:
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- fp.write(')\n\n')
-
-class EnumDef(Definition):
- def __init__(self, name, *args):
- self.deftype = 'enum'
- self.name = name
- self.in_module = None
- self.c_name = None
- self.typecode = None
- self.values = []
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'in-module':
- self.in_module = arg[1]
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'values':
- for varg in arg[1:]:
- self.values.append((varg[0], varg[1]))
- def merge(self, old):
- pass
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-' + self.deftype + ' ' + self.name + '\n')
- if self.in_module:
- fp.write(' (in-module "' + self.in_module + '")\n')
- fp.write(' (c-name "' + self.c_name + '")\n')
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- if self.values:
- fp.write(' (values\n')
- for name, val in self.values:
- fp.write(' \'("' + name + '" "' + val + '")\n')
- fp.write(' )\n')
- fp.write(')\n\n')
-
-class FlagsDef(EnumDef):
- def __init__(self, *args):
- apply(EnumDef.__init__, (self,) + args)
- self.deftype = 'flags'
-
-class BoxedDef(Definition):
- def __init__(self, name, *args):
- self.name = name
- self.module = None
- self.c_name = None
- self.typecode = None
- self.copy = None
- self.release = None
- self.fields = []
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'in-module':
- self.module = arg[1]
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'copy-func':
- self.copy = arg[1]
- elif arg[0] == 'release-func':
- self.release = arg[1]
- elif arg[0] == 'fields':
- for parg in arg[1:]:
- self.fields.append((parg[0], parg[1]))
- def merge(self, old):
- # currently the .h parser doesn't try to work out what fields of
- # an object structure should be public, so we just copy the list
- # from the old version ...
- self.fields = old.fields
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-boxed ' + self.name + '\n')
- if self.module:
- fp.write(' (in-module "' + self.module + '")\n')
- if self.c_name:
- fp.write(' (c-name "' + self.c_name + '")\n')
- if self.typecode:
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- if self.copy:
- fp.write(' (copy-func "' + self.copy + '")\n')
- if self.release:
- fp.write(' (release-func "' + self.release + '")\n')
- if self.fields:
- fp.write(' (fields\n')
- for (ftype, fname) in self.fields:
- fp.write(' \'("' + ftype + '" "' + fname + '")\n')
- fp.write(' )\n')
- fp.write(')\n\n')
-
-class PointerDef(Definition):
- def __init__(self, name, *args):
- self.name = name
- self.module = None
- self.c_name = None
- self.typecode = None
- self.fields = []
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'in-module':
- self.module = arg[1]
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'fields':
- for parg in arg[1:]:
- self.fields.append((parg[0], parg[1]))
- def merge(self, old):
- # currently the .h parser doesn't try to work out what fields of
- # an object structure should be public, so we just copy the list
- # from the old version ...
- self.fields = old.fields
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-pointer ' + self.name + '\n')
- if self.module:
- fp.write(' (in-module "' + self.module + '")\n')
- if self.c_name:
- fp.write(' (c-name "' + self.c_name + '")\n')
- if self.typecode:
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- if self.fields:
- fp.write(' (fields\n')
- for (ftype, fname) in self.fields:
- fp.write(' \'("' + ftype + '" "' + fname + '")\n')
- fp.write(' )\n')
- fp.write(')\n\n')
-
-class MethodDefBase(Definition):
- def __init__(self, name, *args):
- dump = 0
- self.name = name
- self.ret = None
- self.caller_owns_return = None
- self.unblock_threads = None
- self.c_name = None
- self.typecode = None
- self.of_object = None
- self.params = [] # of form (type, name, default, nullok)
- self.varargs = 0
- self.deprecated = None
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'of-object':
- self.of_object = arg[1]
- elif arg[0] == 'docstring':
- self.docstring = make_docstring(arg[1:])
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'return-type':
- type_name = arg[1]
- optional = False
- for prop in arg[2:]:
- if prop[0] == 'optional':
- optional = True
- self.ret = ReturnType(type_name, optional)
- elif arg[0] == 'caller-owns-return':
- self.caller_owns_return = arg[1] in ('t', '#t')
- elif arg[0] == 'unblock-threads':
- self.unblock_threads = arg[1] in ('t', '#t')
- elif arg[0] == 'parameters':
- for parg in arg[1:]:
- ptype = parg[0]
- pname = parg[1]
- pdflt = None
- pnull = 0
- pdir = None
- for farg in parg[2:]:
- assert isinstance(farg, tuple)
- if farg[0] == 'default':
- pdflt = farg[1]
- elif farg[0] == 'null-ok':
- pnull = 1
- elif farg[0] == 'direction':
- pdir = farg[1]
- self.params.append(Parameter(ptype, pname, pdflt, pnull, pdir))
- elif arg[0] == 'varargs':
- self.varargs = arg[1] in ('t', '#t')
- elif arg[0] == 'deprecated':
- self.deprecated = arg[1]
- else:
- sys.stderr.write("Warning: %s argument unsupported.\n"
- % (arg[0]))
- dump = 1
- if dump:
- self.write_defs(sys.stderr)
-
- if self.caller_owns_return is None and self.ret is not None:
- self.guess_return_value_ownership()
-
- def merge(self, old, parmerge):
- self.caller_owns_return = old.caller_owns_return
- self.varargs = old.varargs
- # here we merge extra parameter flags accross to the new object.
- if not parmerge:
- self.params = copy.deepcopy(old.params)
- return
- for i in range(len(self.params)):
- ptype, pname, pdflt, pnull = self.params[i]
- for p2 in old.params:
- if p2[1] == pname:
- self.params[i] = (ptype, pname, p2[2], p2[3])
- break
- def _write_defs(self, fp=sys.stdout):
- if self.of_object != (None, None):
- fp.write(' (of-object "' + self.of_object + '")\n')
- if self.c_name:
- fp.write(' (c-name "' + self.c_name + '")\n')
- if self.typecode:
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- if self.caller_owns_return:
- fp.write(' (caller-owns-return #t)\n')
- if self.unblock_threads:
- fp.write(' (unblock_threads #t)\n')
- if self.ret:
- fp.write(' (return-type "' + self.ret + '")\n')
- if self.deprecated:
- fp.write(' (deprecated "' + self.deprecated + '")\n')
- if self.params:
- fp.write(' (parameters\n')
- for ptype, pname, pdflt, pnull in self.params:
- fp.write(' \'("' + ptype + '" "' + pname +'"')
- if pdflt: fp.write(' (default "' + pdflt + '")')
- if pnull: fp.write(' (null-ok)')
- fp.write(')\n')
- fp.write(' )\n')
- if self.varargs:
- fp.write(' (varargs #t)\n')
- fp.write(')\n\n')
-
-
-class MethodDef(MethodDefBase):
- def __init__(self, name, *args):
- MethodDefBase.__init__(self, name, *args)
- for item in ('c_name', 'of_object'):
- if self.__dict__[item] == None:
- self.write_defs(sys.stderr)
- raise RuntimeError("definition missing required %s" % (item,))
-
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-method ' + self.name + '\n')
- self._write_defs(fp)
-
-class VirtualDef(MethodDefBase):
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-virtual ' + self.name + '\n')
- self._write_defs(fp)
-
-class FunctionDef(Definition):
- def __init__(self, name, *args):
- dump = 0
- self.name = name
- self.in_module = None
- self.is_constructor_of = None
- self.ret = None
- self.caller_owns_return = None
- self.unblock_threads = None
- self.c_name = None
- self.typecode = None
- self.params = [] # of form (type, name, default, nullok)
- self.varargs = 0
- self.deprecated = None
- for arg in get_valid_scheme_definitions(args):
- if arg[0] == 'in-module':
- self.in_module = arg[1]
- elif arg[0] == 'docstring':
- self.docstring = make_docstring(arg[1:])
- elif arg[0] == 'is-constructor-of':
- self.is_constructor_of = arg[1]
- elif arg[0] == 'c-name':
- self.c_name = arg[1]
- elif arg[0] == 'gtype-id':
- self.typecode = arg[1]
- elif arg[0] == 'return-type':
- self.ret = arg[1]
- elif arg[0] == 'caller-owns-return':
- self.caller_owns_return = arg[1] in ('t', '#t')
- elif arg[0] == 'unblock-threads':
- self.unblock_threads = arg[1] in ('t', '#t')
- elif arg[0] == 'parameters':
- for parg in arg[1:]:
- ptype = parg[0]
- pname = parg[1]
- pdflt = None
- pnull = 0
- for farg in parg[2:]:
- if farg[0] == 'default':
- pdflt = farg[1]
- elif farg[0] == 'null-ok':
- pnull = 1
- self.params.append(Parameter(ptype, pname, pdflt, pnull))
- elif arg[0] == 'properties':
- if self.is_constructor_of is None:
- print >> sys.stderr, "Warning: (properties ...) "\
- "is only valid for constructors"
- for prop in arg[1:]:
- pname = prop[0]
- optional = False
- argname = pname
- for farg in prop[1:]:
- if farg[0] == 'optional':
- optional = True
- elif farg[0] == 'argname':
- argname = farg[1]
- self.params.append(Property(pname, optional, argname))
- elif arg[0] == 'varargs':
- self.varargs = arg[1] in ('t', '#t')
- elif arg[0] == 'deprecated':
- self.deprecated = arg[1]
- else:
- sys.stderr.write("Warning: %s argument unsupported\n"
- % (arg[0],))
- dump = 1
- if dump:
- self.write_defs(sys.stderr)
-
- if self.caller_owns_return is None and self.ret is not None:
- self.guess_return_value_ownership()
- for item in ('c_name',):
- if self.__dict__[item] == None:
- self.write_defs(sys.stderr)
- raise RuntimeError("definition missing required %s" % (item,))
-
- _method_write_defs = MethodDef.__dict__['write_defs']
-
- def merge(self, old, parmerge):
- self.caller_owns_return = old.caller_owns_return
- self.varargs = old.varargs
- if not parmerge:
- self.params = copy.deepcopy(old.params)
- return
- # here we merge extra parameter flags accross to the new object.
- def merge_param(param):
- for old_param in old.params:
- if old_param.pname == param.pname:
- if isinstance(old_param, Property):
- # h2def never scans Property's, therefore if
- # we have one it was manually written, so we
- # keep it.
- return copy.deepcopy(old_param)
- else:
- param.merge(old_param)
- return param
- raise RuntimeError("could not find %s in old_parameters %r" % (
- param.pname, [p.pname for p in old.params]))
- try:
- self.params = map(merge_param, self.params)
- except RuntimeError:
- # parameter names changed and we can't find a match; it's
- # safer to keep the old parameter list untouched.
- self.params = copy.deepcopy(old.params)
-
- if not self.is_constructor_of:
- try:
- self.is_constructor_of = old.is_constructor_of
- except AttributeError:
- pass
- if isinstance(old, MethodDef):
- self.name = old.name
- # transmogrify from function into method ...
- self.write_defs = self._method_write_defs
- self.of_object = old.of_object
- del self.params[0]
- def write_defs(self, fp=sys.stdout):
- fp.write('(define-function ' + self.name + '\n')
- if self.in_module:
- fp.write(' (in-module "' + self.in_module + '")\n')
- if self.is_constructor_of:
- fp.write(' (is-constructor-of "' + self.is_constructor_of +'")\n')
- if self.c_name:
- fp.write(' (c-name "' + self.c_name + '")\n')
- if self.typecode:
- fp.write(' (gtype-id "' + self.typecode + '")\n')
- if self.caller_owns_return:
- fp.write(' (caller-owns-return #t)\n')
- if self.unblock_threads:
- fp.write(' (unblock-threads #t)\n')
- if self.ret:
- fp.write(' (return-type "' + self.ret + '")\n')
- if self.deprecated:
- fp.write(' (deprecated "' + self.deprecated + '")\n')
- if self.params:
- if isinstance(self.params[0], Parameter):
- fp.write(' (parameters\n')
- for ptype, pname, pdflt, pnull in self.params:
- fp.write(' \'("' + ptype + '" "' + pname +'"')
- if pdflt: fp.write(' (default "' + pdflt + '")')
- if pnull: fp.write(' (null-ok)')
- fp.write(')\n')
- fp.write(' )\n')
- elif isinstance(self.params[0], Property):
- fp.write(' (properties\n')
- for prop in self.params:
- fp.write(' \'("' + prop.pname +'"')
- if prop.optional: fp.write(' (optional)')
- fp.write(')\n')
- fp.write(' )\n')
- else:
- assert False, "strange parameter list %r" % self.params[0]
- if self.varargs:
- fp.write(' (varargs #t)\n')
-
- fp.write(')\n\n')
diff --git a/codegen/defsconvert.py b/codegen/defsconvert.py
deleted file mode 100755
index c3c2324..0000000
--- a/codegen/defsconvert.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#! /usr/bin/env python
-
-import sys
-import string, re
-
-# ------------------ Create typecodes from typenames ---------
-
-_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
-_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
-_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
-
-def to_upper_str(name):
- """Converts a typename to the equivalent upercase and underscores
- name. This is used to form the type conversion macros and enum/flag
- name variables"""
- name = _upperstr_pat1.sub(r'\1_\2', name)
- name = _upperstr_pat2.sub(r'\1_\2', name)
- name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
- return string.upper(name)
-
-def typecode(typename):
- """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
- return string.replace(to_upper_str(typename), '_', '_TYPE_', 1)
-
-
-STATE_START = 0
-STATE_OBJECT = 1
-STATE_INTERFACE = 2
-STATE_BOXED = 3
-STATE_ENUM = 4
-STATE_FLAGS = 5
-STATE_METHOD = 6
-STATE_FUNCTION = 7
-
-def convert(infp=sys.stdin, outfp=sys.stdout):
- state = STATE_START
- seen_params = 0
-
- line = infp.readline()
- while line:
- if line[:8] == '(object ':
- state = STATE_OBJECT
- seen_params = 0
- outfp.write('(define-object ' + line[8:])
- elif line[:11] == '(interface ':
- state = STATE_INTERFACE
- seen_params = 0
- outfp.write('(define-interface ' + line[11:])
- elif line[:7] == '(boxed ':
- state = STATE_BOXED
- seen_params = 0
- outfp.write('(define-boxed ' + line[7:])
- elif line[:6] == '(enum ':
- state = STATE_ENUM
- seen_params = 0
- outfp.write('(define-enum ' + line[6:])
- elif line[:7] == '(flags ':
- state = STATE_FLAGS
- seen_params = 0
- outfp.write('(define-flags ' + line[7:])
- elif line[:8] == '(method ':
- state = STATE_METHOD
- seen_params = 0
- outfp.write('(define-method ' + line[8:])
- elif line[:10] == '(function ':
- state = STATE_FUNCTION
- seen_params = 0
- outfp.write('(define-function ' + line[10:])
- elif line[:13] == ' (in-module ':
- outfp.write(re.sub(r'^(\s+\(in-module\s+)(\w+)(.*)$',
- r'\1"\2"\3', line))
- elif line[:10] == ' (parent ':
- outfp.write(re.sub(r'^(\s+\(parent\s+)(\w+)(\s+\((\w+)\))?(.*)$',
- r'\1"\4\2"\5', line))
- elif line[:14] == ' (implements ':
- outfp.write(re.sub(r'^(\s+\(implements\s+)([^\s]+)(\s*\))$',
- r'\1"\2"\3', line))
- elif line[:13] == ' (of-object ':
- outfp.write(re.sub(r'^(\s+\(of-object\s+)(\w+)(\s+\((\w+)\))?(.*)$',
- r'\1"\4\2"\5', line))
- elif line[:10] == ' (c-name ':
- outfp.write(re.sub(r'^(\s+\(c-name\s+)([^\s]+)(\s*\))$',
- r'\1"\2"\3', line))
- if state in (STATE_OBJECT, STATE_INTERFACE, STATE_BOXED,
- STATE_ENUM, STATE_FLAGS):
- c_name = re.match(r'^\s+\(c-name\s+([^\s]+)\s*\)$',
- line).group(1)
- outfp.write(' (gtype-id "%s")\n' % typecode(c_name))
- elif line[:15] == ' (return-type ':
- outfp.write(re.sub(r'^(\s+\(return-type\s+)([^\s]+)(\s*\))$',
- r'\1"\2"\3', line))
- elif line[:13] == ' (copy-func ':
- outfp.write(re.sub(r'^(\s+\(copy-func\s+)(\w+)(.*)$',
- r'\1"\2"\3', line))
- elif line[:16] == ' (release-func ':
- outfp.write(re.sub(r'^(\s+\(release-func\s+)(\w+)(.*)$',
- r'\1"\2"\3', line))
- elif line[:9] == ' (field ':
- if not seen_params:
- outfp.write(' (fields\n')
- seen_params = 1
- outfp.write(re.sub(r'^\s+\(field\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)\s*\)$',
- ' \'("\\1" "\\2")', line))
- elif line[:9] == ' (value ':
- if not seen_params:
- outfp.write(' (values\n')
- seen_params = 1
- outfp.write(re.sub(r'^\s+\(value\s+\(name\s+([^\s]+)\)\s+\(c-name\s+([^\s]+)\s*\)\s*\)$',
- ' \'("\\1" "\\2")', line))
- elif line[:13] == ' (parameter ':
- if not seen_params:
- outfp.write(' (parameters\n')
- seen_params = 1
- outfp.write(re.sub(r'^\s+\(parameter\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)(\s*.*)\)$',
- ' \'("\\1" "\\2"\\3)', line))
- elif line[:11] == ' (varargs ':
- if seen_params:
- outfp.write(' )\n')
- seen_params = 0
- outfp.write(' (varargs #t)\n')
- elif line[0] == ')':
- if seen_params:
- outfp.write(' )\n')
- seen_params = 0
- state = STATE_START
- outfp.write(line)
- else:
- outfp.write(line)
- line = infp.readline()
-
-if __name__ == '__main__':
- convert()
diff --git a/codegen/defsgen.py b/codegen/defsgen.py
deleted file mode 100755
index 6c2e63d..0000000
--- a/codegen/defsgen.py
+++ /dev/null
@@ -1,737 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-#
-# Copyright (C) 2006-2009 John Finlay.
-#
-# Scan the given public .h files of a GTK module (or module using
-# GTK object conventions) and generates a set of scheme defs.
-#
-# defsgen uses the ctypes module to extract information from the installed
-# module library (or libraries) to generate the object, interface, function,
-# method, virtual, enum and flags defs. defsgen uses the gobject library
-# g_type_* functions. defsgen will try to open the "libgobject-2.0.so" library
-# if one is not specified on the command line.
-#
-# Basically the operation of defsgen is:
-#
-# - open and initialize the gobject and module libraries
-# - read each .h file into a buffer which is scrubbed of extraneous data
-# - find all *_get_type() functions prototypes
-# - look in the module libraries for the get_type symbols
-# - if found run the get_type() function to retrieve the GType
-# - find the parent type name and save the object info
-# - find each function prototypes in the file and check if it has a symbol in
-# the module libraries - save the info if found
-# - extract the virtual prototypes from the Class or Iface structs and save
-# - write out the various defs.
-#
-# The command line options are:
-#
-# -l --modulelib Adds the given module library name to the list to be used
-# for finding symbols. Mor ethan one modulefile may be
-# specified. (required)
-# -L --libgobject Specifies the name of the gobject library (optional but
-# must be specified if "libgobject-2.0.so" is not availble)
-# -s --separate Create separate files for objects and function/method defs
-# using the given name as the base name (optional). If this
-# is not specified the combined object and function defs
-# will be output to sys.stdout.
-# -f --defsfile Extract defs from the given file to filter the output defs
-# that is don't output defs that are defined in the
-# defsfile. More than one deffile may be specified.
-# -D --defines Include portions of the defsfile defs that are conditional
-# on the given define, for example GDK_TARGET_X11. Only
-# useful with the --defsfile option
-# -m --modulename The prefix to be stripped from the front of function names
-# for the given module
-# -p --useprefix Use the modulename prefix as a hint to split names into
-# module and name for object and enum defs. Also used for
-# generating type codes.
-# --onlyenums Only produce defs for enums and flags
-# --onlyobjdefs Only produce defs for objects
-# --onlyvirtuals Only produce defs for virtuals
-# --genpropgetsets Experimental option to generate prop-getset annotations.
-# Not supported by codegen.py and friends.
-#
-# Examples:
-#
-# python defsgen.py -m pango -l libpango-1.0.so \
-# /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs
-#
-# - Outputs all defs for the pango module.using the library module
-# libpango-1.0.so.
-#
-# python defsgen.py -m gdk -DGDK_TARGET_X11 -l libgdk-x11-2.0.so \
-# -l libgdk_pixbuf-2.0.so -s /tmp/gdk-2.10 \
-# -f /usr/tmp/pygtk/gtk/gdk-base.defs \
-# /usr/local/include/gtk-2.0/gdk/*.h \
-# /usr/local/include/gtk-2.0/gdk-pixbuf/*.h
-#
-# - Outputs the gdk module defs that are not contained in the defs file
-# /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created:
-# /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs.
-#
-# Based on the original h2def.py program by
-# Toby D. Reeves <toby@max.rl.plh.af.mil> and
-# modified by James Henstridge <james@daa.com.au> to output stuff in
-# Havoc's new defs format. Info on this format can be seen at:
-# http://www.gnome.org/mailing-lists/archives/gtk-devel-list/2000-January/0085.shtml
-# Updated to be PEP-8 compatible and refactored to use OOP
-# Extensively modified by John Finlay to use ctypes module to extract GType
-# info from the given library and to create virtual defines.
-#
-
-import getopt
-import os
-import re, string
-import sys
-import ctypes
-import defsparser
-
-#------------------ utility defs -----------------
-
-_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
-_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
-_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
-
-def to_upper_str(name):
- """Converts a typename to the equivalent uppercase and underscores
- name. This is used to form the type conversion macros and enum/flag
- name variables"""
- name = _upperstr_pat1.sub(r'\1_\2', name)
- name = _upperstr_pat2.sub(r'\1_\2', name)
- name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
- return name.upper()
-
-def typecode(typename, prefix, use_prefix):
- """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
- tcode = to_upper_str(typename)
- if (use_prefix and prefix and tcode.lower() != prefix
- and tcode.lower().startswith(prefix)):
- l = len(prefix)
- tcode = tcode[:l] + '_TYPE' + tcode[l:]
- else:
- tcode = tcode.replace('_', '_TYPE_', 1)
- return tcode
-
-_class_iface_pat = re.compile(r'\w+(Class|Iface)')
-
-def class_iface_sub(mobj):
- '''Returns matched string if it matches a Class or Iface struct
- otherwise returns the empty string'''
- if not _class_iface_pat.match(mobj.group(1)):
- return ''
- return mobj.group(0)
-
-clean_patterns = [
- # strip comments
- (re.compile(r'/\*.*?\*/', re.DOTALL), ''),
- # compact continued lines
- (re.compile(r"\\\n", re.MULTILINE), ''),
- # remove preprocess directives
- (re.compile(r"""^[#].*?$""", re.MULTILINE), ''),
- # strip DECLS macros and Windows DLL API macros
- (re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS|G_END_DECLS|[A-Z]+_API """,
- re.MULTILINE), ''),
- # remove extern "C"
- (re.compile(r'^\s*(extern)\s+"C"\s+{', re.MULTILINE), ''),
- # remove singleline typedefs of stucts
- (re.compile(r'^typedef\s+struct\s*[^{;\n]*;\s*$', re.MULTILINE), ''),
- # remove all struct definitons but those for object classes and interfaces
- (re.compile(r'^struct\s+(\w+)\s+{[^}]+}\s*;\s*$', re.MULTILINE),
- class_iface_sub),
- # compress multiple whitespace
- (re.compile(r'\s+', re.MULTILINE), ' '),
- # clean up line ends
- (re.compile(r';\s*', re.MULTILINE), '\n'),
- (re.compile(r'^\s*', re.MULTILINE), ''),
- # associate *, &, and [] with type instead of variable
- (re.compile(r' \s* ([*|&]+) \s* ([(\w]+)', re.VERBOSE), r'\1 \2'),
- (re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE), r'[] \1'),
- # make return types that are const work.
- (re.compile(r'\s*\*\s*G_CONST_RETURN\s*\*\s*'), '** '),
- (re.compile(r'G_CONST_RETURN |const '), 'const-'),
- # remove typedefs of callback types
- (re.compile(r'^typedef\s+\w+\s*\*?\s*\(\s*\*\s*\w+\)\s*\([^(]*\)\n',
- re.MULTILINE), ''),
- #strip GSEAL macros from the middle of function declarations:
- (re.compile(r"""GSEAL""", re.VERBOSE), '')
- ]
-
-def clean_buffer(buf):
- """Cleans out extraneous data leaving function prototypes, Class and Iface
- structs."""
- for pat, subst in clean_patterns:
- buf = pat.sub(subst, buf)
- return buf
-
-# ------------------ utility classes -------------------------
-
-class ObjDef(object):
- def __init__(self, name, type_id, parent_name, parent_type, base_name):
- self.name = name
- self.type = type_id
- self.parent_name = parent_name
- self.parent_type = parent_type
- self.base_name = base_name
- self.props = []
- return
- def __cmp__(self, other):
- try:
- res = cmp(self.name, other.name)
- except AttributeError:
- res = cmp(id(self), id(other))
- return res
- def set_properties(self, gobj):
- if self.base_name == 'GObject':
- self.props = self._get_gobject_properties(gobj)
- elif self.base_name == 'GInterface':
- self.props = self._get_ginterface_properties(gobj)
-
- def _get_gobject_properties(self, gobj):
- klass = gobj.g_type_class_ref(self.type)
- num = ctypes.c_uint()
- plist = gobj.g_object_class_list_properties(klass, ctypes.byref(num))
- props = [plist[i][0].name for i in range(num.value)
- if self.name == gobj.g_type_name(plist[i][0].owner_type)]
- return props
- def _get_ginterface_properties(self, gobj):
- iface = gobj.g_type_default_interface_ref(self.type)
- num = ctypes.c_uint()
- plist = gobj.g_object_interface_list_properties(iface,
- ctypes.byref(num))
- props = [plist[i][0].name for i in range(num.value)]
- return props
-
-# ------------------ Find object definitions -----------------
-
-split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)')
-
-get_type_pat = re.compile(r'''^\s*(GType|GtkType)\s+
-([a-z]\w+_get_type)\s*(\(void\)|\(\)).*$''', re.VERBOSE | re.MULTILINE)
-
-defkeys = 'GBoxed GInterface GObject gpointer GEnum GFlags'
-
-def find_defs(buf, gobj, modlib, defs):
- """Find possible gobject, gboxed, interface, gpointer, enum and flags
- definitions in header files.and find parent type."""
- # find all *_get_type() functions that may represent a GObject
- for m in get_type_pat.findall(buf):
- func_name = m[1]
- for lib in modlib:
- if hasattr(lib, func_name):
- objtype = apply(getattr(lib, func_name))
- obj_name = gobj.g_type_name(objtype)
- parent = gobj.g_type_parent(objtype)
- parent_name = gobj.g_type_name(parent)
- base_name = gobj.g_type_name(gobj.g_type_fundamental(parent))
- #if gobj.g_type_is_a(parent, gobj.GObject):
- # base_name = 'GObject'
- if base_name in defkeys:
- obj = ObjDef(obj_name, objtype, parent_name, parent,
- base_name)
- obj.set_properties(gobj)
- defs[obj.base_name].append(obj)
- break
- return
-
-# ------------------ Find function definitions -----------------
-
-arg_split_pat = re.compile("\s*,\s*")
-
-proto_pat=re.compile(r"""^
-\s*((?:-|\w|\&|\*)+) # return type
-\s+ # skip whitespace
-([a-z]\w+)\s*[(] # match the function name until the opening (
-\s*(.*?)\s*[)].* # group the function arguments
-$""", re.IGNORECASE|re.VERBOSE|re.MULTILINE)
-
-def find_func_defs(buf, modlib, deffile, defs, verbose):
- '''Find function prototypes in buf that have symbols in modlib
- and save in defs.'''
- funcs = defs['funcs'][deffile] = []
- for m in proto_pat.findall(buf):
- ret, func, args = m
- if not True in [hasattr(lib, func) for lib in modlib]:
- if verbose:
- sys.stderr.write('no symbol for function: ' + func
- + ' from file' + deffile + '\n')
- else:
- args = arg_split_pat.split(args)
- args = [a.replace(' ','-', a.count(' ')-1) for a in args]
- funcs.append((func, ret, args))
- return
-
-virtual_pat = re.compile(r'''^
-\s*((?:-|\w|\&|\*)+) # return type
-\s* # skip whitespace
-\(\s*\*\s* # opening (
-([a-z]\w+)\) # match the function name until the closing )
-\s*\(\s*([^)]*)\).* # group the function arguments
-$''', re.VERBOSE|re.MULTILINE)
-
-class_iface_struct_pat = re.compile(
- r'^struct\s+_(\w+)(?:Class|Iface)\s+{([^}]+)}\s*$', re.MULTILINE)
-
-def find_virt_defs(buf, deffile, defs):
- '''Find virtual function prototypes in buf and save in defs.'''
- virts = defs['virts'][deffile] = []
- # get the Class or Iface structs
- for m in class_iface_struct_pat.findall(buf):
- objname, virtuals = m
- for v in virtual_pat.findall(virtuals):
- ret, func, args = v
- if 'reserved' in func or args == 'void':
- continue
- args = arg_split_pat.split(args)
- args = [a.replace(' ','-', a.count(' ')-1) for a in args]
- virts.append((func, ret, args, objname))
- return
-
-enum_pat = re.compile(r'^\s*typedef enum\s+{\s*([^}]*)}\s*([^\s]*)$',
- re.MULTILINE)
-values_splitter = re.compile(r'\s*,\s', re.MULTILINE)
-
-def find_enums(buf, defs):
- for vals, name in enum_pat.findall(buf):
- if name != 'GdkCursorType':
- isflags = '<<' in vals
- entries = [val.split()[0] for val in values_splitter.split(vals)
- if val.strip()]
- if entries:
- defs['untypedenums'][name] = (isflags, entries)
- return
-
-# ------------------ write definitions -----------------
-
-type_pat = re.compile(r'(?:const-)?([A-Za-z0-9]+)\*?\s+')
-pointer_pat = re.compile('(.*)\*$')
-func_new_pat = re.compile('(\w+)_new$')
-getset_pat = re.compile(r'^(?:get|set)_(.*)$')
-
-def split_prefix(cname, prefix, use_prefix):
- # use the module prefix to split the cname
- pre = prefix.replace('_', '')
- if use_prefix and cname.lower().startswith(pre):
- l = len(pre)
- module = cname[:l]
- name = cname[l:]
- else:
- m = split_prefix_pat.match(cname)
- if m:
- module = m.group(1)
- name = m.group(2)
- return module, name
-
-class DefsWriter:
- def __init__(self, defs, fp=None, prefix=None, verbose=False,
- defsfiles=None, defines={}, genpropgetsets=False,
- useprefix=False):
- self.defs = defs
- self.use_prefix = useprefix
- self.objnames = reduce(list.__add__,
- [[o.name for o in defs[base]]
- for base in defkeys.split()[:3]])
- self.othernames = reduce(list.__add__,
- [[o.name for o in defs[base]]
- for base in defkeys.split()[3:]])
- self.objifacedefs = dict(reduce(list.__add__,
- [[(o.name, o) for o in defs[base]]
- for base in defkeys.split()[1:3]]))
- self.fp = (fp, sys.stdout)[not fp]
- self.prefix = prefix
- self.verbose = verbose
- self.genpropgetsets = genpropgetsets
- self._c_names={}
- for defsfile in defsfiles:
- filter = defsparser.DefsParser(defsfile, defines)
- filter.startParsing()
- self._c_names.update(filter.c_name)
- for vdef in filter.virtuals:
- self._c_names[vdef.of_object + '.' + vdef.name] = None
- return
-
- def write_func_defs(self, deffiles, onlyvirts=False):
- filter = self._c_names
- for deffile in deffiles:
- self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile))
- if not onlyvirts:
- for func, ret, args in self.defs['funcs'][deffile]:
- if not func in filter:
- self._write_func(func, ret, args)
- for virt, ret, args, objname in self.defs['virts'][deffile]:
- if not objname + '.' + virt in filter:
- self._write_virt(objname, virt, ret, args)
- self.fp.write('\n')
- return
-
- def write_enum_defs(self, fp=None):
- fp = (fp, self.fp)[not fp]
- klassptrs = {'GEnum':ctypes.POINTER(EnumClass),
- 'GFlags':ctypes.POINTER(FlagsClass)}
- filter = self._c_names
- objs = self.defs['GEnum'] + self.defs ['GFlags']
- #objs.sort()
- fp.write(';; Enumerations and Flags ...\n\n')
- for obj in objs:
- cname = name = obj.name
- tcode = typecode(cname, self.prefix, self.use_prefix)
- if cname in filter:
- continue
- if cname in self.defs['untypedenums']:
- if tcode not in self.defs['typedefines']:
- # no type define so skip and print as untyped enum
- continue
- self.defs['untypedenums'].pop(cname, None)
- parent_name = obj.parent_name
- klassptr = klassptrs[parent_name]
- typename = parent_name.lower()[1:]
- module = None
- module, name = split_prefix(cname, self.prefix, self.use_prefix)
- fp.write('(define-' + typename + ' ' + name + '\n')
- if module:
- fp.write(' (in-module "' + module + '")\n')
- fp.write(' (c-name "' + cname + '")\n')
- fp.write(' (gtype-id "' + tcode + '")\n')
- fp.write(' (values\n')
- classref = self.gobj.g_type_class_ref(obj.type)
- itemclass = ctypes.cast(classref, klassptr).contents
- for i in range(itemclass.n_values):
- val = itemclass.values[i]
- fp.write(' \'("%s" "%s")\n' % (val.value_nick,
- val.value_name))
- fp.write(' )\n')
- fp.write(')\n\n')
- if self.defs['untypedenums']:
- self.write_untyped_enum_defs(fp)
- return
-
- def write_untyped_enum_defs(self, fp):
- fp.write(';; Untyped enumerations and flags ...\n\n')
- filter = self._c_names
- for cname, (isflags, entries) in self.defs['untypedenums'].items():
- if filter and cname in filter: continue
- module, name = split_prefix(cname, self.prefix, self.use_prefix)
- if isflags:
- fp.write('(define-flags ' + name + '\n')
- else:
- fp.write('(define-enum ' + name + '\n')
- if module:
- fp.write(' (in-module "' + module + '")\n')
- fp.write(' (c-name "' + cname + '")\n')
- preindex = entries[0].rfind('_')
- for ent in entries[1:]:
- while (preindex > 0
- and ent[:preindex] != entries[0][:preindex]):
- preindex = ent[:preindex].rfind('_')
- fp.write(' (values\n')
- for ent in entries:
- fp.write(' \'("%s" "%s")\n' %
- (ent[preindex+1:].lower().replace('_', '-'), ent))
- fp.write(' )\n')
- fp.write(')\n\n')
-
-
- def _write_obj_helper(self, obj, fp):
- base_name = obj.base_name.lower()[1:]
- cmodule = None
- cname = name = obj.name
- type_id = obj.type
- parent_name = obj.parent_name
- cmodule, name = split_prefix(cname, self.prefix, self.use_prefix)
- fp.write('(define-' + base_name + ' ' + name + '\n')
- if cmodule:
- fp.write(' (in-module "' + cmodule + '")\n')
- if base_name == 'object':
- fp.write(' (parent "' + parent_name + '")\n')
- fp.write(' (c-name "' + cname + '")\n')
- fp.write(' (gtype-id "'
- + typecode(cname, self.prefix, self.use_prefix) + '")\n')
- n = ctypes.c_uint()
- ifaces = self.gobj.g_type_interfaces(type_id, ctypes.byref(n))
- for i in range(n.value):
- iface_name = self.gobj.g_type_name(ifaces[i])
- if iface_name in self.interfaces:
- fp.write(' (implements "%s")\n' % iface_name)
- if base_name == 'interface':
- prereq = self.gobj.g_type_interface_prerequisites(type_id,
- ctypes.byref(n))
- for i in range(n.value):
- fp.write(' (prerequisite "%s")\n'
- % self.gobj.g_type_name(prereq[i]))
- # should do something about accessible fields
- fp.write(')\n\n')
- return
-
- def write_obj_defs(self, fp=None):
- fp = (fp, self.fp)[not fp]
- fp.write(';; -*- scheme -*-\n')
- filter = self._c_names
- for base in defkeys.split()[:4]:
- base_name = base.lower()[1:]
- fp.write('; %s definitions ...\n\n' % base_name)
- for obj in self.defs[base]:
- if not obj.name in filter:
- self._write_obj_helper(obj, fp)
- return
-
- def _write_func(self, name, ret, args):
- if len(args) >= 1:
- # methods must have at least one argument
- munged_name = name.replace('_', '')
- m = type_pat.match(args[0])
- if m:
- obj = m.group(1)
- if munged_name.startswith(obj.lower()):
- if obj not in self.othernames:
- self._write_method(obj, name, ret, args)
- return
- fname = name
- if self.prefix:
- fname = re.sub('^'+self.prefix+'_', '', fname)
-
- # it is either a constructor or normal function
- self.fp.write('(define-function ' + fname + '\n')
- self.fp.write(' (c-name "' + name + '")\n')
-
- # Asume that a constructor function name
- # ends with '_new' and it returns an object pointer.
- m = func_new_pat.match(name)
- r = pointer_pat.match(ret)
- if m and r:
- cname = ''
- # get the type name by using the _get_type function
- func = m.group(1) + '_get_type'
- lib = [l for l in self.modlib if hasattr(l, func)]
- if lib:
- cname = self.gobj.g_type_name(apply(getattr(lib[0], func)))
- if cname and self.gobj.g_type_from_name(r.group(1)):
- self.fp.write(' (is-constructor-of "' + cname + '")\n')
- self._write_return(ret)
- self._write_arguments(args)
- return
-
- def _write_method(self, obj, name, ret, args):
- regex = ''.join([c+'_?' for c in obj.lower()])
- mname, count = re.subn(regex, '', name, 1)
- if not count and self.prefix:
- mname = re.sub('^'+self.prefix+'_', '', mname)
- self.fp.write('(define-method ' + mname + '\n')
- self.fp.write(' (of-object "' + obj + '")\n')
- self.fp.write(' (c-name "' + name + '")\n')
- m = getset_pat.match(mname)
- if self.genpropgetsets and m and len(args[1:]) <= 1:
- prop = m.group(1)
- if obj in self.objifacedefs:
- oidef = self.objifacedefs[obj]
- if prop.replace('_', '-') in oidef.props:
- self.fp.write(' (prop-getset "' + prop + '")\n')
- self._write_return(ret)
- self._write_arguments(args[1:])
- return
-
- def _write_virt(self, obj, name, ret, args):
- self.fp.write('(define-virtual ' + name + '\n')
- self.fp.write(' (of-object "' + obj + '")\n')
- self._write_return(ret)
- self._write_arguments(args[1:])
- return
-
- def _write_return(self, ret):
- if ret == 'void':
- ret = 'none'
- self.fp.write(' (return-type "' + ret + '")\n')
- return
-
- def _write_arguments(self, args):
- if args and not 'void' in args:
- varargs = ''
- self.fp.write(' (parameters\n')
- for arg in args:
- if arg == '...':
- varargs = ' (varargs #t)\n'
- else:
- tupleArg = tuple(arg.split())
- if len(tupleArg) == 2:
- self.fp.write(' \'("%s" "%s")\n' % tupleArg)
- self.fp.write(' )\n' + varargs)
- self.fp.write(')\n\n')
-
-# ---------- ctypes support classes for gobject library functions ----------
-
-GType = ctypes.c_uint
-
-class GTypeClass(ctypes.Structure):
- _fields_ = [('g_type', GType)]
-
-class GTypeInstance(ctypes.Structure):
- _fields_ = [('g_class', ctypes.POINTER(GTypeClass))]
-
-class EnumValue(ctypes.Structure):
- _fields_ = [('value', ctypes.c_int),
- ('value_name', ctypes.c_char_p),
- ('value_nick', ctypes.c_char_p)]
-
-class FlagsValue(ctypes.Structure):
- _fields_ = [('value', ctypes.c_uint),
- ('value_name', ctypes.c_char_p),
- ('value_nick', ctypes.c_char_p)]
-
-class EnumClass(ctypes.Structure):
- _fields_ = [('g_type_class', GTypeClass),
- ('minimum', ctypes.c_int),
- ('maximum', ctypes.c_int),
- ('n_values', ctypes.c_uint),
- ('values', ctypes.POINTER(EnumValue))]
-
-class FlagsClass(ctypes.Structure):
- _fields_ = [('g_type_class', GTypeClass),
- ('mask', ctypes.c_uint),
- ('n_values', ctypes.c_uint),
- ('values', ctypes.POINTER(FlagsValue))]
-
-class GTypeInterface(ctypes.Structure):
- _fields_ = [('g_type', GType),
- ('g_instance_type', GType)]
-
-class GParamSpec(ctypes.Structure):
- _fields_ = [('g_type_instance', GTypeInstance),
- ('name', ctypes.c_char_p),
- ('flags', ctypes.c_uint),
- ('value_type', GType),
- ('owner_type', GType)]
-
-# ------------------ Main function -----------------
-
-def main(args):
- verbose = False
- all = True
- onlyenums = False
- onlyobjdefs = False
- onlyvirtuals = False
- separate = False
- modulename = None
- defsfiles = []
- libgobject = None
- modulelibs = []
- defines = {}
- genpropgetsets = False
- use_prefix = False
- opts, args = getopt.getopt(args[1:], 'vs:m:f:D:L:l:p',
- ['onlyenums', 'onlyobjdefs', 'onlyvirtuals',
- 'modulename=', 'separate=',
- 'defsfile=', 'defines=', 'genpropgetsets',
- 'libgobject-', 'modulelib=', 'useprefix'])
- for o, v in opts:
- if o == '-v':
- verbose = True
- if o == '--onlyenums':
- onlyenums = True
- all = False
- if o == '--onlyvirtuals':
- onlyvirtuals = True
- all = False
- if o == '--onlyobjdefs':
- onlyobjdefs = True
- all = False
- if o in ('-p', '--useprefix'):
- use_prefix = True
- if o == '--genpropgetsets':
- genpropgetsets = True
- if o in ('-s', '--separate'):
- separate = v
- if o in ('-m', '--modulename'):
- modulename = v
- if o in ('-L', '--libgobject'):
- libgobject = v
- if o in ('-l', '--modulelib'):
- modulelibs.append(v)
- if o in ('-f', '--defsfile'):
- defsfiles.append(v)
- if o in ('-D', '--defines'):
- nameval = v.split('=')
- try:
- defines[nameval[0]] = nameval[1]
- except IndexError:
- defines[nameval[0]] = None
-
- if not args[0:1]:
- print 'Must specify at least one input file name'
- return -1
- if not modulelibs:
- print 'Must specify one or more modulelib names'
- return -1
-
- # load the gobject and module libraries and init the gtype system
- if not libgobject:
- if verbose:
- sys.stderr.write('Using "libgobject-2.0.so" as the libobject' \
- 'library name by default\n')
- gobj = ctypes.cdll.LoadLibrary('libgobject-2.0.so')
- else:
- gobj = ctypes.cdll.LoadLibrary(libgobject)
-
- modlib = [ctypes.cdll.LoadLibrary(lib) for lib in modulelibs]
-
- gobj.g_type_init()
- gobj.g_type_name.restype = ctypes.c_char_p
- gobj.g_type_from_name.argtypes = [ctypes.c_char_p]
- gobj.g_type_interfaces.restype = ctypes.POINTER(ctypes.c_int)
- gobj.g_type_interface_prerequisites.restype = ctypes.POINTER(ctypes.c_int)
- gobj.g_object_class_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec))
- gobj.g_object_interface_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec))
- gobj.GObject = gobj.g_type_from_name('GObject')
- gobj.g_object_new(gobj.GObject, None)
-
- defs = {}
- for key in defkeys.split():
- defs[key] = []
- defs['funcs'] = {}
- defs['virts'] = {}
- defs['untypedenums'] = {}
- defs['typedefines'] = []
-
- # read in all the object and function definitions
- args.sort()
- type_define_pat = re.compile(
- r'^#define\s+([A-Z]\S+_TYPE_\S+)\s+.*[a-z]\w+_get_type.*$',
- re.MULTILINE)
- for filename in args:
- buf = open(filename).read()
- defs['typedefines'] += type_define_pat.findall(buf)
- buf = clean_buffer(buf)
- find_enums(buf, defs)
- find_defs(buf, gobj, modlib, defs)
- find_func_defs(buf, modlib, filename, defs, verbose)
- find_virt_defs(buf, filename, defs)
-
- for key in defkeys.split():
- defs[key].sort()
-
- methods = types = None
- if separate:
- methods = file(separate + '.defs', 'w')
- types = file(separate + '-types.defs', 'w')
-
- dw = DefsWriter(defs, methods, prefix=modulename, verbose=verbose,
- defsfiles=defsfiles, defines=defines,
- genpropgetsets=genpropgetsets, useprefix=use_prefix)
- dw.interfaces = [i.name for i in defs['GInterface']]
- dw.gobj = gobj
- dw.modlib = modlib
-
- if onlyobjdefs or all:
- dw.write_obj_defs(types)
- if separate:
- print "Wrote object defs to %s-types.defs" % separate
- if onlyenums or all:
- dw.write_enum_defs(types)
- if separate:
- print "Wrote enum and flags defs to %s-types.defs" % separate
- if onlyvirtuals or all:
- dw.write_func_defs(args, onlyvirtuals)
- if separate:
- print "Wrote function and virtual defs to %s.defs" % separate
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/codegen/defsparser.py b/codegen/defsparser.py
deleted file mode 100644
index 37ba0a2..0000000
--- a/codegen/defsparser.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-import os, sys
-import scmexpr
-from definitions import BoxedDef, EnumDef, FlagsDef, FunctionDef, \
- InterfaceDef, MethodDef, ObjectDef, PointerDef, VirtualDef
-
-include_path = ['.']
-
-class IncludeParser(scmexpr.Parser):
- """A simple parser that follows include statements automatically"""
- def include(self, input_filename):
- global include_path
- if os.path.isabs(input_filename):
- filename = input_filename
- # set self.filename to the include name, to handle recursive includes
- oldfile = self.filename
- self.filename = filename
- self.startParsing()
- self.filename = oldfile
- else:
- inc_path = [os.path.dirname(self.filename)] + include_path
- for filename in [os.path.join(path_entry, input_filename)
- for path_entry in inc_path]:
- if not os.path.exists(filename):
- continue
- # set self.filename to the include name, to handle recursive includes
- oldfile = self.filename
- self.filename = filename
- self.startParsing()
- self.filename = oldfile
- break
- else:
- raise IOError("%s not found in include path %s" % (input_filename, inc_path))
-
-class DefsParser(IncludeParser):
- def __init__(self, arg, defines={}):
- IncludeParser.__init__(self, arg)
- self.objects = []
- self.interfaces = []
- self.enums = [] # enums and flags
- self.boxes = [] # boxed types
- self.pointers = [] # pointer types
- self.functions = [] # functions and methods
- self.virtuals = [] # virtual methods
- self.c_name = {} # hash of c names of functions
- self.methods = {} # hash of methods of particular objects
- self.defines = defines # -Dfoo=bar options, as dictionary
-
- def define_object(self, *args):
- odef = apply(ObjectDef, args)
- self.objects.append(odef)
- self.c_name[odef.c_name] = odef
- def define_interface(self, *args):
- idef = apply(InterfaceDef, args)
- self.interfaces.append(idef)
- self.c_name[idef.c_name] = idef
- def define_enum(self, *args):
- edef = apply(EnumDef, args)
- self.enums.append(edef)
- self.c_name[edef.c_name] = edef
- def define_flags(self, *args):
- fdef = apply(FlagsDef, args)
- self.enums.append(fdef)
- self.c_name[fdef.c_name] = fdef
- def define_boxed(self, *args):
- bdef = apply(BoxedDef, args)
- self.boxes.append(bdef)
- self.c_name[bdef.c_name] = bdef
- def define_pointer(self, *args):
- pdef = apply(PointerDef, args)
- self.pointers.append(pdef)
- self.c_name[pdef.c_name] = pdef
- def define_function(self, *args):
- fdef = apply(FunctionDef, args)
- self.functions.append(fdef)
- self.c_name[fdef.c_name] = fdef
- def define_method(self, *args):
- mdef = apply(MethodDef, args)
- self.functions.append(mdef)
- self.c_name[mdef.c_name] = mdef
- def define_virtual(self, *args):
- vdef = apply(VirtualDef, args)
- self.virtuals.append(vdef)
- def merge(self, old, parmerge):
- for obj in self.objects:
- if old.c_name.has_key(obj.c_name):
- obj.merge(old.c_name[obj.c_name])
- for f in self.functions:
- if old.c_name.has_key(f.c_name):
- f.merge(old.c_name[f.c_name], parmerge)
-
- def printMissing(self, old):
- for obj in self.objects:
- if not old.c_name.has_key(obj.c_name):
- obj.write_defs()
- for f in self.functions:
- if not old.c_name.has_key(f.c_name):
- f.write_defs()
-
- def write_defs(self, fp=sys.stdout):
- for obj in self.objects:
- obj.write_defs(fp)
- for enum in self.enums:
- enum.write_defs(fp)
- for boxed in self.boxes:
- boxed.write_defs(fp)
- for pointer in self.pointers:
- pointer.write_defs(fp)
- for func in self.functions:
- func.write_defs(fp)
-
- def find_object(self, c_name):
- for obj in self.objects:
- if obj.c_name == c_name:
- return obj
- else:
- raise ValueError('object %r not found' % c_name)
-
- def find_constructor(self, obj, overrides):
- for func in self.functions:
- if isinstance(func, FunctionDef) and \
- func.is_constructor_of == obj.c_name and \
- not overrides.is_ignored(func.c_name):
- return func
-
- def find_methods(self, obj):
- objname = obj.c_name
- return filter(lambda func, on=objname: isinstance(func, MethodDef) and
- func.of_object == on, self.functions)
-
- def find_virtuals(self, obj):
- objname = obj.c_name
- retval = filter(lambda func, on=objname: isinstance(func, VirtualDef) and
- func.of_object == on, self.virtuals)
- return retval
-
- def find_functions(self):
- return filter(lambda func: isinstance(func, FunctionDef) and
- not func.is_constructor_of, self.functions)
-
- def ifdef(self, *args):
- if args[0] in self.defines:
- for arg in args[1:]:
- #print >> sys.stderr, "-----> Handling conditional definition (%s): %s" % (args[0], arg)
- self.handle(arg)
- else:
- pass
- #print >> sys.stderr, "-----> Conditional %s is not true" % (args[0],)
-
- def ifndef(self, *args):
- if args[0] not in self.defines:
- for arg in args[1:]:
- self.handle(arg)
diff --git a/codegen/docextract.py b/codegen/docextract.py
deleted file mode 100644
index eff8c5e..0000000
--- a/codegen/docextract.py
+++ /dev/null
@@ -1,448 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-'''Simple module for extracting GNOME style doc comments from C
-sources, so I can use them for other purposes.'''
-
-import sys, os, string, re
-
-__all__ = ['extract']
-
-class GtkDoc:
- def __init__(self):
- self.name = None
- self.block_type = '' # The block type ('function', 'signal', 'property')
- self.params = []
- self.annotations = []
- self.description = ''
- self.ret = ('', []) # (return, annotations)
- def set_name(self, name):
- self.name = name
- def set_type(self, block_type):
- self.block_type = block_type
- def get_type(self):
- return self.block_type
- def add_param(self, name, description, annotations=[]):
- if name == '...':
- name = 'Varargs'
- self.params.append((name, description, annotations))
- def append_to_last_param(self, extra):
- self.params[-1] = (self.params[-1][0], self.params[-1][1] + extra,
- self.params[-1][2])
- def append_to_named_param(self, name, extra):
- for i in range(len(self.params)):
- if self.params[i][0] == name:
- self.params[i] = (name, self.params[i][1] + extra,
- self.params[i][2])
- return
- # fall through to adding extra parameter ...
- self.add_param(name, extra)
- def add_annotation(self, annotation):
- self.annotations.append(annotation)
- def get_annotations(self):
- return self.annotations
- def append_to_description(self, extra):
- self.description = self.description + extra
- def get_description(self):
- return self.description
- def add_return(self, first_line, annotations=[]):
- self.ret = (first_line, annotations)
- def append_to_return(self, extra):
- self.ret = (self.ret[0] + extra, self.ret[1])
-
-comment_start_pattern = re.compile(r'^\s*/\*\*\s')
-comment_end_pattern = re.compile(r'^\s*\*+/')
-comment_line_lead_pattern = re.compile(r'^\s*\*\s*')
-comment_empty_line_pattern = re.compile(r'^\s*\**\s*$')
-function_name_pattern = re.compile(r'^([a-z]\w*)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
-signal_name_pattern = re.compile(r'^([A-Z]\w+::[a-z0-9-]+)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
-property_name_pattern = re.compile(r'^([A-Z]\w+:[a-z0-9-]+)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
-return_pattern = re.compile(r'^@?(returns:|return\s+value:)(.*\n?)$', re.IGNORECASE)
-deprecated_pattern = re.compile(r'^(deprecated\s*:\s*.*\n?)$', re.IGNORECASE)
-rename_to_pattern = re.compile(r'^(rename\s+to)\s*:\s*(.*\n?)$', re.IGNORECASE)
-param_pattern = re.compile(r'^@(\S+)\s*:(.*\n?)$')
-# Used to extract the annotations in the parameter and return descriptions
-# extracted using above [param|return]_pattern patterns.
-annotations_pattern = re.compile(r'^(?:(\s*\(.*\)\s*)*:)')
-# Used to construct the annotation lists.
-annotation_lead_pattern = re.compile(r'^\s*\(\s*(.*?)\s*\)\s*')
-
-# These patterns determine the identifier of the current comment block. They
-# are grouped in a list for easy determination of block identifiers (in
-# skip_to_identifier). The function_name_pattern should be tested for last
-# because it always matches signal and property identifiers.
-identifier_patterns = [ signal_name_pattern, property_name_pattern, function_name_pattern ]
-
-# This pattern is to match return sections that forget to have a colon (':')
-# after the initial 'Return' phrase. It is not included by default in the list
-# of final sections below because a lot of function descriptions begin with
-# 'Returns ...' and the process_description() function would stop right at that
-# first line, thinking it is a return section.
-no_colon_return_pattern = re.compile(r'^@?(returns|return\s+value)\s*(.*\n?)$', re.IGNORECASE)
-since_pattern = re.compile(r'^(since\s*:\s*.*\n?)$', re.IGNORECASE)
-
-# These patterns normally will be encountered after the description. Knowing
-# the order of their appearance is difficult so this list is used to test when
-# one begins and the other ends when processing the rest of the sections after
-# the description.
-final_section_patterns = [ return_pattern, since_pattern, deprecated_pattern, rename_to_pattern ]
-
-def parse_file(fp, doc_dict):
- line = fp.readline()
- while line:
- cur_doc = GtkDoc()
- line = skip_to_comment_block(fp, line)
- line = skip_to_identifier(fp, line, cur_doc)
- # See if the identifier is found (stored in the current GtkDoc by
- # skip_to_identifier). If so, continue reading the rest of the comment
- # block.
- if cur_doc.name:
- line = process_params(fp, line, cur_doc)
- line = process_description(fp, line, cur_doc)
- line = process_final_sections(fp, line, cur_doc)
- # Add the current doc block to the dictionary of doc blocks.
- doc_dict[cur_doc.name] = cur_doc
-
-# Given a list of annotations as string of the form
-# '(annotation1) (annotation2) ...' return a list of annotations of the form
-# [ (name1, value1), (name2, value2) ... ]. Not all annotations have values so
-# the values in the list of tuples could be empty ('').
-def get_annotation_list(annotations):
- annotation_list = []
- while annotations:
- match = annotation_lead_pattern.match(annotations)
- if match:
- annotation_contents = match.group(1)
- name, split, value = annotation_contents.strip().partition(' ')
- annotation_list.append((name, value))
- # Remove first occurrence to continue processing.
- annotations = annotation_lead_pattern.sub('', annotations)
- else:
- break
- return annotation_list
-
-# Given a currently read line, test that line and continue reading until the
-# beginning of a comment block is found or eof is reached. Return the last
-# read line.
-def skip_to_comment_block(fp, line):
- while line:
- if comment_start_pattern.match(line):
- break
- line = fp.readline()
- return line
-
-# Given the current line in a comment block, continue skipping lines until a
-# non-blank line in the comment block is found or until the end of the block
-# (or eof) is reached. Returns the line where reading stopped.
-def skip_to_nonblank(fp, line):
- while line:
- if not comment_empty_line_pattern.match(line):
- break
- line = fp.readline()
- # Stop processing if eof or end of comment block is reached.
- if not line or comment_end_pattern.match(line):
- break
- return line
-
-# Given the first line of a comment block (the '/**'), see if the next
-# non-blank line is the identifier of the comment block. Stop processing if
-# the end of the block or eof is reached. Store the identifier (if there is
-# one) and its type ('function', 'signal' or 'property') in the given GtkDoc.
-# Return the line where the identifier is found or the line that stops the
-# processing (if eof or the end of the comment block is found first).
-def skip_to_identifier(fp, line, cur_doc):
- # Skip the initial comment block line ('/**') if not eof.
- if line: line = fp.readline()
-
- # Now skip empty lines.
- line = skip_to_nonblank(fp, line)
-
- # See if the first non-blank line is the identifier.
- if line and not comment_end_pattern.match(line):
- # Remove the initial ' * ' in comment block line and see if there is an
- # identifier.
- line = comment_line_lead_pattern.sub('', line)
- for pattern in identifier_patterns:
- match = pattern.match(line)
- if match:
- # Set the GtkDoc name.
- cur_doc.set_name(match.group(1))
- # Get annotations and add them to the GtkDoc.
- annotations = get_annotation_list(match.group(2))
- for annotation in annotations:
- cur_doc.add_annotation(annotation)
- # Set the GtkDoc type.
- if pattern == signal_name_pattern:
- cur_doc.set_type('signal')
- elif pattern == property_name_pattern:
- cur_doc.set_type('property')
- elif pattern == function_name_pattern:
- cur_doc.set_type('function')
- return line
- return line
-
-# Given a currently read line (presumably the identifier line), read the next
-# lines, testing to see if the lines are part of parameter descriptions. If
-# so, store the parameter descriptions in the given doc block. Stop on eof and
-# return the last line that stops the processing.
-def process_params(fp, line, cur_doc):
- # Skip the identifier line if not eof. Also skip any blank lines in the
- # comment block. Return if eof or the end of the comment block are
- # encountered.
- if line: line = fp.readline()
- line = skip_to_nonblank(fp, line)
- if not line or comment_end_pattern.match(line):
- return line
-
- # Remove initial ' * ' in first non-empty comment block line.
- line = comment_line_lead_pattern.sub('', line)
-
- # Now process possible parameters as long as no eof or the end of the
- # param section is not reached (which could be triggered by anything that
- # doesn't match a '@param:..." line, even the end of the comment block).
- match = param_pattern.match(line)
- while line and match:
- description = match.group(2)
-
- # First extract the annotations from the description and save them.
- annotations = []
- annotation_match = annotations_pattern.match(description)
- if annotation_match:
- annotations = get_annotation_list(annotation_match.group(1))
- # Remove the annotations from the description
- description = annotations_pattern.sub('', description)
-
- # Default to appending lines to current parameter.
- append_func = cur_doc.append_to_last_param
-
- # See if the return has been included as part of the parameter
- # section and make sure that lines are added to the GtkDoc return if
- # so.
- if match.group(1).lower() == "returns":
- cur_doc.add_return(description, annotations)
- append_func = cur_doc.append_to_return
- # If not, just add it as a regular parameter.
- else:
- cur_doc.add_param(match.group(1), description, annotations)
-
- # Now read lines and append them until next parameter, beginning of
- # description (an empty line), the end of the comment block or eof.
- line = fp.readline()
- while line:
- # Stop processing if end of comment block or a blank comment line
- # is encountered.
- if comment_empty_line_pattern.match(line) or \
- comment_end_pattern.match(line):
- break
-
- # Remove initial ' * ' in comment block line.
- line = comment_line_lead_pattern.sub('', line)
-
- # Break from current param processing if a new one is
- # encountered.
- if param_pattern.match(line): break;
-
- # Otherwise, just append the current line and get the next line.
- append_func(line)
- line = fp.readline()
-
- # Re-evaluate match for while condition
- match = param_pattern.match(line)
-
- # End by returning the current line.
- return line
-
-# Having processed parameters, read the following lines into the description of
-# the current doc block until the end of the comment block, the end of file or
-# a return section is encountered.
-def process_description(fp, line, cur_doc):
- # First skip empty lines returning on eof or end of comment block.
- line = skip_to_nonblank(fp, line)
- if not line or comment_end_pattern.match(line):
- return line
-
- # Remove initial ' * ' in non-empty comment block line.
- line = comment_line_lead_pattern.sub('', line)
-
- # Also remove possible 'Description:' prefix.
- if line[:12] == 'Description:': line = line[12:]
-
- # Used to tell if the previous line was blank and a return section
- # uncommonly marked with 'Returns ...' instead of 'Returns: ...' has
- # started (assume it is non-empty to begin with).
- prev_line = 'non-empty'
-
- # Now read lines until a new section (like a return or a since section) is
- # encountered.
- while line:
- # See if the description section has ended (if the line begins with
- # 'Returns ...' and the previous line was empty -- this loop replaces
- # empty lines with a newline).
- if no_colon_return_pattern.match(line) and prev_line == '\n':
- return line
- # Or if one of the patterns of the final sections match
- for pattern in final_section_patterns:
- if pattern.match(line):
- return line
-
- # If not, append lines to description in the doc comment block.
- cur_doc.append_to_description(line)
-
- prev_line = line
- line = fp.readline()
-
- # Stop processing on eof or at the end of comment block.
- if not line or comment_end_pattern.match(line):
- return line
-
- # Remove initial ' * ' in line so that the text can be appended to the
- # description of the comment block and make sure that if the line is
- # empty it be interpreted as a newline.
- line = comment_line_lead_pattern.sub('', line)
- if not line: line = '\n'
-
-# Given the line that ended the description (the first line of one of the final
-# sections) process the final sections ('Returns:', 'Since:', etc.) until the
-# end of the comment block or eof. Return the line that ends the processing.
-def process_final_sections(fp, line, cur_doc):
- while line and not comment_end_pattern.match(line):
- # Remove leading ' * ' from current non-empty comment line.
- line = comment_line_lead_pattern.sub('', line)
- # Temporarily append the no colon return pattern to the final section
- # patterns now that the description has been processed. It will be
- # removed after the for loop below executes so that future descriptions
- # that begin with 'Returns ...' are not interpreted as a return
- # section.
- final_section_patterns.append(no_colon_return_pattern)
- for pattern in final_section_patterns:
- match = pattern.match(line)
- if match:
- if pattern == return_pattern or \
- pattern == no_colon_return_pattern:
- # Dealing with a 'Returns:' so first extract the
- # annotations from the description and save them.
- description = match.group(2)
- annotations = []
- annotation_match = \
- annotations_pattern.match(description)
- if annotation_match:
- annotations = \
- get_annotation_list(annotation_match.group(1))
- # Remove the annotations from the description
- description = annotations_pattern.sub('', description)
-
- # Now add the return.
- cur_doc.add_return(description, annotations)
- # In case more lines need to be appended.
- append_func = cur_doc.append_to_return
- elif pattern == rename_to_pattern:
- # Dealing with a 'Rename to:' section (GObjectIntrospection
- # annotation) so no further lines will be appended but this
- # single one (and only to the annotations).
- append_func = None
- cur_doc.add_annotation((match.group(1),
- match.group(2)))
- else:
- # For all others ('Since:' and 'Deprecated:') just append
- # the line to the description for now.
- cur_doc.append_to_description(line)
- # In case more lines need to be appended.
- append_func = cur_doc.append_to_description
-
- # Stop final section pattern matching for loop since a match
- # has already been found.
- break
-
- # Remove the no colon return pattern (which was temporarily added in
- # the just executed loop) from the list of final section patterns.
- final_section_patterns.pop()
-
- line = fp.readline()
-
- # Now continue appending lines to current section until a new one is
- # found or an eof or the end of the comment block is encountered.
- finished = False
- while not finished and line and \
- not comment_end_pattern.match(line):
- # Remove leading ' * ' from line and make sure that if it is empty,
- # it be interpreted as a newline.
- line = comment_line_lead_pattern.sub('', line)
- if not line: line = '\n'
-
- for pattern in final_section_patterns:
- if pattern.match(line):
- finished = True
- break
-
- # Break out of loop if a new section is found (determined in above
- # inner loop).
- if finished: break
-
- # Now it's safe to append line.
- if append_func: append_func(line)
-
- # Get the next line to continue processing.
- line = fp.readline()
-
- return line
-
-def parse_dir(dir, doc_dict):
- for file in os.listdir(dir):
- if file in ('.', '..'): continue
- path = os.path.join(dir, file)
- if os.path.isdir(path):
- parse_dir(path, doc_dict)
- if len(file) > 2 and file[-2:] == '.c':
- sys.stderr.write("Processing " + path + '\n')
- parse_file(open(path, 'r'), doc_dict)
-
-def extract(dirs, doc_dict=None):
- if not doc_dict: doc_dict = {}
- for dir in dirs:
- parse_dir(dir, doc_dict)
- return doc_dict
-
-tmpl_section_pattern = re.compile(r'^<!-- ##### (\w+) (\w+) ##### -->$')
-def parse_tmpl(fp, doc_dict):
- cur_doc = None
-
- line = fp.readline()
- while line:
- match = tmpl_section_pattern.match(line)
- if match:
- cur_doc = None # new input shouldn't affect the old doc dict
- sect_type = match.group(1)
- sect_name = match.group(2)
-
- if sect_type == 'FUNCTION':
- cur_doc = doc_dict.get(sect_name)
- if not cur_doc:
- cur_doc = GtkDoc()
- cur_doc.set_name(sect_name)
- doc_dict[sect_name] = cur_doc
- elif line == '<!-- # Unused Parameters # -->\n':
- cur_doc = None # don't worry about unused params.
- elif cur_doc:
- if line[:10] == '@Returns: ':
- if string.strip(line[10:]):
- cur_doc.append_to_return(line[10:])
- elif line[0] == '@':
- pos = string.find(line, ':')
- if pos >= 0:
- cur_doc.append_to_named_param(line[1:pos], line[pos+1:])
- else:
- cur_doc.append_to_description(line)
- else:
- cur_doc.append_to_description(line)
-
- line = fp.readline()
-
-def extract_tmpl(dirs, doc_dict=None):
- if not doc_dict: doc_dict = {}
- for dir in dirs:
- for file in os.listdir(dir):
- if file in ('.', '..'): continue
- path = os.path.join(dir, file)
- if os.path.isdir(path):
- continue
- if len(file) > 2 and file[-2:] == '.sgml':
- parse_tmpl(open(path, 'r'), doc_dict)
- return doc_dict
diff --git a/codegen/docextract_to_xml.py b/codegen/docextract_to_xml.py
deleted file mode 100755
index f41c839..0000000
--- a/codegen/docextract_to_xml.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-#
-# This litte script outputs the C doc comments to an XML format.
-# So far it's only used by gtkmm (The C++ bindings). Murray Cumming.
-# Usage example:
-# # ./docextract_to_xml.py -s /gnome/head/cvs/gtk+/gtk/ -s /gnome/head/cvs/gtk+/docs/reference/gtk/tmpl/ > gtk_docs.xml
-
-import getopt
-import re
-import string
-import sys
-
-import docextract
-
-def usage():
- sys.stderr.write('usage: docextract_to_xml.py ' +
- '[-s /src/dir | --source-dir=/src/dir] ' +
- '[-a | --with-annotations] [-p | --with-properties] ' +
- '[-i | --with-signals ]\n')
- sys.exit(1)
-
-# Translates special texts to &... HTML acceptable format. Also replace
-# occurrences of '/*' and '*/' with '/ *' and '* /' respectively to avoid
-# comment errors (note the spaces). Some function descriptions include C++
-# multi-line comments which cause errors when the description is included in a
-# C++ Doxygen comment block.
-def escape_text(unescaped_text):
- # Escape every "&" not part of an entity reference
- escaped_text = re.sub(r'&(?![A-Za-z]+;)', '&amp;', unescaped_text)
-
- # These weird entities turn up in the output...
- escaped_text = string.replace(escaped_text, '&mdash;', '&#8212;')
- escaped_text = string.replace(escaped_text, '&ast;', '*')
- escaped_text = string.replace(escaped_text, '&percnt;', '%')
- escaped_text = string.replace(escaped_text, '&commat;', '@')
- escaped_text = string.replace(escaped_text, '&num;', '&#35;')
- escaped_text = string.replace(escaped_text, '&nbsp;', '&#160;')
- # This represents a '/' before or after an '*' so replace with slash but
- # with spaces.
- escaped_text = string.replace(escaped_text, '&sol;', ' / ')
-
- # Escape for both tag contents and attribute values
- escaped_text = string.replace(escaped_text, '<', '&lt;')
- escaped_text = string.replace(escaped_text, '>', '&gt;')
- escaped_text = string.replace(escaped_text, '"', '&quot;')
-
- # Replace C++ comment begin and ends to ones that don't affect Doxygen.
- escaped_text = string.replace(escaped_text, '/*', '/ *')
- escaped_text = string.replace(escaped_text, '*/', '* /')
-
- return escaped_text
-
-def print_annotations(annotations):
- for annotation in annotations:
- print "<annotation name=" + annotation[0] + ">" + \
- escape_text(annotation[1]) + "</annotation>"
-
-if __name__ == '__main__':
- try:
- opts, args = getopt.getopt(sys.argv[1:], "d:s:o:api",
- ["source-dir=", "with-annotations",
- "with-properties", "with-signals"])
- except getopt.error, e:
- sys.stderr.write('docextract_to_xml.py: %s\n' % e)
- usage()
- source_dirs = []
- with_annotations = False
- with_signals = False
- with_properties = False
- for opt, arg in opts:
- if opt in ('-s', '--source-dir'):
- source_dirs.append(arg)
- if opt in ('-a', '--with-annotations'):
- with_annotations = True
- if opt in ('-p', '--with-properties'):
- with_properties = True
- if opt in ('-i', '--with-signals'):
- with_signals = True
- if len(args) != 0:
- usage()
-
- docs = docextract.extract(source_dirs);
- docextract.extract_tmpl(source_dirs, docs); #Try the tmpl sgml files too.
-
- # print d.docs
-
- if docs:
-
- print "<root>"
-
- for name, value in sorted(docs.items()):
- # Get the type of comment block ('function', 'signal' or
- # 'property') (the value is a GtkDoc).
- block_type = value.get_type()
-
- # Skip signals if the option was not specified.
- if block_type == 'signal' and not with_signals:
- continue
- # Likewise for properties.
- elif block_type == 'property' and not with_properties:
- continue
-
- print "<" + block_type + " name=\"" + escape_text(name) + "\">"
-
- print "<description>"
- print escape_text(value.get_description())
- print "</description>"
-
- # Loop through the parameters if not dealing with a property:
- if block_type != 'property':
- print "<parameters>"
- for name, description, annotations in value.params:
- print "<parameter name=\"" + escape_text(name) + "\">"
- print "<parameter_description>" + escape_text(description) + "</parameter_description>"
-
- if with_annotations:
- print_annotations(annotations)
-
- print "</parameter>"
-
- print "</parameters>"
-
- # Show the return-type (also if not dealing with a property):
- if with_annotations:
- print "<return>"
- print "<return_description>" + escape_text(value.ret[0]) + \
- "</return_description>"
- print_annotations(value.ret[1])
- print "</return>"
- else:
- print "<return>" + escape_text(value.ret[0]) + "</return>"
-
- if with_annotations:
- print_annotations(value.get_annotations())
-
- print "</" + block_type + ">\n"
-
- print "</root>"
diff --git a/codegen/docgen.py b/codegen/docgen.py
deleted file mode 100755
index b9e2f67..0000000
--- a/codegen/docgen.py
+++ /dev/null
@@ -1,766 +0,0 @@
-#!/usr/bin/env python
-import getopt
-import os
-import re
-import sys
-
-import definitions
-import defsparser
-import docextract
-import override
-
-
-class Node:
-
- def __init__(self, name, interfaces=[]):
- self.name = name
- self.interfaces = interfaces
- self.subclasses = []
-
- def add_child(self, node):
- self.subclasses.append(node)
-
-
-def build_object_tree(parser):
- # reorder objects so that parent classes come first ...
- objects = parser.objects[:]
- pos = 0
- while pos < len(objects):
- parent = objects[pos].parent
- for i in range(pos+1, len(objects)):
- if objects[i].c_name == parent:
- objects.insert(i+1, objects[pos])
- del objects[pos]
- break
- else:
- pos = pos + 1
-
- root = Node(None)
- nodes = {None: root}
- for obj_def in objects:
- parent_name = obj_def.parent
- if parent_name == 'GObject':
- parent_name = None
- parent_node = nodes[parent_name]
- node = Node(obj_def.c_name, obj_def.implements)
- parent_node.add_child(node)
- nodes[node.name] = node
-
- if parser.interfaces:
- interfaces = Node('gobject.GInterface')
- root.add_child(interfaces)
- nodes[interfaces.name] = interfaces
- for obj_def in parser.interfaces:
- node = Node(obj_def.c_name)
- interfaces.add_child(node)
- nodes[node.name] = node
-
- if parser.boxes:
- boxed = Node('gobject.GBoxed')
- root.add_child(boxed)
- nodes[boxed.name] = boxed
- for obj_def in parser.boxes:
- node = Node(obj_def.c_name)
- boxed.add_child(node)
- nodes[node.name] = node
-
- if parser.pointers:
- pointers = Node('gobject.GPointer')
- root.add_child(pointers)
- nodes[pointers.name] = pointers
- for obj_def in parser.pointers:
- node = Node(obj_def.c_name)
- pointers.add_child(node)
- nodes[node.name] = node
-
- return root
-
-
-class DocWriter:
-
- def __init__(self):
- self._fp = None
- # parse the defs file
- self.parser = defsparser.DefsParser(())
- self.overrides = override.Overrides()
- self.classmap = {}
- self.docs = {}
-
- def add_sourcedirs(self, source_dirs):
- self.docs = docextract.extract(source_dirs, self.docs)
-
- def add_tmpldirs(self, tmpl_dirs):
- self.docs = docextract.extract_tmpl(tmpl_dirs, self.docs)
-
- def add_docs(self, defs_file, overrides_file, module_name):
- '''parse information about a given defs file'''
- self.parser.filename = defs_file
- self.parser.startParsing(defs_file)
- if overrides_file:
- self.overrides.handle_file(overrides_file)
-
- for obj in (self.parser.objects + self.parser.interfaces +
- self.parser.boxes + self.parser.pointers):
- if not obj.c_name in self.classmap:
- self.classmap[obj.c_name] = '%s.%s' % (
- module_name, obj.name)
-
- def pyname(self, name):
- return self.classmap.get(name, name)
-
- def _compare(self, obja, objb):
- return cmp(self.pyname(obja.c_name), self.pyname(objb.c_name))
-
- def output_docs(self, output_prefix):
- files = {}
-
- # class hierarchy
- hierarchy = build_object_tree(self.parser)
- filename = self.create_filename('hierarchy', output_prefix)
- self._fp = open(filename, 'w')
- self.write_full_hierarchy(hierarchy)
- self._fp.close()
-
- obj_defs = (self.parser.objects + self.parser.interfaces +
- self.parser.boxes + self.parser.pointers)
- obj_defs.sort(self._compare)
-
- for obj_def in obj_defs:
- filename = self.create_filename(obj_def.c_name, output_prefix)
- self._fp = open(filename, 'w')
- if isinstance(obj_def, definitions.ObjectDef):
- self.output_object_docs(obj_def)
- elif isinstance(obj_def, definitions.InterfaceDef):
- self.output_interface_docs(obj_def)
- elif isinstance(obj_def, definitions.BoxedDef):
- self.output_boxed_docs(obj_def)
- elif isinstance(obj_def, definitions.PointerDef):
- self.output_boxed_docs(obj_def)
- self._fp.close()
- files[os.path.basename(filename)] = obj_def
-
- if not files:
- return
-
- output_filename = self.create_toc_filename(output_prefix)
- self._fp = open(output_filename, 'w')
- self.output_toc(files)
- self._fp.close()
-
- def output_object_docs(self, obj_def):
- self.write_class_header(obj_def.c_name)
-
- self.write_heading('Synopsis')
- self.write_synopsis(obj_def)
- self.close_section()
-
- # construct the inheritence hierarchy ...
- ancestry = [(obj_def.c_name, obj_def.implements)]
- try:
- parent = obj_def.parent
- while parent != None:
- if parent == 'GObject':
- ancestry.append(('GObject', []))
- parent = None
- else:
- parent_def = self.parser.find_object(parent)
- ancestry.append((parent_def.c_name, parent_def.implements))
- parent = parent_def.parent
- except ValueError:
- pass
- ancestry.reverse()
- self.write_heading('Ancestry')
- self.write_hierarchy(obj_def.c_name, ancestry)
- self.close_section()
-
- constructor = self.parser.find_constructor(obj_def, self.overrides)
- if constructor:
- self.write_heading('Constructor')
- self.write_constructor(constructor,
- self.docs.get(constructor.c_name, None))
- self.close_section()
-
- methods = self.parser.find_methods(obj_def)
- methods = filter(lambda meth, self=self:
- not self.overrides.is_ignored(meth.c_name), methods)
- if methods:
- self.write_heading('Methods')
- for method in methods:
- self.write_method(method, self.docs.get(method.c_name, None))
- self.close_section()
-
- self.write_class_footer(obj_def.c_name)
-
- def get_methods_for_object(self, obj_def):
- methods = []
- for method in self.parser.find_methods(obj_def):
- if not self.overrides.is_ignored(method.c_name):
- methods.append(method)
- return methods
-
- def output_interface_docs(self, int_def):
- self.write_class_header(int_def.c_name)
-
- self.write_heading('Synopsis')
- self.write_synopsis(int_def)
- self.close_section()
-
- methods = self.get_methods_for_object(int_def)
- if methods:
- self.write_heading('Methods')
- for method in methods:
- self.write_method(method, self.docs.get(method.c_name, None))
- self.close_section()
- self.write_class_footer(int_def.c_name)
-
- def output_boxed_docs(self, box_def):
- self.write_class_header(box_def.c_name)
-
- self.write_heading('Synopsis')
- self.write_synopsis(box_def)
- self.close_section()
-
- constructor = self.parser.find_constructor(box_def, self.overrides)
- if constructor:
- self.write_heading('Constructor')
- self.write_constructor(constructor,
- self.docs.get(constructor.c_name, None))
- self.close_section()
-
- methods = self.get_methods_for_object(box_def)
- if methods:
- self.write_heading('Methods')
- for method in methods:
- self.write_method(method, self.docs.get(method.c_name, None))
- self.close_section()
-
- self.write_class_footer(box_def.c_name)
-
- def output_toc(self, files):
- self._fp.write('TOC\n\n')
- for filename in sorted(files):
- obj_def = files[filename]
- self._fp.write(obj_def.c_name + ' - ' + filename + '\n')
-
- # override the following to create a more complex output format
-
- def create_filename(self, obj_name, output_prefix):
- '''Create output filename for this particular object'''
- return output_prefix + '-' + obj_name.lower() + '.txt'
-
- def create_toc_filename(self, output_prefix):
- return self.create_filename(self, 'docs', output_prefix)
-
- def write_full_hierarchy(self, hierarchy):
-
- def handle_node(node, indent=''):
- for child in node.subclasses:
- self._fp.write(indent + node.name)
- if node.interfaces:
- self._fp.write(' (implements ')
- self._fp.write(', '.join(node.interfaces))
- self._fp.write(')\n')
- else:
- self._fp.write('\n')
- handle_node(child, indent + ' ')
- handle_node(hierarchy)
-
- def serialize_params(self, func_def):
- params = []
- for param in func_def.params:
- params.append(param[1])
- return ', '.join(params)
-
- # these need to handle default args ...
-
- def create_constructor_prototype(self, func_def):
- return '%s(%s)' % (func_def.is_constructor_of,
- self.serialize_params(func_def))
-
- def create_function_prototype(self, func_def):
- return '%s(%s)' % (func_def.name,
- self.serialize_params(func_def))
-
- def create_method_prototype(self, meth_def):
- return '%s.%s(%s)' % (meth_def.of_object,
- meth_def.name,
- self.serialize_params(meth_def))
-
- def write_class_header(self, obj_name):
- self._fp.write('Class %s\n' % obj_name)
- self._fp.write('======%s\n\n' % ('=' * len(obj_name)))
-
- def write_class_footer(self, obj_name):
- pass
-
- def write_heading(self, text):
- self._fp.write('\n' + text + '\n' + ('-' * len(text)) + '\n')
-
- def close_section(self):
- pass
-
- def write_synopsis(self, obj_def):
- self._fp.write('class %s' % obj_def.c_name)
- if isinstance(obj_def, definitions.ObjectDef):
- bases = []
- if obj_def.parent:
- bases.append(obj_def.parent)
- bases = bases = obj_def.implements
- if bases:
- self._fp.write('(%s)' % ', '.join(bases, ))
- self._fp.write(':\n')
-
- constructor = self.parser.find_constructor(obj_def, self.overrides)
- if constructor:
- prototype = self.create_constructor_prototype(constructor)
- self._fp.write(' def %s\n' % prototype)
-
- for method in self.get_methods_for_object(obj_def):
- prototype = self.create_method_prototype(method)
- self._fp.write(' def %s\n' % prototype)
-
- def write_hierarchy(self, obj_name, ancestry):
- indent = ''
- for name, interfaces in ancestry:
- self._fp.write(indent + '+-- ' + name)
- if interfaces:
- self._fp.write(' (implements ')
- self._fp.write(', '.join(interfaces))
- self._fp.write(')\n')
- else:
- self._fp.write('\n')
- indent = indent + ' '
- self._fp.write('\n')
-
- def write_constructor(self, func_def, func_doc):
- prototype = self.create_constructor_prototype(func_def)
- self._fp.write(prototype + '\n\n')
- for type, name, dflt, null in func_def.params:
- self.write_parameter(name, func_doc)
- self.write_return_value(func_def, func_doc)
- if func_doc and func_doc.description:
- self._fp.write(func_doc.description)
- self._fp.write('\n\n\n')
-
- def write_method(self, meth_def, func_doc):
- prototype = self.create_method_prototype(meth_def)
- self._fp.write(prototype + '\n\n')
- for type, name, dflt, null in meth_def.params:
- self.write_parameter(name, func_doc)
- self.write_return_value(meth_def, func_doc)
- if func_doc and func_doc.description:
- self._fp.write('\n')
- self._fp.write(func_doc.description)
- self._fp.write('\n\n')
-
- def write_parameter(self, param_name, func_doc):
- if func_doc:
- descr = func_doc.get_param_description(param_name)
- else:
- descr = 'a ' + type
- self._fp.write(' ' + param_name + ': ' + descr + '\n')
-
- def write_return_value(self, meth_def, func_doc):
- if meth_def.ret and meth_def.ret != 'none':
- if func_doc and func_doc.ret:
- descr = func_doc.ret
- else:
- descr = 'a ' + meth_def.ret
- self._fp.write(' Returns: ' + descr + '\n')
-
-CLASS_HEADER_TEMPLATE = """<refentry id="%(entryid)s">
- <refmeta>
- <refentrytitle>%(name)s</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>%(miscinfo)s</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>%(name)s</refname><refpurpose></refpurpose>
- </refnamediv>
-
-"""
-VARIABLE_TEMPLATE = """<varlistentry>
- <term><parameter>%(parameter)s</parameter>&nbsp;:</term>
- <listitem><simpara>%(description)s</simpara></listitem>
- </varlistentry>
-"""
-
-DOCBOOK_HEADER = """<?xml version="1.0" standalone="no"?>
-<!DOCTYPE synopsis PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-"""
-
-
-class DocbookDocWriter(DocWriter):
-
- def __init__(self):
- DocWriter.__init__(self)
-
- self._function_pat = re.compile(r'(\w+)\s*\(\)')
- self._parameter_pat = re.compile(r'\@(\w+)')
- self._constant_pat = re.compile(r'\%(-?\w+)')
- self._symbol_pat = re.compile(r'#([\w-]+)')
-
- self._transtable = ['-'] * 256
- # make string -> reference translation func
- for digit in '0123456789':
- self._transtable[ord(digit)] = digit
-
- for letter in 'abcdefghijklmnopqrstuvwxyz':
- self._transtable[ord(letter)] = letter
- self._transtable[ord(letter.upper())] = letter
- self._transtable = ''.join(self._transtable)
-
- def create_filename(self, obj_name, output_prefix):
- '''Create output filename for this particular object'''
- stem = output_prefix + '-' + obj_name.lower()
- return stem + '.xml'
-
- def create_toc_filename(self, output_prefix):
- return self.create_filename('classes', output_prefix)
-
- def make_class_ref(self, obj_name):
- return 'class-' + obj_name.translate(self._transtable)
-
- def make_method_ref(self, meth_def):
- return 'method-%s--%s' % (
- meth_def.of_object.translate(self._transtable),
- meth_def.name.translate(self._transtable))
-
- def _format_function(self, match):
- info = self.parser.c_name.get(match.group(1), None)
- if info:
- if isinstance(info, defsparser.FunctionDef):
- return self._format_funcdef(info)
- if isinstance(info, defsparser.MethodDef):
- return self._format_method(info)
-
- # fall through through
- return '<function>%s()</function>' % (match.group(1), )
-
- def _format_funcdef(self, info):
- if info.is_constructor_of is not None:
- # should have a link here
- return '<methodname>%s()</methodname>' % (
- self.pyname(info.is_constructor_of), )
- else:
- return '<function>%s()</function>' % (info.name, )
-
- def _format_param(self, match):
- return '<parameter>%s</parameterdliteral>' % (match.group(1), )
-
- def _format_const(self, match):
- return '<literal>%s</literal>' % (match.group(1), )
-
- def _format_method(self, info):
- return ('<link linkend="%s">'
- '<methodname>%s.%s</methodname>'
- '</link>') % (self.make_method_ref(info),
- self.pyname(info.of_object),
- info.name)
-
- def _format_object(self, info):
- return ('<link linkend="%s">'
- '<classname>%s</classname>'
- '</link>') % (self.make_class_ref(info.c_name),
- self.pyname(info.c_name))
-
- def _format_symbol(self, match):
- info = self.parser.c_name.get(match.group(1), None)
- if info:
- if isinstance(info, defsparser.FunctionDef):
- return self._format_funcdef(info)
- elif isinstance(info, defsparser.MethodDef):
- return self._format_method(info)
- elif isinstance(info, (defsparser.ObjectDef,
- defsparser.InterfaceDef,
- defsparser.BoxedDef,
- defsparser.PointerDef)):
- return self._format_object(info)
-
- # fall through through
- return '<literal>%s</literal>' % (match.group(1), )
-
- def reformat_text(self, text, singleline=0):
- # replace special strings ...
- text = self._function_pat.sub(self._format_function, text)
- text = self._parameter_pat.sub(self._format_param, text)
- text = self._constant_pat.sub(self._format_const, text)
- text = self._symbol_pat.sub(self._format_symbol, text)
-
- # don't bother with <para> expansion for single line text.
- if singleline:
- return text
-
- lines = text.strip().split('\n')
- for index in range(len(lines)):
- if lines[index].strip() == '':
- lines[index] = '</para>\n<para>'
- continue
- return '<para>%s</para>' % ('\n'.join(lines), )
-
- # write out hierarchy
-
- def write_full_hierarchy(self, hierarchy):
-
- def handle_node(node, indent=''):
- if node.name:
- self._fp.write('%s<link linkend="%s">%s</link>' %
- (indent, self.make_class_ref(node.name),
- self.pyname(node.name)))
- if node.interfaces:
- self._fp.write(' (implements ')
- for i in range(len(node.interfaces)):
- self._fp.write('<link linkend="%s">%s</link>' %
- (self.make_class_ref(node.interfaces[i]),
- self.pyname(node.interfaces[i])))
- if i != len(node.interfaces) - 1:
- self._fp.write(', ')
- self._fp.write(')\n')
- else:
- self._fp.write('\n')
-
- indent = indent + ' '
- node.subclasses.sort(lambda a, b:
- cmp(self.pyname(a.name), self.pyname(b.name)))
- for child in node.subclasses:
- handle_node(child, indent)
-
- self._fp.write(DOCBOOK_HEADER)
- self._fp.write('<synopsis>')
- handle_node(hierarchy)
- self._fp.write('</synopsis>\n')
-
- # these need to handle default args ...
-
- def create_constructor_prototype(self, func_def):
- xml = ['<constructorsynopsis language="python">\n']
- xml.append(' <methodname>__init__</methodname>\n')
- for type, name, dflt, null in func_def.params:
- xml.append(' <methodparam><parameter>')
- xml.append(name)
- xml.append('</parameter>')
- if dflt:
- xml.append('<initializer>')
- xml.append(dflt)
- xml.append('</initializer>')
- xml.append('</methodparam>\n')
- if not func_def.params:
- xml.append(' <methodparam></methodparam>')
- xml.append(' </constructorsynopsis>')
- return ''.join(xml)
-
- def create_function_prototype(self, func_def):
- xml = ['<funcsynopsis language="python">\n <funcprototype>\n']
- xml.append(' <funcdef><function>')
- xml.append(func_def.name)
- xml.append('</function></funcdef>\n')
- for type, name, dflt, null in func_def.params:
- xml.append(' <paramdef><parameter>')
- xml.append(name)
- xml.append('</parameter>')
- if dflt:
- xml.append('<initializer>')
- xml.append(dflt)
- xml.append('</initializer>')
- xml.append('</paramdef>\n')
- if not func_def.params:
- xml.append(' <paramdef></paramdef')
- xml.append(' </funcprototype>\n </funcsynopsis>')
- return ''.join(xml)
-
- def create_method_prototype(self, meth_def, addlink=0):
- xml = ['<methodsynopsis language="python">\n']
- xml.append(' <methodname>')
- if addlink:
- xml.append('<link linkend="%s">' % self.make_method_ref(meth_def))
- xml.append(self.pyname(meth_def.name))
- if addlink:
- xml.append('</link>')
- xml.append('</methodname>\n')
- for type, name, dflt, null in meth_def.params:
- xml.append(' <methodparam><parameter>')
- xml.append(name)
- xml.append('</parameter>')
- if dflt:
- xml.append('<initializer>')
- xml.append(dflt)
- xml.append('</initializer>')
- xml.append('</methodparam>\n')
- if not meth_def.params:
- xml.append(' <methodparam></methodparam>')
- xml.append(' </methodsynopsis>')
- return ''.join(xml)
-
- def write_class_header(self, obj_name):
- self._fp.write(DOCBOOK_HEADER)
- self._fp.write(CLASS_HEADER_TEMPLATE % dict(
- entryid=self.make_class_ref(obj_name),
- name=self.pyname(obj_name),
- miscinfo="PyGTK Docs"))
-
- def write_class_footer(self, obj_name):
- self._fp.write('</refentry>\n')
-
- def write_heading(self, text):
- self._fp.write(' <refsect1>\n')
- self._fp.write(' <title>' + text + '</title>\n\n')
-
- def close_section(self):
- self._fp.write(' </refsect1>\n')
-
- def write_synopsis(self, obj_def):
- self._fp.write('<classsynopsis language="python">\n')
- self._fp.write(' <ooclass><classname>%s</classname></ooclass>\n'
- % self.pyname(obj_def.c_name))
- if isinstance(obj_def, definitions.ObjectDef):
- if obj_def.parent:
- self._fp.write(' <ooclass><classname><link linkend="%s">%s'
- '</link></classname></ooclass>\n'
- % (self.make_class_ref(obj_def.parent),
- self.pyname(obj_def.parent)))
- for base in obj_def.implements:
- self._fp.write(' <ooclass><classname><link linkend="%s">%s'
- '</link></classname></ooclass>\n'
- % (self.make_class_ref(base), self.pyname(base)))
- elif isinstance(obj_def, definitions.InterfaceDef):
- self._fp.write(' <ooclass><classname>gobject.GInterface'
- '</classname></ooclass>\n')
- elif isinstance(obj_def, definitions.BoxedDef):
- self._fp.write(' <ooclass><classname>gobject.GBoxed'
- '</classname></ooclass>\n')
- elif isinstance(obj_def, definitions.PointerDef):
- self._fp.write(' <ooclass><classname>gobject.GPointer'
- '</classname></ooclass>\n')
-
- constructor = self.parser.find_constructor(obj_def, self.overrides)
- if constructor:
- self._fp.write(
- '%s\n' % self.create_constructor_prototype(constructor))
- for method in self.get_methods_for_object(obj_def):
- self._fp.write(
- '%s\n' % self.create_method_prototype(method, addlink=1))
- self._fp.write('</classsynopsis>\n\n')
-
- def write_hierarchy(self, obj_name, ancestry):
- self._fp.write('<synopsis>')
- indent = ''
- for name, interfaces in ancestry:
- self._fp.write(
- '%s+-- <link linkend="%s">%s</link>' %
- (indent, self.make_class_ref(name), self.pyname(name)))
- if interfaces:
- self._fp.write(' (implements ')
- for i in range(len(interfaces)):
- self._fp.write('<link linkend="%s">%s</link>' %
- (self.make_class_ref(interfaces[i]),
- self.pyname(interfaces[i])))
- if i != len(interfaces) - 1:
- self._fp.write(', ')
- self._fp.write(')\n')
- else:
- self._fp.write('\n')
- indent = indent + ' '
- self._fp.write('</synopsis>\n\n')
-
- def write_params(self, params, ret, func_doc):
- if not params and (not ret or ret == 'none'):
- return
- self._fp.write(' <variablelist>\n')
- for type, name, dflt, null in params:
- if func_doc:
- descr = func_doc.get_param_description(name).strip()
- else:
- descr = 'a ' + type
- self._fp.write(VARIABLE_TEMPLATE % dict(
- parameter=name,
- description=self.reformat_text(descr, singleline=1)))
- if ret and ret != 'none':
- if func_doc and func_doc.ret:
- descr = func_doc.ret.strip()
- else:
- descr = 'a ' + ret
- self._fp.write(VARIABLE_TEMPLATE % dict(
- parameter='Returns',
- description=self.reformat_text(descr, singleline=1)))
- self._fp.write(' </variablelist>\n')
-
- def write_constructor(self, func_def, func_doc):
- prototype = self.create_constructor_prototype(func_def)
- self._fp.write('<programlisting>%s</programlisting>\n' % prototype)
- self.write_params(func_def.params, func_def.ret, func_doc)
-
- if func_doc and func_doc.description:
- self._fp.write(self.reformat_text(func_doc.description))
- self._fp.write('\n\n\n')
-
- def write_method(self, meth_def, func_doc):
- self._fp.write(' <refsect2 id="%s">\n' % (
- self.make_method_ref(meth_def), ))
- self._fp.write(' <title>%s.%s</title>\n\n' % (
- self.pyname(meth_def.of_object),
- meth_def.name))
- prototype = self.create_method_prototype(meth_def)
- self._fp.write('<programlisting>%s</programlisting>\n' % prototype)
- self.write_params(meth_def.params, meth_def.ret, func_doc)
- if func_doc and func_doc.description:
- self._fp.write(self.reformat_text(func_doc.description))
- self._fp.write(' </refsect2>\n\n\n')
-
- def output_toc(self, files, fp=sys.stdout):
- self._fp.write(DOCBOOK_HEADER)
-
- #self._fp.write('<reference id="class-reference">\n')
- #self._fp.write(' <title>Class Documentation</title>\n')
- #for filename, obj_def in files:
- # self._fp.write('&' +
- # obj_def.c_name.translate(self._transtable) + ';\n')
- #self._fp.write('</reference>\n')
-
- self._fp.write('<reference id="class-reference" '
- 'xmlns:xi="http://www.w3.org/2001/XInclude">\n')
- self._fp.write(' <title>Class Reference</title>\n')
- for filename in sorted(files):
- self._fp.write(' <xi:include href="%s"/>\n' % filename)
- self._fp.write('</reference>\n')
-
-
-def main(args):
- try:
- opts, args = getopt.getopt(args[1:], "d:s:o:",
- ["defs-file=", "override=", "source-dir=",
- "output-prefix="])
- except getopt.error, e:
- sys.stderr.write('docgen.py: %s\n' % e)
- sys.stderr.write(
- 'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n')
- return 1
-
- defs_file = None
- overrides_file = None
- source_dirs = []
- output_prefix = 'docs'
- for opt, arg in opts:
- if opt in ('-d', '--defs-file'):
- defs_file = arg
- if opt in ('--override', ):
- overrides_file = arg
- elif opt in ('-s', '--source-dir'):
- source_dirs.append(arg)
- elif opt in ('-o', '--output-prefix'):
- output_prefix = arg
- if len(args) != 0 or not defs_file:
- sys.stderr.write(
- 'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n')
- return 1
-
- d = DocbookDocWriter()
- d.add_sourcedirs(source_dirs)
- d.add_docs(defs_file, overrides_file, 'gio')
- d.output_docs(output_prefix)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/codegen/h2def.py b/codegen/h2def.py
deleted file mode 100755
index 17617fa..0000000
--- a/codegen/h2def.py
+++ /dev/null
@@ -1,631 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-# GPL'ed
-# Toby D. Reeves <toby@max.rl.plh.af.mil>
-#
-# Modified by James Henstridge <james@daa.com.au> to output stuff in
-# Havoc's new defs format. Info on this format can be seen at:
-# http://mail.gnome.org/archives/gtk-devel-list/2000-January/msg00070.html
-# Updated to be PEP-8 compatible and refactored to use OOP
-#
-# Scan the given public .h files of a GTK module (or module using
-# GTK object conventions) and generates a set of scheme defs.
-#
-# h2def searches through a header file looking for function prototypes and
-# generates a scheme style defenition for each prototype.
-# Basically the operation of h2def is:
-#
-# - read each .h file into a buffer which is scrubbed of extraneous data
-# - find all object defenitions:
-# - find all structures that may represent a GtkObject
-# - find all structures that might represent a class
-# - find all structures that may represent a GtkObject subclass
-# - find all structures that might represent a class/Iface inherited from
-# GTypeInterface
-# - find all enum defenitions
-# - write out the defs
-#
-# The command line options are:
-#
-# -s --separate Create separate files for objects and function/method defs
-# using the given name as the base name (optional). If this
-# is not specified the combined object and function defs
-# will be output to sys.stdout.
-# -f --defsfilter Extract defs from the given file to filter the output defs
-# that is don't output defs that are defined in the
-# defsfile. More than one deffile may be specified.
-# -m --modulename The prefix to be stripped from the front of function names
-# for the given module
-# -n --namespace The module or namespace name to be used, for example
-# WebKit where h2def is unable to detect the module name
-# automatically. it also sets the gtype-id prefix.
-# --onlyenums Only produce defs for enums and flags
-# --onlyobjdefs Only produce defs for objects
-# -v Verbose output
-#
-# Examples:
-#
-# python h2def.py /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs
-#
-# - Outputs all defs for the pango module.
-#
-# python h2def.py -m gdk -s /tmp/gdk-2.10 \
-# -f /usr/tmp/pygtk/gtk/gdk-base.defs \
-# /usr/local/include/gtk-2.0/gdk/*.h \
-# /usr/local/include/gtk-2.0/gdk-pixbuf/*.h
-#
-# - Outputs the gdk module defs that are not contained in the defs file
-# /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created:
-# /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs.
-#
-# python h2def.py -n WebKit /usr/incude/webkit-1.0/webkit/*.h \
-# >/tmp/webkit.defs
-#
-# - Outputs all the defs for webkit module, setting the module name to WebKit
-# and the gtype-id prefix to WEBKIT_ which can't be detected automatically.
-#
-
-import getopt
-import os
-import re
-import string
-import sys
-
-import defsparser
-
-# ------------------ Create typecodes from typenames ---------
-
-_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
-_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
-_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])')
-
-def to_upper_str(name):
- """Converts a typename to the equivalent upercase and underscores
- name. This is used to form the type conversion macros and enum/flag
- name variables"""
- name = _upperstr_pat1.sub(r'\1_\2', name)
- name = _upperstr_pat2.sub(r'\1_\2', name)
- name = _upperstr_pat3.sub(r'\1_\2', name, count=1)
- return string.upper(name)
-
-def typecode(typename, namespace=None):
- """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
- if namespace:
- return string.replace(string.upper(namespace) + "_" + to_upper_str(typename[len(namespace):]), '_', '_TYPE_', 1)
-
- return string.replace(to_upper_str(typename), '_', '_TYPE_', 1)
-
-
-# ------------------ Find object definitions -----------------
-# Strips the comments from buffer
-def strip_comments(buf):
- parts = []
- lastpos = 0
- while 1:
- pos = string.find(buf, '/*', lastpos)
- if pos >= 0:
- parts.append(buf[lastpos:pos])
- pos = string.find(buf, '*/', pos)
- if pos >= 0:
- lastpos = pos + 2
- else:
- break
- else:
- parts.append(buf[lastpos:])
- break
- return string.join(parts, '')
-
-# Strips the dll API from buffer, for example WEBKIT_API
-def strip_dll_api(buf):
- pat = re.compile("[A-Z]*_API ")
- buf = pat.sub("", buf)
- return buf
-
-obj_name_pat = "[A-Z][a-z]*[A-Z][A-Za-z0-9]*"
-
-split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)')
-
-def find_obj_defs(buf, objdefs=[]):
- """
- Try to find object definitions in header files.
- """
-
- # filter out comments from buffer.
- buf = strip_comments(buf)
-
- # filter out dll api
- buf = strip_dll_api(buf)
-
- maybeobjdefs = [] # contains all possible objects from file
-
- # first find all structures that look like they may represent a GtkObject
- pat = re.compile("struct\s+_(" + obj_name_pat + ")\s*{\s*" +
- "(" + obj_name_pat + ")\s+", re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = pat.search(buf, pos)
- if not m: break
- maybeobjdefs.append((m.group(1), m.group(2)))
- pos = m.end()
-
- # handle typedef struct { ... } style struct defs.
- pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" +
- "(" + obj_name_pat + ")\s+[^}]*}\s*" +
- "(" + obj_name_pat + ")\s*;", re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = pat.search(buf, pos)
- if not m: break
- maybeobjdefs.append((m.group(2), m.group(1)))
- pos = m.end()
-
- # now find all structures that look like they might represent a class:
- pat = re.compile("struct\s+_(" + obj_name_pat + ")Class\s*{\s*" +
- "(" + obj_name_pat + ")Class\s+", re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = pat.search(buf, pos)
- if not m: break
- t = (m.group(1), m.group(2))
- # if we find an object structure together with a corresponding
- # class structure, then we have probably found a GtkObject subclass.
- if t in maybeobjdefs:
- objdefs.append(t)
- pos = m.end()
-
- pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" +
- "(" + obj_name_pat + ")Class\s+[^}]*}\s*" +
- "(" + obj_name_pat + ")Class\s*;", re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = pat.search(buf, pos)
- if not m: break
- t = (m.group(2), m.group(1))
- # if we find an object structure together with a corresponding
- # class structure, then we have probably found a GtkObject subclass.
- if t in maybeobjdefs:
- objdefs.append(t)
- pos = m.end()
-
- # now find all structures that look like they might represent
- # a class inherited from GTypeInterface:
- pat = re.compile("struct\s+_(" + obj_name_pat + ")Class\s*{\s*" +
- "GTypeInterface\s+", re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = pat.search(buf, pos)
- if not m: break
- t = (m.group(1), '')
- t2 = (m.group(1)+'Class', 'GTypeInterface')
- # if we find an object structure together with a corresponding
- # class structure, then we have probably found a GtkObject subclass.
- if t2 in maybeobjdefs:
- objdefs.append(t)
- pos = m.end()
-
- # now find all structures that look like they might represent
- # an Iface inherited from GTypeInterface:
- pat = re.compile("struct\s+_(" + obj_name_pat + ")Iface\s*{\s*" +
- "GTypeInterface\s+", re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = pat.search(buf, pos)
- if not m: break
- t = (m.group(1), '')
- t2 = (m.group(1)+'Iface', 'GTypeInterface')
- # if we find an object structure together with a corresponding
- # class structure, then we have probably found a GtkObject subclass.
- if t2 in maybeobjdefs:
- objdefs.append(t)
- pos = m.end()
-
-def sort_obj_defs(objdefs):
- objdefs.sort() # not strictly needed, but looks nice
- pos = 0
- while pos < len(objdefs):
- klass,parent = objdefs[pos]
- for i in range(pos+1, len(objdefs)):
- # parent below subclass ... reorder
- if objdefs[i][0] == parent:
- objdefs.insert(i+1, objdefs[pos])
- del objdefs[pos]
- break
- else:
- pos = pos + 1
- return objdefs
-
-# ------------------ Find enum definitions -----------------
-
-def find_enum_defs(buf, enums=[]):
- # strip comments
- # bulk comments
- buf = strip_comments(buf)
-
- # strip dll api macros
- buf = strip_dll_api(buf)
-
- # strip # directives
- pat = re.compile(r"""^[#].*?$""", re.MULTILINE)
- buf = pat.sub('', buf)
-
- buf = re.sub('\n', ' ', buf)
-
- enum_pat = re.compile(r'enum\s*{([^}]*)}\s*([A-Z][A-Za-z]*)(\s|;)')
- splitter = re.compile(r'\s*,\s', re.MULTILINE)
- pos = 0
- while pos < len(buf):
- m = enum_pat.search(buf, pos)
- if not m: break
-
- name = m.group(2)
- vals = m.group(1)
- isflags = string.find(vals, '<<') >= 0
- entries = []
- for val in splitter.split(vals):
- if not string.strip(val): continue
- entries.append(string.split(val)[0])
- if name != 'GdkCursorType':
- enums.append((name, isflags, entries))
-
- pos = m.end()
-
-# ------------------ Find function definitions -----------------
-
-def clean_func(buf):
- """
- Ideally would make buf have a single prototype on each line.
- Actually just cuts out a good deal of junk, but leaves lines
- where a regex can figure prototypes out.
- """
- # bulk comments
- buf = strip_comments(buf)
-
- # dll api
- buf = strip_dll_api(buf)
-
- # compact continued lines
- pat = re.compile(r"""\\\n""", re.MULTILINE)
- buf = pat.sub('', buf)
-
- # Preprocess directives
- pat = re.compile(r"""^[#].*?$""", re.MULTILINE)
- buf = pat.sub('', buf)
-
- #typedefs, stucts, and enums
- pat = re.compile(r"""^(typedef|struct|enum)(\s|.|\n)*?;\s*""",
- re.MULTILINE)
- buf = pat.sub('', buf)
-
- #strip DECLS macros
- pat = re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS""", re.MULTILINE)
- buf = pat.sub('', buf)
-
- #extern "C"
- pat = re.compile(r"""^\s*(extern)\s+\"C\"\s+{""", re.MULTILINE)
- buf = pat.sub('', buf)
-
- #multiple whitespace
- pat = re.compile(r"""\s+""", re.MULTILINE)
- buf = pat.sub(' ', buf)
-
- #clean up line ends
- pat = re.compile(r""";\s*""", re.MULTILINE)
- buf = pat.sub('\n', buf)
- buf = buf.lstrip()
-
- #associate *, &, and [] with type instead of variable
- #pat = re.compile(r'\s+([*|&]+)\s*(\w+)')
- pat = re.compile(r' \s* ([*|&]+) \s* (\w+)', re.VERBOSE)
- buf = pat.sub(r'\1 \2', buf)
- pat = re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE)
- buf = pat.sub(r'[] \1', buf)
-
- # make return types that are const work.
- buf = re.sub(r'\s*\*\s*G_CONST_RETURN\s*\*\s*', '** ', buf)
- buf = string.replace(buf, 'G_CONST_RETURN ', 'const-')
- buf = string.replace(buf, 'const ', 'const-')
-
- #strip GSEAL macros from the middle of function declarations:
- pat = re.compile(r"""GSEAL""", re.VERBOSE)
- buf = pat.sub('', buf)
-
- return buf
-
-proto_pat=re.compile(r"""
-(?P<ret>(-|\w|\&|\*)+\s*) # return type
-\s+ # skip whitespace
-(?P<func>\w+)\s*[(] # match the function name until the opening (
-\s*(?P<args>.*?)\s*[)] # group the function arguments
-""", re.IGNORECASE|re.VERBOSE)
-#"""
-arg_split_pat = re.compile("\s*,\s*")
-
-get_type_pat = re.compile(r'(const-)?([A-Za-z0-9]+)\*?\s+')
-pointer_pat = re.compile('.*\*$')
-func_new_pat = re.compile('(\w+)_new$')
-
-class DefsWriter:
- def __init__(self, fp=None, prefix=None, ns=None, verbose=False,
- defsfilter=None):
- if not fp:
- fp = sys.stdout
-
- self.fp = fp
- self.prefix = prefix
- self.namespace = ns
- self.verbose = verbose
-
- self._enums = {}
- self._objects = {}
- self._functions = {}
- if defsfilter:
- filter = defsparser.DefsParser(defsfilter)
- filter.startParsing()
- for func in filter.functions + filter.methods.values():
- self._functions[func.c_name] = func
- for obj in filter.objects + filter.boxes + filter.interfaces:
- self._objects[obj.c_name] = obj
- for obj in filter.enums:
- self._enums[obj.c_name] = obj
-
- def write_def(self, deffile):
- buf = open(deffile).read()
-
- self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile))
- self._define_func(buf)
- self.fp.write('\n')
-
- def write_enum_defs(self, enums, fp=None):
- if not fp:
- fp = self.fp
-
- fp.write(';; Enumerations and flags ...\n\n')
- trans = string.maketrans(string.uppercase + '_',
- string.lowercase + '-')
- filter = self._enums
- for cname, isflags, entries in enums:
- if filter:
- if cname in filter:
- continue
- name = cname
- module = None
- if self.namespace:
- module = self.namespace
- name = cname[len(self.namespace):]
- else:
- m = split_prefix_pat.match(cname)
- if m:
- module = m.group(1)
- name = m.group(2)
- if isflags:
- fp.write('(define-flags ' + name + '\n')
- else:
- fp.write('(define-enum ' + name + '\n')
- if module:
- fp.write(' (in-module "' + module + '")\n')
- fp.write(' (c-name "' + cname + '")\n')
- fp.write(' (gtype-id "' + typecode(cname, self.namespace) + '")\n')
- prefix = entries[0]
- for ent in entries:
- # shorten prefix til we get a match ...
- # and handle GDK_FONT_FONT, GDK_FONT_FONTSET case
- while ((len(prefix) and prefix[-1] != '_') or ent[:len(prefix)] != prefix
- or len(prefix) >= len(ent)):
- prefix = prefix[:-1]
- prefix_len = len(prefix)
- fp.write(' (values\n')
- for ent in entries:
- fp.write(' \'("%s" "%s")\n' %
- (string.translate(ent[prefix_len:], trans), ent))
- fp.write(' )\n')
- fp.write(')\n\n')
-
- def write_obj_defs(self, objdefs, fp=None):
- if not fp:
- fp = self.fp
-
- fp.write(';; -*- scheme -*-\n')
- fp.write('; object definitions ...\n')
-
- filter = self._objects
- for klass, parent in objdefs:
- if filter:
- if klass in filter:
- continue
- if self.namespace:
- cname = klass[len(self.namespace):]
- cmodule = self.namespace
- else:
- m = split_prefix_pat.match(klass)
- cname = klass
- cmodule = None
- if m:
- cmodule = m.group(1)
- cname = m.group(2)
- fp.write('(define-object ' + cname + '\n')
- if cmodule:
- fp.write(' (in-module "' + cmodule + '")\n')
- if parent:
- fp.write(' (parent "' + parent + '")\n')
- fp.write(' (c-name "' + klass + '")\n')
- fp.write(' (gtype-id "' + typecode(klass, self.namespace) + '")\n')
- # should do something about accessible fields
- fp.write(')\n\n')
-
- def _define_func(self, buf):
- buf = clean_func(buf)
- buf = string.split(buf,'\n')
- filter = self._functions
- for p in buf:
- if not p:
- continue
- m = proto_pat.match(p)
- if m == None:
- if self.verbose:
- sys.stderr.write('No match:|%s|\n' % p)
- continue
- func = m.group('func')
- if func[0] == '_':
- continue
- if filter:
- if func in filter:
- continue
- ret = m.group('ret')
- args = m.group('args')
- args = arg_split_pat.split(args)
- for i in range(len(args)):
- spaces = string.count(args[i], ' ')
- if spaces > 1:
- args[i] = string.replace(args[i], ' ', '-', spaces - 1)
-
- self._write_func(func, ret, args)
-
- def _write_func(self, name, ret, args):
- if len(args) >= 1:
- # methods must have at least one argument
- munged_name = name.replace('_', '')
- m = get_type_pat.match(args[0])
- if m:
- obj = m.group(2)
- if munged_name[:len(obj)] == obj.lower():
- self._write_method(obj, name, ret, args)
- return
-
- if self.prefix:
- l = len(self.prefix)
- if name[:l] == self.prefix and name[l] == '_':
- fname = name[l+1:]
- else:
- fname = name
- else:
- fname = name
-
- # it is either a constructor or normal function
- self.fp.write('(define-function ' + fname + '\n')
- self.fp.write(' (c-name "' + name + '")\n')
-
- # Hmmm... Let's asume that a constructor function name
- # ends with '_new' and it returns a pointer.
- m = func_new_pat.match(name)
- if pointer_pat.match(ret) and m:
- cname = ''
- for s in m.group(1).split ('_'):
- cname += s.title()
- if cname != '':
- self.fp.write(' (is-constructor-of "' + cname + '")\n')
-
- self._write_return(ret)
- self._write_arguments(args)
-
- def _write_method(self, obj, name, ret, args):
- regex = string.join(map(lambda x: x+'_?', string.lower(obj)),'')
- mname = re.sub(regex, '', name, 1)
- if self.prefix:
- l = len(self.prefix) + 1
- if mname[:l] == self.prefix and mname[l+1] == '_':
- mname = mname[l+1:]
- self.fp.write('(define-method ' + mname + '\n')
- self.fp.write(' (of-object "' + obj + '")\n')
- self.fp.write(' (c-name "' + name + '")\n')
- self._write_return(ret)
- self._write_arguments(args[1:])
-
- def _write_return(self, ret):
- if ret != 'void':
- self.fp.write(' (return-type "' + ret + '")\n')
- else:
- self.fp.write(' (return-type "none")\n')
-
- def _write_arguments(self, args):
- is_varargs = 0
- has_args = len(args) > 0
- for arg in args:
- if arg == '...':
- is_varargs = 1
- elif arg in ('void', 'void '):
- has_args = 0
- if has_args:
- self.fp.write(' (parameters\n')
- for arg in args:
- if arg != '...':
- tupleArg = tuple(string.split(arg))
- if len(tupleArg) == 2:
- self.fp.write(' \'("%s" "%s")\n' % tupleArg)
- self.fp.write(' )\n')
- if is_varargs:
- self.fp.write(' (varargs #t)\n')
- self.fp.write(')\n\n')
-
-# ------------------ Main function -----------------
-
-def main(args):
- verbose = False
- onlyenums = False
- onlyobjdefs = False
- separate = False
- modulename = None
- namespace = None
- defsfilter = None
- opts, args = getopt.getopt(args[1:], 'vs:m:n:f:',
- ['onlyenums', 'onlyobjdefs',
- 'modulename=', 'namespace=',
- 'separate=', 'defsfilter='])
- for o, v in opts:
- if o == '-v':
- verbose = True
- if o == '--onlyenums':
- onlyenums = True
- if o == '--onlyobjdefs':
- onlyobjdefs = True
- if o in ('-s', '--separate'):
- separate = v
- if o in ('-m', '--modulename'):
- modulename = v
- if o in ('-n', '--namespace'):
- namespace = v
- if o in ('-f', '--defsfilter'):
- defsfilter = v
-
- if not args[0:1]:
- print 'Must specify at least one input file name'
- return -1
-
- # read all the object definitions in
- objdefs = []
- enums = []
- for filename in args:
- buf = open(filename).read()
- find_obj_defs(buf, objdefs)
- find_enum_defs(buf, enums)
- objdefs = sort_obj_defs(objdefs)
-
- if separate:
- methods = file(separate + '.defs', 'w')
- types = file(separate + '-types.defs', 'w')
-
- dw = DefsWriter(methods, prefix=modulename, ns=namespace,
- verbose=verbose, defsfilter=defsfilter)
- dw.write_obj_defs(objdefs, types)
- dw.write_enum_defs(enums, types)
- print "Wrote %s-types.defs" % separate
-
- for filename in args:
- dw.write_def(filename)
- print "Wrote %s.defs" % separate
- else:
- dw = DefsWriter(prefix=modulename, ns=namespace,
- verbose=verbose, defsfilter=defsfilter)
-
- if onlyenums:
- dw.write_enum_defs(enums)
- elif onlyobjdefs:
- dw.write_obj_defs(objdefs)
- else:
- dw.write_obj_defs(objdefs)
- dw.write_enum_defs(enums)
-
- for filename in args:
- dw.write_def(filename)
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/codegen/mergedefs.py b/codegen/mergedefs.py
deleted file mode 100755
index 773e499..0000000
--- a/codegen/mergedefs.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-
-import optparse
-
-import defsparser
-
-parser = optparse.OptionParser(
- usage="usage: %prog [options] generated-defs old-defs")
-parser.add_option("-p", "--merge-parameters",
- help="Merge changes in function/methods parameter lists",
- action="store_true", dest="parmerge", default=False)
-(options, args) = parser.parse_args()
-
-if len(args) != 2:
- parser.error("wrong number of arguments")
-
-newp = defsparser.DefsParser(args[0])
-oldp = defsparser.DefsParser(args[1])
-
-newp.startParsing()
-oldp.startParsing()
-
-newp.merge(oldp, options.parmerge)
-
-newp.write_defs()
diff --git a/codegen/missingdefs.py b/codegen/missingdefs.py
deleted file mode 100755
index f0017e7..0000000
--- a/codegen/missingdefs.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-
-import sys
-import defsparser
-
-if len(sys.argv) < 3:
- sys.stderr.write("Usage: missingdefs.py generated-defs old-defs\n")
- sys.exit(1)
-
-newp = defsparser.DefsParser(sys.argv[1])
-oldp = defsparser.DefsParser(sys.argv[2])
-
-newp.startParsing()
-oldp.startParsing()
-
-newp.printMissing(oldp)
diff --git a/codegen/mkskel.py b/codegen/mkskel.py
deleted file mode 100755
index 61f520b..0000000
--- a/codegen/mkskel.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-
-import sys, os, getopt
-
-module_init_template = \
-'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \
-'#ifdef HAVE_CONFIG_H\n' + \
-'# include "config.h"\n' + \
-'#endif\n' + \
-'#include <Python.h>\n' + \
-'#include <pygtk.h>\n' + \
-'\n' + \
-'/* include any extra headers needed here */\n' + \
-'\n' + \
-'void %(prefix)s_register_classes(PyObject *d);\n' + \
-'extern PyMethodDef %(prefix)s_functions[];\n' + \
-'\n' + \
-'DL_EXPORT(void)\n' + \
-'init%(module)s(void)\n' + \
-'{\n' + \
-' PyObject *m, *d;\n' + \
-'\n' + \
-' /* perform any initialisation required by the library here */\n' + \
-'\n' + \
-' m = Py_InitModule("%(module)s", %(prefix)s_functions);\n' + \
-' d = PyModule_GetDict(m);\n' + \
-'\n' + \
-' init_pygtk();\n' + \
-'\n' + \
-' %(prefix)s_register_classes(d);\n' + \
-'\n' + \
-' /* add anything else to the module dictionary (such as constants) */\n' +\
-'\n' + \
-' if (PyErr_Occurred())\n' + \
-' Py_FatalError("could not initialise module %(module)s");\n' + \
-'}\n'
-
-override_template = \
-'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \
-'%%%%\n' + \
-'headers\n' + \
-'/* include any required headers here */\n' + \
-'%%%%\n' + \
-'init\n' + \
-' /* include any code here that needs to be executed before the\n' + \
-' * extension classes get initialised */\n' + \
-'%%%%\n' + \
-'\n' + \
-'/* you should add appropriate ignore, ignore-glob and\n' + \
-' * override sections here */\n'
-
-def open_with_backup(file):
- if os.path.exists(file):
- try:
- os.rename(file, file+'~')
- except OSError:
- # fail silently if we can't make a backup
- pass
- return open(file, 'w')
-
-def write_skels(fileprefix, prefix, module):
- fp = open_with_backup(fileprefix+'module.c')
- fp.write(module_init_template % { 'prefix': prefix, 'module': module })
- fp.close()
- fp = open_with_backup(fileprefix+'.override')
- fp.write(override_template % { 'prefix': prefix, 'module': module })
- fp.close()
-
-if __name__ == '__main__':
- opts, args = getopt.getopt(sys.argv[1:], 'f:p:m:h',
- ['file-prefix=', 'prefix=', 'module=', 'help'])
- fileprefix = None
- prefix = None
- module = None
- for opt, arg in opts:
- if opt in ('-f', '--file-prefix'):
- fileprefix = arg
- elif opt in ('-p', '--prefix'):
- prefix = arg
- elif opt in ('-m', '--module'):
- module = arg
- elif opt in ('-h', '--help'):
- print 'usage: mkskel.py -f fileprefix -p prefix -m module'
- sys.exit(0)
- if not fileprefix or not prefix or not module:
- print 'usage: mkskel.py -f fileprefix -p prefix -m module'
- sys.exit(1)
- write_skels(fileprefix, prefix, module)
diff --git a/codegen/override.py b/codegen/override.py
deleted file mode 100644
index bba5e42..0000000
--- a/codegen/override.py
+++ /dev/null
@@ -1,285 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-
-# this file contains code for loading up an override file. The override file
-# provides implementations of functions where the code generator could not
-# do its job correctly.
-
-import fnmatch
-import os
-import re
-import string
-import sys
-
-def class2cname(klass, method):
- c_name = ''
- for c in klass:
- if c.isupper():
- c_name += '_' + c.lower()
- else:
- c_name += c
- return c_name[1:] + '_' + method
-
-# import python_type as c_name [for arg_type]
-# Last ('for') clause is optional. If present, the type will be
-# imported only if given 'arg_type' is registered.
-import_pat = re.compile(r'\s*import\s+(\S+)\.([^\s.]+)\s+as\s+(\S+)(\s+for\s+(\S+))?')
-
-class Overrides:
- def __init__(self, filename=None):
- self.modulename = None
- self.ignores = {}
- self.glob_ignores = []
- self.type_ignores = {}
- self.overrides = {}
- self.overridden = {}
- self.kwargs = {}
- self.noargs = {}
- self.onearg = {}
- self.staticmethod = {}
- self.classmethod = {}
- self.startlines = {}
- self.override_attrs = {}
- self.override_slots = {}
- self.headers = ''
- self.body = ''
- self.init = ''
- self.imports = []
- self.defines = {}
- self.functions = {}
- self.newstyle_constructors = {}
- self.dynamicnamespace = False
- if filename:
- self.handle_file(filename)
-
- def handle_file(self, filename):
- oldpath = os.getcwd()
-
- fp = open(filename, 'r')
- dirname = os.path.dirname(os.path.abspath(filename))
-
- if dirname != oldpath:
- os.chdir(dirname)
-
- # read all the components of the file ...
- bufs = []
- startline = 1
- lines = []
- line = fp.readline()
- linenum = 1
- while line:
- if line == '%%\n' or line == '%%':
- if lines:
- bufs.append((string.join(lines, ''), startline))
- startline = linenum + 1
- lines = []
- else:
- lines.append(line)
- line = fp.readline()
- linenum = linenum + 1
- if lines:
- bufs.append((string.join(lines, ''), startline))
- if not bufs: return
-
- for buf, startline in bufs:
- self.__parse_override(buf, startline, filename)
-
- os.chdir(oldpath)
-
- def __parse_override(self, buffer, startline, filename):
- pos = string.find(buffer, '\n')
- if pos >= 0:
- line = buffer[:pos]
- rest = buffer[pos+1:]
- else:
- line = buffer ; rest = ''
- words = string.split(line)
- command = words[0]
- if (command == 'ignore' or
- command == 'ignore-' + sys.platform):
- "ignore/ignore-platform [functions..]"
- for func in words[1:]:
- self.ignores[func] = 1
- for func in string.split(rest):
- self.ignores[func] = 1
- elif (command == 'ignore-glob' or
- command == 'ignore-glob-' + sys.platform):
- "ignore-glob/ignore-glob-platform [globs..]"
- for func in words[1:]:
- self.glob_ignores.append(func)
- for func in string.split(rest):
- self.glob_ignores.append(func)
- elif (command == 'ignore-type' or
- command == 'ignore-type-' + sys.platform):
- "ignore-type/ignore-type-platform [typenames..]"
- for typename in words[1:]:
- self.type_ignores[typename] = 1
- for typename in string.split(rest):
- self.type_ignores[typename] = 1
- elif command == 'override':
- "override function/method [kwargs|noargs|onearg] [staticmethod|classmethod]"
- func = words[1]
- if 'kwargs' in words[1:]:
- self.kwargs[func] = 1
- elif 'noargs' in words[1:]:
- self.noargs[func] = 1
- elif 'onearg' in words[1:]:
- self.onearg[func] = True
-
- if 'staticmethod' in words[1:]:
- self.staticmethod[func] = True
- elif 'classmethod' in words[1:]:
- self.classmethod[func] = True
- if func in self.overrides:
- raise RuntimeError("Function %s is being overridden more than once" % (func,))
- self.overrides[func] = rest
- self.startlines[func] = (startline + 1, filename)
- elif command == 'override-attr':
- "override-slot Class.attr"
- attr = words[1]
- self.override_attrs[attr] = rest
- self.startlines[attr] = (startline + 1, filename)
- elif command == 'override-slot':
- "override-slot Class.slot"
- slot = words[1]
- self.override_slots[slot] = rest
- self.startlines[slot] = (startline + 1, filename)
- elif command == 'headers':
- "headers"
- self.headers = '%s\n#line %d "%s"\n%s' % \
- (self.headers, startline + 1, filename, rest)
- elif command == 'body':
- "body"
- self.body = '%s\n#line %d "%s"\n%s' % \
- (self.body, startline + 1, filename, rest)
- elif command == 'init':
- "init"
- self.init = '%s\n#line %d "%s"\n%s' % \
- (self.init, startline + 1, filename, rest)
- elif command == 'modulename':
- "modulename name"
- self.modulename = words[1]
- elif command == 'include':
- "include filename"
- for filename in words[1:]:
- self.handle_file(filename)
- for filename in string.split(rest):
- self.handle_file(filename)
- elif command == 'import':
- "import module1 [\n module2, \n module3 ...]"
- for line in string.split(buffer, '\n'):
- match = import_pat.match(line)
- if match:
- module, pyname, cname, conditional, importing_for = match.groups()
- self.imports.append((module, pyname, cname, importing_for or None))
- elif command == 'define':
- "define funcname [kwargs|noargs|onearg] [classmethod|staticmethod]"
- "define Class.method [kwargs|noargs|onearg] [classmethod|staticmethod]"
- func = words[1]
- klass = None
- if func.find('.') != -1:
- klass, func = func.split('.', 1)
-
- if not self.defines.has_key(klass):
- self.defines[klass] = {}
- self.defines[klass][func] = rest
- else:
- self.functions[func] = rest
-
- if 'kwargs' in words[1:]:
- self.kwargs[func] = 1
- elif 'noargs' in words[1:]:
- self.noargs[func] = 1
- elif 'onearg' in words[1:]:
- self.onearg[func] = 1
-
- if 'staticmethod' in words[1:]:
- self.staticmethod[func] = True
- elif 'classmethod' in words[1:]:
- self.classmethod[func] = True
-
- self.startlines[func] = (startline + 1, filename)
-
- elif command == 'new-constructor':
- "new-constructor GType"
- gtype, = words[1:]
- self.newstyle_constructors[gtype] = True
- elif command == 'options':
- for option in words[1:]:
- if option == 'dynamicnamespace':
- self.dynamicnamespace = True
-
- def is_ignored(self, name):
- if self.ignores.has_key(name):
- return 1
- for glob in self.glob_ignores:
- if fnmatch.fnmatchcase(name, glob):
- return 1
- return 0
-
- def is_type_ignored(self, name):
- return name in self.type_ignores
-
- def is_overriden(self, name):
- return self.overrides.has_key(name)
-
- def is_already_included(self, name):
- return self.overridden.has_key(name)
-
- def override(self, name):
- self.overridden[name] = 1
- return self.overrides[name]
-
- def define(self, klass, name):
- self.overridden[class2cname(klass, name)] = 1
- return self.defines[klass][name]
-
- def function(self, name):
- return self.functions[name]
-
- def getstartline(self, name):
- return self.startlines[name]
-
- def wants_kwargs(self, name):
- return self.kwargs.has_key(name)
-
- def wants_noargs(self, name):
- return self.noargs.has_key(name)
-
- def wants_onearg(self, name):
- return self.onearg.has_key(name)
-
- def is_staticmethod(self, name):
- return self.staticmethod.has_key(name)
-
- def is_classmethod(self, name):
- return self.classmethod.has_key(name)
-
- def attr_is_overriden(self, attr):
- return self.override_attrs.has_key(attr)
-
- def attr_override(self, attr):
- return self.override_attrs[attr]
-
- def slot_is_overriden(self, slot):
- return self.override_slots.has_key(slot)
-
- def slot_override(self, slot):
- return self.override_slots[slot]
-
- def get_headers(self):
- return self.headers
-
- def get_body(self):
- return self.body
-
- def get_init(self):
- return self.init
-
- def get_imports(self):
- return self.imports
-
- def get_defines_for(self, klass):
- return self.defines.get(klass, {})
-
- def get_functions(self):
- return self.functions
diff --git a/codegen/pygobject-codegen-2.0.in b/codegen/pygobject-codegen-2.0.in
deleted file mode 100644
index c5c912e..0000000
--- a/codegen/pygobject-codegen-2.0.in
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-prefix=@prefix@
-datarootdir=@datarootdir@
-datadir=@datadir@
-codegendir=${datadir}/pygobject/2.0/codegen
-
-PYTHONPATH=$codegendir
-export PYTHONPATH
-
-exec @PYTHON@ $codegendir/codegen.py "$@"
diff --git a/codegen/reversewrapper.py b/codegen/reversewrapper.py
deleted file mode 100644
index b96e12e..0000000
--- a/codegen/reversewrapper.py
+++ /dev/null
@@ -1,912 +0,0 @@
-### -*- python -*-
-### Code to generate "Reverse Wrappers", i.e. C->Python wrappers
-### (C) 2004 Gustavo Carneiro <gjc@gnome.org>
-import argtypes
-import os
-
-DEBUG_MODE = ('PYGTK_CODEGEN_DEBUG' in os.environ)
-
-def join_ctype_name(ctype, name):
- '''Joins a C type and a variable name into a single string'''
- if ctype[-1] != '*':
- return " ".join((ctype, name))
- else:
- return "".join((ctype, name))
-
-
-class CodeSink(object):
- def __init__(self):
- self.indent_level = 0 # current indent level
- self.indent_stack = [] # previous indent levels
-
- def _format_code(self, code):
- assert isinstance(code, str)
- l = []
- for line in code.split('\n'):
- l.append(' '*self.indent_level + line)
- if l[-1]:
- l.append('')
- return '\n'.join(l)
-
- def writeln(self, line=''):
- raise NotImplementedError
-
- def indent(self, level=4):
- '''Add a certain ammount of indentation to all lines written
- from now on and until unindent() is called'''
- self.indent_stack.append(self.indent_level)
- self.indent_level += level
-
- def unindent(self):
- '''Revert indentation level to the value before last indent() call'''
- self.indent_level = self.indent_stack.pop()
-
-
-class FileCodeSink(CodeSink):
- def __init__(self, fp):
- CodeSink.__init__(self)
- assert isinstance(fp, file)
- self.fp = fp
-
- def writeln(self, line=''):
- self.fp.write(self._format_code(line))
-
-class MemoryCodeSink(CodeSink):
- def __init__(self):
- CodeSink.__init__(self)
- self.lines = []
-
- def writeln(self, line=''):
- self.lines.append(self._format_code(line))
-
- def flush_to(self, sink):
- assert isinstance(sink, CodeSink)
- for line in self.lines:
- sink.writeln(line.rstrip())
- self.lines = []
-
- def flush(self):
- l = []
- for line in self.lines:
- l.append(self._format_code(line))
- self.lines = []
- return "".join(l)
-
-class ReverseWrapper(object):
- '''Object that generates a C->Python wrapper'''
- def __init__(self, cname, is_static=True):
- assert isinstance(cname, str)
-
- self.cname = cname
- ## function object we will call, or object whose method we will call
- self.called_pyobj = None
- ## name of method of self.called_pyobj we will call
- self.method_name = None
- self.is_static = is_static
-
- self.parameters = []
- self.declarations = MemoryCodeSink()
- self.post_return_code = MemoryCodeSink()
- self.body = MemoryCodeSink()
- self.check_exception_code = MemoryCodeSink()
- self.cleanup_actions = []
- self.pyargv_items = []
- self.pyargv_optional_items = []
- self.pyret_parse_items = [] # list of (format_spec, parameter)
- self.code_sinks_stack = [self.body]
-
- def set_call_target(self, called_pyobj, method_name=None):
- assert called_pyobj is not None
- assert self.called_pyobj is None
- self.called_pyobj = called_pyobj
- self.method_name = method_name
-
- def set_return_type(self, return_type):
- assert isinstance(return_type, ReturnType)
- self.return_type = return_type
-
- def add_parameter(self, param):
- assert isinstance(param, Parameter)
- self.parameters.append(param)
-
- def add_declaration(self, decl_code):
- self.declarations.writeln(decl_code)
-
- def add_pyargv_item(self, variable, optional=False):
- if optional:
- self.pyargv_optional_items.append(variable)
- else:
- self.pyargv_items.append(variable)
-
- def add_pyret_parse_item(self, format_specifier, parameter, prepend=False):
- if prepend:
- self.pyret_parse_items.insert(0, (format_specifier, parameter))
- else:
- self.pyret_parse_items.append((format_specifier, parameter))
-
-
- def push_code_sink(self, code_sink):
- self.code_sinks_stack.insert(0, code_sink)
-
- def pop_code_sink(self):
- return self.code_sinks_stack.pop(0)
-
-
- def write_code(self, code,
- cleanup=None,
- failure_expression=None,
- failure_cleanup=None,
- failure_exception=None,
- code_sink=None):
- '''Add a chunk of code with cleanup and error handling
-
- This method is to be used by TypeHandlers when generating code
-
- Keywork arguments:
- code -- code to add
- cleanup -- code to cleanup any dynamic resources created by @code
- (except in case of failure) (default None)
- failure_expression -- C boolean expression to indicate
- if anything failed (default None)
- failure_cleanup -- code to cleanup any dynamic resources
- created by @code in case of failure (default None)
- failure_exception -- code to raise an exception in case of
- failure (which will be immediately
- printed and cleared), (default None)
- code_sink -- "code sink" to use; by default,
- ReverseWrapper.body is used, which writes the
- main body of the wrapper, before calling the
- python method. Alternatively,
- ReverseWrapper.after_pyret_parse can be used, to
- write code after the PyArg_ParseTuple that
- parses the python method return value.
- '''
- if code_sink is None:
- code_sink = self.code_sinks_stack[0]
- if code is not None:
- code_sink.writeln(code)
- if failure_expression is not None:
- code_sink.writeln("if (%s) {" % (failure_expression,))
- code_sink.indent()
- if failure_exception is None:
- code_sink.writeln("if (PyErr_Occurred())")
- code_sink.indent()
- code_sink.writeln("PyErr_Print();")
- code_sink.unindent()
- else:
- code_sink.writeln(failure_exception)
- code_sink.writeln("PyErr_Print();")
- if failure_cleanup is not None:
- code_sink.writeln(failure_cleanup)
- for cleanup_action in self.cleanup_actions:
- code_sink.writeln(cleanup_action)
-
- self.push_code_sink(code_sink)
- try:
- self.return_type.write_error_return()
- finally:
- self.pop_code_sink()
-
- code_sink.unindent()
- code_sink.writeln("}")
- if cleanup is not None:
- self.cleanup_actions.insert(0, cleanup)
-
- def generate(self, sink):
- '''Generate the code into a CodeSink object'''
- assert isinstance(sink, CodeSink)
-
- if DEBUG_MODE:
- self.declarations.writeln("/* begin declarations */")
- self.body.writeln("/* begin main body */")
- self.post_return_code.writeln("/* begin post-return code */")
-
- self.add_declaration("PyGILState_STATE __py_state;")
- self.write_code(code="__py_state = pyg_gil_state_ensure();",
- cleanup="pyg_gil_state_release(__py_state);")
-
- for param in self.parameters:
- param.convert_c2py()
-
- assert self.called_pyobj is not None,\
- "Parameters failed to provide a target function or method."
-
- if self.is_static:
- sink.writeln('static %s' % self.return_type.get_c_type())
- else:
- sink.writeln(self.return_type.get_c_type())
- c_proto_params = map(Parameter.format_for_c_proto, self.parameters)
- sink.writeln("%s(%s)\n{" % (self.cname, ", ".join(c_proto_params)))
-
- self.return_type.write_decl()
- self.add_declaration("PyObject *py_retval;")
-
- ## Handle number of arguments
- if self.pyargv_items:
- self.add_declaration("PyObject *py_args;")
- py_args = "py_args"
- if self.pyargv_optional_items:
- self.add_declaration("int argc = %i;" % len(self.pyargv_items))
- argc = "argc"
- for arg in self.pyargv_optional_items:
- self.body.writeln("if (%s)" % arg)
- self.body.indent()
- self.body.writeln("++argc;")
- self.body.unindent()
- else:
- argc = str(len(self.pyargv_items))
- else:
- if self.pyargv_optional_items:
- self.add_declaration("PyObject *py_args;")
- py_args = "py_args"
- self.add_declaration("int argc = 0;")
- argc = "argc"
- for arg in self.pyargv_optional_items:
- self.body.writeln("if (%s)" % arg)
- self.body.indent()
- self.body.writeln("++argc;")
- self.body.unindent()
- else:
- py_args = "NULL"
- argc = None
-
- self.body.writeln()
-
- if py_args != "NULL":
- self.write_code("py_args = PyTuple_New(%s);" % argc,
- cleanup="Py_DECREF(py_args);")
- pos = 0
- for arg in self.pyargv_items:
- try: # try to remove the Py_DECREF cleanup action, if we can
- self.cleanup_actions.remove("Py_DECREF(%s);" % arg)
- except ValueError: # otherwise we have to Py_INCREF..
- self.body.writeln("Py_INCREF(%s);" % arg)
- self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg))
- pos += 1
- for arg in self.pyargv_optional_items:
- self.body.writeln("if (%s) {" % arg)
- self.body.indent()
- try: # try to remove the Py_DECREF cleanup action, if we can
- self.cleanup_actions.remove("Py_XDECREF(%s);" % arg)
- except ValueError: # otherwise we have to Py_INCREF..
- self.body.writeln("Py_INCREF(%s);" % arg)
- self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg))
- self.body.unindent()
- self.body.writeln("}")
- pos += 1
-
- self.body.writeln()
-
- ## Call the python method
- if self.method_name is None:
- self.write_code("py_retval = PyObject_Call(%s, %s);"
- % (self.called_pyobj, py_args),
- cleanup="Py_XDECREF(py_retval);")
- self.check_exception_code.flush_to(self.body)
- self.write_code(None, failure_expression="!py_retval")
-
- else:
- self.add_declaration("PyObject *py_method;")
- self.write_code("py_method = PyObject_GetAttrString(%s, \"%s\");"
- % (self.called_pyobj, self.method_name),
- cleanup="Py_DECREF(py_method);",
- failure_expression="!py_method")
- self.write_code("py_retval = PyObject_CallObject(py_method, %s);"
- % (py_args,),
- cleanup="Py_XDECREF(py_retval);")
- self.check_exception_code.flush_to(self.body)
- self.write_code(None, failure_expression="!py_retval")
-
- ## -- Handle the return value --
-
- ## we need to check if the return_type object is prepared to cooperate with multiple return values
- len_before = len(self.pyret_parse_items)
- self.return_type.write_conversion()
- len_after = len(self.pyret_parse_items)
- assert (self.return_type.get_c_type() == 'void'
- or not (len_before == len_after and len_after > 0)),\
- ("Bug in reverse wrappers: return type handler %s"
- " is not prepared to cooperate multiple return values") % (type(self.return_type),)
-
- sink.indent()
-
- if self.pyret_parse_items == [("", "")]:
- ## special case when there are no return parameters
- self.write_code(
- code=None,
- failure_expression='py_retval != Py_None',
- failure_exception=('PyErr_SetString(PyExc_TypeError, '
- '"virtual method should return None");'))
- else:
- if len(self.pyret_parse_items) == 1:
- ## if retval is one item only, pack it in a tuple so we
- ## can use PyArg_ParseTuple as usual..
- self.write_code('py_retval = Py_BuildValue("(N)", py_retval);')
- if len(self.pyret_parse_items) > 0:
- ## Parse return values using PyArg_ParseTuple
- params = ["py_retval",
- '"%s"' % "".join([format for format, param in self.pyret_parse_items])]
- params.extend([param for format, param in self.pyret_parse_items if param])
- self.write_code(code=None, failure_expression=(
- '!PyArg_ParseTuple(%s)' % (', '.join(params),)))
-
- if DEBUG_MODE:
- self.declarations.writeln("/* end declarations */")
- self.declarations.flush_to(sink)
- sink.writeln()
- if DEBUG_MODE:
- self.body.writeln("/* end main body */")
- self.body.flush_to(sink)
- sink.writeln()
- if DEBUG_MODE:
- self.post_return_code.writeln("/* end post-return code */")
- self.post_return_code.flush_to(sink)
- sink.writeln()
-
- for cleanup_action in self.cleanup_actions:
- sink.writeln(cleanup_action)
- if self.return_type.get_c_type() != 'void':
- sink.writeln()
- sink.writeln("return retval;")
- sink.unindent()
- sink.writeln("}")
-
-class TypeHandler(object):
- def __init__(self, wrapper, **props):
- assert isinstance(wrapper, ReverseWrapper)
- self.wrapper = wrapper
- self.props = props
-
-class ReturnType(TypeHandler):
-
- supports_optional = False
-
- def get_c_type(self):
- raise NotImplementedError
-
- def write_decl(self):
- raise NotImplementedError
-
- def write_error_return(self):
- '''Write "return <value>" code in case of error'''
- raise NotImplementedError
-
- def write_conversion(self):
- '''Writes code to convert Python return value in 'py_retval'
- into C 'retval'. Returns a string with C boolean expression
- that determines if anything went wrong. '''
- raise NotImplementedError
-
-class Parameter(TypeHandler):
-
- def __init__(self, wrapper, name, **props):
- TypeHandler.__init__(self, wrapper, **props)
- self.name = name
-
- def get_c_type(self):
- raise NotImplementedError
-
- def convert_c2py(self):
- '''Write some code before calling the Python method.'''
- pass
-
- def format_for_c_proto(self):
- return join_ctype_name(self.get_c_type(), self.name)
-
-
-###---
-class StringParam(Parameter):
-
- def get_c_type(self):
- return self.props.get('c_type', 'char *').replace('const-', 'const ')
-
- def convert_c2py(self):
- if self.props.get('optional', False):
- self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
- self.wrapper.write_code(code=("if (%s)\n"
- " py_%s = PyString_FromString(%s);\n"
- % (self.name, self.name, self.name)),
- cleanup=("Py_XDECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name, optional=True)
- elif self.props.get('nullok', False):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=("if (%s)\n"
- " py_%s = PyString_FromString(%s);\n"
- "else {\n"
- " Py_INCREF(Py_None);\n"
- " py_%s = Py_None;\n"
- "}\n"
- % (self.name, self.name, self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
- else:
- self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
- self.wrapper.write_code(code=("if (%s)\n"
- " py_%s = PyString_FromString(%s);\n" %
- (self.name, self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name),
- failure_expression=("!py_%s" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-for ctype in ('char*', 'gchar*', 'const-char*', 'char-const*', 'const-gchar*',
- 'gchar-const*', 'string', 'static_string'):
- argtypes.matcher.register_reverse(ctype, StringParam)
-del ctype
-
-class StringReturn(ReturnType):
-
- def get_c_type(self):
- return self.props.get('c_type', 'char *').replace('const-', 'const ')
- #return "char *"
-
- def write_decl(self):
- self.wrapper.add_declaration("%s retval;" % self.get_c_type())
- #self.wrapper.add_declaration("char *retval;")
-
- def write_error_return(self):
- self.wrapper.write_code("return NULL;")
-
- def write_conversion(self):
- self.wrapper.add_pyret_parse_item("s", "&retval", prepend=True)
- self.wrapper.write_code("retval = g_strdup(retval);", code_sink=self.wrapper.post_return_code)
-
-for ctype in ('char*', 'gchar*', 'const-gchar*'):
- argtypes.matcher.register_reverse_ret(ctype, StringReturn)
-del ctype
-
-
-class VoidReturn(ReturnType):
-
- def get_c_type(self):
- return "void"
-
- def write_decl(self):
- pass
-
- def write_error_return(self):
- self.wrapper.write_code("return;")
-
- def write_conversion(self):
- self.wrapper.add_pyret_parse_item("", "", prepend=True)
-
-argtypes.matcher.register_reverse_ret('void', VoidReturn)
-argtypes.matcher.register_reverse_ret('none', VoidReturn)
-
-class GObjectParam(Parameter):
-
- def get_c_type(self):
- return self.props.get('c_type', 'GObject *')
-
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name)
- self.wrapper.write_code(code=("if (%s)\n"
- " py_%s = pygobject_new((GObject *) %s);\n"
- "else {\n"
- " Py_INCREF(Py_None);\n"
- " py_%s = Py_None;\n"
- "}"
- % (self.name, self.name, self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse('GObject*', GObjectParam)
-
-class GObjectReturn(ReturnType):
-
- supports_optional = True
-
- def get_c_type(self):
- return self.props.get('c_type', 'GObject *')
-
- def write_decl(self):
- if not self.props.get('optional'):
- self.wrapper.add_declaration("%s retval;" % self.get_c_type())
- else:
- self.wrapper.add_declaration("%s retval = NULL;" % self.get_c_type())
-
- def write_error_return(self):
- self.wrapper.write_code("return NULL;")
-
- def write_conversion(self):
- if not self.props.get('optional'):
- self.wrapper.write_code(
- code=None,
- failure_expression="!PyObject_TypeCheck(py_retval, &PyGObject_Type)",
- failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be a GObject");')
- self.wrapper.write_code("retval = (%s) pygobject_get(py_retval);"
- % self.get_c_type())
- self.wrapper.write_code("g_object_ref((GObject *) retval);")
- else:
- self.wrapper.write_code(
- code=None,
- failure_expression="py_retval != Py_None && !PyObject_TypeCheck(py_retval, &PyGObject_Type)",
- failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be None or a GObject");')
- self.wrapper.write_code("if (py_retval != Py_None) {\n"
- " retval = (%s) pygobject_get(py_retval);\n"
- " g_object_ref((GObject *) retval);\n"
- "}\n"
- % self.get_c_type())
-
-argtypes.matcher.register_reverse_ret('GObject*', GObjectReturn)
-
-
-
-class IntParam(Parameter):
-
- def get_c_type(self):
- return self.props.get('c_type', 'int')
-
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=("py_%s = PyInt_FromLong(%s);" %
- (self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-class IntReturn(ReturnType):
- def get_c_type(self):
- return self.props.get('c_type', 'int')
- def write_decl(self):
- self.wrapper.add_declaration("%s retval;" % self.get_c_type())
- def write_error_return(self):
- self.wrapper.write_code("return -G_MAXINT;")
- def write_conversion(self):
- self.wrapper.add_pyret_parse_item("i", "&retval", prepend=True)
-
-for argtype in ('int', 'gint', 'guint', 'short', 'gshort', 'gushort', 'long',
- 'glong', 'gsize', 'gssize', 'guint8', 'gint8', 'guint16',
- 'gint16', 'gint32', 'GTime'):
- argtypes.matcher.register_reverse(argtype, IntParam)
- argtypes.matcher.register_reverse_ret(argtype, IntReturn)
-del argtype
-
-class IntPtrParam(Parameter):
- def __init__(self, wrapper, name, **props):
- if "direction" not in props:
- raise argtypes.ArgTypeConfigurationError(
- "cannot use int* parameter without direction")
- if props["direction"] not in ("out", "inout"):
- raise argtypes.ArgTypeConfigurationError(
- "cannot use int* parameter with direction '%s'"
- % (props["direction"],))
- Parameter.__init__(self, wrapper, name, **props)
- def get_c_type(self):
- return self.props.get('c_type', 'int*')
- def convert_c2py(self):
- if self.props["direction"] == "inout":
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=("py_%s = PyInt_FromLong(*%s);" %
- (self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
- self.wrapper.add_pyret_parse_item("i", self.name)
-for argtype in ('int*', 'gint*'):
- argtypes.matcher.register_reverse(argtype, IntPtrParam)
-del argtype
-
-
-class GEnumReturn(IntReturn):
- def write_conversion(self):
- self.wrapper.write_code(
- code=None,
- failure_expression=(
- "pyg_enum_get_value(%s, py_retval, (gint *)&retval)"
- % (self.props['typecode'],)))
-
-argtypes.matcher.register_reverse_ret("GEnum", GEnumReturn)
-
-class GEnumParam(IntParam):
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=("py_%s = pyg_enum_from_gtype(%s, %s);" %
- (self.name, self.props['typecode'], self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name),
- failure_expression=("!py_%s" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse("GEnum", GEnumParam)
-
-class GFlagsReturn(IntReturn):
- def write_conversion(self):
- self.wrapper.write_code(
- code=None,
- failure_expression=(
- "pyg_flags_get_value(%s, py_retval, (gint *)&retval)" %
- self.props['typecode']))
-
-argtypes.matcher.register_reverse_ret("GFlags", GFlagsReturn)
-
-class GFlagsParam(IntParam):
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=(
- "py_%s = pyg_flags_from_gtype(%s, %s);" %
- (self.name, self.props['typecode'], self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name),
- failure_expression=("!py_%s" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse("GFlags", GFlagsParam)
-
-
-class GtkTreePathParam(IntParam):
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=(
- "py_%s = pygtk_tree_path_to_pyobject(%s);" %
- (self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name),
- failure_expression=("!py_%s" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse("GtkTreePath*", GtkTreePathParam)
-
-
-class GtkTreePathReturn(ReturnType):
- def get_c_type(self):
- return self.props.get('c_type', 'GtkTreePath *')
- def write_decl(self):
- self.wrapper.add_declaration("GtkTreePath * retval;")
- def write_error_return(self):
- self.wrapper.write_code("return NULL;")
- def write_conversion(self):
- self.wrapper.write_code(
- "retval = pygtk_tree_path_from_pyobject(py_retval);\n",
- failure_expression=('!retval'),
- failure_exception=(
- 'PyErr_SetString(PyExc_TypeError, "retval should be a GtkTreePath");'))
-
-argtypes.matcher.register_reverse_ret("GtkTreePath*", GtkTreePathReturn)
-
-
-class BooleanReturn(ReturnType):
- def get_c_type(self):
- return "gboolean"
- def write_decl(self):
- self.wrapper.add_declaration("gboolean retval;")
- self.wrapper.add_declaration("PyObject *py_main_retval;")
- def write_error_return(self):
- self.wrapper.write_code("return FALSE;")
- def write_conversion(self):
- self.wrapper.add_pyret_parse_item("O", "&py_main_retval", prepend=True)
- self.wrapper.write_code(
- "retval = PyObject_IsTrue(py_main_retval)? TRUE : FALSE;",
- code_sink=self.wrapper.post_return_code)
-argtypes.matcher.register_reverse_ret("gboolean", BooleanReturn)
-
-class BooleanParam(Parameter):
- def get_c_type(self):
- return "gboolean"
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code("py_%s = %s? Py_True : Py_False;"
- % (self.name, self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse("gboolean", BooleanParam)
-
-
-class DoubleParam(Parameter):
- def get_c_type(self):
- return self.props.get('c_type', 'gdouble')
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=("py_%s = PyFloat_FromDouble(%s);" %
- (self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-class DoublePtrParam(Parameter):
- def __init__(self, wrapper, name, **props):
- if "direction" not in props:
- raise argtypes.ArgTypeConfigurationError(
- "cannot use double* parameter without direction")
- if props["direction"] not in ("out", ): # inout not yet implemented
- raise argtypes.ArgTypeConfigurationError(
- "cannot use double* parameter with direction '%s'"
- % (props["direction"],))
- Parameter.__init__(self, wrapper, name, **props)
- def get_c_type(self):
- return self.props.get('c_type', 'double*')
- def convert_c2py(self):
- self.wrapper.add_pyret_parse_item("d", self.name)
-for argtype in ('double*', 'gdouble*'):
- argtypes.matcher.register_reverse(argtype, DoublePtrParam)
-del argtype
-
-class DoubleReturn(ReturnType):
- def get_c_type(self):
- return self.props.get('c_type', 'gdouble')
- def write_decl(self):
- self.wrapper.add_declaration("%s retval;" % self.get_c_type())
- def write_error_return(self):
- self.wrapper.write_code("return -G_MAXFLOAT;")
- def write_conversion(self):
- self.wrapper.add_pyret_parse_item("d", "&retval", prepend=True)
-
-for argtype in ('float', 'double', 'gfloat', 'gdouble'):
- argtypes.matcher.register_reverse(argtype, DoubleParam)
- argtypes.matcher.register_reverse_ret(argtype, DoubleReturn)
-
-
-class GBoxedParam(Parameter):
- def get_c_type(self):
- return self.props.get('c_type').replace('const-', 'const ')
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- ctype = self.get_c_type()
- if ctype.startswith('const '):
- ctype_no_const = ctype[len('const '):]
- self.wrapper.write_code(
- code=('py_%s = pyg_boxed_new(%s, (%s) %s, TRUE, TRUE);' %
- (self.name, self.props['typecode'],
- ctype_no_const, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- else:
- self.wrapper.write_code(
- code=('py_%s = pyg_boxed_new(%s, %s, FALSE, FALSE);' %
- (self.name, self.props['typecode'], self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse("GBoxed", GBoxedParam)
-
-
-class GBoxedReturn(ReturnType):
- def get_c_type(self):
- return self.props.get('c_type')
- def write_decl(self):
- self.wrapper.add_declaration("%s retval;" % self.get_c_type())
- def write_error_return(self):
- self.wrapper.write_code("return retval;")
- def write_conversion(self):
- self.wrapper.write_code(code = None,
- failure_expression=("!pyg_boxed_check(py_retval, %s)" %
- (self.props['typecode'],)),
- failure_exception=(
- 'PyErr_SetString(PyExc_TypeError, "retval should be a %s");'
- % (self.props['typename'],)))
- self.wrapper.write_code('retval = pyg_boxed_get(py_retval, %s);' %
- self.props['typename'])
-
-argtypes.matcher.register_reverse_ret("GBoxed", GBoxedReturn)
-
-
-class GdkRegionPtrReturn(GBoxedReturn):
- def write_error_return(self):
- self.wrapper.write_code("return gdk_region_new();")
- def write_conversion(self):
- self.props['typecode'] = 'PYGDK_TYPE_REGION'
- self.props['typename'] = 'GdkRegion'
- super(GdkRegionPtrReturn, self).write_conversion()
-
-argtypes.matcher.register_reverse_ret("GdkRegion*", GdkRegionPtrReturn)
-
-
-class PangoFontDescriptionReturn(GBoxedReturn):
- def write_error_return(self):
- self.wrapper.write_code("return pango_font_description_new();")
- def write_conversion(self):
- self.props['typecode'] = 'PANGO_TYPE_FONT_DESCRIPTION'
- self.props['typename'] = 'PangoFontDescription'
- super(PangoFontDescriptionReturn, self).write_conversion()
-
-argtypes.matcher.register_reverse_ret("PangoFontDescription*",
- PangoFontDescriptionReturn)
-
-
-class PangoFontMetricsReturn(GBoxedReturn):
- def write_error_return(self):
- self.wrapper.write_code("return pango_font_metrics_new();")
- def write_conversion(self):
- self.props['typecode'] = 'PANGO_TYPE_FONT_METRICS'
- self.props['typename'] = 'PangoFontMetrics'
- super(PangoFontMetricsReturn, self).write_conversion()
-
-argtypes.matcher.register_reverse_ret("PangoFontMetrics*",
- PangoFontMetricsReturn)
-
-
-class PangoLanguageReturn(GBoxedReturn):
- def write_error_return(self):
- self.wrapper.write_code("return pango_language_from_string(\"\");")
- def write_conversion(self):
- self.props['typecode'] = 'PANGO_TYPE_LANGUAGE'
- self.props['typename'] = 'PangoLanguage'
- super(PangoLanguageReturn, self).write_conversion()
-
-argtypes.matcher.register_reverse_ret("PangoLanguage*", PangoLanguageReturn)
-
-
-class GdkRectanglePtrParam(Parameter):
- def get_c_type(self):
- return self.props.get('c_type').replace('const-', 'const ')
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(
- code=('py_%s = pyg_boxed_new(GDK_TYPE_RECTANGLE, %s, TRUE, TRUE);' %
- (self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name))
- self.wrapper.add_pyargv_item("py_%s" % self.name)
-
-argtypes.matcher.register_reverse("GdkRectangle*", GdkRectanglePtrParam)
-argtypes.matcher.register_reverse('GtkAllocation*', GdkRectanglePtrParam)
-
-
-class GErrorParam(Parameter):
- def get_c_type(self):
- return self.props.get('c_type').replace('**', ' **')
- def convert_c2py(self):
- self.wrapper.write_code(code=None,
- failure_expression=("pyg_gerror_exception_check(%s)" % self.name),
- code_sink=self.wrapper.check_exception_code)
-
-argtypes.matcher.register_reverse('GError**', GErrorParam)
-
-
-class PyGObjectMethodParam(Parameter):
- def __init__(self, wrapper, name, method_name, **props):
- Parameter.__init__(self, wrapper, name, **props)
- self.method_name = method_name
-
- def get_c_type(self):
- return self.props.get('c_type', 'GObject *')
-
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
- self.wrapper.write_code(code=("py_%s = pygobject_new((GObject *) %s);" %
- (self.name, self.name)),
- cleanup=("Py_DECREF(py_%s);" % self.name),
- failure_expression=("!py_%s" % self.name))
- self.wrapper.set_call_target("py_%s" % self.name, self.method_name)
-
-
-class CallbackInUserDataParam(Parameter):
- def __init__(self, wrapper, name, free_it, **props):
- Parameter.__init__(self, wrapper, name, **props)
- self.free_it = free_it
-
- def get_c_type(self):
- return "gpointer"
-
- def convert_c2py(self):
- self.wrapper.add_declaration("PyObject **_user_data;")
- cleanup = self.free_it and ("g_free(%s);" % self.name) or None
- self.wrapper.write_code(code=("_real_user_data = (PyObject **) %s;"
- % self.name),
- cleanup=cleanup)
-
- self.wrapper.add_declaration("PyObject *py_func;")
- cleanup = self.free_it and "Py_DECREF(py_func);" or None
- self.wrapper.write_code(code="py_func = _user_data[0];",
- cleanup=cleanup)
- self.wrapper.set_call_target("py_func")
-
- self.wrapper.add_declaration("PyObject *py_user_data;")
- cleanup = self.free_it and "Py_XDECREF(py_user_data);" or None
- self.wrapper.write_code(code="py_user_data = _user_data[1];",
- cleanup=cleanup)
- self.wrapper.add_pyargv_item("py_user_data", optional=True)
-
-def _test():
- import sys
-
- if 1:
- wrapper = ReverseWrapper("this_is_the_c_function_name", is_static=True)
- wrapper.set_return_type(StringReturn(wrapper))
- wrapper.add_parameter(PyGObjectMethodParam(wrapper, "self", method_name="do_xxx"))
- wrapper.add_parameter(StringParam(wrapper, "param2", optional=True))
- wrapper.add_parameter(GObjectParam(wrapper, "param3"))
- #wrapper.add_parameter(InoutIntParam(wrapper, "param4"))
- wrapper.generate(FileCodeSink(sys.stderr))
-
- if 0:
- wrapper = ReverseWrapper("this_a_callback_wrapper")
- wrapper.set_return_type(VoidReturn(wrapper))
- wrapper.add_parameter(StringParam(wrapper, "param1", optional=False))
- wrapper.add_parameter(GObjectParam(wrapper, "param2"))
- wrapper.add_parameter(CallbackInUserDataParam(wrapper, "data", free_it=True))
- wrapper.generate(FileCodeSink(sys.stderr))
-
-if __name__ == '__main__':
- _test()
diff --git a/codegen/scanvirtuals.py b/codegen/scanvirtuals.py
deleted file mode 100755
index c108737..0000000
--- a/codegen/scanvirtuals.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-import re
-import sys
-
-
-def main():
- rx = re.compile(r'^\s*([\w\s\*]+)\(\s*\*\s*(\w+)\s*\)\s*\(([^()]*)\);',
- re.DOTALL|re.MULTILINE)
- for f in sys.argv[1:]:
- #print ";; From", f
- buf = file(f).read()
- for m in rx.findall(buf):
- return_type = m[0].strip()
- if 'typedef' in return_type:
- continue
- if return_type == 'void':
- return_type = 'none'
- return_type = return_type.replace(' ', '')
- virtual_name = m[1]
- if 'reserved' in virtual_name:
- continue
- params = []
- if not m[2]:
- print >> sys.stderr, repr(m)
- continue
- for param in map(str.strip, m[2].split(',')):
- if '*' in param:
- tokens = param.split('*')
- ptype = tokens[0].strip() + '*'*(len(tokens) - 1)
- pname = tokens[-1].strip()
- else:
- if param == 'void':
- continue
- ptype, pname = map(str.strip, param.split())
- ptype = ptype.replace('const ', 'const-')
- while '[]' in pname:
- pname = pname.replace('[]', '')
- ptype += '[]'
- params.append((ptype, pname))
- if not params:
- continue
- objname = params[0][0].replace('*', '')
- print '(define-virtual', virtual_name
- print ' (of-object "%s")' % objname
- print ' (return-type "%s")' % return_type
- if len(params) > 1:
- print ' (parameters'
- for param in params[1:]:
- print ' \'("%s" "%s")' % param
- print ' )'
- print ')'
-
-if __name__ == '__main__':
- main()
diff --git a/codegen/scmexpr.py b/codegen/scmexpr.py
deleted file mode 100755
index 02f2e4b..0000000
--- a/codegen/scmexpr.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: Python; py-indent-offset: 4 -*-
-from __future__ import generators
-
-import string
-from cStringIO import StringIO
-
-class error(Exception):
- def __init__(self, filename, lineno, msg):
- Exception.__init__(self, msg)
- self.filename = filename
- self.lineno = lineno
- self.msg = msg
- def __str__(self):
- return '%s:%d: error: %s' % (self.filename, self.lineno, self.msg)
-
-trans = [' '] * 256
-for i in range(256):
- if chr(i) in string.letters + string.digits + '_':
- trans[i] = chr(i)
- else:
- trans[i] = '_'
-trans = string.join(trans, '')
-
-def parse(filename):
- if isinstance(filename, str):
- fp = open(filename, 'r')
- else: # if not string, assume it is some kind of iterator
- fp = filename
- filename = getattr(fp, 'name', '<unknown>')
- whitespace = ' \t\n\r\x0b\x0c'
- nonsymbol = whitespace + '();\'"'
- stack = []
- openlines = []
- lineno = 0
- for line in fp:
- pos = 0
- lineno += 1
- while pos < len(line):
- if line[pos] in whitespace: # ignore whitespace
- pass
- elif line[pos] == ';': # comment
- break
- elif line[pos:pos+2] == "'(":
- pass # the open parenthesis will be handled next iteration
- elif line[pos] == '(':
- stack.append(())
- openlines.append(lineno)
- elif line[pos] == ')':
- if len(stack) == 0:
- raise error(filename, lineno, 'close parenthesis found when none open')
- closed = stack[-1]
- del stack[-1]
- del openlines[-1]
- if stack:
- stack[-1] += (closed,)
- else:
- yield closed
- elif line[pos] == '"': # quoted string
- if not stack:
- raise error(filename, lineno,
- 'string found outside of s-expression')
- endpos = pos + 1
- chars = []
- while endpos < len(line):
- if endpos+1 < len(line) and line[endpos] == '\\':
- endpos += 1
- if line[endpos] == 'n':
- chars.append('\n')
- elif line[endpos] == 'r':
- chars.append('\r')
- elif line[endpos] == 't':
- chars.append('\t')
- else:
- chars.append('\\')
- chars.append(line[endpos])
- elif line[endpos] == '"':
- break
- else:
- chars.append(line[endpos])
- endpos += 1
- if endpos >= len(line):
- raise error(filename, lineno, "unclosed quoted string")
- pos = endpos
- stack[-1] += (''.join(chars),)
- else: # symbol/number
- if not stack:
- raise error(filename, lineno,
- 'identifier found outside of s-expression')
- endpos = pos
- while endpos < len(line) and line[endpos] not in nonsymbol:
- endpos += 1
- symbol = line[pos:endpos]
- pos = max(pos, endpos-1)
- try: symbol = int(symbol)
- except ValueError:
- try: symbol = float(symbol)
- except ValueError: pass
- stack[-1] += (symbol,)
- pos += 1
- if len(stack) != 0:
- msg = '%d unclosed parentheses found at end of ' \
- 'file (opened on line(s) %s)' % (len(stack),
- ', '.join(map(str, openlines)))
- raise error(filename, lineno, msg)
-
-class Parser:
- def __init__(self, filename):
- """Argument is either a string, a parse tree, or file object"""
- self.filename = filename
- def startParsing(self, filename=None):
- statements = parse(filename or self.filename)
- for statement in statements:
- self.handle(statement)
- def handle(self, tup):
- cmd = string.translate(tup[0], trans)
- if hasattr(self, cmd):
- getattr(self, cmd)(*tup[1:])
- else:
- self.unknown(tup)
- def unknown(self, tup):
- pass
-
-_testString = """; a scheme file
-(define-func gdk_font_load ; a comment at end of line
- GdkFont
- ((string name)))
-
-(define-boxed GdkEvent
- gdk_event_copy
- gdk_event_free
- "sizeof(GdkEvent)")
-"""
-
-if __name__ == '__main__':
- import sys
- if sys.argv[1:]:
- fp = open(sys.argv[1])
- else:
- fp = StringIO(_testString)
- statements = parse(fp)
- for s in statements:
- print `s`
diff --git a/config.h.in b/config.h.in
index 5ac6e15..1420b85 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,8 +1,5 @@
/* config.h.in. Generated from configure.ac by autoheader. */
-/* Use introspection information */
-#undef ENABLE_INTROSPECTION
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
diff --git a/configure b/configure
index 927e918..744bde9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pygobject 2.28.6.
+# Generated by GNU Autoconf 2.68 for pygobject 2.90.1.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
#
@@ -571,12 +571,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pygobject'
PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='2.28.6'
-PACKAGE_STRING='pygobject 2.28.6'
+PACKAGE_VERSION='2.90.1'
+PACKAGE_STRING='pygobject 2.90.1'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL=''
-ac_unique_file="gobject/gobjectmodule.c"
+ac_unique_file="gi/gimodule.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -621,19 +621,11 @@ INTROSPECTION_COMPILER
INTROSPECTION_SCANNER
ENABLE_CAIRO_FALSE
ENABLE_CAIRO_TRUE
-ENABLE_INTROSPECTION_FALSE
-ENABLE_INTROSPECTION_TRUE
PYCAIRO_LIBS
PYCAIRO_CFLAGS
GI_DATADIR
GI_LIBS
GI_CFLAGS
-BUILD_GIOUNIX_FALSE
-BUILD_GIOUNIX_TRUE
-GIOUNIX_LIBS
-GIOUNIX_CFLAGS
-BUILD_GIO_FALSE
-BUILD_GIO_TRUE
GIO_LIBS
GIO_CFLAGS
LIBFFI_PC
@@ -642,7 +634,6 @@ HAVE_LIBFFI_TRUE
FFI_LIBS
FFI_CFLAGS
DATADIR
-pygobject_CODEGEN_DEFINES
PYTHON_BASENAME
GLIB_MKENUMS
GOBJECT_QUERY
@@ -806,7 +797,6 @@ enable_docs
enable_glibtest
with_ffi
enable_cairo
-enable_introspection
'
ac_precious_vars='build_alias
host_alias
@@ -824,8 +814,6 @@ FFI_CFLAGS
FFI_LIBS
GIO_CFLAGS
GIO_LIBS
-GIOUNIX_CFLAGS
-GIOUNIX_LIBS
GI_CFLAGS
GI_LIBS
PYCAIRO_CFLAGS
@@ -1372,7 +1360,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.28.6 to adapt to many kinds of systems.
+\`configure' configures pygobject 2.90.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1442,7 +1430,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pygobject 2.28.6:";;
+ short | recursive ) echo "Configuration of pygobject 2.90.1:";;
esac
cat <<\_ACEOF
@@ -1466,7 +1454,6 @@ Optional Features:
--disable-glibtest do not try to compile and run a test GLIB program
--enable-cairo Enable Cairo bindings using introspection
information
- --enable-introspection Use introspection information
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1496,10 +1483,6 @@ Some influential environment variables:
FFI_LIBS linker flags for FFI, overriding pkg-config
GIO_CFLAGS C compiler flags for GIO, overriding pkg-config
GIO_LIBS linker flags for GIO, overriding pkg-config
- GIOUNIX_CFLAGS
- C compiler flags for GIOUNIX, overriding pkg-config
- GIOUNIX_LIBS
- linker flags for GIOUNIX, overriding pkg-config
GI_CFLAGS C compiler flags for GI, overriding pkg-config
GI_LIBS linker flags for GI, overriding pkg-config
PYCAIRO_CFLAGS
@@ -1573,7 +1556,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 2.28.6
+pygobject configure 2.90.1
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1851,7 +1834,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.28.6, which was
+It was created by pygobject $as_me 2.90.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2210,14 +2193,14 @@ $as_echo "#define PYGOBJECT_MAJOR_VERSION 2" >>confdefs.h
PYGOBJECT_MAJOR_VERSION=2
-$as_echo "#define PYGOBJECT_MINOR_VERSION 28" >>confdefs.h
+$as_echo "#define PYGOBJECT_MINOR_VERSION 90" >>confdefs.h
-PYGOBJECT_MINOR_VERSION=28
+PYGOBJECT_MINOR_VERSION=90
-$as_echo "#define PYGOBJECT_MICRO_VERSION 6" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 1" >>confdefs.h
-PYGOBJECT_MICRO_VERSION=6
+PYGOBJECT_MICRO_VERSION=1
ac_config_headers="$ac_config_headers config.h"
@@ -2701,7 +2684,7 @@ fi
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='2.28.6'
+ VERSION='2.90.1'
cat >>confdefs.h <<_ACEOF
@@ -12037,7 +12020,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-pygobject config.lt 2.28.6
+pygobject config.lt 2.90.1
configured by $0, generated by GNU Autoconf 2.68.
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -15519,9 +15502,6 @@ fi
PYTHON_BASENAME=`basename $PYTHON`
-pygobject_CODEGEN_DEFINES=""
-
-
EXP_VAR=DATADIR
FROM_VAR=$datadir
@@ -15712,67 +15692,92 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$GIO_PKG_ERRORS" >&5
- have_gio=false
+ as_fn_error $? "Package requirements (gio-2.0 >= 2.24.0) were not met:
+
+$GIO_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GIO_CFLAGS
+and GIO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- have_gio=false
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GIO_CFLAGS
+and GIO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+
else
GIO_CFLAGS=$pkg_cv_GIO_CFLAGS
GIO_LIBS=$pkg_cv_GIO_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_gio=true
-fi
-
+fi
-# Do not build GIO if the python version >= 3.0
-# We use GI to access GIO in python 3
- if test $have_gio = true -a $build_py3k = false; then
- BUILD_GIO_TRUE=
- BUILD_GIO_FALSE='#'
+# Check whether --enable-cairo was given.
+if test "${enable_cairo+set}" = set; then :
+ enableval=$enable_cairo; enable_cairo=$enableval
else
- BUILD_GIO_TRUE='#'
- BUILD_GIO_FALSE=
+ enable_cairo=yes
fi
-if test -n "$export_dynamic"; then
- GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
-fi
-
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIOUNIX" >&5
-$as_echo_n "checking for GIOUNIX... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GI" >&5
+$as_echo_n "checking for GI... " >&6; }
-if test -n "$GIOUNIX_CFLAGS"; then
- pkg_cv_GIOUNIX_CFLAGS="$GIOUNIX_CFLAGS"
+if test -n "$GI_CFLAGS"; then
+ pkg_cv_GI_CFLAGS="$GI_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GIOUNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0 >= 2.22.4" 2>/dev/null`
+ pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
-if test -n "$GIOUNIX_LIBS"; then
- pkg_cv_GIOUNIX_LIBS="$GIOUNIX_LIBS"
+if test -n "$GI_LIBS"; then
+ pkg_cv_GI_LIBS="$GI_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GIOUNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0 >= 2.22.4" 2>/dev/null`
+ pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -15792,101 +15797,96 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1`
+ GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+" 2>&1`
else
- GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1`
+ GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$GIOUNIX_PKG_ERRORS" >&5
+ echo "$GI_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0
+ gobject-introspection-1.0 >= 0.10.2
+) were not met:
+
+$GI_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GI_CFLAGS
+and GI_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
- have_giounix=false
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- have_giounix=false
-else
- GIOUNIX_CFLAGS=$pkg_cv_GIOUNIX_CFLAGS
- GIOUNIX_LIBS=$pkg_cv_GIOUNIX_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_giounix=true
-fi
-
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
- if test $have_giounix = true -a $build_py3k = false; then
- BUILD_GIOUNIX_TRUE=
- BUILD_GIOUNIX_FALSE='#'
-else
- BUILD_GIOUNIX_TRUE='#'
- BUILD_GIOUNIX_FALSE=
-fi
+Alternatively, you may set the environment variables GI_CFLAGS
+and GI_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
-if test -n "$export_dynamic"; then
- GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
-fi
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
-# Check whether --enable-cairo was given.
-if test "${enable_cairo+set}" = set; then :
- enableval=$enable_cairo; enable_cairo=$enableval
else
- enable_cairo=yes
-fi
-
+ GI_CFLAGS=$pkg_cv_GI_CFLAGS
+ GI_LIBS=$pkg_cv_GI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
-# Check whether --enable-introspection was given.
-if test "${enable_introspection+set}" = set; then :
- enableval=$enable_introspection; enable_introspection=$enableval
-else
- enable_introspection=yes
fi
-if test "$enable_introspection" != no; then
+GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-$as_echo "#define ENABLE_INTROSPECTION 1" >>confdefs.h
+if test "$enable_cairo" != no; then
+ if test $build_py3k = true; then
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GI" >&5
-$as_echo_n "checking for GI... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYCAIRO" >&5
+$as_echo_n "checking for PYCAIRO... " >&6; }
-if test -n "$GI_CFLAGS"; then
- pkg_cv_GI_CFLAGS="$GI_CFLAGS"
+if test -n "$PYCAIRO_CFLAGS"; then
+ pkg_cv_PYCAIRO_CFLAGS="$PYCAIRO_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- \""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- ") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"py3cairo >= 1.10.0
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "py3cairo >= 1.10.0
+ ") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- " 2>/dev/null`
+ pkg_cv_PYCAIRO_CFLAGS=`$PKG_CONFIG --cflags "py3cairo >= 1.10.0
+ " 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
-if test -n "$GI_LIBS"; then
- pkg_cv_GI_LIBS="$GI_LIBS"
+if test -n "$PYCAIRO_LIBS"; then
+ pkg_cv_PYCAIRO_LIBS="$PYCAIRO_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- \""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- ") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"py3cairo >= 1.10.0
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "py3cairo >= 1.10.0
+ ") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- " 2>/dev/null`
+ pkg_cv_PYCAIRO_LIBS=`$PKG_CONFIG --libs "py3cairo >= 1.10.0
+ " 2>/dev/null`
else
pkg_failed=yes
fi
@@ -15906,28 +15906,25 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- " 2>&1`
+ PYCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "py3cairo >= 1.10.0
+ " 2>&1`
else
- GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- " 2>&1`
+ PYCAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors "py3cairo >= 1.10.0
+ " 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$GI_PKG_ERRORS" >&5
+ echo "$PYCAIRO_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0
- gobject-introspection-1.0 >= 0.10.2
- ) were not met:
+ as_fn_error $? "Package requirements (py3cairo >= 1.10.0
+ ) were not met:
-$GI_PKG_ERRORS
+$PYCAIRO_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables GI_CFLAGS
-and GI_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables PYCAIRO_CFLAGS
+and PYCAIRO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
@@ -15939,25 +15936,21 @@ as_fn_error $? "The pkg-config script could not be found or is too old. Make su
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables GI_CFLAGS
-and GI_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables PYCAIRO_CFLAGS
+and PYCAIRO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
- GI_CFLAGS=$pkg_cv_GI_CFLAGS
- GI_LIBS=$pkg_cv_GI_LIBS
+ PYCAIRO_CFLAGS=$pkg_cv_PYCAIRO_CFLAGS
+ PYCAIRO_LIBS=$pkg_cv_PYCAIRO_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
-
- GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-
-
- if test "$enable_cairo" != no; then
+ else
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYCAIRO" >&5
@@ -16060,14 +16053,6 @@ $as_echo "yes" >&6; }
fi
fi
fi
- if test "$enable_introspection" = "yes"; then
- ENABLE_INTROSPECTION_TRUE=
- ENABLE_INTROSPECTION_FALSE='#'
-else
- ENABLE_INTROSPECTION_TRUE='#'
- ENABLE_INTROSPECTION_FALSE=
-fi
-
if test "$enable_cairo" = "yes"; then
ENABLE_CAIRO_TRUE=
ENABLE_CAIRO_FALSE='#'
@@ -16193,7 +16178,7 @@ esac
fi
-ac_config_files="$ac_config_files Makefile pygobject-2.0.pc pygobject-2.0-uninstalled.pc codegen/Makefile codegen/pygobject-codegen-2.0 docs/Makefile docs/reference/entities.docbook docs/xsl/fixxref.py gi/Makefile gi/repository/Makefile gi/overrides/Makefile glib/Makefile gobject/Makefile gio/Makefile examples/Makefile tests/Makefile PKG-INFO"
+ac_config_files="$ac_config_files Makefile pygobject-3.0.pc pygobject-3.0-uninstalled.pc docs/Makefile docs/reference/entities.docbook docs/xsl/fixxref.py gi/Makefile gi/repository/Makefile gi/overrides/Makefile gi/_glib/Makefile gi/_gobject/Makefile examples/Makefile tests/Makefile PKG-INFO"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -16348,18 +16333,6 @@ if test -z "${HAVE_LIBFFI_TRUE}" && test -z "${HAVE_LIBFFI_FALSE}"; then
as_fn_error $? "conditional \"HAVE_LIBFFI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${BUILD_GIO_TRUE}" && test -z "${BUILD_GIO_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_GIO\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_GIOUNIX_TRUE}" && test -z "${BUILD_GIOUNIX_FALSE}"; then
- as_fn_error $? "conditional \"BUILD_GIOUNIX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${ENABLE_INTROSPECTION_TRUE}" && test -z "${ENABLE_INTROSPECTION_FALSE}"; then
- as_fn_error $? "conditional \"ENABLE_INTROSPECTION\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${ENABLE_CAIRO_TRUE}" && test -z "${ENABLE_CAIRO_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_CAIRO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16773,7 +16746,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.28.6, which was
+This file was extended by pygobject $as_me 2.90.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16839,7 +16812,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.28.6
+pygobject config.status 2.90.1
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -17252,19 +17225,16 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "pygobject-2.0.pc") CONFIG_FILES="$CONFIG_FILES pygobject-2.0.pc" ;;
- "pygobject-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pygobject-2.0-uninstalled.pc" ;;
- "codegen/Makefile") CONFIG_FILES="$CONFIG_FILES codegen/Makefile" ;;
- "codegen/pygobject-codegen-2.0") CONFIG_FILES="$CONFIG_FILES codegen/pygobject-codegen-2.0" ;;
+ "pygobject-3.0.pc") CONFIG_FILES="$CONFIG_FILES pygobject-3.0.pc" ;;
+ "pygobject-3.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pygobject-3.0-uninstalled.pc" ;;
"docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
"docs/reference/entities.docbook") CONFIG_FILES="$CONFIG_FILES docs/reference/entities.docbook" ;;
"docs/xsl/fixxref.py") CONFIG_FILES="$CONFIG_FILES docs/xsl/fixxref.py" ;;
"gi/Makefile") CONFIG_FILES="$CONFIG_FILES gi/Makefile" ;;
"gi/repository/Makefile") CONFIG_FILES="$CONFIG_FILES gi/repository/Makefile" ;;
"gi/overrides/Makefile") CONFIG_FILES="$CONFIG_FILES gi/overrides/Makefile" ;;
- "glib/Makefile") CONFIG_FILES="$CONFIG_FILES glib/Makefile" ;;
- "gobject/Makefile") CONFIG_FILES="$CONFIG_FILES gobject/Makefile" ;;
- "gio/Makefile") CONFIG_FILES="$CONFIG_FILES gio/Makefile" ;;
+ "gi/_glib/Makefile") CONFIG_FILES="$CONFIG_FILES gi/_glib/Makefile" ;;
+ "gi/_gobject/Makefile") CONFIG_FILES="$CONFIG_FILES gi/_gobject/Makefile" ;;
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"PKG-INFO") CONFIG_FILES="$CONFIG_FILES PKG-INFO" ;;
@@ -18633,5 +18603,4 @@ fi
echo
echo "libffi support: $have_libffi"
-echo "introspection support: $enable_introspection"
echo
diff --git a/configure.ac b/configure.ac
index 1b923b4..d6832c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,22 +11,22 @@ m4_define(python3_min_ver, 3.1)
dnl the pygobject version number
m4_define(pygobject_major_version, 2)
-m4_define(pygobject_minor_version, 28)
-m4_define(pygobject_micro_version, 6)
+m4_define(pygobject_minor_version, 90)
+m4_define(pygobject_micro_version, 1)
m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
dnl versions of packages we require ...
m4_define(introspection_required_version, 0.10.2)
-m4_define(pycairo_required_version, 1.2.0)
+m4_define(py2cairo_required_version, 1.2.0)
+m4_define(py3cairo_required_version, 1.10.0)
m4_define(glib_required_version, 2.24.0)
m4_define(gio_required_version, 2.24.0)
-m4_define(giounix_required_version, 2.22.4)
AC_INIT(pygobject, pygobject_version,
[http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject])
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .")
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SRCDIR([gobject/gobjectmodule.c])
+AC_CONFIG_SRCDIR([gi/gimodule.c])
AC_DEFINE(PYGOBJECT_MAJOR_VERSION, pygobject_major_version, [pygobject major version])
AC_SUBST(PYGOBJECT_MAJOR_VERSION, pygobject_major_version)
@@ -176,9 +176,6 @@ fi
PYTHON_BASENAME=`basename $PYTHON`
AC_SUBST([PYTHON_BASENAME])
-pygobject_CODEGEN_DEFINES=""
-AC_SUBST([pygobject_CODEGEN_DEFINES])
-
AS_AC_EXPAND(DATADIR, $datadir)
dnl libffi
@@ -205,55 +202,32 @@ AC_SUBST(FFI_LIBS)
AC_SUBST(LIBFFI_PC)
dnl gio
-PKG_CHECK_MODULES(GIO, gio-2.0 >= gio_required_version,
- have_gio=true, have_gio=false)
-AC_SUBST(GIO_CFLAGS)
-AC_SUBST(GIO_LIBS)
-
-# Do not build GIO if the python version >= 3.0
-# We use GI to access GIO in python 3
-AM_CONDITIONAL(BUILD_GIO, test $have_gio = true -a $build_py3k = false)
-
-if test -n "$export_dynamic"; then
- GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
-fi
-
-dnl giounix
-PKG_CHECK_MODULES(GIOUNIX, gio-unix-2.0 >= giounix_required_version,
- have_giounix=true, have_giounix=false)
-AC_SUBST(GIOUNIX_CFLAGS)
-AC_SUBST(GIOUNIX_LIBS)
-AM_CONDITIONAL(BUILD_GIOUNIX, test $have_giounix = true -a $build_py3k = false)
-if test -n "$export_dynamic"; then
- GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
-fi
+PKG_CHECK_MODULES(GIO, gio-2.0 >= gio_required_version)
AC_ARG_ENABLE(cairo,
AC_HELP_STRING([--enable-cairo], [Enable Cairo bindings using introspection information]),
enable_cairo=$enableval,
enable_cairo=yes)
-AC_ARG_ENABLE(introspection,
- AC_HELP_STRING([--enable-introspection], [Use introspection information]),
- enable_introspection=$enableval,
- enable_introspection=yes)
-if test "$enable_introspection" != no; then
- AC_DEFINE(ENABLE_INTROSPECTION,1,Use introspection information)
- PKG_CHECK_MODULES(GI,
- glib-2.0 >= glib_required_version
- gobject-introspection-1.0 >= introspection_required_version
- )
-
- GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
-
- if test "$enable_cairo" != no; then
+PKG_CHECK_MODULES(GI,
+ glib-2.0 >= glib_required_version
+ gobject-introspection-1.0 >= introspection_required_version
+)
+
+GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+AC_SUBST(GI_DATADIR)
+
+if test "$enable_cairo" != no; then
+ if test $build_py3k = true; then
+ PKG_CHECK_MODULES(PYCAIRO,
+ py3cairo >= py3cairo_required_version
+ )
+ else
PKG_CHECK_MODULES(PYCAIRO,
- pycairo >= pycairo_required_version
+ pycairo >= py2cairo_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`
@@ -279,19 +253,16 @@ fi
AC_CONFIG_FILES(
Makefile
- pygobject-2.0.pc
- pygobject-2.0-uninstalled.pc
- codegen/Makefile
- codegen/pygobject-codegen-2.0
+ pygobject-3.0.pc
+ pygobject-3.0-uninstalled.pc
docs/Makefile
docs/reference/entities.docbook
docs/xsl/fixxref.py
gi/Makefile
gi/repository/Makefile
gi/overrides/Makefile
- glib/Makefile
- gobject/Makefile
- gio/Makefile
+ gi/_glib/Makefile
+ gi/_gobject/Makefile
examples/Makefile
tests/Makefile
PKG-INFO)
@@ -299,5 +270,4 @@ AC_OUTPUT
echo
echo "libffi support: $have_libffi"
-echo "introspection support: $enable_introspection"
echo
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 418df8a..ad68613 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -16,46 +16,6 @@ HTML_FILES = \
html/glib-functions.html \
html/gobject-class-reference.html \
html/glib-class-reference.html \
- html/class-gioapplaunchcontext.html \
- html/class-gioappinfo.html \
- html/class-gioasyncresult.html \
- html/class-giobufferedinputstream.html \
- html/class-giobufferedoutputstream.html \
- html/class-giocancellable.html \
- html/class-giodatainputstream.html \
- html/class-giodataoutputstream.html \
- html/class-giodrive.html \
- html/class-gioemblem.html \
- html/class-gioemblemedicon.html \
- html/class-giofile.html \
- html/class-giofileattributeinfo.html \
- html/class-giofileenumerator.html \
- html/class-giofileicon.html \
- html/class-giofileinfo.html \
- html/class-giofileinputstream.html \
- html/class-giofilemonitor.html \
- html/class-giofileoutputstream.html \
- html/class-giofilterinputstream.html \
- html/class-giofilteroutputstream.html \
- html/class-gioicon.html \
- html/class-gioinputstream.html \
- html/class-gioloadableicon.html \
- html/class-giomemoryinputstream.html \
- html/class-giomemoryoutputstream.html \
- html/class-giomount.html \
- html/class-giomountoperation.html \
- html/class-giooutputstream.html \
- html/class-gioseekable.html \
- html/class-giosimpleasyncresult.html \
- html/class-giothemedicon.html \
- html/class-giounixinputstream.html \
- html/class-giounixoutputstream.html \
- html/class-giovolume.html \
- html/class-giovolumemonitor.html \
- html/gio-constants.html \
- html/gio-functions.html \
- html/gio-class-reference.html \
- html/giounix-class-reference.html \
html/gobject-constants.html \
html/gobject-functions.html \
html/index.html \
@@ -78,47 +38,7 @@ XML_FILES = \
reference/pyglib-constants.xml \
reference/pyglib-functions.xml \
reference/pyglib-maincontext.xml \
- reference/pyglib-mainloop.xml \
- reference/pygio-classes.xml \
- reference/pygiounix-classes.xml \
- reference/pygio-constants.xml \
- reference/pygio-functions.xml \
- reference/pygio-applaunchcontext.xml \
- reference/pygio-appinfo.xml \
- reference/pygio-asyncresult.xml \
- reference/pygio-bufferedinputstream.xml \
- reference/pygio-bufferedoutputstream.xml \
- reference/pygio-cancellable.xml \
- reference/pygio-datainputstream.xml \
- reference/pygio-dataoutputstream.xml \
- reference/pygio-drive.xml \
- reference/pygio-emblem.xml \
- reference/pygio-emblemedicon.xml \
- reference/pygio-file.xml \
- reference/pygio-fileattributeinfo.xml \
- reference/pygio-fileenumerator.xml \
- reference/pygio-fileicon.xml \
- reference/pygio-fileinfo.xml \
- reference/pygio-fileinputstream.xml \
- reference/pygio-filemonitor.xml \
- reference/pygio-fileoutputstream.xml \
- reference/pygio-filterinputstream.xml \
- reference/pygio-filteroutputstream.xml \
- reference/pygio-icon.xml \
- reference/pygio-inputstream.xml \
- reference/pygio-loadableicon.xml \
- reference/pygio-memoryinputstream.xml \
- reference/pygio-memoryoutputstream.xml \
- reference/pygio-mount.xml \
- reference/pygio-mountoperation.xml \
- reference/pygio-outputstream.xml \
- reference/pygio-seekable.xml \
- reference/pygio-simpleasyncresult.xml \
- reference/pygio-themedicon.xml \
- reference/pygio-unixinputstream.xml \
- reference/pygio-unixoutputstream.xml \
- reference/pygio-volume.xml \
- reference/pygio-volumemonitor.xml
+ reference/pyglib-mainloop.xml
XSL_FILES = \
xsl/common.xsl \
diff --git a/docs/Makefile.in b/docs/Makefile.in
index acb75a7..14ef3ad 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -110,8 +110,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -228,7 +226,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
@@ -253,46 +250,6 @@ HTML_FILES = \
html/glib-functions.html \
html/gobject-class-reference.html \
html/glib-class-reference.html \
- html/class-gioapplaunchcontext.html \
- html/class-gioappinfo.html \
- html/class-gioasyncresult.html \
- html/class-giobufferedinputstream.html \
- html/class-giobufferedoutputstream.html \
- html/class-giocancellable.html \
- html/class-giodatainputstream.html \
- html/class-giodataoutputstream.html \
- html/class-giodrive.html \
- html/class-gioemblem.html \
- html/class-gioemblemedicon.html \
- html/class-giofile.html \
- html/class-giofileattributeinfo.html \
- html/class-giofileenumerator.html \
- html/class-giofileicon.html \
- html/class-giofileinfo.html \
- html/class-giofileinputstream.html \
- html/class-giofilemonitor.html \
- html/class-giofileoutputstream.html \
- html/class-giofilterinputstream.html \
- html/class-giofilteroutputstream.html \
- html/class-gioicon.html \
- html/class-gioinputstream.html \
- html/class-gioloadableicon.html \
- html/class-giomemoryinputstream.html \
- html/class-giomemoryoutputstream.html \
- html/class-giomount.html \
- html/class-giomountoperation.html \
- html/class-giooutputstream.html \
- html/class-gioseekable.html \
- html/class-giosimpleasyncresult.html \
- html/class-giothemedicon.html \
- html/class-giounixinputstream.html \
- html/class-giounixoutputstream.html \
- html/class-giovolume.html \
- html/class-giovolumemonitor.html \
- html/gio-constants.html \
- html/gio-functions.html \
- html/gio-class-reference.html \
- html/giounix-class-reference.html \
html/gobject-constants.html \
html/gobject-functions.html \
html/index.html \
@@ -314,47 +271,7 @@ XML_FILES = \
reference/pyglib-constants.xml \
reference/pyglib-functions.xml \
reference/pyglib-maincontext.xml \
- reference/pyglib-mainloop.xml \
- reference/pygio-classes.xml \
- reference/pygiounix-classes.xml \
- reference/pygio-constants.xml \
- reference/pygio-functions.xml \
- reference/pygio-applaunchcontext.xml \
- reference/pygio-appinfo.xml \
- reference/pygio-asyncresult.xml \
- reference/pygio-bufferedinputstream.xml \
- reference/pygio-bufferedoutputstream.xml \
- reference/pygio-cancellable.xml \
- reference/pygio-datainputstream.xml \
- reference/pygio-dataoutputstream.xml \
- reference/pygio-drive.xml \
- reference/pygio-emblem.xml \
- reference/pygio-emblemedicon.xml \
- reference/pygio-file.xml \
- reference/pygio-fileattributeinfo.xml \
- reference/pygio-fileenumerator.xml \
- reference/pygio-fileicon.xml \
- reference/pygio-fileinfo.xml \
- reference/pygio-fileinputstream.xml \
- reference/pygio-filemonitor.xml \
- reference/pygio-fileoutputstream.xml \
- reference/pygio-filterinputstream.xml \
- reference/pygio-filteroutputstream.xml \
- reference/pygio-icon.xml \
- reference/pygio-inputstream.xml \
- reference/pygio-loadableicon.xml \
- reference/pygio-memoryinputstream.xml \
- reference/pygio-memoryoutputstream.xml \
- reference/pygio-mount.xml \
- reference/pygio-mountoperation.xml \
- reference/pygio-outputstream.xml \
- reference/pygio-seekable.xml \
- reference/pygio-simpleasyncresult.xml \
- reference/pygio-themedicon.xml \
- reference/pygio-unixinputstream.xml \
- reference/pygio-unixoutputstream.xml \
- reference/pygio-volume.xml \
- reference/pygio-volumemonitor.xml
+ reference/pyglib-mainloop.xml
XSL_FILES = \
xsl/common.xsl \
diff --git a/docs/html/class-gioappinfo.html b/docs/html/class-gioappinfo.html
deleted file mode 100644
index e8d134f..0000000
--- a/docs/html/class-gioappinfo.html
+++ /dev/null
@@ -1,210 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AppInfo</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="next" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AppInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioapplaunchcontext.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AppInfo"><a name="class-gioappinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AppInfo</h2><p>gio.AppInfo — Information about an installed application and methods to launch it (with file arguments).</p></div><div class="refsect1" title="Synopsis"><a name="id509673"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AppInfo</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioappinfo.html#constructor-gioappinfo" title="Constructor">gio.AppInfo</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>application_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.APP_INFO_CREATE_NONE</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--add-supports-type" title="gio.AppInfo.add_supports_type">add_supports_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-delete" title="gio.AppInfo.can_delete">can_delete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-remove-supports-type" title="gio.AppInfo.can_remove_supports_type">can_remove_supports_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--delete" title="gio.AppInfo.delete">delete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--dup" title="gio.AppInfo.dup">dup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--equal" title="gio.AppInfo.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>appinfo2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-commandline" title="gio.AppInfo.get_commandline">get_commandline</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-description" title="gio.AppInfo.get_description">get_description</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-executable" title="gio.AppInfo.get_executable">get_executable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-icon" title="gio.AppInfo.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-id" title="gio.AppInfo.get_id">get_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-name" title="gio.AppInfo.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch" title="gio.AppInfo.launch">launch</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch-uris" title="gio.AppInfo.launch_uris">launch_uris</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--remove-supports-type" title="gio.AppInfo.remove_supports_type">remove_supports_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension" title="gio.AppInfo.set_as_default_for_extension">set_as_default_for_extension</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>extension</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type" title="gio.AppInfo.set_as_default_for_type">set_as_default_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--should-show" title="gio.AppInfo.should_show">should_show</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--supports-files" title="gio.AppInfo.supports_files">supports_files</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--supports-uris" title="gio.AppInfo.supports_uris">supports_uris</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-all" title="gio.app_info_get_all">gio.app_info_get_all</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-all-for-type" title="gio.app_info_get_all_for_type">gio.app_info_get_all_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-default-for-type" title="gio.app_info_get_default_for_type">gio.app_info_get_default_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>must_support_uris</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme" title="gio.app_info_get_default_for_uri_scheme">gio.app_info_get_default_for_uri_scheme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-reset-type-association" title="gio.app_info_reset_type_association">gio.app_info_reset_type_association</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id509140"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo">gio.AppInfo</a>
-</pre></div><div class="refsect1" title="Known Implementation"><a name="id509121"></a><h2>Known Implementation</h2><p>
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a> is implemented by
- <PYGTKDOCLINK HREF="class-giodesktopappinfo"><code class="classname">gio.DesktopAppInfo</code></PYGTKDOCLINK>
- </p></div><div class="refsect1" title="Description"><a name="id509100"></a><h2>Description</h2><p>
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- and <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
- are used for describing and launching applications installed on the system.
- </p><p>
- As of GLib 2.20, URIs will always be converted to POSIX paths (using
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">gio.File.get_path</a></code>()) when using
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch" title="gio.AppInfo.launch">gio.AppInfo.launch</a></code>()
- even if the application requested an URI and not a POSIX path. For example for an desktop-file
- based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
- on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
- compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
- unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
- (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application.
- </p><p>
- Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> constructors
- (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
- it needs to use
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>()
- or similar on
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- In other words, an application cannot assume that the URI passed to e.g.
- <code class="methodname"><a class="link" href="class-giofile.html#constructor-giofile" title="Constructor">gio.File</a></code>() constructor
- is equal to the result of
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>().
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioappinfo"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.AppInfo</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>application_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.APP_INFO_CREATE_NONE</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td><td>the commandline to use
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>application_name</code></em> :</span></p></td><td>the application name, or <code class="literal">None</code> to use commandline.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>flags that can specify details of the created,
- from <a class="xref" href="gio-constants.html#gio-app-info-constants" title="Gio AppInfo Create Flags Constants">Gio AppInfo Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- for given command.
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- from the given information.
- </p></div><div class="refsect1" title="Methods"><a name="id508887"></a><h2>Methods</h2><div class="refsect2" title="gio.AppInfo.add_supports_type"><a name="method-gioappinfo--add-supports-type"></a><h3>gio.AppInfo.add_supports_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_supports_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>A string.</td></tr></tbody></table><p>
- The <code class="methodname">add_supports_type</code>() method adds a content type
- to the application information to indicate the application is capable of
- opening files with the given content type.
- </p></div><div class="refsect2" title="gio.AppInfo.can_delete"><a name="method-gioappinfo--can-delete"></a><h3>gio.AppInfo.can_delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_delete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo can be deleted.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_delete</code>() method obtains the information
- whether the <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- can be deleted. See
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--delete" title="gio.AppInfo.delete">gio.AppInfo.delete</a></code>().
- </p></div><div class="refsect2" title="gio.AppInfo.can_remove_supports_type"><a name="method-gioappinfo--can-remove-supports-type"></a><h3>gio.AppInfo.can_remove_supports_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_remove_supports_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if it is possible to remove
- supported content types from a given appinfo, <code class="literal">False</code>
- if not. </td></tr></tbody></table><p>
- The <code class="methodname">can_remove_supports_type</code>() method checks if a
- supported content type can be removed from an application.
- </p></div><div class="refsect2" title="gio.AppInfo.delete"><a name="method-gioappinfo--delete"></a><h3>gio.AppInfo.delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">delete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo has been deleted.
- </td></tr></tbody></table><p>
- The <code class="methodname">delete</code>() method tries to delete an
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>.
- </p><p>
- On some platforms, there may be a difference between user-defined
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
- which can be deleted, and system-wide ones which cannot. See
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-delete" title="gio.AppInfo.can_delete">gio.AppInfo.can_delete</a></code>().
- </p></div><div class="refsect2" title="gio.AppInfo.dup"><a name="method-gioappinfo--dup"></a><h3>gio.AppInfo.dup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">dup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A duplicate of appinfo.</td></tr></tbody></table><p>
- The <code class="methodname">dup</code>() method creates a duplicate of a
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>.
- </p></div><div class="refsect2" title="gio.AppInfo.equal"><a name="method-gioappinfo--equal"></a><h3>gio.AppInfo.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>appinfo2</code></em> :</span></p></td><td>the second
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo1 is equal to appinfo2.
- <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
- The <code class="methodname">equal</code>() method checks if two
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s are equal.
- </p></div><div class="refsect2" title="gio.AppInfo.get_commandline"><a name="method-gioappinfo--get-commandline"></a><h3>gio.AppInfo.get_commandline</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_commandline</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the appinfo's commandline, or
- <code class="literal">None</code> if this information is not available.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_commandline</code>() method gets the
- commandline with which the application will be started.
- </p></div><div class="refsect2" title="gio.AppInfo.get_description"><a name="method-gioappinfo--get-description"></a><h3>gio.AppInfo.get_description</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_description</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing a description of the application
- appinfo, or <code class="literal">None</code> if none.</td></tr></tbody></table><p>
- The <code class="methodname">get_description</code>() method gets a human-readable
- description of an installed application.
- </p></div><div class="refsect2" title="gio.AppInfo.get_executable"><a name="method-gioappinfo--get-executable"></a><h3>gio.AppInfo.get_executable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_executable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the appinfo's application
- binary's name.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_description</code>() method gets the executable's
- name for the installed application.
- </p></div><div class="refsect2" title="gio.AppInfo.get_icon"><a name="method-gioappinfo--get-icon"></a><h3>gio.AppInfo.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> for appinfo.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_icon</code>() method gets the icon for the application.
- </p></div><div class="refsect2" title="gio.AppInfo.get_id"><a name="method-gioappinfo--get-id"></a><h3>gio.AppInfo.get_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_id</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the application's ID.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_id</code>() method gets the ID of an application.
- An id is a string that identifies the application. The exact format of the
- id is platform dependent. For instance, on Unix this is the desktop file id
- from the xdg menu specification.
- </p><p>
- Note that the returned ID may be <code class="literal">None</code>, depending on
- how the appinfo has been constructed.
- </p></div><div class="refsect2" title="gio.AppInfo.get_name"><a name="method-gioappinfo--get-name"></a><h3>gio.AppInfo.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the application for appinfo.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_name</code>() method gets the installed
- name of the application.
- </p></div><div class="refsect2" title="gio.AppInfo.launch"><a name="method-gioappinfo--launch"></a><h3>gio.AppInfo.launch</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">launch</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> objects.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td>a <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
- or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful launch,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">launch</code>() method launches the application.
- Passes files to the launched application as arguments, using the optional
- launch_context to get information about the details of the launcher
- (like what screen it is on). On error, error will be set accordingly.
- </p><p>
- To lauch the application without arguments pass a <code class="literal">None</code> for files list.
- </p><p>
- Note that even if the launch is successful the application launched can fail
- to start if it runs into problems during startup. There is no way to detect this.
- </p><p>
- Some URIs can be changed when passed through a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- (for instance unsupported uris with strange formats like mailto:), so
- if you have a textual uri you want to pass in as argument, consider using
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch-uris" title="gio.AppInfo.launch_uris">gio.File.launch_uris</a></code>()
- instead.
- </p></div><div class="refsect2" title="gio.AppInfo.launch_uris"><a name="method-gioappinfo--launch-uris"></a><h3>gio.AppInfo.launch_uris</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">launch_uris</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>uris</code></em> :</span></p></td><td>a list containing URIs to launch.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td>a <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
- or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful launch,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">launch_uris</code>() method launches the application.
- Passes uris to the launched application as arguments, using the optional
- launch_context to get information about the details of the launcher
- (like what screen it is on). On error, error will be set accordingly.
- </p><p>
- To lauch the application without arguments pass a <code class="literal">None</code> for files list.
- </p><p>
- Note that even if the launch is successful the application launched can fail
- to start if it runs into problems during startup. There is no way to detect this.
- </p></div><div class="refsect2" title="gio.AppInfo.remove_supports_type"><a name="method-gioappinfo--remove-supports-type"></a><h3>gio.AppInfo.remove_supports_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_supports_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>A string.</td></tr></tbody></table><p>
- The <code class="methodname">remove_supports_type</code>() method removes a
- supported type from an application, if possible.
- </p></div><div class="refsect2" title="gio.AppInfo.set_as_default_for_extension"><a name="method-gioappinfo--set-as-default-for-extension"></a><h3>gio.AppInfo.set_as_default_for_extension</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_as_default_for_extension</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>extension</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td><td>A string containing the file extension (without the dot).
- </td></tr></tbody></table><p>
- The <code class="methodname">set_as_default_for_extension</code>() method sets the
- application as the default handler for the given file extention.
- </p></div><div class="refsect2" title="gio.AppInfo.set_as_default_for_type"><a name="method-gioappinfo--set-as-default-for-type"></a><h3>gio.AppInfo.set_as_default_for_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_as_default_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>The content type.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_as_default_for_type</code>() method sets the
- application as the default handler for a given type.
- </p></div><div class="refsect2" title="gio.AppInfo.should_show"><a name="method-gioappinfo--should-show"></a><h3>gio.AppInfo.should_show</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">should_show</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo should be shown,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">should_show</code>() method checks if the application
- info should be shown in menus that list available applications.
- </p></div><div class="refsect2" title="gio.AppInfo.supports_files"><a name="method-gioappinfo--supports-files"></a><h3>gio.AppInfo.supports_files</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">supports_files</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo supports files.
- </td></tr></tbody></table><p>
- The <code class="methodname">supports_files</code>() method checks if the application
- accepts files as arguments.
- </p></div><div class="refsect2" title="gio.AppInfo.supports_uris"><a name="method-gioappinfo--supports-uris"></a><h3>gio.AppInfo.supports_uris</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">supports_uris</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo supports uris.
- </td></tr></tbody></table><p>
- The <code class="methodname">supports_uris</code>() method checks if the application
- accepts uris as arguments.
- </p></div></div><div class="refsect1" title="Functions"><a name="id507387"></a><h2>Functions</h2><div class="refsect2" title="gio.app_info_get_all"><a name="function-gio--app-info-get-all"></a><h3>gio.app_info_get_all</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_all</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s.
- </td></tr></tbody></table><p>
- The <code class="methodname">app_info_get_all</code>() function gets a list of all of
- the applications currently registered on this system.
- </p><p>
- For desktop files, this includes applications that have NoDisplay=true set or are
- excluded from display by means of OnlyShowIn or NotShowIn. See
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--should-show" title="gio.AppInfo.should_show">gio.AppInfo.should_show</a></code>().
- The returned list does not include applications which have the Hidden key set.
- </p></div><div class="refsect2" title="gio.app_info_get_all_for_type"><a name="function-gio--app-info-get-all-for-type"></a><h3>gio.app_info_get_all_for_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_all_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>the content type to find a
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- for.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
- for a given content type or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">app_info_get_all_for_type</code>() function gets a list of all
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
- for a given content type.
- </p></div><div class="refsect2" title="gio.app_info_get_default_for_type"><a name="function-gio--app-info-get-default-for-type"></a><h3>gio.app_info_get_default_for_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_default_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>must_support_uris</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>the content type to find a
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- for.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>must_support_uris</code></em> :</span></p></td><td>if <code class="literal">True</code>, the
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- is expected to support URIs </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- for given content_type or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">app_info_get_default_for_type</code>() function gets the
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- that correspond to a given content type.
- </p></div><div class="refsect2" title="gio.app_info_get_default_for_uri_scheme"><a name="function-gio--app-info-get-default-for-uri-scheme"></a><h3>gio.app_info_get_default_for_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_get_default_for_uri_scheme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>uri_scheme</code></em> :</span></p></td><td>a string containing a URI scheme.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- for given uri_scheme or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">app_info_get_default_for_uri_scheme</code>() function gets
- the default application for launching applications using this URI scheme. A URI
- scheme is the initial part of the URI, up to but not including the
- ':', e.g. "http", "ftp" or "sip".
- </p></div><div class="refsect2" title="gio.app_info_reset_type_association"><a name="function-gio--app-info-reset-type-association"></a><h3>gio.app_info_reset_type_association</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">app_info_reset_type_association</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>a content type</td></tr></tbody></table><p>
- The <code class="methodname">app_info_reset_type_association</code>() function
- removes all changes to the type associations done by
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type" title="gio.AppInfo.set_as_default_for_type">set_as_default_for_type</a></code>(),
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension" title="gio.AppInfo.set_as_default_for_extension">set_as_default_for_extension</a></code>(),
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--add-supports-type" title="gio.AppInfo.add_supports_type">add_supports_type</a></code>() or
- <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--remove-supports-type" title="gio.AppInfo.remove_supports_type">remove_supports_type</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioapplaunchcontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGio Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AppLaunchContext</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioapplaunchcontext.html b/docs/html/class-gioapplaunchcontext.html
deleted file mode 100644
index 2d1d3df..0000000
--- a/docs/html/class-gioapplaunchcontext.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AppLaunchContext</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioappinfo.html" title="gio.AppInfo"><link rel="next" href="class-gioasyncresult.html" title="gio.AsyncResult"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AppLaunchContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioappinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioasyncresult.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AppLaunchContext"><a name="class-gioapplaunchcontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AppLaunchContext</h2><p>gio.AppLaunchContext — Application launch context.</p></div><div class="refsect1" title="Synopsis"><a name="id503788"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AppLaunchContext</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#constructor-gioapplaunchcontext" title="Constructor">gio.AppLaunchContext</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display" title="gio.AppLaunchContext.get_display">get_display</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed" title="gio.AppLaunchContext.launch_failed">launch_failed</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_notify_id</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id495731"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext">gio.AppLaunchContext</a>
-</pre></div><div class="refsect1" title="Description"><a name="id495717"></a><h2>Description</h2><p>
- The <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
- is used for integrating the launch with the launching application. This is used to handle for
- instance startup notification and launching the new application on the same screen as the launching window.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioapplaunchcontext"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.AppLaunchContext</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>.
- </td></tr></tbody></table><p>
- Creates a new application launch context. This is not normally used, instead
- you instantiate a subclass of this, such as
- <PYGTKDOCLINK HREF="class-gdkapplaunchcontext"><code class="classname">gtk.gdk.AppLaunchContext</code></PYGTKDOCLINK>.
- </p></div><div class="refsect1" title="Methods"><a name="id495640"></a><h2>Methods</h2><div class="refsect2" title="gio.AppLaunchContext.get_display"><a name="method-gioapplaunchcontext--get-display"></a><h3>gio.AppLaunchContext.get_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a display string for the display.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_display</code>() method gets the display
- string for the display. This is used to ensure new applications
- are started on the same display as the launching application.
- </p></div><div class="refsect2" title="gio.AppLaunchContext.get_startup_notify_id"><a name="method-gioapplaunchcontext--get-startup-notify-id"></a><h3>gio.AppLaunchContext.get_startup_notify_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_startup_notify_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a startup notification ID for the application,
- or <code class="literal">None</code> if not supported.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_startup_notify_id</code>() method initiates
- startup notification for the application and returns the DESKTOP_STARTUP_ID
- for the launched operation, if supported.
- </p><p>
- Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
- </p></div><div class="refsect2" title="gio.AppLaunchContext.launch_failed"><a name="method-gioapplaunchcontext--launch-failed"></a><h3>gio.AppLaunchContext.launch_failed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">launch_failed</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_notify_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>startup_notify_id</code></em> :</span></p></td><td>the startup notification id that was returned by
- <code class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></code>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a startup notification ID for the application,
- or <code class="literal">None</code> if not supported.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_startup_notify_id</code>() method is called
- when an application has failed to launch, so that it can cancel the application
- startup notification started in
- <code class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></code>
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioappinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioasyncresult.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AppInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AsyncResult</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioasyncresult.html b/docs/html/class-gioasyncresult.html
deleted file mode 100644
index ea06247..0000000
--- a/docs/html/class-gioasyncresult.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AsyncResult</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><link rel="next" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AsyncResult</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioapplaunchcontext.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giobufferedinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AsyncResult"><a name="class-gioasyncresult"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AsyncResult</h2><p>gio.AsyncResult — Asynchronous Function Results.</p></div><div class="refsect1" title="Synopsis"><a name="id504044"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AsyncResult</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioasyncresult.html#method-gioasyncresult--get-source-object" title="gio.AsyncResult.get_source_object">get_source_object</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id504001"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult">gio.AsyncResult</a>
-</pre></div><div class="refsect1" title="Prerequisites"><a name="id503975"></a><h2>Prerequisites</h2><p>
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a> is required by
- <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>.
- </p></div><div class="refsect1" title="Known Implementation"><a name="id503938"></a><h2>Known Implementation</h2><p>
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a> is implemented by
- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>.
- </p></div><div class="refsect1" title="Description"><a name="id440594"></a><h2>Description</h2><p>
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- provides a base class for implementing asynchronous function results.
- </p><p>
- Asynchronous operations are broken up into two separate operations which are chained
- together by a GAsyncReadyCallback. To begin an asynchronous operation, provide a
- GAsyncReadyCallback to the asynchronous function. This callback will be triggered when
- the operation has completed, and will be passed a GAsyncResult instance filled with the
- details of the operation's success or failure, the object the asynchronous function was
- started for and any error codes returned. The asynchronous callback function is then expected
- to call the corresponding "_finish()" function with the object the function was called for,
- and the <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- instance, and optionally, an error to grab any error conditions that may have occurred.
- </p><p>
- The purpose of the "_finish()" function is to take the generic result of type GAsyncResult and
- return the specific result that the operation in question yields (e.g. a
- <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- for a "enumerate children" operation). If the result or error status of the operation is not needed,
- there is no need to call the "_finish()" function, GIO will take care of cleaning up the result and error
- information after the GAsyncReadyCallback returns. It is also allowed to take a reference to the
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- and call "_finish()" later.
- </p><p>
- The callback for an asynchronous operation is called only once, and is always called, even
- in the case of a cancelled operation. On cancellation the result is a gio.ERROR_CANCELLED error.
- </p><p>
- Some ascynchronous operations are implemented using synchronous calls. These are run in a
- separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event
- Loop and processed in an idle function. So, if you truly need asynchronous operations, make
- sure to initialize GThread.
- </p></div><div class="refsect1" title="Methods"><a name="id437501"></a><h2>Methods</h2><div class="refsect2" title="gio.AsyncResult.get_source_object"><a name="method-gioasyncresult--get-source-object"></a><h3>gio.AsyncResult.get_source_object</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_source_object</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the source object for the res.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_source_object</code>() method gets the source object
- from a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioapplaunchcontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giobufferedinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AppLaunchContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.BufferedInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giobufferedinputstream.html b/docs/html/class-giobufferedinputstream.html
deleted file mode 100644
index 7fc25b4..0000000
--- a/docs/html/class-giobufferedinputstream.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.BufferedInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioasyncresult.html" title="gio.AsyncResult"><link rel="next" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.BufferedInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioasyncresult.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giobufferedoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.BufferedInputStream"><a name="class-giobufferedinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.BufferedInputStream</h2><p>gio.BufferedInputStream — Buffered Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id449200"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.BufferedInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#constructor-giobufferedinputstream" title="Constructor">gio.BufferedInputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill" title="gio.BufferedInputStream.fill">fill</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">fill_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish" title="gio.BufferedInputStream.fill_finish">fill_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-available" title="gio.BufferedInputStream.get_available">get_available</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size" title="gio.BufferedInputStream.get_buffer_size">get_buffer_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte" title="gio.BufferedInputStream.read_byte">read_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size" title="gio.BufferedInputStream.set_buffer_size">set_buffer_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized" title="gio.buffered_input_stream_new_sized">gio.buffered_input_stream_new_sized</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id448121"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
- +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
- +-- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a>
-</pre></div><div class="refsect1" title="gio.BufferedInputStream Properties"><a name="properties-giobufferedinputstream"></a><h2>gio.BufferedInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"buffer-size"</td><td valign="top">Read - Write - Construct</td><td valign="top">The size of the backend buffer. Allowed values: &gt;= 1. Default value: 4096.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id500482"></a><h2>Description</h2><p>
- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>
- implements <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream"><code class="classname">gio.FilterInputStream</code></a>
- and provides for buffered reads.
- </p><p>
- By default,
- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>'s
- buffer size is set at 4 kilobytes.
- </p><p>
- To create a buffered input stream, use
- <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#constructor-giobufferedinputstream" title="Constructor">gio.BufferedInputStream</a></code>(),
- or <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized" title="gio.buffered_input_stream_new_sized">gio.buffered_input_stream_new_sized</a></code>()
- to specify the buffer's size at construction.
- </p><p>
- To get the size of a buffer within a buffered input stream, use
- <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size" title="gio.BufferedInputStream.get_buffer_size">get_buffer_size</a></code>().
- To change the size of a buffered input stream's buffer, use
- <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size" title="gio.BufferedInputStream.set_buffer_size">set_buffer_size</a></code>().
- Note that the buffer's size cannot be reduced below the size of the data within the buffer.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giobufferedinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.BufferedInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- for the given base_stream.
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- from the given base_stream, with a buffer set to the default size (4 kilobytes).
- </p></div><div class="refsect1" title="Methods"><a name="id449318"></a><h2>Methods</h2><div class="refsect2" title="gio.BufferedInputStream.fill"><a name="method-giobufferedinputstream--fill"></a><h3>gio.BufferedInputStream.fill</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fill</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be read from the stream.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes read into stream's buffer,
- up to count, or -1 on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">fill</code>() method tries to read count bytes
- from the stream into the buffer. Will block during this read.
- </p><p>
- If count is zero, returns zero and does nothing. A value of count
- larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </p><p>
- On success, the number of bytes read into the buffer is returned. It
- is not an error if this is not the same as the requested size, as it can
- happen e.g. near the end of a file. Zero is returned on end of file
- (or if count is zero), but never otherwise.
- </p><p>
- If count is -1 then the attempted read size is equal to the number
- of bytes that are required to fill the buffer.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can
- be cancelled by triggering the cancellable object from another thread.
- If the operation was cancelled, the error gio.ERROR_CANCELLED will be
- returned. If an operation was partially finished when the operation was
- cancelled the partial result will be returned, without an error.
- </p><p>
- On error -1 is returned and error is set accordingly.
- </p><p>
- For the asynchronous, non-blocking, version of this function, see
- <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">gio.BufferedInputStream.fill_async</a></code>().
- </p></div><div class="refsect2" title="gio.BufferedInputStream.fill_async"><a name="method-giobufferedinputstream--fill-async"></a><h3>gio.BufferedInputStream.fill_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fill_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be read from the stream.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">fill_async</code>() method reads data into stream's
- buffer asynchronously, up to count size. io_priority can be used to
- prioritize reads.
- </p><p>
- For the synchronous version of this function, see
- <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill" title="gio.BufferedInputStream.fill">gio.BufferedInputStream.fill</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </p><p>
- If count is -1 then the attempted read size is equal to the number of bytes
- that are required to fill the buffer.
- </p></div><div class="refsect2" title="gio.BufferedInputStream.fill_finish"><a name="method-giobufferedinputstream--fill-finish"></a><h3>gio.BufferedInputStream.fill_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fill_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the size of the read stream, or -1 on an error.
- </td></tr></tbody></table><p>
- The <code class="methodname">fill_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">gio.BufferedInputStream.fill_async</a></code>().
- </p></div><div class="refsect2" title="gio.BufferedInputStream.get_available"><a name="method-giobufferedinputstream--get-available"></a><h3>gio.BufferedInputStream.get_available</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_available</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>size of the available stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_available</code>() method gets the size of
- the available data within the stream.
- </p></div><div class="refsect2" title="gio.BufferedInputStream.get_buffer_size"><a name="method-giobufferedinputstream--get-buffer-size"></a><h3>gio.BufferedInputStream.get_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_buffer_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current buffer size.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_buffer_size</code>() method gets the size
- of the input buffer.
- </p></div><div class="refsect2" title="gio.BufferedInputStream.read_byte"><a name="method-giobufferedinputstream--read-byte"></a><h3>gio.BufferedInputStream.read_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the byte read from the stream, or -1 on end of stream or error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_byte</code>() method tries to read a single
- byte from the stream or the buffer. Will block during this read.
- </p><p>
- On success, the byte read from the stream is returned. On end of stream -1
- is returned but it's not an exceptional error and error is not set.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can
- be cancelled by triggering the cancellable object from another thread.
- If the operation was cancelled, the error gio.ERROR_CANCELLED will be
- returned. If an operation was partially finished when the operation was
- cancelled the partial result will be returned, without an error.
- </p><p>
- On error -1 is returned and error is set accordingly.
- </p></div><div class="refsect2" title="gio.BufferedInputStream.set_buffer_size"><a name="method-giobufferedinputstream--set-buffer-size"></a><h3>gio.BufferedInputStream.set_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_buffer_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the new buffer size.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_buffer_size</code>() method sets the size
- of the internal buffer of stream to size, or to the size of the contents
- of the buffer. The buffer can never be resized smaller than its current contents.
- </p></div></div><div class="refsect1" title="Functions"><a name="id353937"></a><h2>Functions</h2><div class="refsect2" title="gio.buffered_input_stream_new_sized"><a name="function-gio--buffered-input-stream-new-sized"></a><h3>gio.buffered_input_stream_new_sized</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">buffered_input_stream_new_sized</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>the requested buffer size.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">buffered_input_stream_new_sized</code>() function creates
- a new <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>
- from the given base_stream, with a buffer set to size.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioasyncresult.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giobufferedoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AsyncResult </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.BufferedOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giobufferedoutputstream.html b/docs/html/class-giobufferedoutputstream.html
deleted file mode 100644
index a77139f..0000000
--- a/docs/html/class-giobufferedoutputstream.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.BufferedOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><link rel="next" href="class-giocancellable.html" title="gio.Cancellable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.BufferedOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giobufferedinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giocancellable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.BufferedOutputStream"><a name="class-giobufferedoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.BufferedOutputStream</h2><p>gio.BufferedOutputStream — Buffered Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id470769"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.BufferedOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream" title="Constructor">gio.BufferedOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow" title="gio.BufferedOutputStream.get_auto_grow">get_auto_grow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size" title="gio.BufferedOutputStream.get_buffer_size">get_buffer_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow" title="gio.BufferedOutputStream.set_auto_grow">set_auto_grow</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>auto_grow</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size" title="gio.BufferedOutputStream.set_buffer_size">set_buffer_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized" title="gio.buffered_output_stream_new_sized">gio.buffered_output_stream_new_sized</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id435166"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
- +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
- +-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
-</pre></div><div class="refsect1" title="gio.BufferedOutputStream Properties"><a name="properties-giobufferedoutputstream"></a><h2>gio.BufferedOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"auto-grow"</td><td valign="top">Read - Write</td><td valign="top">Whether the buffer should automatically grow. Default value: <code class="literal">False</code>.</td></tr><tr valign="top"><td valign="top">"buffer-size"</td><td valign="top">Read - Write - Construct</td><td valign="top">The size of the backend buffer. Allowed values: &gt;= 1. Default value: 4096.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id367442"></a><h2>Description</h2><p>
- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>
- implements <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"><code class="classname">gio.FilterOutputStream</code></a>
- and provides for buffered writes.
- </p><p>
- By default,
- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>'s
- buffer size is set at 4 kilobytes.
- </p><p>
- To create a buffered output stream, use
- <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream" title="Constructor">gio.BufferedOutputStream</a></code>(),
- or <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized" title="gio.buffered_output_stream_new_sized">gio.buffered_output_stream_new_sized</a></code>()
- to specify the buffer's size at construction.
- </p><p>
- To get the size of a buffer within a buffered output stream, use
- <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size" title="gio.BufferedOutputStream.get_buffer_size">gio.BufferedOutputStream.get_buffer_size</a></code>().
- To change the size of a buffered output stream's buffer, use
- <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size" title="gio.BufferedOutputStream.set_buffer_size">gio.BufferedOutputStream.set_buffer_size</a></code>().
- Note that the buffer's size cannot be reduced below the size of the data within the buffer.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giobufferedoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.BufferedOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
- for the given base_stream.
- </td></tr></tbody></table><p>
- Creates a new buffered output stream for a base stream.
- </p></div><div class="refsect1" title="Methods"><a name="id442713"></a><h2>Methods</h2><div class="refsect2" title="gio.BufferedOutputStream.get_auto_grow"><a name="method-giobufferedoutputstream--get-auto-grow"></a><h3>gio.BufferedOutputStream.get_auto_grow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_auto_grow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream's
- buffer automatically grows, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_auto_grow</code>() method checks if the
- buffer automatically grows as data is added.
- </p></div><div class="refsect2" title="gio.BufferedOutputStream.get_buffer_size"><a name="method-giobufferedoutputstream--get-buffer-size"></a><h3>gio.BufferedOutputStream.get_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_buffer_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current buffer size.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_buffer_size</code>() method gets the size
- of the buffer in the stream.
- </p></div><div class="refsect2" title="gio.BufferedOutputStream.set_auto_grow"><a name="method-giobufferedoutputstream--set-auto-grow"></a><h3>gio.BufferedOutputStream.set_auto_grow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_auto_grow</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>auto_grow</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>auto_grow</code></strong> :</span></p></td><td>a boolean.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_auto_grow</code>() method sets whether or not
- the stream's buffer should automatically grow. If auto_grow is true,
- then each write will just make the buffer larger, and you must manually
- flush the buffer to actually write out the data to the underlying stream.
- </p></div><div class="refsect2" title="gio.BufferedOutputStream.set_buffer_size"><a name="method-giobufferedoutputstream--set-buffer-size"></a><h3>gio.BufferedOutputStream.set_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_buffer_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the new buffer size.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_buffer_size</code>() method sets the size of
- the internal buffer to size.
- </p></div></div><div class="refsect1" title="Functions"><a name="id416016"></a><h2>Functions</h2><div class="refsect2" title="gio.buffered_output_stream_new_sized"><a name="function-gio--buffered-output-stream-new-sized"></a><h3>gio.buffered_output_stream_new_sized</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">buffered_output_stream_new_sized</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>the requested buffer size.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
- with an internal buffer set to size..
- </td></tr></tbody></table><p>
- The <code class="methodname">buffered_output_stream_new_sized</code>() function creates
- a new <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>
- from the given base_stream, with a buffer set to size.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giobufferedinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giocancellable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.BufferedInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Cancellable</td></tr></table></div></body></html>
diff --git a/docs/html/class-giocancellable.html b/docs/html/class-giocancellable.html
deleted file mode 100644
index 54c8bf5..0000000
--- a/docs/html/class-giocancellable.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Cancellable</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><link rel="next" href="class-giodatainputstream.html" title="gio.DataInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Cancellable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giobufferedoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodatainputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Cancellable"><a name="class-giocancellable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Cancellable</h2><p>gio.Cancellable — Thread-safe Operation Cancellation Stack.</p></div><div class="refsect1" title="Synopsis"><a name="id312088"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Cancellable</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giocancellable.html#constructor-giocancellable" title="Constructor">gio.Cancellable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--cancel" title="gio.Cancellable.cancel">cancel</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--get-fd" title="gio.Cancellable.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--is-cancelled" title="gio.Cancellable.is_cancelled">is_cancelled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--pop-current" title="gio.Cancellable.pop_current">pop_current</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--push-current" title="gio.Cancellable.push_current">push_current</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--reset" title="gio.Cancellable.reset">reset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--set-error-if-cancelled" title="gio.Cancellable.set_error_if_cancelled">set_error_if_cancelled</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giocancellable.html#function-gio--cancellable-get-current" title="gio.cancellable_get_current">gio.cancellable_get_current</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id459303"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giocancellable.html" title="gio.Cancellable">gio.Cancellable</a>
-</pre></div><div class="refsect1" title="Description"><a name="id440909"></a><h2>Description</h2><p>
- The <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- is a thread-safe operation cancellation stack used throughout GIO to allow for
- cancellation of synchronous and asynchronous operations.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giocancellable"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.Cancellable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>.
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a> object.
- </p><p>
- Applications that want to start one or more operations that should be cancellable should create a
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- and pass it to the operations.
- </p><p>
- One <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- can be used in multiple consecutive operations, but not in multiple concurrent operations.
- </p></div><div class="refsect1" title="Methods"><a name="id386832"></a><h2>Methods</h2><div class="refsect2" title="gio.Cancellable.cancel"><a name="method-giocancellable--cancel"></a><h3>gio.Cancellable.cancel</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cancel</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">cancel</code>() method will set cancellable to cancelled,
- and will emit the "cancelled" signal. (However, see the warning about race conditions
- in the documentation for that signal if you are planning to connect to it.)
- </p><p>
- This function is thread-safe. In other words, you can safely call it from a thread
- other than the one running the operation that was passed the cancellable.
- </p><p>
- The convention within gio is that cancelling an asynchronous operation causes it
- to complete asynchronously. That is, if you cancel the operation from the same thread
- in which it is running, then the operation's GAsyncReadyCallback will not be invoked
- until the application returns to the main loop.
- </p></div><div class="refsect2" title="gio.Cancellable.get_fd"><a name="method-giocancellable--get-fd"></a><h3>gio.Cancellable.get_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A valid file descriptor. -1 if the file descriptor
- is not supported, or on errors.</td></tr></tbody></table><p>
- The <code class="methodname">get_fd</code>() method gets the file descriptor
- for a cancellable job. This can be used to implement cancellable operations
- on Unix systems. The returned fd will turn readable when cancellable is cancelled.
- </p></div><div class="refsect2" title="gio.Cancellable.is_cancelled"><a name="method-giocancellable--is-cancelled"></a><h3>gio.Cancellable.is_cancelled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_cancelled</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if cancellable is cancelled,
- <code class="literal">False</code> if called with <code class="literal">None</code> or if
- item is not cancelled. </td></tr></tbody></table><p>
- The <code class="methodname">get_fd</code>() method gets the file descriptor
- for a cancellable job. This can be used to implement cancellable operations
- on Unix systems. The returned fd will turn readable when cancellable is cancelled.
- </p></div><div class="refsect2" title="gio.Cancellable.pop_current"><a name="method-giocancellable--pop-current"></a><h3>gio.Cancellable.pop_current</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pop_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">pop_current</code>() method pops cancellable off
- the cancellable stack (verifying that cancellable is on the top of the stack).
- </p></div><div class="refsect2" title="gio.Cancellable.push_current"><a name="method-giocancellable--push-current"></a><h3>gio.Cancellable.push_current</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">push_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">push_current</code>() method pushes cancellable onto
- the cancellable stack. The current cancllable can then be recieved using
- <code class="methodname"><a class="link" href="class-giocancellable.html#function-gio--cancellable-get-current" title="gio.cancellable_get_current">gio.cancellable_get_current</a></code>().
- </p></div><div class="refsect2" title="gio.Cancellable.reset"><a name="method-giocancellable--reset"></a><h3>gio.Cancellable.reset</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reset</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">reset</code>() method resets cancellable to its uncancelled state.
- </p></div><div class="refsect2" title="gio.Cancellable.set_error_if_cancelled"><a name="method-giocancellable--set-error-if-cancelled"></a><h3>gio.Cancellable.set_error_if_cancelled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_error_if_cancelled</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if cancellable was cancelled,
- <code class="literal">False</code> if it was not.</td></tr></tbody></table><p>
- The <code class="methodname">set_error_if_cancelled</code>() method, if the cancellable
- is cancelled, sets the error to notify that the operation was cancelled.
- </p></div></div><div class="refsect1" title="Functions"><a name="id432204"></a><h2>Functions</h2><div class="refsect2" title="gio.cancellable_get_current"><a name="function-gio--cancellable-get-current"></a><h3>gio.cancellable_get_current</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cancellable_get_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- from the top of the stack, or <code class="literal">None</code> if the stack is empty.</td></tr></tbody></table><p>
- The <code class="methodname">cancellable_get_current</code>() function gets the top cancellable from the stack.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giobufferedoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodatainputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.BufferedOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.DataInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodatainputstream.html b/docs/html/class-giodatainputstream.html
deleted file mode 100644
index 67fb819..0000000
--- a/docs/html/class-giodatainputstream.html
+++ /dev/null
@@ -1,223 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giocancellable.html" title="gio.Cancellable"><link rel="next" href="class-giodataoutputstream.html" title="gio.DataOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giocancellable.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodataoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataInputStream"><a name="class-giodatainputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataInputStream</h2><p>gio.DataInputStream — Data Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id464053"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giodatainputstream.html#constructor-giodatainputstream" title="Constructor">gio.DataInputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--get-byte-order" title="gio.DataInputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--get-newline-type" title="gio.DataInputStream.get_newline_type">get_newline_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-byte" title="gio.DataInputStream.read_byte">read_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int16" title="gio.DataInputStream.read_int16">read_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int32" title="gio.DataInputStream.read_int32">read_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int64" title="gio.DataInputStream.read_int64">read_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">read_line</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-async" title="gio.DataInputStream.read_line_async">read_line_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-finish" title="gio.DataInputStream.read_line_finish">read_line_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint16" title="gio.DataInputStream.read_uint16">read_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint32" title="gio.DataInputStream.read_uint32">read_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint64" title="gio.DataInputStream.read_uint64">read_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">read_until</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-async" title="gio.DataInputStream.read_until_async">read_until_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-finish" title="gio.DataInputStream.read_until_finish">read_until_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--set-byte-order" title="gio.DataInputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--set-newline-type" title="gio.DataInputStream.set_newline_type">set_newline_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id439747"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
- +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
- +-- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a>
- +-- <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream">gio.DataInputStream</a>
-</pre></div><div class="refsect1" title="gio.DataInputStream Properties"><a name="properties-giodatainputstream"></a><h2>gio.DataInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">The byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr><tr valign="top"><td valign="top">"newline-type"</td><td valign="top">Read - Write</td><td valign="top">The accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id464009"></a><h2>Description</h2><p>
- <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
- implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- and includes functions for reading structured data directly from a binary input stream.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giodatainputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.DataInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
- from the given base_stream.
- </p></div><div class="refsect1" title="Methods"><a name="id433976"></a><h2>Methods</h2><div class="refsect2" title="gio.DataInputStream.get_byte_order"><a name="method-giodatainputstream--get-byte-order"></a><h3>gio.DataInputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
- <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_byte_order</code>() method gets the byte
- order for the data input stream.
- </p></div><div class="refsect2" title="gio.DataInputStream.get_newline_type"><a name="method-giodatainputstream--get-newline-type"></a><h3>gio.DataInputStream.get_newline_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_newline_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a>
- for the given stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_newline_type</code>() method gets the current
- newline type for the stream.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_byte"><a name="method-giodatainputstream--read-byte"></a><h3>gio.DataInputStream.read_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an unsigned 8-bit/1-byte value read from the
- stream or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_byte</code>() method reads an unsigned 8-bit/1-byte value from stream.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_int16"><a name="method-giodatainputstream--read-int16"></a><h3>gio.DataInputStream.read_int16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_int16</code>() method reads a 16-bit/2-byte value from stream.
- </p><p>
- In order to get the correct byte order for this read operation, see
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
- and
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_int32"><a name="method-giodatainputstream--read-int32"></a><h3>gio.DataInputStream.read_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 32-bit/4-byte value read from the stream
- or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_int32</code>() method reads a signed 32-bit/4-byte value from stream.
- </p><p>
- In order to get the correct byte order for this read operation, see
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
- and
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_int64"><a name="method-giodatainputstream--read-int64"></a><h3>gio.DataInputStream.read_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 64-bit/8-byte value read from the stream
- or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_int64</code>() method reads a signed 64-bit/8-byte value from stream.
- </p><p>
- In order to get the correct byte order for this read operation, see
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
- and
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_line"><a name="method-giodatainputstream--read-line"></a><h3>gio.DataInputStream.read_line</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_line</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the line that was read in (without the newlines).
- Set length to a gsize to get the length of the read line. On an error, it will return
- <code class="literal">None</code> and error will be set. If there's no content to read, it
- will still return <code class="literal">None</code>, but error won't be set.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_line</code>() reads a line from the data input stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can
- be cancelled by triggering the cancellable object from another thread.
- If the operation was cancelled, the error gio.ERROR_CANCELLED will be
- returned. If an operation was partially finished when the operation was
- cancelled the partial result will be returned, without an error.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_line_async"><a name="method-giodatainputstream--read-line-async"></a><h3>gio.DataInputStream.read_line_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_line_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_line_async</code>() method is the asynchronous version of
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">gio.DataInputStream.read_line</a></code>().
- It is an error to have two outstanding calls to this function.
- </p><p>
- For the synchronous version of this function, see
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">gio.DataInputStream.read_line</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </p></div><div class="refsect2" title="gio.DataInputStream.read_line_finish"><a name="method-giodatainputstream--read-line-finish"></a><h3>gio.DataInputStream.read_line_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_line_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the line that was read in (without the newlines).
- On an error, it will return <code class="literal">None</code> and error will be set.
- If there's no content to read, it will still return <code class="literal">None</code>,
- but error won't be set.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_line_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-async" title="gio.DataInputStream.read_line_async">gio.DataInputStream.read_line_async</a></code>().
- </p></div><div class="refsect2" title="gio.DataInputStream.read_uint16"><a name="method-giodatainputstream--read-uint16"></a><h3>gio.DataInputStream.read_uint16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_uint16</code>() method reads a 16-bit/2-byte value from stream.
- </p><p>
- In order to get the correct byte order for this read operation, see
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
- and
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_uint32"><a name="method-giodatainputstream--read-uint32"></a><h3>gio.DataInputStream.read_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 32-bit/4-byte value read from the stream
- or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_uint32</code>() method reads a signed 32-bit/4-byte value from stream.
- </p><p>
- In order to get the correct byte order for this read operation, see
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
- and
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_uint64"><a name="method-giodatainputstream--read-uint64"></a><h3>gio.DataInputStream.read_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 64-bit/8-byte value read from the stream
- or 0 if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_uint64</code>() method reads a signed 64-bit/8-byte value from stream.
- </p><p>
- In order to get the correct byte order for this read operation, see
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
- and
- <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_until"><a name="method-giodatainputstream--read-until"></a><h3>gio.DataInputStream.read_until</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_until</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stop_chars</code></strong> :</span></p></td><td>characters to terminate the read.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the data that was read before encountering
- any of the stop characters. This function will return NULL on an error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_until</code>() reads a string from the data input
- stream, up to the first occurrence of any of the stop characters.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_until_async"><a name="method-giodatainputstream--read-until-async"></a><h3>gio.DataInputStream.read_until_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_until_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stop_chars</code></strong> :</span></p></td><td>characters to terminate the read.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_until_async</code>() method it's the asynchronous version of
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">gio.DataInputStream.read_until</a></code>().
- It is an error to have two outstanding calls to this function.
- </p><p>
- For the synchronous version of this function, see
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">gio.DataInputStream.read_until</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-finish" title="gio.DataInputStream.read_until_finish">gio.DataInputStream.read_until_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.DataInputStream.read_until_finish"><a name="method-giodatainputstream--read-until-finish"></a><h3>gio.DataInputStream.read_until_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_until_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the data that was read before encountering
- any of the stop characters. This function will return <code class="literal">None</code> on an error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_until_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-async" title="gio.DataInputStream.read_until_async">gio.DataInputStream.read_until_async</a></code>().
- </p></div><div class="refsect2" title="gio.DataInputStream.set_byte_order"><a name="method-giodatainputstream--set-byte-order"></a><h3>gio.DataInputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_byte_order</code>() method sets the byte order for
- the given stream. All subsequent reads from the stream will be read in the given order.
- </p></div><div class="refsect2" title="gio.DataInputStream.set_newline_type"><a name="method-giodatainputstream--set-newline-type"></a><h3>gio.DataInputStream.set_newline_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_newline_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a> to set.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_newline_type</code>() method sets the newline type for the stream.
- </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
- Note that using gio.DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a
- read chunk ends in "CR" we must read an additional byte to know if this is
- "CR" or "CR LF", and this might block if there is no more data availible.
- </div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giocancellable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodataoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Cancellable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.DataOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodataoutputstream.html b/docs/html/class-giodataoutputstream.html
deleted file mode 100644
index a681efe..0000000
--- a/docs/html/class-giodataoutputstream.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodatainputstream.html" title="gio.DataInputStream"><link rel="next" href="class-giodrive.html" title="gio.Drive"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataOutputStream"><a name="class-giodataoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataOutputStream</h2><p>gio.DataOutputStream — Data Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id432940"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giodataoutputstream.html#constructor-giodataoutputstream" title="Constructor">gio.DataOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order" title="gio.DataOutputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-byte" title="gio.DataOutputStream.put_byte">put_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int16" title="gio.DataOutputStream.put_int16">put_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int32" title="gio.DataOutputStream.put_int32">put_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int64" title="gio.DataOutputStream.put_int64">put_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-string" title="gio.DataOutputStream.put_string">put_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16" title="gio.DataOutputStream.put_uint16">put_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32" title="gio.DataOutputStream.put_uint32">put_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64" title="gio.DataOutputStream.put_uint64">put_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order" title="gio.DataOutputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id396268"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
- +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
- +-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
- +-- <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream">gio.DataOutputStream</a>
-</pre></div><div class="refsect1" title="gio.DataOutputStream Properties"><a name="properties-giodataoutputstream"></a><h2>gio.DataOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">Determines the byte ordering that is used when writing
- multi-byte entities (such as integers) to the stream.
- Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id409238"></a><h2>Description</h2><p>
- <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
- implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- and includes functions for writing data directly to an output stream.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giodataoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.DataOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
- from the given base_stream.
- </p></div><div class="refsect1" title="Methods"><a name="id441772"></a><h2>Methods</h2><div class="refsect2" title="gio.DataOutputStream.get_byte_order"><a name="method-giodataoutputstream--get-byte-order"></a><h3>gio.DataOutputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
- <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_byte_order</code>() method gets the byte
- order for the stream.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_byte"><a name="method-giodataoutputstream--put-byte"></a><h3>gio.DataOutputStream.put_byte</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a char.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_byte</code>() method puts a byte into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_int16"><a name="method-giodataoutputstream--put-int16"></a><h3>gio.DataOutputStream.put_int16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint16.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_int16</code>() method puts a signed 16-bit integer into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_int32"><a name="method-giodataoutputstream--put-int32"></a><h3>gio.DataOutputStream.put_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint32.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_int32</code>() method puts a signed 32-bit integer into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_int64"><a name="method-giodataoutputstream--put-int64"></a><h3>gio.DataOutputStream.put_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint64.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_int64</code>() method puts a signed 64-bit integer into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_string"><a name="method-giodataoutputstream--put-string"></a><h3>gio.DataOutputStream.put_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a string.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if string was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_string</code>() method puts a string into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint16"><a name="method-giodataoutputstream--put-uint16"></a><h3>gio.DataOutputStream.put_uint16</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint16.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_uint16</code>() method puts an unsigned 16-bit integer into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint32"><a name="method-giodataoutputstream--put-uint32"></a><h3>gio.DataOutputStream.put_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint32.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_uint32</code>() method puts an unsigned 32-bit integer into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint64"><a name="method-giodataoutputstream--put-uint64"></a><h3>gio.DataOutputStream.put_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">put_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint64.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">put_uint64</code>() method puts an unsigned 64-bit integer into the output stream.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.DataOutputStream.set_byte_order"><a name="method-giodataoutputstream--set-byte-order"></a><h3>gio.DataOutputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_byte_order</code>() method sets the byte order for
- the given stream. All subsequent reads from the stream will be read in the given order.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Drive</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodrive.html b/docs/html/class-giodrive.html
deleted file mode 100644
index be54893..0000000
--- a/docs/html/class-giodrive.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Drive</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><link rel="next" href="class-gioemblem.html" title="gio.Emblem"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Drive</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodataoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblem.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Drive"><a name="class-giodrive"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Drive</h2><p>gio.Drive — Virtual File System drive management.</p></div><div class="refsect1" title="Synopsis"><a name="id439146"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Drive</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--can-eject" title="gio.Drive.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--can-poll-for-media" title="gio.Drive.can_poll_for_media">can_poll_for_media</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject" title="gio.Drive.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject-finish" title="gio.Drive.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--enumerate-identifiers" title="gio.Drive.enumerate_identifiers">enumerate_identifiers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-icon" title="gio.Drive.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-identifier" title="gio.Drive.get_identifier">get_identifier</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-name" title="gio.Drive.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-volumes" title="gio.Drive.get_volumes">get_volumes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--has-media" title="gio.Drive.has_media">has_media</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--has-volumes" title="gio.Drive.has_volumes">has_volumes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-check-automatic" title="gio.Drive.is_media_check_automatic">is_media_check_automatic</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-removable" title="gio.Drive.is_media_removable">is_media_removable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media" title="gio.Drive.poll_for_media">poll_for_media</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media-finish" title="gio.Drive.poll_for_media_finish">poll_for_media_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id440047"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-giodrive.html" title="gio.Drive">gio.Drive</a>
-</pre></div><div class="refsect1" title="Prerequisites"><a name="id408094"></a><h2>Prerequisites</h2><p>
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a> requires
- <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id412009"></a><h2>Description</h2><p>
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- - this represent a piece of hardware connected to the machine. Its generally
- only created for removable hardware or hardware with removable media.
- </p><p>
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- is a container class for GVolume objects that stem from the same piece of media.
- As such, <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- abstracts a drive with (or without) removable media and provides operations for
- querying whether media is available, determing whether media change is automatically
- detected and ejecting the media.
- </p><p>
- If the <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- reports that media isn't automatically detected, one can poll for media; typically
- one should not do this periodically as a poll for media operation is potententially
- expensive and may spin up the drive creating noise.
- </p><p>
- For porting from GnomeVFS note that there is no equivalent of
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- in that API.
- </p></div><div class="refsect1" title="Methods"><a name="id431819"></a><h2>Methods</h2><div class="refsect2" title="gio.Drive.can_eject"><a name="method-giodrive--can-eject"></a><h3>gio.Drive.can_eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive can be ejected,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_eject</code>() method checks if a drive can be ejected.
- </p></div><div class="refsect2" title="gio.Drive.can_poll_for_media"><a name="method-giodrive--can-poll-for-media"></a><h3>gio.Drive.can_poll_for_media</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_poll_for_media</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive can be polled
- for media changes, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_poll_for_media</code>() method checks if a drive
- can be polled for media changes.
- </p></div><div class="refsect2" title="gio.Drive.eject"><a name="method-giodrive--eject"></a><h3>gio.Drive.eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject</code>() method asynchronously ejects a drive.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject-finish" title="gio.Drive.eject_finish">gio.Drive.eject_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Drive.eject_finish"><a name="method-giodrive--eject-finish"></a><h3>gio.Drive.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive has been ejected
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject_finish</code>() method finishes ejecting a drive.
- </p></div><div class="refsect2" title="gio.Drive.enumerate_identifiers"><a name="method-giodrive--enumerate-identifiers"></a><h3>gio.Drive.enumerate_identifiers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_identifiers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of strings containing kinds of identifiers.
- </td></tr></tbody></table><p>
- The <code class="methodname">enumerate_identifiers</code>() method gets the kinds
- of identifiers that drive has. Use
- <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-identifier" title="gio.Drive.get_identifier">gio.Drive.get_identifier</a></code>()
- to obtain the identifiers themselves.
- </p></div><div class="refsect2" title="gio.Drive.get_icon"><a name="method-giodrive--get-icon"></a><h3>gio.Drive.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- for the drive.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_icon</code>() method gets the icon for drive.
- </p></div><div class="refsect2" title="gio.Drive.get_identifier"><a name="method-giodrive--get-identifier"></a><h3>gio.Drive.get_identifier</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_identifier</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing the requested identfier, or
- <code class="literal">None</code> if the
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- doesn't have this kind of identifier.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_identifier</code>() method gets the identifier of
- the given kind for drive.
- </p></div><div class="refsect2" title="gio.Drive.get_name"><a name="method-giodrive--get-name"></a><h3>gio.Drive.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing drive's name.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_name</code>() method gets the name of drive.
- </p></div><div class="refsect2" title="gio.Drive.get_volumes"><a name="method-giodrive--get-volumes"></a><h3>gio.Drive.get_volumes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list containing any
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- objects on the given drive.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_volumes</code>() method get a list of mountable
- volumes for drive.
- </p></div><div class="refsect2" title="gio.Drive.has_media"><a name="method-giodrive--has-media"></a><h3>gio.Drive.has_media</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_media</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive has media,
- <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
- The <code class="methodname">has_media</code>() method checks if the drive
- has media. Note that the OS may not be polling the drive for media changes; see
- <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-check-automatic" title="gio.Drive.is_media_check_automatic">gio.Drive.is_media_check_automatic</a></code>()
- for more details.
- </p></div><div class="refsect2" title="gio.Drive.has_volumes"><a name="method-giodrive--has-volumes"></a><h3>gio.Drive.has_volumes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive contains volumes,
- <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
- The <code class="methodname">has_volumes</code>() method check if drive has any mountable volumes.
- </p></div><div class="refsect2" title="gio.Drive.is_media_check_automatic"><a name="method-giodrive--is-media-check-automatic"></a><h3>gio.Drive.is_media_check_automatic</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_media_check_automatic</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive is capabable
- of automatically detecting media changes,
- <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
- The <code class="methodname">is_media_check_automatic</code>() method checks if
- drive is capabable of automatically detecting media changes.
- </p></div><div class="refsect2" title="gio.Drive.is_media_removable"><a name="method-giodrive--is-media-removable"></a><h3>gio.Drive.is_media_removable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_media_removable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive supports removable media,
- <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
- The <code class="methodname">is_media_removable</code>() method checks if the
- drive supports removable media.
- </p></div><div class="refsect2" title="gio.Drive.poll_for_media"><a name="method-giodrive--poll-for-media"></a><h3>gio.Drive.poll_for_media</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">poll_for_media</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">poll_for_media</code>() method asynchronously polls
- drive to see if media has been inserted or removed.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media-finish" title="gio.Drive.poll_for_media_finish">gio.Drive.poll_for_media_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Drive.poll_for_media_finish"><a name="method-giodrive--poll-for-media-finish"></a><h3>gio.Drive.poll_for_media_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">poll_for_media_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive has been poll_for_mediaed
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">poll_for_media_finish</code>() method finishes
- an operation started with
- <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media" title="gio.Drive.poll_for_media">gio.Drive.poll_for_media</a></code>()
- on a drive.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodataoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblem.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Emblem</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioemblem.html b/docs/html/class-gioemblem.html
deleted file mode 100644
index 451f288..0000000
--- a/docs/html/class-gioemblem.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Emblem</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodrive.html" title="gio.Drive"><link rel="next" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Emblem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Emblem"><a name="class-gioemblem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Emblem</h2><p>gio.Emblem — An object for emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id431946"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Emblem</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioemblem.html#constructor-gioemblem" title="Constructor">gio.Emblem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-icon" title="gio.Emblem.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-origin" title="gio.Emblem.get_origin">get_origin</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblem.html#function-gio--emblem-new-with-origin" title="gio.emblem_new_with_origin">gio.emblem_new_with_origin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id421408"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioemblem.html" title="gio.Emblem">gio.Emblem</a>
-</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id354264"></a><h2>Implemented Interfaces</h2><p>
- <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
- implements
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- </p></div><div class="refsect1" title="gio.Emblem Properties"><a name="properties-gioemblem"></a><h2>gio.Emblem Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"icon"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">The actual icon of the emblem.</td></tr><tr valign="top"><td valign="top">"origin"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">Tells which origin the emblem is derived from.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id432212"></a><h2>Description</h2><p>
- The <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
- class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
- that supports having an emblem, which is an icon with additional properties.
- It can then be added to a
- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
- </p><p>
- Currently, only metainformation about the emblem's origin is supported.
- More may be added in the future.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.Emblem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> containing the icon.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>
- <a class="link" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">origin</a> of the emblem.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
- </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
- Parameter <em class="parameter"><code>origin</code></em> is available since PyGObject 2.20.
- </div><p>
- Creates a new <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a> for icon.
- </p></div><div class="refsect1" title="Methods"><a name="id495382"></a><h2>Methods</h2><div class="refsect2" title="gio.Emblem.get_icon"><a name="method-gioemblem--get-icon"></a><h3>gio.Emblem.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_icon</code>() method gives back the icon from emblem.
- </p></div><div class="refsect2" title="gio.Emblem.get_origin"><a name="method-gioemblem--get-origin"></a><h3>gio.Emblem.get_origin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_origin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the origin of the emblem.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_origin</code>() method gets the origin of the emblem.
- </p></div></div><div class="refsect1" title="Functions"><a name="id382610"></a><h2>Functions</h2><div class="refsect2" title="gio.emblem_new_with_origin"><a name="function-gio--emblem-new-with-origin"></a><h3>gio.emblem_new_with_origin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">emblem_new_with_origin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>a <a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
- defining the emblem's origin.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
- </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
- While this method is not deprecated, with 2.20 and up it is recommended
- to use the constructor instead.
- </div><p>
- The <code class="methodname">emblem_new_with_origin</code>() function creates
- a new emblem for icon.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Drive </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.EmblemedIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioemblemedicon.html b/docs/html/class-gioemblemedicon.html
deleted file mode 100644
index 12b7277..0000000
--- a/docs/html/class-gioemblemedicon.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.EmblemedIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioemblem.html" title="gio.Emblem"><link rel="next" href="class-giofile.html" title="gio.File"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.EmblemedIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioemblem.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofile.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.EmblemedIcon"><a name="class-gioemblemedicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.EmblemedIcon</h2><p>gio.EmblemedIcon — Icon with emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id435196"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.EmblemedIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gioemblemedicon.html#constructor-gioemblemedicon" title="Constructor">gio.EmblemedIcon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem" title="gio.EmblemedIcon.add_emblem">add_emblem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--get-icon" title="gio.EmblemedIcon.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id434379"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon">gio.EmblemedIcon</a>
-</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id359522"></a><h2>Implemented Interfaces</h2><p>
- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
- implements
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id434774"></a><h2>Description</h2><p>
- The <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
- class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
- that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via
- <code class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem" title="gio.EmblemedIcon.add_emblem">gio.EmblemedIcon.add_emblem</a></code>().
- </p><p>
- Note that
- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
- allows no control over the position of the emblems. See also
- <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
- for more information.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblemedicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.EmblemedIcon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>emblem</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- for icon with the emblem emblem.
- </p></div><div class="refsect1" title="Methods"><a name="id440198"></a><h2>Methods</h2><div class="refsect2" title="gio.EmblemedIcon.add_emblem"><a name="method-gioemblemedicon--add-emblem"></a><h3>gio.EmblemedIcon.add_emblem</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_emblem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>emblem</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
- </td></tr></tbody></table><p>
- The <code class="methodname">add_emblem</code>() method adds emblem to the
- list of <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>s.
- </p></div><div class="refsect2" title="gio.EmblemedIcon.get_icon"><a name="method-gioemblemedicon--get-icon"></a><h3>gio.EmblemedIcon.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- that is owned by emblemed.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_icon</code>() method gets the main icon for emblemed.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioemblem.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofile.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Emblem </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.File</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofile.html b/docs/html/class-giofile.html
deleted file mode 100644
index 9f40126..0000000
--- a/docs/html/class-giofile.html
+++ /dev/null
@@ -1,1436 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.File</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><link rel="next" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.File</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioemblemedicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileattributeinfo.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.File"><a name="class-giofile"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.File</h2><p>gio.File — File and Directory Handling.</p></div><div class="refsect1" title="Synopsis"><a name="id418550"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.File</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giofile.html#constructor-giofile" title="Constructor">gio.File</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to" title="gio.File.append_to">append_to</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-async" title="gio.File.append_to_async">append_to_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-finish" title="gio.File.append_to_finish">append_to_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">copy</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-async" title="gio.File.copy_async">copy_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-attributes" title="gio.File.copy_attributes">copy_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-finish" title="gio.File.copy_finish">copy_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">create</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">create_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-finish" title="gio.File.create_finish">create_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--delete" title="gio.File.delete">delete</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--dup" title="gio.File.dup">dup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable" title="gio.File.eject_mountable">eject_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable-finish" title="gio.File.eject_mountable_finish">eject_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">enumerate_children</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-async" title="gio.File.enumerate_children_async">enumerate_children_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-finish" title="gio.File.eject_mountable_finish">enumerate_children_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--equal" title="gio.File.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount" title="gio.File.find_enclosing_mount">find_enclosing_mount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-async" title="gio.File.find_enclosing_mount_async">find_enclosing_mount_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-finish" title="gio.File.find_enclosing_mount_finish">find_enclosing_mount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-basename" title="gio.File.get_basename">get_basename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child" title="gio.File.get_child">get_child</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child-for-display-name" title="gio.File.get_child_for_display_name">get_child_for_display_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">get_parent</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parse-name" title="gio.File.get_parse_name">get_parse_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">get_path</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-relative-path" title="gio.File.get_relative_path">get_relative_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>descendant</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">get_uri</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri-scheme" title="gio.File.get_uri_scheme">get_uri_scheme</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--has-prefix" title="gio.File.has_prefix">has_prefix</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>prefix</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--has-uri-scheme" title="gio.File.has_uri_scheme">has_uri_scheme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--is-native" title="gio.File.is_native">is_native</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents" title="gio.File.load_contents">load_contents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-async" title="gio.File.load_contents_async">load_contents_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-finish" title="gio.File.load_contents_finish">load_contents_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory" title="gio.File.make_directory">make_directory</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory-with-parents" title="gio.File.make_directory_with_parents">make_directory_with_parents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-symbolic-link" title="gio.File.make_symbolic_link">make_symbolic_link</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor" title="gio.File.monitor">monitor</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-directory" title="gio.File.monitor_directory">monitor_directory</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-file" title="gio.File.monitor_file">monitor_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume" title="gio.File.mount_enclosing_volume">mount_enclosing_volume</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume-finish" title="gio.File.mount_enclosing_volume_finish">mount_enclosing_volume_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">mount_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable-finish" title="gio.File.mount_mountable_finish">mount_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--move" title="gio.File.move">move</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-default-handler" title="gio.File.query_default_handler">query_default_handler</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-exists" title="gio.File.query_exists">query_exists</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-file-type" title="gio.File.query_file_type">query_file_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-async" title="gio.File.query_filesystem_info_async">query_filesystem_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-finish" title="gio.File.query_filesystem_info_finish">query_filesystem_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-async" title="gio.File.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-finish" title="gio.File.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-settable-attributes" title="gio.File.query_settable_attributes">query_settable_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-writable-namespace" title="gio.File.query_writable_namespace">query_writable_namespace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read" title="gio.File.read">read</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-async" title="gio.File.read_async">read_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-finish" title="gio.File.read_finish">read_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace" title="gio.File.replace">replace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-async" title="gio.File.replace_async">replace_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents" title="gio.File.replace_contents">replace_contents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-async" title="gio.File.replace_contents_async">replace_contents_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-finish" title="gio.File.replace_contents_finish">replace_contents_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-finish" title="gio.File.replace_finish">replace_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--resolve-relative-path" title="gio.File.resolve_relative_path">resolve_relative_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>relative_path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute" title="gio.File.set_attribute">set_attribute</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-byte-string" title="gio.File.set_attribute_byte_string">set_attribute_byte_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-int32" title="gio.File.set_attribute_int32">set_attribute_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-int64" title="gio.File.set_attribute_int64">set_attribute_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-string" title="gio.File.set_attribute_string">set_attribute_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-uint32" title="gio.File.set_attribute_uint32">set_attribute_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-uint64" title="gio.File.set_attribute_uint64">set_attribute_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">set_attributes_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-finish" title="gio.File.set_attributes_finish">set_attributes_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">set_attributes_from_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">set_dispay_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-async" title="gio.File.set_display_name_async">set_display_name_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-finish" title="gio.File.set_display_name_finish">set_display_name_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--trash" title="gio.File.trash">trash</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">unmount_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable-finish" title="gio.File.unmount_mountable_finish">unmount_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parse_name</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id442206"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-giofile.html" title="gio.File">gio.File</a>
-</pre></div><div class="refsect1" title="Prerequisites"><a name="id441365"></a><h2>Prerequisites</h2><p>
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is implemented by
- <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id417179"></a><h2>Description</h2><p>
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is a high
- level abstraction for manipulating files on a virtual file system.
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are lightweight,
- immutable objects that do no I/O upon creation. It is necessary to understand that
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- objects do not represent files, merely an identifier for a file. All file content
- I/O is implemented as streaming operations (see
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a> and
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>).
- </p><p>
- To construct a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, you can use
- it's constructor either with a path, an uri or a commandline argument.
- <code class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></code>()
- from a utf8 string gotten from
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parse-name" title="gio.File.get_parse_name">gio.File.get_parse_name</a></code>().
- </p><p>
- One way to think of a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is as
- an abstraction of a pathname. For normal files the system pathname is what is stored internally,
- but as <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are extensible it
- could also be something else that corresponds to a pathname in a userspace implementation of a filesystem.
- </p><p>
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s make up hierarchies of
- directories and files that correspond to the files on a filesystem. You can move through the
- file system with GFile using
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">gio.File.get_parent</a></code>()
- to get an identifier for the parent directory,
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child" title="gio.File.get_child">gio.File.get_child</a></code>()
- to get a child within a directory,
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--resolve-relative-path" title="gio.File.resolve_relative_path">gio.File.resolve_relative_path</a></code>()
- to resolve a relative path between two <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
- There can be multiple hierarchies, so you may not end up at the same root if you repeatedly call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">gio.File.get_parent</a></code>()
- on two different files.
- </p><p>
- All <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s have a basename (get with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-basename" title="gio.File.get_basename">gio.File.get_basename</a></code>()
- ). These names are byte strings that are used to identify the file on the filesystem
- (relative to its parent directory) and there is no guarantees that they have any particular charset
- encoding or even make any sense at all. If you want to use filenames in a user interface you should
- use the display name that you can get by requesting the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>().
- This is guaranteed to be in utf8 and can be used in a user interface. But always store the real basename or the
- GFile to use to actually access the file, because there is no way to go from a display name to the actual name.
- </p><p>
- Using <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> as an identifier has the same
- weaknesses as using a path in that there may be multiple aliases for the same file. For instance,
- hard or soft links may cause two different <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
- to refer to the same file. Other possible causes for aliases are: case insensitive filesystems, short and
- long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the same file
- you can query for the gio.FILE_ATTRIBUTE_ID_FILE attribute. Note that
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> does some trivial canonicalization
- of pathnames passed in, so that trivial differences in the path string used at creation
- (duplicated slashes, slash at end of path, "." or ".." path segments, etc) does not create different
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
- </p><p>
- Many <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> operations have both synchronous
- and asynchronous versions to suit your application. Asynchronous versions of synchronous functions simply
- have _async() appended to their function names. The asynchronous I/O functions call a
- GAsyncReadyCallback which is then used to finalize the operation, producing a GAsyncResult
- which is then passed to the function's matching _finish() operation.
- </p><p>
- Some <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> operations do not have
- synchronous analogs, as they may take a very long time to finish, and blocking may leave an application
- unusable. Notable cases include:
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">gio.File.mount_mountable</a></code>()
- to mount a mountable file.
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">gio.File.unmount_mountable</a></code>()
- to unmount a mountable file.
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable" title="gio.File.eject_mountable">gio.File.eject_mountable</a></code>()
- to eject a mountable file.
- </p><p>
- One notable feature of <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are
- entity tags, or "etags" for short. Entity tags are somewhat like a more abstract
- version of the traditional mtime, and can be used to quickly determine if the file
- has been modified from the version on the file system. See the HTTP 1.1
- specification for HTTP Etag headers, which are a very similar concept.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofile"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.File</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td><td>a command line string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td><td>a string containing a relative or absolute path.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td><td>a string containing a URI.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> either from a commandline,
- a path or an uri.
- </p></div><div class="refsect1" title="Methods"><a name="id374828"></a><h2>Methods</h2><div class="refsect2" title="gio.File.append_to"><a name="method-giofile--append-to"></a><h3>gio.File.append_to</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">append_to</code>() method gets an output stream for
- appending data to the file. If the file doesn't already exist it is created.
- </p><p>
- By default files created are generally readable by everyone, but if you pass
- gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
- current user, to the level that is supported on the target filesystem.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If
- the operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- Some file systems don't allow all file names, and may return an
- gio.ERROR_INVALID_FILENAME error. If the file is a directory the
- gio.ERROR_IS_DIRECTORY error will be returned. Other errors are possible too,
- and depend on what kind of filesystem the file is on.
- </p></div><div class="refsect2" title="gio.File.append_to_async"><a name="method-giofile--append-to-async"></a><h3>gio.File.append_to_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">append_to_async</code>() method asynchronously opens file for appending.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to" title="gio.File.append_to">gio.File.append_to</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-finish" title="gio.File.append_to_finish">gio.File.append_to_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.append_to_finish"><a name="method-giofile--append-to-finish"></a><h3>gio.File.append_to_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a valid
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">append_to_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-async" title="gio.File.append_to_async">gio.File.append_to_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.copy"><a name="method-giofile--copy"></a><h3>gio.File.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">copy</code>() method copies the file source to
- the location specified by destination. Can not handle recursive copies of directories.
- </p><p>
- If the flag gio.FILE_COPY_OVERWRITE is specified an already existing
- destination file is overwritten.
- </p><p>
- If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will
- be copied as symlinks, otherwise the target of the source symlink will be copied.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- If progress_callback is not <code class="literal">None</code>, then the operation can be
- monitored by setting this to a GFileProgressCallback function. user_data
- will be passed to this function. It is guaranteed that this callback will be
- called after all data has been transferred with the total number of bytes
- copied during the operation.
- </p><p>
- If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
- independent on the status of the destination.
- </p><p>
- If gio.FILE_COPY_OVERWRITE is not specified and the target exists,
- then the error gio.ERROR_EXISTS is returned.
- </p><p>
- If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error
- is returned. If trying to overwrite a directory with a directory the
- gio.ERROR_WOULD_MERGE error is returned.
- </p><p>
- If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE
- is specified and the target is a file, then the gio.ERROR_WOULD_RECURSE error is returned.
- </p><p>
- If you are interested in copying the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> object
- itself (not the on-disk file), see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--dup" title="gio.File.dup">gio.File.dup</a></code>().
- </p></div><div class="refsect2" title="gio.File.copy_async"><a name="method-giofile--copy-async"></a><h3>gio.File.copy_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_to_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">copy_async</code>() method copies the file source to
- the location specified by destination asynchronously. For details of the behaviour,
- see <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>().
- </p><p>
- If progress_callback is not <code class="literal">None</code>, then that function that will
- be called just like in
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>(),
- however the callback will run in the main loop, not in the thread that is doing the I/O operation.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-finish" title="gio.File.copy_finish">gio.File.copy_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.copy_attributes"><a name="method-giofile--copy-attributes"></a><h3>gio.File.copy_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- to copy attributes to.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were copied successfully,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">copy_attributes</code>() method copies the file attributes
- from source to destination.
- </p><p>
- Normally only a subset of the file attributes are copied, those that are copies
- in a normal file copy operation (which for instance does not include e.g. owner).
- However if gio.FILE_COPY_ALL_METADATA is specified in flags, then all the metadata
- that is possible to copy is copied. This is useful when implementing move by copy + delete source.
- </p></div><div class="refsect2" title="gio.File.copy_finish"><a name="method-giofile--copy-finish"></a><h3>gio.File.copy_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
- <code class="literal">False</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">copy_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-async" title="gio.File.copy_async">gio.File.copy_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.create"><a name="method-giofile--create"></a><h3>gio.File.create</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">create</code>() method creates a new file and returns
- an output stream for writing to it. The file must not already exist.
- </p><p>
- By default files created are generally readable by everyone, but if you pass
- gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
- current user, to the level that is supported on the target filesystem.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- If a file or directory with this name already exists the gio.ERROR_EXISTS
- error will be returned. Some file systems don't allow all file names, and
- may return an gio.ERROR_INVALID_FILENAME error, and if the name is to long
- gio.ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too,
- and depend on what kind of filesystem the file is on.
- </p></div><div class="refsect2" title="gio.File.create_async"><a name="method-giofile--create-async"></a><h3>gio.File.create_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">create_async</code>() method asynchronously creates a new
- file and returns an output stream for writing to it. The file must not already exist.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">gio.File.create</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-finish" title="gio.File.create_finish">gio.File.create_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.create_finish"><a name="method-giofile--create-finish"></a><h3>gio.File.create_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">create_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">gio.File.create_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.delete"><a name="method-giofile--delete"></a><h3>gio.File.delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">delete</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file was deleted,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">deleted</code>() method deletes a file. If the file is a
- directory, it will only be deleted if it is empty.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.dup"><a name="method-giofile--dup"></a><h3>gio.File.dup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">dup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- that is a duplicate of the given <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">dup</code>() method duplicates a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- handle. This operation does not duplicate the actual file or directory represented
- by the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>; see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>()
- if attempting to copy a file.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.eject_mountable"><a name="method-giofile--eject-mountable"></a><h3>gio.File.eject_mountable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject_mountable</code>() method starts an asynchronous eject on a
- mountable. When this operation has completed, callback will be called with
- user_user data, and the operation can be finalized with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable-finish" title="gio.File.eject_mountable_finish">gio.File.eject_mountable_finish</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.eject_mountable_finish"><a name="method-giofile--eject-mountable-finish"></a><h3>gio.File.eject_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file was ejected successfully,
- <code class="literal">False</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">create_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">gio.File.create_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.enumerate_children"><a name="method-giofile--enumerate-children"></a><h3>gio.File.enumerate_children</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">enumerate_children</code>() method gets the requested information
- about the files in a directory. The result is a GFileEnumerator object that will give out
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a> objects
- for all the files in the directory.
- </p><p>
- The attribute value is a string that specifies the file attributes that should be gathered.
- It is not an error if it's not possible to read a particular requested attribute from a file -
- it just won't be set. attribute should be a comma-separated list of attribute or attribute
- wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all
- attributes in the standard namespace. An example attribute query be "standard::*,owner::user".
- The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. If the file
- is not a directory, the gio.FILE_ERROR_NOTDIR error will be returned.
- Other errors are possible too.
- </p></div><div class="refsect2" title="gio.File.enumerate_children_async"><a name="method-giofile--enumerate-children-async"></a><h3>gio.File.enumerate_children_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">enumerate_children_async</code>() method asynchronously gets the
- requested information about the files in a directory. The result is a
- <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- object that will give out <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- objects for all the files in the directory.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">enumerate_children</a></code>()
- which is the synchronous version of this call.
- </p></div><div class="refsect2" title="gio.File.eject_mountable_finish"><a name="method-giofile--enumerate-children-finish"></a><h3>gio.File.eject_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- or <code class="literal">None</code> if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">enumerate_children_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-async" title="gio.File.enumerate_children_async">gio.File.enumerate_children_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.equal"><a name="method-giofile--equal"></a><h3>gio.File.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>file2</code></strong> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if file1 and file2 are equal.
- <code class="literal">False</code> if either is not a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">equal</code>() method checks equality of two given
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
- Note that two <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
- that differ can still refer to the same file on the filesystem due to various
- forms of filename aliasing.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.find_enclosing_mount"><a name="method-giofile--find-enclosing-mount"></a><h3>gio.File.find_enclosing_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_children</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">find_enclosing_mount</code>() method gets a
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> for the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </p><p>
- If the interface for file does not have a mount (e.g. possibly a remote share),
- error will be set to gio.ERROR_NOT_FOUND and <code class="literal">None</code> will be returned.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.find_enclosing_mount_async"><a name="method-giofile--find-enclosing-mount-async"></a><h3>gio.File.find_enclosing_mount_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">find_enclosing_mount_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">find_enclosing_mount_async</code>() method asynchronously
- gets the mount for the file.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount" title="gio.File.find_enclosing_mount">gio.File.find_enclosing_mount</a></code>()
- which is the synchronous version of this call.
- </p></div><div class="refsect2" title="gio.File.find_enclosing_mount_finish"><a name="method-giofile--find-enclosing-mount-finish"></a><h3>gio.File.find_enclosing_mount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">find_enclosing_mount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- or <code class="literal">None</code> if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">find_enclosing_mount_finish</code>() method finishes an asynchronous
- find mount started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-async" title="gio.File.find_enclosing_mount_async">gio.File.find_enclosing_mount_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.get_basename"><a name="method-giofile--get-basename"></a><h3>gio.File.get_basename</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_basename</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>string containing the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s
- base name, or <code class="literal">None</code> if given
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is invalid.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_basename</code>() method gets the base name
- (the last component of the path) for a given
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </p><p>
- If called for the top level of a system (such as the filesystem root or
- a uri like sftp://host/) it will return a single directory separator
- (and on Windows, possibly a drive letter).
- </p><p>
- The base name is a byte string (*not* UTF-8). It has no defined encoding
- or rules other than it may not contain zero bytes. If you want to use filenames
- in a user interface you should use the display name that you can get by requesting
- the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>().
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_child"><a name="method-giofile--get-child"></a><h3>gio.File.get_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>string containing the child's basename.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- to a child specified by name.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_child</code>() method gets a child of file
- with basename equal to name.
- </p><p>
- Note that the file with that specific name might not exist, but you can
- still have a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- that points to it. You can use this for instance to create that file.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_child_for_display_name"><a name="method-giofile--get-child-for-display-name"></a><h3>gio.File.get_child_for_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child_for_display_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display_name</code></strong> :</span></p></td><td>string to a possible child.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- to the specified child or <code class="literal">None</code>
- if the display name couldn't be converted.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_child_for_display_name</code>() method gets the
- child of file for a given display_name (i.e. a UTF8 version of the name).
- If this function fails, it returns NULL and error will be set. This is very
- useful when constructing a GFile for a new file and the user entered the filename
- in the user interface, for instance when you select a directory and type a filename
- in the file selector.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_parent"><a name="method-giofile--get-parent"></a><h3>gio.File.get_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_parent</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- structure to the parent of the given
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> or
- <code class="literal">None</code> if there is no parent.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_parent</code>() method gets the parent directory for the file.
- If the file represents the root directory of the file system, then <code class="literal">None</code>
- will be returned.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_parse_name"><a name="method-giofile--get-parse-name"></a><h3>gio.File.get_parse_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_parse_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s parse name.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_parse_name</code>() method gets the parse name
- of the file. A parse name is a UTF-8 string that describes the file such
- that one can get the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- back using
- <code class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></code>().
- </p><p>
- This is generally used to show the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- as a nice full-pathname kind of string in a user interface, like in a location entry.
- </p><p>
- For local files with names that can safely be converted to UTF8 the pathname is used,
- otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped).
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_path"><a name="method-giofile--get-path"></a><h3>gio.File.get_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_path</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s path,
- or <code class="literal">None</code> if no such path exists.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_path</code>() method gets the local pathname for
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, if one exists.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_relative_path"><a name="method-giofile--get-relative-path"></a><h3>gio.File.get_relative_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_relative_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>descendant</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>descendant</code></strong> :</span></p></td><td>input <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>string with the relative path from descendant to parent,
- or <code class="literal">None</code> if descendant doesn't have parent as prefix.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_relative_path</code>() method gets the path for
- descendant relative to parent.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_uri"><a name="method-giofile--get-uri"></a><h3>gio.File.get_uri</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uri</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s URI.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_uri</code>() method gets the URI for the file.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.get_uri_scheme"><a name="method-giofile--get-uri-scheme"></a><h3>gio.File.get_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uri_scheme</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the URI scheme for the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_uri_scheme</code>() method gets the URI scheme for a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- RFC 3986 decodes the scheme as:
- </p><pre class="programlisting">
-URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
-</pre><p>
- Common schemes include "file", "http", "ftp", etc.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.has_prefix"><a name="method-giofile--has-prefix"></a><h3>gio.File.has_prefix</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_prefix</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>prefix</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>prefix</code></strong> :</span></p></td><td>input <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the files's parent, grandparent,
- etc is prefix. <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">has_prefix</code>() method checks whether file has the prefix
- specified by prefix. In other word, if the names of inital elements of files pathname
- match prefix. Only full pathname elements are matched, so a path like /foo is not
- considered a prefix of /foobar, only of /foo/bar.
- </p><p>
- This call does no blocking i/o, as it works purely on names. As such it can sometimes
- return <code class="literal">False</code> even if file is inside a prefix (from a filesystem point
- of view), because the prefix of file is an alias of prefix.
- </p></div><div class="refsect2" title="gio.File.has_uri_scheme"><a name="method-giofile--has-uri-scheme"></a><h3>gio.File.has_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_uri_scheme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uri_scheme</code></strong> :</span></p></td><td>a string containing a URI scheme.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s
- backend supports the given URI scheme, <code class="literal">False</code> if URI scheme
- is <code class="literal">None</code>, not supported, or
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is invalid.
- </td></tr></tbody></table><p>
- The <code class="methodname">has_uri_scheme</code>() method checks to see if a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- has a given URI scheme.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.is_native"><a name="method-giofile--is-native"></a><h3>gio.File.is_native</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_native</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if file is native.
- </td></tr></tbody></table><p>
- The <code class="methodname">is_native</code>() method checks to see if a file
- is native to the platform.
- </p><p>
- A native file s one expressed in the platform-native filename format, e.g.
- "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it
- might be on a locally mounted remote filesystem.
- </p><p>
- On some systems non-native files may be available using the native filesystem
- via a userspace filesystem (FUSE), in these cases this call will return
- <code class="literal">False</code>, but
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">gio.File.get_path</a></code>()
- will still return a native path.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.load_contents"><a name="method-giofile--load-contents"></a><h3>gio.File.load_contents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_contents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a three tuple containing the contents of the file,
- the length of the contents of the file and the current entity tag for the file.
- </td></tr></tbody></table><p>
- The <code class="methodname">load_contents</code>() method loads the content of the file into memory.
- The data is always zero-terminated, but this is not included in the resultant length.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.load_contents_async"><a name="method-giofile--load-contents-async"></a><h3>gio.File.load_contents_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_contents_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">load_contents_async</code>() method starts an asynchronous load of the file's contents.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents" title="gio.File.load_contents">gio.File.load_contents</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the load operation has completed, callback will be called with user data. To finish
- the operation, call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-finish" title="gio.File.load_contents_finish">gio.File.load_contents_finish</a></code>()
- with the GAsyncResult returned by the callback.
- </p></div><div class="refsect2" title="gio.File.load_contents_finish"><a name="method-giofile--load-contents-finish"></a><h3>gio.File.load_contents_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_contents_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a three tuple containing the contents of the file,
- the length of the contents of the file and the current entity tag for the file.
- </td></tr></tbody></table><p>
- The <code class="methodname">load_contents_finish</code>() method finishes an asynchronous
- find mount started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-async" title="gio.File.load_contents_async">gio.File.load_contents_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.make_directory"><a name="method-giofile--make-directory"></a><h3>gio.File.make_directory</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_directory</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful creation,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">make_directory</code>() method creates a directory.
- Note that this will only create a child directory of the immediate parent directory
- of the path or URI given by the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- To recursively create directories, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory-with-parents" title="gio.File.make_directory_with_parents">gio.File.make_directory_with_parents</a></code>().
- This function will fail if the parent directory does not exist, setting error to
- gio.ERROR_NOT_FOUND. If the file system doesn't support creating directories, this
- function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
- </p><p>
- For a local <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> the newly
- created directory will have the default (current) ownership and permissions of the current process.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.make_directory_with_parents"><a name="method-giofile--make-directory-with-parents"></a><h3>gio.File.make_directory_with_parents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_directory_with_parents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if all directories have been successfully created,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">make_directory_with_parents</code>() method creates a directory
- and any parent directories that may not exist similar to 'mkdir -p'. If the file system
- does not support creating directories, this function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
- </p><p>
- For a local <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> the newly
- created directories will have the default (current) ownership and permissions of the current process.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.make_symbolic_link"><a name="method-giofile--make-symbolic-link"></a><h3>gio.File.make_symbolic_link</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">make_symbolic_link</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>symlink_value</code></em> :</span></p></td><td>a string with the value of the new symlink.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on the creation of a new symlink,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">make_symbolic_link</code>() method creates a symbolic link.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.monitor"><a name="method-giofile--monitor"></a><h3>gio.File.monitor</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">monitor</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
- a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
- for the given file, or <code class="literal">None</code> on error
- </td></tr></tbody></table><p>
- The <code class="methodname">monitor</code>() method obtains a file or directory
- monitor for the given file, depending on the type of the file.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.monitor_directory"><a name="method-giofile--monitor-directory"></a><h3>gio.File.monitor_directory</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">monitor_directory</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
- a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
- for the given file, or <code class="literal">None</code> on error
- </td></tr></tbody></table><p>
- The <code class="methodname">monitor_directory</code>() method obtains a directory monitor
- for the given file. This may fail if directory monitoring is not supported.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.monitor_file"><a name="method-giofile--monitor-file"></a><h3>gio.File.monitor_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">monitor_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
- a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
- for the given file, or <code class="literal">None</code> on error
- </td></tr></tbody></table><p>
- The <code class="methodname">monitor_file</code>() method obtains a file monitor for the
- given file. If no file notification mechanism exists, then regular polling
- of the file is used.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.mount_enclosing_volume"><a name="method-giofile--mount-enclosing-volume"></a><h3>gio.File.mount_enclosing_volume</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_enclosing_volume</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td><td>a
- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- or <code class="literal">None</code> to avoid user interaction.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request
- is satisfied, or <code class="literal">None</code>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">mount_enclosing_volume</code>() method starts a mount_operation,
- mounting the volume that contains the file location.
- </p><p>
- When this operation has completed, callback will be called with user_user data,
- and the operation can be finalized with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume-finish" title="gio.File.mount_enclosing_volume_finish">gio.File.mount_enclosing_volume_finish</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.mount_enclosing_volume_finish"><a name="method-giofile--mount-enclosing-volume-finish"></a><h3>gio.File.mount_enclosing_volume_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_enclosing_volume_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if successful. If an error has occurred,
- this function will return <code class="literal">False</code> and set error appropriately if present.
- </td></tr></tbody></table><p>
- The <code class="methodname">mount_enclosing_volume_finish</code>() method finishes an asynchronous
- find mount started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume" title="gio.File.mount_enclosing_volume">gio.File.mount_enclosing_volume</a></code>().
- </p></div><div class="refsect2" title="gio.File.mount_mountable"><a name="method-giofile--mount-mountable"></a><h3>gio.File.mount_mountable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td><td>a
- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- or <code class="literal">None</code> to avoid user interaction.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request
- is satisfied, or <code class="literal">None</code>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">mount_mountable</code>() method mounts a file of type
- gio.FILE_TYPE_MOUNTABLE. Using mount_operation, you can request callbacks when,
- for instance, passwords are needed during authentication.
- </p><p>
- When this operation has completed, callback will be called with user_user data,
- and the operation can be finalized with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable-finish" title="gio.File.mount_mountable_finish">gio.File.mount_mountable_finish</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.mount_mountable_finish"><a name="method-giofile--mount-mountable-finish"></a><h3>gio.File.mount_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">mount_mountable_finish</code>() method finishes an asynchronous
- find mount started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">gio.File.mount_mountable</a></code>().
- </p></div><div class="refsect2" title="gio.File.move"><a name="method-giofile--move"></a><h3>gio.File.move</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">move</code>() method tries to move the file or directory
- source to the location specified by destination. If native move operations are
- supported then this is used, otherwise a copy + delete fallback is used. The native
- implementation may support moving directories (for instance on moves inside the same
- filesystem), but the fallback code does not.
- </p><p>
- If the flag gio.FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten.
- </p><p>
- If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied
- as symlinks, otherwise the target of the source symlink will be copied.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- If progress_callback is not <code class="literal">None</code>, then the operation can be monitored
- by setting this to a GFileProgressCallback function. progress_callback_data will be passed
- to this function. It is guaranteed that this callback will be called after all data has been
- transferred with the total number of bytes copied during the operation.
- </p><p>
- If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
- independent on the status of the destination.
- </p><p>
- If gio.FILE_COPY_OVERWRITE is not specified and the target exists, then the error
- gio.ERROR_EXISTS is returned.
- </p><p>
- If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error is returned.
- If trying to overwrite a directory with a directory the gio.ERROR_WOULD_MERGE error is returned.
- </p><p>
- If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE is specified
- and the target is a file, then the gio.ERROR_WOULD_RECURSE error may be returned
- (if the native move operation isn't available).
- </p></div><div class="refsect2" title="gio.File.query_default_handler"><a name="method-giofile--query-default-handler"></a><h3>gio.File.query_default_handler</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_default_handler</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- if the handle was found, <code class="literal">None</code> if there were errors.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_default_handler</code>() method returns the
- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a> that
- is registered as the default application to handle the file specified by file.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.query_exists"><a name="method-giofile--query-exists"></a><h3>gio.File.query_exists</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_exists</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file exists (and can be detected
- without error), <code class="literal">False</code> otherwise (or if cancelled).
- </td></tr></tbody></table><p>
- The <code class="methodname">query_exists</code>() method is an tility function to check
- if a particular file exists. This is implemented using
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
- and as such does blocking I/O.
- </p><p>
- Note that in many cases it is racy to first check for file existence and then execute
- something based on the outcome of that, because the file might have been created or
- removed in between the operations. The general approach to handling that is to not check,
- but just do the operation and handle the errors as they come.
- </p><p>
- As an example of race-free checking, take the case of reading a file, and if it doesn't
- exist, creating it. There are two racy versions: read it, and on error create it; and:
- check if it exists, if not create it. These can both result in two processes creating the
- file (with perhaps a partially written file as the result). The correct approach is to
- always try to create the file with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">gio.File.create</a></code>()
- which will either atomically create the file or fail with a gio.ERROR_EXISTS error.
- </p><p>
- However, in many cases an existence check is useful in a user interface, for instance
- to make a menu item sensitive/insensitive, so that you don't have to fool users that
- something is possible and then just show and error dialog. If you do this, you should
- make sure to also handle the errors that can happen due to races when you execute the operation.
- </p></div><div class="refsect2" title="gio.File.query_file_type"><a name="method-giofile--query-file-type"></a><h3>gio.File.query_file_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_file_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
- a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
- <a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
- </td></tr></tbody></table><p>
- The <code class="methodname">query_file_type</code>() method it's an utility function to inspect
- the <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- of a file. This is implemented using
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
- and as such does blocking I/O.
- </p><p>
- The primary use case of this method is to check if a file is a regular file, directory, or symlink.
- </p></div><div class="refsect2" title="gio.File.query_filesystem_info"><a name="method-giofile--query-filesystem-info"></a><h3>gio.File.query_filesystem_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_filesystem_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- or <code class="literal">None</code> if there was an error.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_filesystem_info</code>() method it's similar to
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>(),
- but obtains information about the filesystem the file is on, rather than the
- file itself. For instance the amount of space available and the type of the filesystem.
- </p><p>
- The attribute value is a string that specifies the file attributes that should be gathered.
- It is not an error if it's not possible to read a particular requested attribute from a file -
- it just won't be set. attribute should be a comma-separated list of attribute or attribute
- wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes
- in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes
- of interest are gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes),
- gio.FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE
- (type of the filesystem).
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p><p>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. Other errors
- are possible too, and depend on what kind of filesystem the file is on.
- </p></div><div class="refsect2" title="gio.File.query_filesystem_info_async"><a name="method-giofile--query-filesystem-info-async"></a><h3>gio.File.query_filesystem_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_filesystem_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_filesystem_info_async</code>() method asynchronously
- gets the requested information about the filesystem that the specified file is on.
- The result is a GFileInfo object that contains key-value attributes
- (such as type or size for the file).
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-finish" title="gio.File.query_filesystem_info_finish">gio.File.query_filesystem_info_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.query_filesystem_info_finish"><a name="method-giofile--query-filesystem-info-finish"></a><h3>gio.File.query_filesystem_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_filesystem_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- or <code class="literal">None</code> if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_filesystem_info_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-async" title="gio.File.query_filesystem_info_async">gio.File.query_filesystem_info_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.query_filesystem_info"><a name="method-giofile--query-info"></a><h3>gio.File.query_filesystem_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
- a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- for the given file or <code class="literal">None</code> if there was an error.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info</code>() method gets the requested
- information about specified file. The result is a
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- object that contains key-value attributes (such as the type or size of the file).
- </p><p>
- The attribute value is a string that specifies the file attributes that should
- be gathered. It is not an error if it's not possible to read a particular
- requested attribute from a file - it just won't be set. attribute should be
- a comma-separated list of attribute or attribute wildcards. The wildcard "*"
- means all attributes, and a wildcard like "standard::*" means all attributes
- in the standard namespace. An example attribute query be "standard::*,owner::user".
- The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p><p>
- For symlinks, normally the information about the target of the symlink is returned,
- rather than information about the symlink itself. However if you pass
- gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about
- the symlink itself will be returned. Also, for symlinks that point to non-existing
- files the information about the symlink itself will be returned.
- </p><p>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be
- returned. Other errors are possible too, and depend on what kind of
- filesystem the file is on.
- </p></div><div class="refsect2" title="gio.File.query_info_async"><a name="method-giofile--query-info-async"></a><h3>gio.File.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
- a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info_async</code>() method asynchronously gets the
- requested information about specified file. The result is a
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- object that contains key-value attributes (such as type or size for the file).
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">query_info</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-finish" title="gio.File.query_info_finish">gio.File.query_info_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.query_info_finish"><a name="method-giofile--query-info-finish"></a><h3>gio.File.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- for the given file or <code class="literal">None</code> if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-async" title="gio.File.query_info_async">gio.File.query_info_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.query_settable_attributes"><a name="method-giofile--query-settable-attributes"></a><h3>gio.File.query_settable_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_settable_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of
- <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
- describing the settable attributes.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_settable_attributes</code>() method obtain the
- list of settable attributes for the file.
- </p><p>
- Returns the type and full attribute name of all the attributes that can be
- set on this file. This doesn't mean setting it will always succeed though,
- you might get an access failure, or some specific file may not support a specific attribute.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.query_writable_namespace"><a name="method-giofile--query-writable-namespace"></a><h3>gio.File.query_writable_namespace</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_writable_namespace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of
- <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
- describing the writable namespaces.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_writable_namespace</code>() method obtain the
- list of attribute namespaces where new attributes can be created by a user.
- An example of this is extended attributes (in the "xattr" namespace).
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.read"><a name="method-giofile--read"></a><h3>gio.File.read</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read</code>() method opens a file for reading. The result
- is a <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- that can be used to read the contents of the file.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p><p>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.
- If the file is a directory, the gio.ERROR_IS_DIRECTORY error will be returned.
- Other errors are possible too, and depend on what kind of filesystem the file is on.
- </p></div><div class="refsect2" title="gio.File.read_async"><a name="method-giofile--read-async"></a><h3>gio.File.read_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_async</code>() method asynchronously opens file for reading.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read" title="gio.File.read">read</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-finish" title="gio.File.read_finish">gio.File.read_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.read_finish"><a name="method-giofile--read-finish"></a><h3>gio.File.read_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- file or <code class="literal">None</code> if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-async" title="gio.File.read_async">gio.File.read_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.replace"><a name="method-giofile--replace"></a><h3>gio.File.replace</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
- or <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">replace</code>() method returns an output stream for
- overwriting the file, possibly creating a backup copy of the file first.
- If the file doesn't exist, it will be created.
- </p><p>
- This will try to replace the file in the safest way possible so that any
- errors during the writing will not affect an already existing copy of the file.
- For instance, for local files it may write to a temporary file and then atomically
- rename over the destination when the stream is closed.
- </p><p>
- By default files created are generally readable by everyone, but if you pass
- gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to
- the current user, to the level that is supported on the target filesystem.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p><p>
- If you pass in a non-<code class="literal">None</code> etag value, then this value is compared
- to the current entity tag of the file, and if they differ an gio.ERROR_WRONG_ETAG error
- is returned. This generally means that the file has been changed since you last read it.
- You can get the new etag from
- <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--get-etag" title="gio.FileOutputStream.get_etag">gio.FileOutputStream.get_etag</a></code>()
- after you've finished writing and closed the GFileOutputStream. When you load a new file you can use
- <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>()
- to get the etag of the file.
- </p><p>
- If make_backup is <code class="literal">True</code>, this function will attempt to make a backup
- of the current file before overwriting it. If this fails a gio.ERROR_CANT_CREATE_BACKUP
- error will be returned. If you want to replace anyway, try again
- with make_backup set to <code class="literal">False</code>.
- </p><p>
- If the file is a directory the gio.ERROR_IS_DIRECTORY error will be returned, and
- if the file is some other form of non-regular file then a gio.ERROR_NOT_REGULAR_FILE
- error will be returned. Some file systems don't allow all file names, and may return an
- gio.ERROR_INVALID_FILENAME error, and if the name is to long gio.ERROR_FILENAME_TOO_LONG
- will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
- </p></div><div class="refsect2" title="gio.File.replace_async"><a name="method-giofile--replace-async"></a><h3>gio.File.replace_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
- or <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">replace_async</code>() method asynchronously overwrites the file,
- replacing the contents, possibly creating a backup copy of the file first.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace" title="gio.File.replace">replace</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-finish" title="gio.File.replace_finish">gio.File.replace_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.replace_contents"><a name="method-giofile--replace-contents"></a><h3>gio.File.replace_contents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_contents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>contents</code></em> :</span></p></td><td>a string containing the new contents for file.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>the old entity tag for the document
- or <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new entity tag for the document.
- </td></tr></tbody></table><p>
- The <code class="methodname">replace_contents</code>() method replaces the contents
- of file with contents of length bytes. If etag is specified (not NULL) any existing
- file must have that etag, or the error gio.ERROR_WRONG_ETAG will be returned.
- </p><p>
- If make_backup is <code class="literal">True</code>, this function will attempt to make a backup of file.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p><p>
- The returned etag can be used to verify that the file hasn't changed the next time it is saved over.
- </p></div><div class="refsect2" title="gio.File.replace_contents_async"><a name="method-giofile--replace-contents-async"></a><h3>gio.File.replace_contents_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_contents_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>contents</code></em> :</span></p></td><td>a string containing the new contents for file.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
- or <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">replace_contents_async</code>() method starts an asynchronous
- replacement of file with the given contents of length bytes. etag will
- replace the document's current entity tag.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents" title="gio.File.replace_contents">replace_contents</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-finish" title="gio.File.replace_contents_finish">gio.File.replace_contents_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.replace_contents_finish"><a name="method-giofile--replace-contents-finish"></a><h3>gio.File.replace_contents_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_contents_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new entity tag for the document.
- </td></tr></tbody></table><p>
- The <code class="methodname">replace_contents_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-async" title="gio.File.replace_contents_async">gio.File.replace_contents_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.replace_finish"><a name="method-giofile--replace-finish"></a><h3>gio.File.replace_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">replace_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- or <code class="literal">None</code> if an error occurred.
- </td></tr></tbody></table><p>
- The <code class="methodname">replace_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-async" title="gio.File.replace_async">gio.File.replace_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.resolve_relative_path"><a name="method-giofile--resolve-relative-path"></a><h3>gio.File.resolve_relative_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">resolve_relative_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>relative_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>relative_path</code></strong> :</span></p></td><td>a given relative path string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- to the resolved path. <code class="literal">None</code> if relative_path is <code class="literal">None</code>
- or if file is invalid.
- </td></tr></tbody></table><p>
- The <code class="methodname">resolve_relative_path</code>() method resolves a
- relative path for file to an absolute path.
- </p><p>
- This call does no blocking i/o.
- </p></div><div class="refsect2" title="gio.File.set_attribute"><a name="method-giofile--set-attribute"></a><h3>gio.File.set_attribute</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>the type of the attribute .
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value_p</code></em> :</span></p></td><td>the value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute</code>() method sets an attribute in
- the file with attribute name attribute to value.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attribute_byte_string"><a name="method-giofile--set-attribute-byte-string"></a><h3>gio.File.set_attribute_byte_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_byte_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a string containing the attribute's new value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute_byte_string</code>() method Sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING to value. If attribute is of a different type,
- this operation will fail, returning <code class="literal">False</code>.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attribute_int32"><a name="method-giofile--set-attribute-int32"></a><h3>gio.File.set_attribute_int32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>an int containing the attribute's new value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute_int32</code>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_INT32 to value. If attribute is of a different type,
- this operation will fail.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attribute_int64"><a name="method-giofile--set-attribute-int64"></a><h3>gio.File.set_attribute_int64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a long containing the attribute's new value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute_int64</code>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_INT64 to value. If attribute is of a different type,
- this operation will fail.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attribute_string"><a name="method-giofile--set-attribute-string"></a><h3>gio.File.set_attribute_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a string containing the attribute's new value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute_string</code>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type,
- this operation will fail.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attribute_uint32"><a name="method-giofile--set-attribute-uint32"></a><h3>gio.File.set_attribute_uint32</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>an int containing the attribute's new value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute_uint32</code>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_UINT32 to value. If attribute is of a different type,
- this operation will fail.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attribute_uint64"><a name="method-giofile--set-attribute-uint64"></a><h3>gio.File.set_attribute_uint64</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attribute_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a long containing the attribute's new value.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attribute_uint64</code>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_UINT64 to value. If attribute is of a different type,
- this operation will fail.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_attributes_async"><a name="method-giofile--set-attributes-async"></a><h3>gio.File.set_attributes_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attributes_async</code>() method asynchronously
- sets the attributes of file with info.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">set_attributes_from_info</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-finish" title="gio.File.set_attributes_finish">gio.File.set_attributes_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.set_attributes_finish"><a name="method-giofile--set-attributes-finish"></a><h3>gio.File.set_attributes_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were set correctly,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attributes_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">gio.File.set_attributes_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.set_attributes_from_info"><a name="method-giofile--set-attributes-from-info"></a><h3>gio.File.set_attributes_from_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes_from_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were set correctly,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_attributes_from_info</code>() method tries to set
- all attributes in the GFileInfo on the target values, not stopping on the first error.
- </p>
- If there is any error during this operation then error will be set to the
- first error. Error on particular fields are flagged by setting the "status"
- field in the attribute value to gio.FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
- which means you can also detect further errors.
- <p>
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_display_name"><a name="method-giofile--set-display-name"></a><h3>gio.File.set_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_display_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display_name</code></em> :</span></p></td><td>a string conaining the name to display.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- specifying what file was renamed to, or <code class="literal">None</code> if there was an error.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_display_name</code>() method renames file to
- the specified display name.
- </p><p>
- The display name is converted from UTF8 to the correct encoding for the
- target filesystem if possible and the file is renamed to this.
- </p><p>
- If you want to implement a rename operation in the user interface the
- edit name (gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
- initial value in the rename widget, and then the result after editing
- should be passed to
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">gio.File.set_dispay_name</a></code>().
- </p><p>
- On success the resulting converted filename is returned.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.set_display_name_async"><a name="method-giofile--set-display-name-async"></a><h3>gio.File.set_display_name_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_display_name_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display_name</code></em> :</span></p></td><td>a string conaining the name to display.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_display_name_async</code>() method asynchronously
- sets the display name for a given GFile.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">set_display_name</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-finish" title="gio.File.set_display_name_finish">gio.File.set_display_name_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.set_display_name_finish"><a name="method-giofile--set-display-name-finish"></a><h3>gio.File.set_display_name_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_display_name_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_display_name_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-async" title="gio.File.set_display_name_async">gio.File.set_display_name_async</a></code>().
- </p></div><div class="refsect2" title="gio.File.trash"><a name="method-giofile--trash"></a><h3>gio.File.trash</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">trash</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful trash, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">trash</code>() method sends file to the "Trashcan", if possible.
- This is similar to deleting it, but the user can recover it before emptying the trashcan.
- Not all file systems support trashing, so this call can return the gio.ERROR_NOT_SUPPORTED error.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p></div><div class="refsect2" title="gio.File.unmount_mountable"><a name="method-giofile--unmount-mountable"></a><h3>gio.File.unmount_mountable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">unmount_mountable</code>() method unmounts a file of type gio.FILE_TYPE_MOUNTABLE.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable-finish" title="gio.File.unmount_mountable_finish">gio.File.unmount_mountable_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.File.unmount_mountable_finish"><a name="method-giofile--unmount-mountable-finish"></a><h3>gio.File.unmount_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation finished successfully,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">unmount_mountable_finish</code>() method finishes an asynchronous
- copy operation started with
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">gio.File.unmount_mountable</a></code>().
- </p></div></div><div class="refsect1" title="Functions"><a name="id439674"></a><h2>Functions</h2><div class="refsect2" title="gio.file_parse_name"><a name="function-gio--file-parse-name"></a><h3>gio.file_parse_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">file_parse_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parse_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>parse_name</code></em> :</span></p></td><td>a file name or path to be parsed.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">parse_name</code>() function constructs a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- with the given parse_name (i.e. something given by g_file_get_parse_name()).
- This operation never fails, but the returned object might not support any I/O
- operation if the parse_name cannot be parsed.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioemblemedicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileattributeinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.EmblemedIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileAttributeInfo</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileattributeinfo.html b/docs/html/class-giofileattributeinfo.html
deleted file mode 100644
index 8e69c3a..0000000
--- a/docs/html/class-giofileattributeinfo.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileAttributeInfo</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofile.html" title="gio.File"><link rel="next" href="class-giofileenumerator.html" title="gio.FileEnumerator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileAttributeInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofile.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileenumerator.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileAttributeInfo"><a name="class-giofileattributeinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileAttributeInfo</h2><p>gio.FileAttributeInfo — Information about a specific attribute.</p></div><div class="refsect1" title="Synopsis"><a name="id359184"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileAttributeInfo</span></span>(<span class="ooclass"><span class="classname">__builtin__.object</span></span>):
-</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id464225"></a><h2>Ancestry</h2><pre class="synopsis">+-- __builtin__.object
- +-- <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo">gio.FileAttributeInfo</a>
-</pre></div><div class="refsect1" title="Description"><a name="id464245"></a><h2>Description</h2><p>
- The <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
- contains information about a specific attribute.
- </p></div><div class="refsect1" title="gio.FileAttributeInfo Attributes"><a name="attributes-giofileattributeinfo"></a><h2>gio.FileAttributeInfo Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"name"</td><td valign="top">Read</td><td valign="top">The name of the attribute.</td></tr><tr valign="top"><td valign="top">"type"</td><td valign="top">Read</td><td valign="top">the
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- type of the attribute.</td></tr><tr valign="top"><td valign="top">"flags"</td><td valign="top">Read</td><td valign="top">a set of
- <a class="xref" href="gio-constants.html#gio-file-attribute-flags-constants" title="Gio File Attribute Flags Constants">Gio File Attribute Flags Constants</a>.
- </td></tr></tbody></table></div></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofile.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileenumerator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.File </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileEnumerator</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileenumerator.html b/docs/html/class-giofileenumerator.html
deleted file mode 100644
index d50118e..0000000
--- a/docs/html/class-giofileenumerator.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileEnumerator</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><link rel="next" href="class-giofileicon.html" title="gio.FileIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileEnumerator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileattributeinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileEnumerator"><a name="class-giofileenumerator"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileEnumerator</h2><p>gio.FileEnumerator — Enumerated Files Routines.</p></div><div class="refsect1" title="Synopsis"><a name="id434308"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileEnumerator</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close" title="gio.FileEnumerator.close">close</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">close_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-finish" title="gio.FileEnumerator.close_finish">close_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--get-container" title="gio.FileEnumerator.get_container">get_container</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--has-pending" title="gio.FileEnumerator.has_pending">has_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--is-closed" title="gio.FileEnumerator.is_closed">is_closed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-file" title="gio.FileEnumerator.next_file">next_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">next_files_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-finish" title="gio.FileEnumerator.next_files_finish">next_files_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--set-pending" title="gio.FileEnumerator.set_pending">set_pending</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pending</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id366700"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator">gio.FileEnumerator</a>
-</pre></div><div class="refsect1" title="gio.FileEnumerator Properties"><a name="properties-giofileenumerator"></a><h2>gio.FileEnumerator Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"container"</td><td valign="top">Write - Construct only</td><td valign="top">The container that is being enumerated.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id415898"></a><h2>Description</h2><p>
- The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- allows you to operate on a set of
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
- returning a
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- structure for each file enumerated (e.g.
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">gio.File.enumerate_children</a></code>()
- will return a The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- for each of the children within a directory).
- </p><p>
- To get the next file's information from a
- The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a> use
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-file" title="gio.FileEnumerator.next_file">gio.FileEnumerator.next_file</a></code>()
- or its asynchronous version,
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">gio.FileEnumerator.next_files_async</a></code>().
- Note that the asynchronous version will return a list of
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>s,
- whereas the synchronous will only return the next file in the enumerator.
- </p><p>
- To close a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- use <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close" title="gio.FileEnumerator.close">close</a></code>,
- or its asynchronous version,
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">close_async</a></code>.
- Once a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
- is closed, no further actions may be performed on it.
- </p></div><div class="refsect1" title="Methods"><a name="id491846"></a><h2>Methods</h2><div class="refsect2" title="gio.FileEnumerator.close"><a name="method-giofileenumerator--close"></a><h3>gio.FileEnumerator.close</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success or
- <code class="literal">False</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">close</code>() method releases all resources used by this
- enumerator, making the
- <a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
- return gio.ERROR_CLOSED on all calls.
- </p><p>
- This will be automatically called when the last reference is dropped,
- but you might want to call this function to make sure resources are released
- as early as possible.
- </p></div><div class="refsect2" title="gio.FileEnumerator.close_async"><a name="method-giofileenumerator--close-async"></a><h3>gio.FileEnumerator.close_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>io_priority</code></strong> :</span></p></td><td>The
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a> of the request.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">close_async</code>() method asynchronously closes the file enumerator.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned in
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-finish" title="gio.FileEnumerator.close_finish">gio.FileEnumerator.close_finish</a></code>().
- </p></div><div class="refsect2" title="gio.FileEnumerator.close_finish"><a name="method-giofileenumerator--close-finish"></a><h3>gio.FileEnumerator.close_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a GAsyncResult.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the close operation
- has finished successfully.</td></tr></tbody></table><p>
- The <code class="methodname">close_finish</code>() method finishes closing a file enumerator, started from
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">gio.FileEnumerator.close_async</a></code>().
- </p><p>
- If the file enumerator was already closed when
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">gio.FileEnumerator.close_async</a></code>()
- was called, then this function will report gio.ERROR_CLOSED in error, and return <code class="literal">False</code>.
- If the file enumerator had pending operation when the close operation was started, then this function will report
- gio.ERROR_PENDING, and return <code class="literal">False</code>. If cancellable was not <code class="literal">None</code>, then the operation
- may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be set, and <code class="literal">False</code> will be returned.
- </p></div><div class="refsect2" title="gio.FileEnumerator.get_container"><a name="method-giofileenumerator--get-container"></a><h3>gio.FileEnumerator.get_container</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_container</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- which is being enumerated. </td></tr></tbody></table><p>
- The <code class="methodname">get_container</code>() method gets the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- container which is being enumerated.
- </p></div><div class="refsect2" title="gio.FileEnumerator.has_pending"><a name="method-giofileenumerator--has-pending"></a><h3>gio.FileEnumerator.has_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the enumerator has pending operations.</td></tr></tbody></table><p>
- The <code class="methodname">has_pending</code>() method checks if the file enumerator has pending operations.
- </p></div><div class="refsect2" title="gio.FileEnumerator.is_closed"><a name="method-giofileenumerator--is-closed"></a><h3>gio.FileEnumerator.is_closed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_closed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the enumerator is closed.</td></tr></tbody></table><p>
- The <code class="methodname">is_closed</code>() method checks if the file enumerator has been closed.
- </p></div><div class="refsect2" title="gio.FileEnumerator.next_file"><a name="method-giofileenumerator--next-file"></a><h3>gio.FileEnumerator.next_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- or <code class="literal">None</code> on error or end of enumerator.
- </td></tr></tbody></table><p>
- The <code class="methodname">next_file</code>() method returns information for the next
- file in the enumerated object. Will block until the information is available.
- The <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- returned from this function will contain attributes that match the attribute string
- that was passed when the GFileEnumerator was created.
- </p><p>
- On error, returns <code class="literal">None</code> and sets error to the error. If the enumerator
- is at the end, <code class="literal">None</code> will be returned and error will be unset.
- </p></div><div class="refsect2" title="gio.FileEnumerator.next_files_async"><a name="method-giofileenumerator--next-files-async"></a><h3>gio.FileEnumerator.next_files_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_files_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>num_files</code></strong> :</span></p></td><td>The number of file info objects to request.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>io_priority</code></strong> :</span></p></td><td>The
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a> of the request.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">next_files_async</code>() method requests information for a number
- of files from the enumerator asynchronously. When all i/o for the operation is finished
- the callback will be called with the requested information.
- </p><p>
- The callback can be called with less than num_files files in case of error or at the
- end of the enumerator. In case of a partial error the callback will be called with any
- succeeding items and no error, and on the next request the error will be reported. If a
- request is cancelled the callback will be called with gio.ERROR_CANCELLED.
- </p><p>
- During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors.
- </p><p>
- Any outstanding i/o request with higher priority (lower numerical value) will be executed
- before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
- </p></div><div class="refsect2" title="gio.FileEnumerator.next_files_finish"><a name="method-giofileenumerator--next-files-finish"></a><h3>gio.FileEnumerator.next_files_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">next_files_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a GAsyncResult.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>s.
- </td></tr></tbody></table><p>
- The <code class="methodname">next_files_finish</code>() method finishes the
- asynchronous operation started with
- <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">gio.FileEnumerator.next_files_async</a></code>().
- </p></div><div class="refsect2" title="gio.FileEnumerator.set_pending"><a name="method-giofileenumerator--set-pending"></a><h3>gio.FileEnumerator.set_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_pending</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pending</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pending</code></strong> :</span></p></td><td>A boolean value.
- </td></tr></tbody></table><p>
- The <code class="methodname">push_current</code>() method sets the file enumerator as having pending operations.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileattributeinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileAttributeInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileicon.html b/docs/html/class-giofileicon.html
deleted file mode 100644
index 72c0dba..0000000
--- a/docs/html/class-giofileicon.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileenumerator.html" title="gio.FileEnumerator"><link rel="next" href="class-giofileinfo.html" title="gio.FileInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileenumerator.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileinfo.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileIcon"><a name="class-giofileicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileIcon</h2><p>gio.FileIcon — Icons pointing to an image file.</p></div><div class="refsect1" title="Synopsis"><a name="id498860"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon">gio.LoadableIcon</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giofileicon.html#constructor-giofileicon" title="Constructor">gio.FileIcon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileicon.html#method-giofileicon--get-file" title="gio.FileIcon.get_file">get_file</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id498952"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giofileicon.html" title="gio.FileIcon">gio.FileIcon</a>
-</pre></div><div class="refsect1" title="Description"><a name="id498977"></a><h2>Description</h2><p>
- The <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
- specifies an icon by pointing to an image file to be used as icon.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofileicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.FileIcon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td><td>a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
- for the given file, or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- Creates a new icon for a file.
- </p></div><div class="refsect1" title="Methods"><a name="id499092"></a><h2>Methods</h2><div class="refsect2" title="gio.FileIcon.get_file"><a name="method-giofileicon--get-file"></a><h3>gio.FileIcon.get_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_file</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- or <code class="literal">None</code>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_file</code>() method gets the
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- associated with the given icon.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileenumerator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileEnumerator </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileInfo</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileinfo.html b/docs/html/class-giofileinfo.html
deleted file mode 100644
index d82427c..0000000
--- a/docs/html/class-giofileinfo.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileInfo</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileicon.html" title="gio.FileIcon"><link rel="next" href="class-giofileinputstream.html" title="gio.FileInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileInfo"><a name="class-giofileinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileInfo</h2><p>gio.FileInfo — File Information and Attributes</p></div><div class="refsect1" title="Synopsis"><a name="id499198"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileInfo</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giofileinfo.html#constructor-giofileinfo" title="Constructor">gio.FileInfo</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--clear-status">clear_status</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--copy-into">copy_into</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--dup">dup</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-as-string">get_attribute_as_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-boolean">get_attribute_boolean</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-byte-string">get_attribute_byte_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-data">get_attribute_data</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-int32">get_attribute_int32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-int64">get_attribute_int64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-object">get_attribute_object</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-status">get_attribute_status</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-string">get_attribute_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-type">get_attribute_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-uint32">get_attribute_uint32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-uint64">get_attribute_uint64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-content-type">get_content_type</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-display-name">get_display_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-edit-name">get_edit_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-etag">get_etag</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-file-type">get_file_type</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-icon">get_icon</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-backup">get_is_backup</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-hidden">get_is_hidden</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-symlink">get_is_symlink</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-modification-time">get_modification_time</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-name">get_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-size">get_size</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-sort-order">get_sort_order</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-symlink-target">get_symlink_target</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--has-attribute">has_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--list-attributes">list_attributes</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name_space</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--remove-attribute">remove_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute">set_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-boolean">set_attribute_boolean</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-byte-string">set_attribute_byte_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-data">set_attribute_data</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int32">set_attribute_int32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int64">set_attribute_int64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int64">set_attribute_mask</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-object">set_attribute_object</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-status">set_attribute_status</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-string">set_attribute_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-uint32">set_attribute_uint32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-uint64">set_attribute_uint64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-content-type">set_content_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-display-name">set_display_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-edit-name">set_edit_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>edit_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-file-type">set_file_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-icon">set_icon</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-is-hidden">set_is_hidden</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_hidden</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-is-symlink">set_is_symlink</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_symlink</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-modification-time">set_modification_time</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mtime</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-name">set_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-size">set_size</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-sort-order">set_sort_order</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sort_order</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-symlink-tarset">set_symlink_tarset</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_target</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--unset-attribute-mask">unset_attribute_mask</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id511611"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo">gio.FileInfo</a>
-</pre></div><div class="refsect1" title="Description"><a name="id511633"></a><h2>Description</h2><p>
- Functionality for manipulating basic metadata for files.
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- implements methods for getting information that all files should contain,
- and allows for manipulation of extended attributes.
- </p><p>
- See <PYGTKDOCLINK HREF="class-giofileattribute"><code class="classname">gio.FileAttribute</code></PYGTKDOCLINK>
- for more information on how GIO handles file attributes.
- </p><p>
- To obtain a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- for a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, use
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
- (or its async variant). To obtain a
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- for a file input or output stream, use
- <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>() or
- <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">gio.FileOutputStream.query_info</a></code>()
- (or their async variants).
- </p><p>
- To change the actual attributes of a file, you should then set the attribute in the
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a> and call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">gio.File.set_attributes_from_info</a></code>() or
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">gio.File.set_attributes_async</a></code>()
- on a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </p><p>
- However, not all attributes can be changed in the file. For instance, the
- actual size of a file cannot be changed via
- <code class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-size">gio.FileInfo.set_size</PYGTKDOCLINK></code>(). You may call
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-settable-attributes" title="gio.File.query_settable_attributes">gio.File.query_settable_attributes</a></code>() and
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-writable-namespace" title="gio.File.query_writable_namespace">gio.File.query_writable_namespace</a></code>()
- to discover the settable attributes of a particular file at runtime.
- </p><p>
- <PYGTKDOCLINK HREF="class-giofileattributematcher"><code class="classname">gio.FileAttributeMatcher</code></PYGTKDOCLINK>
- allows for searching through a GFileInfo for attributes.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofileinfo"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.FileInfo</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
- </p></div><div class="refsect1" title="Methods"><a name="id511822"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileinputstream.html b/docs/html/class-giofileinputstream.html
deleted file mode 100644
index a4aedc7..0000000
--- a/docs/html/class-giofileinputstream.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileinfo.html" title="gio.FileInfo"><link rel="next" href="class-giofilemonitor.html" title="gio.FileMonitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilemonitor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileInputStream"><a name="class-giofileinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileInputStream</h2><p>gio.FileInputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id511851"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-finish" title="gio.FileInputStream.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id512018"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
- +-- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream">gio.FileInputStream</a>
-</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id512045"></a><h2>Implemented Interfaces</h2><p>
- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- implements
- <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id512067"></a><h2>Description</h2><p>
- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- provides input streams that take their content from a file.
- </p><p>
- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- implements <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>,
- which allows the input stream to jump to arbitrary positions in the file, provided the filesystem
- of the file allows it. In addition to the generic g_seekable_ API,
- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
- has its own API for seeking and positioning. To find the position of a file input stream, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">gio.Seekable.tell</a></code>().
- To find out if a file input stream supports seeking, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">gio.Seekable.can_seek</a></code>().
- To position a file input stream, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">gio.Seekable.seek</a></code>().
- </p></div><div class="refsect1" title="Methods"><a name="id512126"></a><h2>Methods</h2><div class="refsect2" title="gio.FileInputStream.query_info"><a name="method-giofileinputstream--query-info"></a><h3>gio.FileInputStream.query_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info</code>() method queries a file input stream
- the given attributes. This function blocks while querying the stream.
- For the asynchronous (non-blocking) version of this function, see
- <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">gio.FileInputStream.query_info_async</a></code>().
- While the stream is blocked, the stream will set the pending flag internally,
- and any other operations on the stream will fail with gio.ERROR_PENDING.
- </p></div><div class="refsect2" title="gio.FileInputStream.query_info_async"><a name="method-giofileinputstream--query-info-async"></a><h3>gio.FileInputStream.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info_async</code>() method queries the stream
- information asynchronously. When the operation is finished callback will be
- called. You can then call
- <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-finish" title="gio.FileInputStream.query_info_finish">gio.FileInputStream.query_info_finish</a></code>()
- to get the result of the operation.
- </p><p>
- For the synchronous version of this function, see
- <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </p></div><div class="refsect2" title="gio.FileInputStream.query_info_finish"><a name="method-giofileinputstream--query-info-finish"></a><h3>gio.FileInputStream.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">gio.FileInputStream.query_info_async</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilemonitor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileMonitor</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilemonitor.html b/docs/html/class-giofilemonitor.html
deleted file mode 100644
index 187d822..0000000
--- a/docs/html/class-giofilemonitor.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileMonitor</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileinputstream.html" title="gio.FileInputStream"><link rel="next" href="class-giofileoutputstream.html" title="gio.FileOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileMonitor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileMonitor"><a name="class-giofilemonitor"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileMonitor</h2><p>gio.FileMonitor — File Monitor</p></div><div class="refsect1" title="Synopsis"><a name="id512602"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileMonitor</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--cancel">cancel</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--emit-event">emit_event</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>other_file</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--is-cancelled">is_cancelled</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--set-rate-limit">set_rate_limit</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit_msecs</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id512734"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor">gio.FileMonitor</a>
-</pre></div><div class="refsect1" title="gio.FileMonitor Properties"><a name="properties-giofilemonitor"></a><h2>gio.FileMonitor Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"cancelled"</td><td valign="top">Read</td><td valign="top">
- Whether the monitor has been cancelled. Default value: <code class="literal">False</code>.
- </td></tr><tr valign="top"><td valign="top">"rate-limit"</td><td valign="top">Read/Write</td><td valign="top">
- The limit of the monitor to watch for changes, in milliseconds.
- Allowed values: &gt;= 0. Default value: 800.
- </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gio.FileMonitor Signal Prototypes"><a name="signal-prototypes-giofilemonitor"></a><h2>gio.FileMonitor Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><PYGTKDOCLINK HREF="signal-giofilemonitor--aborted">"changed"</PYGTKDOCLINK></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filemonitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>file</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>other_file</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id512941"></a><h2>Description</h2><p>
- The <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
- monitors a file or directory for changes.
- </p><p>
- To obtain a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
- for a file or directory, use
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor" title="gio.File.monitor">gio.FileMonitor.monitor</a></code>(),
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-file" title="gio.File.monitor_file">gio.FileMonitor.monitor_file</a></code>(), or
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-directory" title="gio.File.monitor_directory">gio.FileMonitor.monitor_directory</a></code>().
- </p><p>
- To get informed about changes to the file or directory you are monitoring,
- connect to the "changed" signal.
- </p></div><div class="refsect1" title="Methods"><a name="id512990"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileoutputstream.html b/docs/html/class-giofileoutputstream.html
deleted file mode 100644
index f69c100..0000000
--- a/docs/html/class-giofileoutputstream.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilemonitor.html" title="gio.FileMonitor"><link rel="next" href="class-giofilterinputstream.html" title="gio.FilterInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilemonitor.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilterinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileOutputStream"><a name="class-giofileoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileOutputStream</h2><p>gio.FileOutputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id513019"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--get-etag" title="gio.FileOutputStream.get_etag">get_etag</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish" title="gio.FileOutputStream.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id513203"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
- +-- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream">gio.FileOutputStream</a>
-</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id513230"></a><h2>Implemented Interfaces</h2><p>
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- implements
- <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id513252"></a><h2>Description</h2><p>
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- provides output streams that write their content to a file.
- </p><p>
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- implements <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>,
- which allows the output stream to jump to arbitrary positions in the file and to truncate
- the file, provided the filesystem of the file supports these operations. In addition to the
- generic gio.Seekable. API,
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
- has its own API for seeking and positioning. To find the position of a file output stream, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">gio.Seekable.tell</a></code>().
- To find out if a file output stream supports seeking, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">gio.Seekable.can_seek</a></code>().
- To position a file output stream, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">gio.Seekable.seek</a></code>().
- To find out if a file output stream supports truncating, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_truncate" title="gio.Seekable.can_truncate">gio.FileOutputStream.can_truncate</a></code>().
- To truncate a file output stream, use
- <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate">gio.Seekable.truncate</a></code>().
- </p></div><div class="refsect1" title="Methods"><a name="id513326"></a><h2>Methods</h2><div class="refsect2" title="gio.FileOutputStream.get_etag"><a name="method-giofileoutputstream--get-etag"></a><h3>gio.FileOutputStream.get_etag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_etag</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the entity tag for the stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_etag</code>() method gets the entity tag
- for the file when it has been written. This must be called after the
- stream has been written and closed, as the etag can change while writing.
- </p></div><div class="refsect2" title="gio.FileOutputStream.query_info"><a name="method-giofileoutputstream--query-info"></a><h3>gio.FileOutputStream.query_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info</code>() method queries a file input stream
- the given attributes. This function blocks while querying the stream.
- For the asynchronous (non-blocking) version of this function, see
- <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">gio.FileOutputStream.query_info_async</a></code>().
- While the stream is blocked, the stream will set the pending flag internally,
- and any other operations on the stream will fail with gio.ERROR_PENDING.
- </p><p>
- Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED),
- the stream has pending operations (with error being set to gio.ERROR_PENDING), or
- if querying info is not supported for the stream's interface (with error being set to
- gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be set, and <code class="literal">None</code> will be returned.
- </p></div><div class="refsect2" title="gio.FileOutputStream.query_info_async"><a name="method-giofileoutputstream--query-info-async"></a><h3>gio.FileOutputStream.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info_async</code>() method queries the stream
- information asynchronously. When the operation is finished callback will be
- called. You can then call
- <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish" title="gio.FileOutputStream.query_info_finish">gio.FileOutputStream.query_info_finish</a></code>()
- to get the result of the operation.
- </p><p>
- For the synchronous version of this function, see
- <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">gio.FileOutputStream.query_info</a></code>().
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </p></div><div class="refsect2" title="gio.FileOutputStream.query_info_finish"><a name="method-giofileoutputstream--query-info-finish"></a><h3>gio.FileOutputStream.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
- or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">gio.FileOutputStream.query_info_async</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilemonitor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilterinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FilterInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilterinputstream.html b/docs/html/class-giofilterinputstream.html
deleted file mode 100644
index 0cfcee6..0000000
--- a/docs/html/class-giofilterinputstream.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FilterInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><link rel="next" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FilterInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilteroutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FilterInputStream"><a name="class-giofilterinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FilterInputStream</h2><p>gio.FilterInputStream — Filter Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id513874"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FilterInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream" title="gio.FilterInputStream.get_base_stream">get_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream" title="gio.FilterInputStream.get_close_base_stream">get_close_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream" title="gio.FilterInputStream.set_close_base_stream">set_close_base_stream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id513958"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
- +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
-</pre></div><div class="refsect1" title="gio.FilterInputStream Properties"><a name="properties-giofilterinputstream"></a><h2>gio.FilterInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The underlying base stream on which the io ops will be done.</td></tr><tr valign="top"><td valign="top">"close-base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">If the base stream should be closed when the filter stream is closed.
- Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id514069"></a><h2>Description</h2><p>
- Filter Input Stream.
- </p></div><div class="refsect1" title="Methods"><a name="id514078"></a><h2>Methods</h2><div class="refsect2" title="gio.FilterInputStream.get_base_stream"><a name="method-giofilterinputstream--get-base-stream"></a><h3>gio.FilterInputStream.get_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- </td></tr></tbody></table><p>
- The <code class="methodname">get_base_stream</code>() method gets the base
- stream for the filter stream.
- </p></div><div class="refsect2" title="gio.FilterInputStream.get_close_base_stream"><a name="method-giofilterinputstream--get-close-base-stream"></a><h3>gio.FilterInputStream.get_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the base stream
- will be closed.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_close_base_stream</code>() method returns
- whether the base stream will be closed when stream is closed.
- </p></div><div class="refsect2" title="gio.FilterInputStream.set_close_base_stream"><a name="method-giofilterinputstream--set-close-base-stream"></a><h3>gio.FilterInputStream.set_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_base_stream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_base</code></strong> :</span></p></td><td><code class="literal">True</code> to close the base stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_close_base_stream</code>() method sets whether
- the base stream will be closed when stream is closed.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilteroutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FilterOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilteroutputstream.html b/docs/html/class-giofilteroutputstream.html
deleted file mode 100644
index e8781a5..0000000
--- a/docs/html/class-giofilteroutputstream.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FilterOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilterinputstream.html" title="gio.FilterInputStream"><link rel="next" href="class-gioicon.html" title="gio.Icon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FilterOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilterinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FilterOutputStream"><a name="class-giofilteroutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FilterOutputStream</h2><p>gio.FilterOutputStream — Filter Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id514276"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FilterOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream" title="gio.FilterOutputStream.get_base_stream">get_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream" title="gio.FilterOutputStream.get_close_base_stream">get_close_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream" title="gio.FilterOutputStream.set_close_base_stream">set_close_base_stream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id514360"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
- +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
-</pre></div><div class="refsect1" title="gio.FilterOutputStream Properties"><a name="properties-giofilteroutputstream"></a><h2>gio.FilterOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The underlying base stream on which the io ops will be done.</td></tr><tr valign="top"><td valign="top">"close-base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">If the base stream should be closed when the filter stream is closed.
- Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id514470"></a><h2>Description</h2><p>
- Filter Output Stream.
- </p></div><div class="refsect1" title="Methods"><a name="id514480"></a><h2>Methods</h2><div class="refsect2" title="gio.FilterOutputStream.get_base_stream"><a name="method-giofilteroutputstream--get-base-stream"></a><h3>gio.FilterOutputStream.get_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
- </td></tr></tbody></table><p>
- The <code class="methodname">get_base_stream</code>() method gets the base
- stream for the filter stream.
- </p></div><div class="refsect2" title="gio.FilterOutputStream.get_close_base_stream"><a name="method-giofilteroutputstream--get-close-base-stream"></a><h3>gio.FilterOutputStream.get_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the base stream
- will be closed.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_close_base_stream</code>() method returns
- whether the base stream will be closed when stream is closed.
- </p></div><div class="refsect2" title="gio.FilterOutputStream.set_close_base_stream"><a name="method-giofilteroutputstream--set-close-base-stream"></a><h3>gio.FilterOutputStream.set_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_base_stream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_base</code></strong> :</span></p></td><td><code class="literal">True</code> to close the base stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_close_base_stream</code>() method sets whether
- the base stream will be closed when stream is closed.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilterinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FilterInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Icon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioicon.html b/docs/html/class-gioicon.html
deleted file mode 100644
index 4a15c7e..0000000
--- a/docs/html/class-gioicon.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Icon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"><link rel="next" href="class-gioinputstream.html" title="gio.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Icon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilteroutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Icon"><a name="class-gioicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Icon</h2><p>gio.Icon — Interface for icons.</p></div><div class="refsect1" title="Synopsis"><a name="id514677"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Icon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--equal" title="gio.Icon.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">to_string</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id514771"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a>
-</pre></div><div class="refsect1" title="Known Derived Interfaces"><a name="id514793"></a><h2>Known Derived Interfaces</h2><p>
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> is required by
- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>.
- </p></div><div class="refsect1" title="Known Implementation"><a name="id514815"></a><h2>Known Implementation</h2><p>
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> is implemented by
- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>,
- <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>,
- <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>,
- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
- </p></div><div class="refsect1" title="Description"><a name="id514856"></a><h2>Description</h2><p>
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- is a very minimal interface for icons. It provides functions for checking
- the equality of two icons, hashing of icons and serializing an icon to and from strings.
- </p><p>
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- does not provide the actual pixmap for the icon as this is out of GIO's
- scope, however implementations of
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- may contain the name of an icon (see
- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>),
- or the path to an icon (see
- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>).
- </p><p>
- To check if two GIcons are equal, see
- <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--equal" title="gio.Icon.equal">gio.Icon.equal</a></code>().
- </p><p>
- For serializing a <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>,
- use <code class="methodname"><PYGTKDOCLINK HREF="method-gioicon-%20-to-string">gio.Icon.to_string</PYGTKDOCLINK></code>() and
- <code class="methodname"><PYGTKDOCLINK HREF="method-gioicon-%20-new-from-string">gio.Icon.new_from_string</PYGTKDOCLINK></code>().
- </p><p>
- If your application or library provides one or more
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- implementations you need to ensure that each GType is registered
- with the type system prior to calling
- <code class="methodname"><PYGTKDOCLINK HREF="function-gioicon--new-from-string">gio.icon_new_from_string</PYGTKDOCLINK></code>().
- </p></div><div class="refsect1" title="Methods"><a name="id514956"></a><h2>Methods</h2><div class="refsect2" title="gio.Icon.equal"><a name="method-gioicon--equal"></a><h3>gio.Icon.equal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon2</code></em> :</span></p></td><td>the second
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- </td></tr></tbody></table><p>
- The <code class="methodname">equal</code>() method checks if two icons are equal.
- </p></div><div class="refsect2" title="gio.Icon.to_string"><a name="method-gioicon--to-string"></a><h3>gio.Icon.to_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">to_string</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>An UTF8 string or <code class="literal">None</code>
- if icon can't be serialized.
- </td></tr></tbody></table><p>
- The <code class="methodname">to_string</code>() method generates a textual
- representation of icon that can be used for serialization such as when
- passing icon to a different process or saving it to persistent storage. Use
- <code class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></code>()
- to get icon back from the returned string.
- </p><p>
- The encoding of the returned string is proprietary to GIcon except in the following two cases
- </p><p>
- If icon is a <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>,
- the returned string is a native path (such as /path/to/my icon.png) without escaping
- if the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
- for icon is a native file. If the file is not native, the returned string is the result of
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>()
- (such as sftp://path/to/my%20icon.png).
- </p><p>
- If icon is a <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
- with exactly one name, the encoding is simply the name (such as network-server).
- </p></div></div><div class="refsect1" title="Functions"><a name="id515125"></a><h2>Functions</h2><div class="refsect2" title="gio.icon_new_from_string"><a name="function-gio--icon-new-from-string"></a><h3>gio.icon_new_from_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">icon_new_from_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td><td>A string obtained via
- <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">gio.Icon.to_string</a></code>().
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>An object implementing the
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- interface or <code class="literal">None</code> if error is set.
- </td></tr></tbody></table><p>
- The <code class="methodname">icon_new_from_string</code>() function generate a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- instance from str. This function can fail if str is not valid - see
- <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">gio.Icon.to_string</a></code>()
- for discussion.
- </p><p>
- If your application or library provides one or more GIcon implementations you need
- to ensure that each GType is registered with the type system prior to calling
- <code class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilteroutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FilterOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.InputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioinputstream.html b/docs/html/class-gioinputstream.html
deleted file mode 100644
index 7a4ee27..0000000
--- a/docs/html/class-gioinputstream.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.InputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioicon.html" title="gio.Icon"><link rel="next" href="class-gioloadableicon.html" title="gio.LoadableIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.InputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioloadableicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.InputStream"><a name="class-gioinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.InputStream</h2><p>gio.InputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id515261"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.InputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--clear-pending" title="gio.InputStream.clear_pending">clear_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">close</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-async" title="gio.InputStream.close_async">close_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-finish" title="gio.InputStream.close_finish">close_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--has-pending" title="gio.InputStream.has_pending">has_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--is-closed" title="gio.InputStream.is_closed">is_closed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">read</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-async" title="gio.InputStream.read_async">read_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-finish" title="gio.InputStream.read_finish">read_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-part" title="gio.InputStream.read_part">read_part</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--set-pending" title="gio.InputStream.set_pending">set_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">skip</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-async" title="gio.InputStream.skip_async">skip_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-finish" title="gio.InputStream.skip_finish">skip_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id515798"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
-</pre></div><div class="refsect1" title="Description"><a name="id515820"></a><h2>Description</h2><p>
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- has functions to read from a stream (
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">gio.InputStream.read</a></code>()
- ), to close a stream (
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">gio.InputStream.close</a></code>()
- ) and to skip some content (
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">gio.InputStream.skip</a></code>()
- ).
- </p><p>
- To copy the content of an input stream to an output stream without manually
- handling the reads and writes, use
- <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--skip">gio.OutputStream.splice</PYGTKDOCLINK></code>().
- </p><p>
- All of these functions have async variants too.
- </p></div><div class="refsect1" title="Methods"><a name="id515868"></a><h2>Methods</h2><div class="refsect2" title="gio.InputStream.clear_pending"><a name="method-gioinputstream--clear-pending"></a><h3>gio.InputStream.clear_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">clear_pending</code>() method clears the pending flag on stream.
- </p></div><div class="refsect2" title="gio.InputStream.close"><a name="method-gioinputstream--close"></a><h3>gio.InputStream.close</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success
- <code class="literal">False</code> on failure.
- </td></tr></tbody></table><p>
- The <code class="methodname">close</code>() method closes the stream, releasing
- resources related to it.
- </p><p>
- Once the stream is closed, all other operations will return gio.ERROR_CLOSED.
- Closing a stream multiple times will not return an error.
- </p><p>
- Streams will be automatically closed when the last reference is dropped, but
- you might want to call this function to make sure resources are released as
- early as possible.
- </p><p>
- Some streams might keep the backing store of the stream (e.g. a file descriptor)
- open after the stream is closed. See the documentation for the individual
- stream for details.
- </p><p>
- On failure the first error that happened will be reported, but the close operation
- will finish as much as possible. A stream that failed to close will still return
- gio.ERROR_CLOSED for all operations. Still, it is important to check and report
- the error to the user.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </p></div><div class="refsect2" title="gio.InputStream.close_async"><a name="method-gioinputstream--close-async"></a><h3>gio.InputStream.close_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">close_async</code>() method asynchronously requests an
- asynchronous closes of the stream, releasing resources related to it.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">gio.InputStream.close</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-finish" title="gio.InputStream.close_finish">gio.InputStream.close_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.InputStream.close_finish"><a name="method-gioinputstream--close-finish"></a><h3>gio.InputStream.close_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">close_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream was closed successfully.
- </td></tr></tbody></table><p>
- The <code class="methodname">close_finish</code>() method finishes an asynchronous
- file append operation started with
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-async" title="gio.InputStream.close_async">gio.InputStream.close_async</a></code>().
- </p></div><div class="refsect2" title="gio.InputStream.has_pending"><a name="method-gioinputstream--has-pending"></a><h3>gio.InputStream.has_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if stream has pending actions.
- </td></tr></tbody></table><p>
- The <code class="methodname">has_pending</code>() method checks if an input stream has pending actions.
- </p></div><div class="refsect2" title="gio.InputStream.is_closed"><a name="method-gioinputstream--is-closed"></a><h3>gio.InputStream.is_closed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_closed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream is closed.
- </td></tr></tbody></table><p>
- The <code class="methodname">is_closed</code>() method checks if an input stream is closed.
- </p></div><div class="refsect2" title="gio.InputStream.read"><a name="method-gioinputstream--read"></a><h3>gio.InputStream.read</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>optionally the number of bytes that will be read from the stream.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read, or -1 on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read</code>() method tries to read count bytes from
- the stream into the buffer starting at buffer. Will block during this read.
- </p><p>
- This function is similar to
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-part" title="gio.InputStream.read_part">gio.InputStream.read_part</a></code>(),
- except it tries to read as many bytes as requested, only stopping on an error or end of stream.
- </p><p>
- On a successful read of count bytes, or if we reached the end of the stream,
- <code class="literal">True</code> is returned, and bytes_read is set to the number of bytes read into buffer.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </p><p>
- If there is an error during the operation <code class="literal">False</code> is returned and error
- is set to indicate the error status, bytes_read is updated to contain the number of
- bytes read into buffer before the error occurred.
- </p></div><div class="refsect2" title="gio.InputStream.read_async"><a name="method-gioinputstream--read-async"></a><h3>gio.InputStream.read_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td>the number of bytes that will be read from the stream.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_async</code>() method requests an asynchronous read
- of count bytes from the stream into the buffer.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">gio.InputStream.read</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-finish" title="gio.InputStream.read_finish">gio.InputStream.read_finish</a></code>()
- to get the result of the operation.
- </p><p>
- During an async request no other sync and async calls are allowed, and
- will result in gio.ERROR_PENDING errors.
- </p><p>
- A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </p><p>
- On success, the number of bytes read into the buffer will be passed to the callback.
- It is not an error if this is not the same as the requested size, as it can happen e.g.
- near the end of a file, but generally we try to read as many bytes as requested. Zero
- is returned on end of file (or if count is zero), but never otherwise.
- </p><p>
- Any outstanding i/o request with higher priority (lower numerical value) will be
- executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
- </p><p>
- The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so
- they are optional for inheriting classes. However, if you override one you must override all.
- </p></div><div class="refsect2" title="gio.InputStream.read_finish"><a name="method-gioinputstream--read-finish"></a><h3>gio.InputStream.read_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read in, or -1 on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_finish</code>() method finishes an asynchronous
- stream read operation started by
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-async" title="gio.InputStream.read_async">gio.InputStream.read_async</a></code>().
- </p></div><div class="refsect2" title="gio.InputStream.read_part"><a name="method-gioinputstream--read-part"></a><h3>gio.InputStream.read_part</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">read_part</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>optionally the number of bytes that will be read from the stream.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read, or -1 on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">read_part</code>() method tries to read count bytes from
- the stream into the buffer starting at buffer. Will block during this read.
- </p><p>
- If count is zero returns zero and does nothing. A value of count larger than
- G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </p><p>
- On success, the number of bytes read into the buffer is returned. It is
- not an error if this is not the same as the requested size, as it can
- happen e.g. near the end of a file. Zero is returned on end of file
- (or if count is zero), but never otherwise.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </p><p>
- On error -1 is returned and error is set accordingly.
- </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
- This method roughly corresponds to C GIO g_input_stream_read.
- </div></div><div class="refsect2" title="gio.InputStream.set_pending"><a name="method-gioinputstream--set-pending"></a><h3>gio.InputStream.set_pending</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if pending was previously
- unset and is now set.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_pending</code>() method sets stream to have actions pending.
- If the pending flag is already set or stream is closed,
- it will return <code class="literal">False</code> and set error.
- </p></div><div class="refsect2" title="gio.InputStream.skip"><a name="method-gioinputstream--skip"></a><h3>gio.InputStream.skip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be skipped from the stream.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes skipped, or -1 on error
- </td></tr></tbody></table><p>
- The <code class="methodname">skip</code>() method tries to skip count bytes
- from the stream. Will block during the operation.
- </p><p>
- This is identical to
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">read</a></code>(),
- from a behaviour standpoint, but the bytes that are skipped are not
- returned to the user. Some streams have an implementation that is more
- efficient than reading the data.
- </p><p>
- This function is optional for inherited classes, as the default implementation emulates it using read.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
- triggering the cancellable object from another thskip. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </p></div><div class="refsect2" title="gio.InputStream.skip_async"><a name="method-gioinputstream--skip-async"></a><h3>gio.InputStream.skip_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skip_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td>the number of bytes that will be skipped from the stream.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncskipyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
- <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
- of the request.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">skip_async</code>() method request an asynchronous
- skip of count bytes from the stream.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">gio.InputStream.skip</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-finish" title="gio.InputStream.skip_finish">gio.InputStream.skip_finish</a></code>()
- to get the result of the operation.
- </p><p>
- During an async request no other sync and async calls are allowed, and
- will result in gio.ERROR_PENDING errors.
- </p><p>
- A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </p><p>
- On success, the number of bytes skipped will be passed to the callback. It is
- not an error if this is not the same as the requested size, as it can happen
- e.g. near the end of a file, but generally we try to skip as many bytes as requested.
- Zero is returned on end of file (or if count is zero), but never otherwise.
- </p><p>
- Any outstanding i/o request with higher priority (lower numerical value) will be
- executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
- </p><p>
- The asyncronous methods have a default fallback that uses thskips to implement asynchronicity, so
- they are optional for inheriting classes. However, if you override one you must override all.
- </p></div><div class="refsect2" title="gio.InputStream.skip_finish"><a name="method-gioinputstream--skip-finish"></a><h3>gio.InputStream.skip_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skip_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes skipped in, or -1 on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">skip_finish</code>() method finishes an asynchronous
- stream skip operation started by
- <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-async" title="gio.InputStream.skip_async">gio.InputStream.skip_async</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioloadableicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Icon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.LoadableIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioloadableicon.html b/docs/html/class-gioloadableicon.html
deleted file mode 100644
index 8f84331..0000000
--- a/docs/html/class-gioloadableicon.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.LoadableIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioinputstream.html" title="gio.InputStream"><link rel="next" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.LoadableIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomemoryinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.LoadableIcon"><a name="class-gioloadableicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.LoadableIcon</h2><p>gio.LoadableIcon — Interface for icons.</p></div><div class="refsect1" title="Synopsis"><a name="id517587"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.LoadableIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load" title="gio.LoadableIcon.load">load</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">load_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-finish" title="gio.LoadableIcon.load_finish">load_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>res</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id517752"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon">gio.LoadableIcon</a>
-</pre></div><div class="refsect1" title="Prerequisites"><a name="id517774"></a><h2>Prerequisites</h2><p>
- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a> requires
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>. and
- <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
- </p></div><div class="refsect1" title="Known Implementation"><a name="id517803"></a><h2>Known Implementation</h2><p>
- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a> is implemented by
- <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id517825"></a><h2>Description</h2><p>
- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>
- extends the <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- interface and adds the ability to load icons from streams.
- </p></div><div class="refsect1" title="Methods"><a name="id517847"></a><h2>Methods</h2><div class="refsect2" title="gio.LoadableIcon.load"><a name="method-gioloadableicon--load"></a><h3>gio.LoadableIcon.load</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>an integer
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2 tuple containing a
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- to read the icon from and a string containing the icon type.
- </td></tr></tbody></table><p>
- The <code class="methodname">load</code>() method loads a loadable icon.
- For the asynchronous version of this function, see
- <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">gio.LoadableIcon.load_async</a></code>().
- </p></div><div class="refsect2" title="gio.LoadableIcon.load_async"><a name="method-gioloadableicon--load-async"></a><h3>gio.LoadableIcon.load_async</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>an integer
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">load_async</code>() method loads an icon asynchronously.
- </p><p>
- For more details, see
- <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load" title="gio.LoadableIcon.load">gio.LoadableIcon.load</a></code>()
- which is the synchronous version of this call.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-finish" title="gio.LoadableIcon.load_finish">gio.LoadableIcon.load_finish</a></code>()
- to get the result of the operation.
- </p></div><div class="refsect2" title="gio.LoadableIcon.load_finish"><a name="method-gioloadableicon--load-finish"></a><h3>gio.LoadableIcon.load_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td><td>a
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2 tuple containing a
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- to read the icon from and a string containing the icon type.
- </td></tr></tbody></table><p>
- The <code class="methodname">load_finish</code>() method finishes an asynchronous
- icon load started in
- <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">gio.LoadableIcon.load_async</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomemoryinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.InputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MemoryInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomemoryinputstream.html b/docs/html/class-giomemoryinputstream.html
deleted file mode 100644
index 5068dea..0000000
--- a/docs/html/class-giomemoryinputstream.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MemoryInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioloadableicon.html" title="gio.LoadableIcon"><link rel="next" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MemoryInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioloadableicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomemoryoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MemoryInputStream"><a name="class-giomemoryinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MemoryInputStream</h2><p>gio.MemoryInputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id518274"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MemoryInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#constructor-giomemoryinputstream" title="Constructor">gio.MemoryInputStream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#method-giomemoryinputstream--add-data" title="gio.MemoryInputStream.add_data">add_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data" title="gio.memory_input_stream_new_from_data">gio.memory_input_stream_new_from_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id518373"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
- +-- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream">gio.MemoryInputStream</a>
-</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id518400"></a><h2>Implemented Interfaces</h2><p>
- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
- implements
- <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id518423"></a><h2>Description</h2><p>
- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
- is a class for using arbitrary memory chunks as input for GIO streaming input operations.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomemoryinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.MemoryInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>.
- </td></tr></tbody></table><p>
- Creates an empty
- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>.
- </p></div><div class="refsect1" title="Methods"><a name="id518503"></a><h2>Methods</h2><div class="refsect2" title="gio.MemoryInputStream.add_data"><a name="method-giomemoryinputstream--add-data"></a><h3>gio.MemoryInputStream.add_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>input data.
- </td></tr></tbody></table><p>
- The <code class="methodname">add_data</code>() method appends data to data
- that can be read from the input stream
- </p></div></div><div class="refsect1" title="Functions"><a name="id518569"></a><h2>Functions</h2><div class="refsect2" title="gio.memory_input_stream_new_from_data"><a name="function-gio--memory-input-stream-new-from-data"></a><h3>gio.memory_input_stream_new_from_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">memory_input_stream_new_from_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>input data.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
- read from data
- </td></tr></tbody></table><p>
- The <code class="methodname">memory_input_stream_new_from_data</code>() function creates
- a new <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
- with data in memory.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioloadableicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomemoryoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.LoadableIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MemoryOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomemoryoutputstream.html b/docs/html/class-giomemoryoutputstream.html
deleted file mode 100644
index 115bba7..0000000
--- a/docs/html/class-giomemoryoutputstream.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MemoryOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><link rel="next" href="class-giomount.html" title="gio.Mount"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MemoryOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomemoryinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomount.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MemoryOutputStream"><a name="class-giomemoryoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MemoryOutputStream</h2><p>gio.MemoryOutputStream — Streaming output operations on memory chunks</p></div><div class="refsect1" title="Synopsis"><a name="id518676"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MemoryOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#constructor-giomemoryoutputstream" title="Constructor">gio.MemoryOutputStream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents" title="gio.MemoryOutputStream.get_contents">get_contents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size" title="gio.MemoryOutputStream.get_data_size">get_data_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size" title="gio.MemoryOutputStream.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id518772"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
- +-- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream">gio.MemoryOutputStream</a>
-</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id518799"></a><h2>Implemented Interfaces</h2><p>
- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>
- implements
- <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
- </p></div><div class="refsect1" title="Description"><a name="id518821"></a><h2>Description</h2><p>
- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>
- is a class for using arbitrary memory chunks as output for GIO streaming output operations.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomemoryoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.MemoryOutputStream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
- </td></tr></tbody></table><p>
- Creates a new
- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
- </p></div><div class="refsect1" title="Methods"><a name="id518896"></a><h2>Methods</h2><div class="refsect2" title="gio.MemoryOutputStream.get_contents"><a name="method-giomemoryoutputstream--get-contents"></a><h3>gio.MemoryOutputStream.get_contents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_contents</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's data
- </td></tr></tbody></table><p>
- The <code class="methodname">get_contents</code>() method gets any loaded data
- from the ostream.
- </p><p>
- Note that the returned data may become invalid on the next write or truncate
- operation on the stream.
- </p></div><div class="refsect2" title="gio.MemoryOutputStream.get_data_size"><a name="method-giomemoryoutputstream--get-data-size"></a><h3>gio.MemoryOutputStream.get_data_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_data_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes written to the stream
- </td></tr></tbody></table><p>
- The <code class="methodname">get_data_size</code>() method returns the number
- of bytes from the start up to including the last byte written in the
- stream that has not been truncated away.
- </p></div><div class="refsect2" title="gio.MemoryOutputStream.get_size"><a name="method-giomemoryoutputstream--get-size"></a><h3>gio.MemoryOutputStream.get_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes allocated for the data buffer
- </td></tr></tbody></table><p>
- The <code class="methodname">get_size</code>() method gets the size of the
- currently allocated data area (availible from
- <code class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents" title="gio.MemoryOutputStream.get_contents">gio.MemoryOutputStream.get_contents</a></code>()
- ).
- </p><p>
- Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
- </p><p>
- If you want the number of bytes currently written to the stream, use
- <code class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size" title="gio.MemoryOutputStream.get_data_size">gio.MemoryOutputStream.get_data_size</a></code>().
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomemoryinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomount.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MemoryInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Mount</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomount.html b/docs/html/class-giomount.html
deleted file mode 100644
index 574ebfd..0000000
--- a/docs/html/class-giomount.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Mount</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><link rel="next" href="class-giomountoperation.html" title="gio.MountOperation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Mount</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomemoryoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomountoperation.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Mount"><a name="class-giomount"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Mount</h2><p>gio.Mount — Mount management</p></div><div class="refsect1" title="Synopsis"><a name="id519095"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Mount</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--can-eject" title="gio.Mount.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--can-unmount" title="gio.Mount.can_unmount">can_unmount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject" title="gio.Mount.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject-finish" title="gio.Mount.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-drive" title="gio.Mount.get_drive">get_drive</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-icon" title="gio.Mount.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-name" title="gio.Mount.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-root" title="gio.Mount.get_root">get_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">get_uuid</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-volume" title="gio.Mount.get_volume">get_volume</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type" title="gio.Mount.guess_content_type">guess_content_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-finish" title="gio.Mount.guess_content_type_finish">guess_content_type_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-sync" title="gio.Mount.guess_content_type_sync">guess_content_type_sync</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">is_shadowed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount" title="gio.Mount.remount">remount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount-finish" title="gio.Mount.remount_finish">remount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--shadow" title="gio.Mount.shadow">shadow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount" title="gio.Mount.unmount">unmount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount-finish" title="gio.Mount.unmount_finish">unmount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unshadow" title="gio.Mount.unshadow">unshadow</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id519766"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-giomount.html" title="gio.Mount">gio.Mount</a>
-</pre></div><div class="refsect1" title="Prerequisites"><a name="id519788"></a><h2>Prerequisites</h2><p>
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> requires
- <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
- </p></div><div class="refsect1" title="gio.Mount Signal Prototypes"><a name="signal-prototypes-giomount"></a><h2>gio.Mount Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--aborted" title='The "aborted" gio.Mount Signal'>"aborted"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--changed" title='The "changed" gio.Mount Signal'>"changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--unmounted" title='The "unmounted" gio.Mount Signal'>"unmounted"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id519980"></a><h2>Description</h2><p>
- The <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- interface represents user-visible mounts. Note, when porting from GnomeVFS,
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- is the moral equivalent of GnomeVFSVolume.
-
- </p><p>
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- is a "mounted" filesystem that you can access. Mounted is in quotes because
- it's not the same as a unix mount, it might be a gvfs mount, but you can still
- access the files on it if you use GIO. Might or might not be related to a volume object.
- </p><p>
- Unmounting a GMount instance is an asynchronous operation. For more information
- about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount
- a <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> instance,
- first call
- g_mount_unmount()
- with (at least) the GMount instance and a GAsyncReadyCallback. The callback will
- be fired when the operation has resolved (either with success or failure), and a
- GAsyncReady structure will be passed to the callback. That callback should then call
- g_mount_unmount_finish()
- with the GMount and the GAsyncReady data to see if the operation was completed successfully.
- If an error is present when g_mount_unmount_finish() is called, then it will be filled
- with any error information.
- </p></div><div class="refsect1" title="Methods"><a name="id520032"></a><h2>Methods</h2><div class="refsect2" title="gio.Mount.can_eject"><a name="method-giomount--can-eject"></a><h3>gio.Mount.can_eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount can be ejected,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_eject</code>() method checks if a mount can be ejected.
- </p></div><div class="refsect2" title="gio.Mount.can_unmount"><a name="method-giomount--can-unmount"></a><h3>gio.Mount.can_unmount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_unmount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount can be unmounted,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_eject</code>() method checks if a mount can be unmounted.
- </p></div><div class="refsect2" title="gio.Mount.eject"><a name="method-giomount--eject"></a><h3>gio.Mount.eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
- <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject</code>() method asynchronously ejects a mount.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject-finish" title="gio.Mount.eject_finish">gio.Mount.eject_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Mount.eject_finish"><a name="method-giomount--eject-finish"></a><h3>gio.Mount.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been ejected
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject_finish</code>() method finishes ejecting a mount.
- </p></div><div class="refsect2" title="gio.Mount.get_drive"><a name="method-giomount--get-drive"></a><h3>gio.Mount.get_drive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_drive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- or <code class="literal">None</code> if mount is not associated with a volume or a drive.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_drive</code>() method gets the drive for the mount.
- </p><p>
- This is a convenience method for getting the
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- and then using that object to get the
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>.
- </p></div><div class="refsect2" title="gio.Mount.get_icon"><a name="method-giomount--get-icon"></a><h3>gio.Mount.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- for the mount.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_icon</code>() method gets the icon for mount.
- </p></div><div class="refsect2" title="gio.Mount.get_name"><a name="method-giomount--get-name"></a><h3>gio.Mount.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name for the given mount.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_name</code>() method gets the name of mount.
- </p></div><div class="refsect2" title="gio.Mount.get_root"><a name="method-giomount--get-root"></a><h3>gio.Mount.get_root</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_root</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_root</code>() method gets the root directory on mount.
- </p></div><div class="refsect2" title="gio.Mount.get_uuid"><a name="method-giomount--get-uuid"></a><h3>gio.Mount.get_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uuid</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the UUID for mount or <code class="literal">None</code>
- if no UUID can be computed.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_uuid</code>() method gets the UUID for the mount.
- The reference is typically based on the file system UUID for the mount in
- question and should be considered an opaque string. Returns <code class="literal">None</code>
- if there is no UUID available
- </p></div><div class="refsect2" title="gio.Mount.get_volume"><a name="method-giomount--get-volume"></a><h3>gio.Mount.get_volume</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volume</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- or <code class="literal">None</code> if mount is not associated with a volume.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_volume</code>() method gets the volume for the mount.
- </p></div><div class="refsect2" title="gio.Mount.guess_content_type"><a name="method-giomount--guess-content-type"></a><h3>gio.Mount.guess_content_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">guess_content_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">guess_content_type</code>() method asynchronously tries to guess the type of
- content stored on mount. Returns one or more textual identifiers of well-known content
- types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory
- cards. See the shared-mime-info specification for more on x-content types.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-finish" title="gio.Mount.guess_content_type_finish">gio.Mount.guess_content_type_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Mount.guess_content_type_finish"><a name="method-giomount--guess-content-type-finish"></a><h3>gio.Mount.guess_content_type_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">guess_content_type_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of types or <code class="literal">None</code> on error.
- </td></tr></tbody></table><p>
- The <code class="methodname">guess_content_type_finish</code>() method finishes guessing content
- types of mount. If any errors occured during the operation, error will be set to
- contain the errors and <code class="literal">False</code> will be returned. In particular, you may get an
- gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
- </p></div><div class="refsect2" title="gio.Mount.guess_content_type_sync"><a name="method-giomount--guess-content-type-sync"></a><h3>gio.Mount.guess_content_type_sync</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">guess_content_type_sync</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr></tbody></table><p>
- The <code class="methodname">guess_content_type_sync</code>() method tries to guess
- the type of content stored on mount. Returns one or more textual identifiers
- of well-known content types (typically prefixed with "x-content/"), e.g.
- x-content/image-dcf for camera memory cards. See the shared-mime-info specification
- for more on x-content types.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- This is an synchronous operation and as such may block doing IO; see
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type" title="gio.Mount.guess_content_type">gio.Mount.guess_content_type</a></code>()
- for the asynchronous version.
- </p></div><div class="refsect2" title="gio.Mount.is_shadowed"><a name="method-giomount--is-shadowed"></a><h3>gio.Mount.is_shadowed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_shadowed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if mount is shadowed.
- </td></tr></tbody></table><p>
- The <code class="methodname">is_shadowed</code>() method determines if mount
- is shadowed. Applications or libraries should avoid displaying mount
- in the user interface if it is shadowed.
- </p><p>
- A mount is said to be shadowed if there exists one or more user visible
- objects (currently
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- objects) with a root that is inside the root of mount.
- </p><p>
- One application of shadow mounts is when exposing a single file system
- that is used to address several logical volumes. In this situation, a
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- implementation would create two
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- objects (for example, one for the camera functionality of the device
- and one for a SD card reader on the device) with activation URIs
- gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/.
- When the underlying mount (with root gphoto2://[usb:001,002]/) is
- mounted, said
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- implementation would create two
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- objects (each with their root matching the corresponding volume
- activation root) that would shadow the original mount.
- </p><p>
- The proxy monitor in GVfs 2.26 and later, automatically creates and
- manage shadow mounts (and shadows the underlying mount) if the activation
- root on a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- is set.
- </p></div><div class="refsect2" title="gio.Mount.remount"><a name="method-giomount--remount"></a><h3>gio.Mount.remount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
- <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>mount_operation</code></strong> :</span></p></td><td>a <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- or <code class="literal">None</code> to avoid user interaction.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">remount</code>() method asynchronously remounts a mount.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount-finish" title="gio.Mount.remount_finish">gio.Mount.remount_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Mount.remount_finish"><a name="method-giomount--remount-finish"></a><h3>gio.Mount.remount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been remounted
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">remount_finish</code>() method finishes remounting a mount.
- </p></div><div class="refsect2" title="gio.Mount.shadow"><a name="method-giomount--shadow"></a><h3>gio.Mount.shadow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">shadow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">shadow</code>() method increments the shadow
- count on mount. Usually used by
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- implementations when creating a shadow mount for mount, see
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
- for more information. The caller will need to emit the "changed"
- signal on mount manually.
- </p></div><div class="refsect2" title="gio.Mount.unmount"><a name="method-giomount--unmount"></a><h3>gio.Mount.unmount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
- <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">unmount</code>() method asynchronously unmounts a mount.
- </p><p>
- If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount-finish" title="gio.Mount.unmount_finish">gio.Mount.unmount_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Mount.unmount_finish"><a name="method-giomount--unmount-finish"></a><h3>gio.Mount.unmount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been unmounted
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">unmount_finish</code>() method finishes unmounting a mount.
- </p></div><div class="refsect2" title="gio.Mount.unshadow"><a name="method-giomount--unshadow"></a><h3>gio.Mount.unshadow</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unshadow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">unshadow</code>() method decrements the shadow
- count on mount. Usually used by
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- implementations when destroying a shadow mount for mount, see
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
- for more information. The caller will need to emit the "changed"
- signal on mount manually.
- </p></div></div><div class="refsect1" title="Signals"><a name="id522197"></a><h2>Signals</h2><div class="refsect2" title='The "aborted" gio.Mount Signal'><a name="signal-giomount--aborted"></a><h3>The "aborted" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted by the backend when e.g. a device becomes unavailable while a
- mount operation is in progress.
- </p><p>
- Implementations of <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- should handle this signal by dismissing open password dialogs.
- </p></div><div class="refsect2" title='The "changed" gio.Mount Signal'><a name="signal-giomount--changed"></a><h3>The "changed" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when the mount has been changed.
- </p></div><div class="refsect2" title='The "unmounted" gio.Mount Signal'><a name="signal-giomount--unmounted"></a><h3>The "unmounted" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- This signal is emitted when the
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- have been unmounted.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomemoryoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomountoperation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MemoryOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MountOperation</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomountoperation.html b/docs/html/class-giomountoperation.html
deleted file mode 100644
index fddc13b..0000000
--- a/docs/html/class-giomountoperation.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MountOperation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomount.html" title="gio.Mount"><link rel="next" href="class-giooutputstream.html" title="gio.OutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MountOperation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomount.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giooutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MountOperation"><a name="class-giomountoperation"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MountOperation</h2><p>gio.MountOperation — Authentication methods for mountable locations.</p></div><div class="refsect1" title="Synopsis"><a name="id522624"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MountOperation</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giomountoperation.html#constructor-giomountoperation" title="Constructor">gio.MountOperation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-anonymous" title="gio.MountOperation.get_anonymous">get_anonymous</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-choice" title="gio.MountOperation.get_choice">get_choice</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-domain" title="gio.MountOperation.get_domain">get_domain</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-password" title="gio.MountOperation.get_password">get_password</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-password-save" title="gio.MountOperation.get_password_save">get_password_save</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-username" title="gio.MountOperation.get_username">get_username</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--reply" title="gio.MountOperation.reply">replay</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-anonymous" title="gio.MountOperation.set_anonymous">set_anonymous</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anonymous</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-choice" title="gio.MountOperation.set_choice">set_choice</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>choice</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-domain" title="gio.MountOperation.set_domain">set_domain</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-password" title="gio.MountOperation.set_password">set_password</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>password</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-password-save" title="gio.MountOperation.set_password_save">set_password_save</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>save</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-username" title="gio.MountOperation.set_username">set_username</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>username</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id522983"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation">gio.MountOperation</a>
-</pre></div><div class="refsect1" title="gio.MountOperation Properties"><a name="properties-giomountoperation"></a><h2>gio.MountOperation Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"anonymous"</td><td valign="top">Read/Write</td><td valign="top">
- Whether to use an anonymous user when authenticating.
- Default value: <code class="literal">False</code>
- </td></tr><tr valign="top"><td valign="top">"choice"</td><td valign="top">Read/Write</td><td valign="top">
- The index of the user's choice when a question is asked during
- the mount operation. See the "ask-question" signal.
- Allowed values: &gt;= 0 Default value: 0
- </td></tr><tr valign="top"><td valign="top">"domain"</td><td valign="top">Read/Write</td><td valign="top">
- The domain to use for the mount operation. Default value: <code class="literal">None</code>
- </td></tr><tr valign="top"><td valign="top">"password"</td><td valign="top">Read/Write</td><td valign="top">
- The password that is used for authentication when carrying out the
- mount operation. Default value: <code class="literal">None</code>
- </td></tr><tr valign="top"><td valign="top">"password-save"</td><td valign="top">Read/Write</td><td valign="top">
- Determines if and how the password information should be saved.
- Default value: gio.PASSWORD_SAVE_NEVER
- </td></tr><tr valign="top"><td valign="top">"username"</td><td valign="top">Read/Write</td><td valign="top">
- The user name that is used for authentication when carrying out the
- mount operation. Default value: <code class="literal">None</code>
- </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gio.MountOperation Signal Prototypes"><a name="signal-prototypes-giomountoperation"></a><h2>gio.MountOperation Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--aborted" title='The "aborted" gio.MountOperation Signal'>"aborted"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--ask-password" title='The "ask-password" gio.MountOperation Signal'>"ask-password"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_user</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_domain</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--ask-question" title='The "ask-question" gio.MountOperation Signal'>"ask-question"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>choices</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--reply" title='The "reply" gio.MountOperation Signal'>"reply"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>result</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id523542"></a><h2>Description</h2><p>
- The <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- provides a mechanism for authenticating mountable operations, such as loop mounting files,
- hard drive partitions or server locations.
- </p><p>
- Mounting operations are handed a
- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- that then can use if they require any privileges or authentication for their volumes to be
- mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing
- a remote server protocol which requires user credentials such as FTP or WebDAV.
- </p><p>
- Users should instantiate a subclass of this that implements all the various callbacks
- to show the required dialogs, such as
- <PYGTKDOCLINK HREF="class-gtkmountoperation"><code class="classname">gtk.MountOperation</code></PYGTKDOCLINK>.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomountoperation"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.MountOperation</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>.
- </td></tr></tbody></table><p>
- Creates a new mount operation.
- </p></div><div class="refsect1" title="Methods"><a name="id523648"></a><h2>Methods</h2><div class="refsect2" title="gio.MountOperation.get_anonymous"><a name="method-giomountoperation--get-anonymous"></a><h3>gio.MountOperation.get_anonymous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_anonymous</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if mount operation is anonymous.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_anonymous</code>() method check to see whether
- the mount operation is being used for an anonymous user
- </p></div><div class="refsect2" title="gio.MountOperation.get_choice"><a name="method-giomountoperation--get-choice"></a><h3>gio.MountOperation.get_choice</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_choice</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer containing an index of the user's
- choice from the choice's list, or 0.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_anonymous</code>() method gets a choice
- from the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.get_domain"><a name="method-giomountoperation--get-domain"></a><h3>gio.MountOperation.get_domain</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_domain</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string set to the domain.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_domain</code>() method gets the domain
- of the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.get_password"><a name="method-giomountoperation--get-password"></a><h3>gio.MountOperation.get_password</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_password</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the password within
- the mountoperation.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_password</code>() method gets a password
- from the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.get_password_save"><a name="method-giomountoperation--get-password-save"></a><h3>gio.MountOperation.get_password_save</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_password_save</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
- flag.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_password_save</code>() method gets the state
- of saving passwords for the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.get_username"><a name="method-giomountoperation--get-username"></a><h3>gio.MountOperation.get_username</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_username</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the user name.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_username</code>() method get the user
- name from the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.reply"><a name="method-giomountoperation--reply"></a><h3>gio.MountOperation.reply</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reply</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
- </td></tr></tbody></table><p>
- The <code class="methodname">reply</code>() method emits the "reply" signal.
- </p></div><div class="refsect2" title="gio.MountOperation.set_anonymous"><a name="method-giomountoperation--set-anonymous"></a><h3>gio.MountOperation.set_anonymous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_anonymous</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anonymous</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>anonymous</code></em> :</span></p></td><td>boolean value.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_anonymous</code>() method sets the mount operation
- to use an anonymous user if anonymous is <code class="literal">True</code>.
- </p></div><div class="refsect2" title="gio.MountOperation.set_choice"><a name="method-giomountoperation--set-choice"></a><h3>gio.MountOperation.set_choice</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_choice</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>choice</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>choice</code></em> :</span></p></td><td>an integer.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_choice</code>() method sets a default choice for the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.set_domain"><a name="method-giomountoperation--set-domain"></a><h3>gio.MountOperation.set_domain</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_domain</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td><td>the domain to set.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_domain</code>() method sets the mount operation's domain.
- </p></div><div class="refsect2" title="gio.MountOperation.set_password"><a name="method-giomountoperation--set-password"></a><h3>gio.MountOperation.set_password</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_password</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>password</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td><td>password to set.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_password</code>() method sets the mount
- operation's password to password.
- </p></div><div class="refsect2" title="gio.MountOperation.set_password_save"><a name="method-giomountoperation--set-password-save"></a><h3>gio.MountOperation.set_password_save</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_password_save</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>save</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>save</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
- </td></tr></tbody></table><p>
- The <code class="methodname">set_password_save</code>() method sets the state
- of saving passwords for the mount operation.
- </p></div><div class="refsect2" title="gio.MountOperation.set_username"><a name="method-giomountoperation--set-username"></a><h3>gio.MountOperation.set_username</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_username</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>username</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td><td>input username.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_anonymous</code>() method sets the user
- name within op to username.
- </p></div></div><div class="refsect1" title="Signals"><a name="id524509"></a><h2>Signals</h2><div class="refsect2" title='The "aborted" gio.MountOperation Signal'><a name="signal-giomountoperation--aborted"></a><h3>The "aborted" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
- Implementations of <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- should handle this signal by dismissing open password dialogs.
- </p></div><div class="refsect2" title='The "ask-password" gio.MountOperation Signal'><a name="signal-giomountoperation--ask-password"></a><h3>The "ask-password" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_user</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_domain</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td><td>string containing a message to display to the user.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>default_user</code></em> :</span></p></td><td>string containing the default user name.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>default_domain</code></em> :</span></p></td><td>string containing the default domain.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
- <a class="xref" href="gio-constants.html#gio-ask-password-flags-constants" title="Gio Ask Password Flags Constants">Gio Ask Password Flags Constants</a>
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- This signal is emitted when a mount operation asks the user for a password.
- If the message contains a line break, the first line should be presented as a heading.
- For example, it may be used as the primary text in a
- <PYGTKDOCLINK HREF="class-gtkmessagedialog"><code class="classname">gtk.MessageDialog</code></PYGTKDOCLINK>.
- </p></div><div class="refsect2" title='The "ask-question" gio.MountOperation Signal'><a name="signal-giomountoperation--ask-question"></a><h3>The "ask-question" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>choices</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td><td>string containing a message to display to the user.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>choices</code></em> :</span></p></td><td>a list of strings for each possible choice.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- This signal is emitted when asking the user a question and gives a list of choices
- for the user to choose from. If the message contains a line break, the first line should be
- presented as a heading. For example, it may be used as the primary text in a
- <PYGTKDOCLINK HREF="class-gtkmessagedialog"><code class="classname">gtk.MessageDialog</code></PYGTKDOCLINK>.
- </p></div><div class="refsect2" title='The "reply" gio.MountOperation Signal'><a name="signal-giomountoperation--reply"></a><h3>The "reply" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>result</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
- indicating how the request was handled</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- This signal is emitted when the user has replied to the mount operation.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomount.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giooutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Mount </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.OutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giooutputstream.html b/docs/html/class-giooutputstream.html
deleted file mode 100644
index d4df1ab..0000000
--- a/docs/html/class-giooutputstream.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.OutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomountoperation.html" title="gio.MountOperation"><link rel="next" href="class-gioseekable.html" title="gio.Seekable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.OutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomountoperation.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioseekable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.OutputStream"><a name="class-giooutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.OutputStream</h2><p>gio.OutputStream — Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id525286"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.OutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--clear-pending">clear_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close">close</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close-async">close_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close-finish">close_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush">flush</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush-async">flush_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush-finish">flush_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--has-pending">has_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--is-closed">is_closed</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--set-pending">set_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice">splice</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.OUTPUT_STREAM_SPLICE_NONE</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice-async">splice_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>source</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.OUTPUT_STREAM_SPLICE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice-finish">splice_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write">write</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write-async">write_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write-finish">write_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id525999"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
-</pre></div><div class="refsect1" title="Description"><a name="id526024"></a><h2>Description</h2><p>
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
- has functions to write from a stream (
- <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write">gio.OutputStream.write</PYGTKDOCLINK></code>()
- ), to close a stream (
- <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close">gio.OutputStream.close</PYGTKDOCLINK></code>()
- ) and to flush pending writes (
- <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush">gio.OutputStream.flush</PYGTKDOCLINK></code>()
- ).
- </p><p>
- To copy the content of an input stream to an output stream without manually
- handling the reads and writes, use
- <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice">gio.OutputStream.splice</PYGTKDOCLINK></code>().
- </p><p>
- All of these functions have async variants too.
- </p></div><div class="refsect1" title="Methods"><a name="id526082"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomountoperation.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioseekable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MountOperation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Seekable</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioseekable.html b/docs/html/class-gioseekable.html
deleted file mode 100644
index e7fdf1b..0000000
--- a/docs/html/class-gioseekable.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Seekable</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giooutputstream.html" title="gio.OutputStream"><link rel="next" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Seekable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giooutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giosimpleasyncresult.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Seekable"><a name="class-gioseekable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Seekable</h2><p>gio.Seekable — Stream seeking interface.</p></div><div class="refsect1" title="Synopsis"><a name="id526116"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Seekable</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">tell</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">can_seek</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">seek</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_truncate" title="gio.Seekable.can_truncate">can_truncate</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate">truncate</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id526294"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-gioseekable.html" title="gio.Seekable">gio.Seekable</a>
-</pre></div><div class="refsect1" title="Known Implementation"><a name="id526320"></a><h2>Known Implementation</h2><p>
- <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a> is implemented by
- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>,
- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>,
- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a> and
- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
- </p></div><div class="refsect1" title="Description"><a name="id526367"></a><h2>Description</h2><p>
- <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
- is implemented by streams (implementations of
- <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a> or
- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>)
- that support seeking.
- </p></div><div class="refsect1" title="Methods"><a name="id526400"></a><h2>Methods</h2><div class="refsect2" title="gio.Seekable.tell"><a name="method-gioseekable--tell"></a><h3>gio.Seekable.tell</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">tell</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
- the offset from the beginning of the buffer
- </td></tr></tbody></table><p>
- Tells the current position within the stream.
- </p></div><div class="refsect2" title="gio.Seekable.can_seek"><a name="method-gioseekable--can_seek"></a><h3>gio.Seekable.can_seek</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_seek</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if this
- <code class="classname">gio.Seekable</code> can be seeked with
- the <code class="methodname">seek</code>() method, <code class="literal">False</code>
- if not. </td></tr></tbody></table><p>
- The <code class="methodname">can_seek</code>() method checks if the
- <a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek"><code class="methodname">seek</code>()</a>
- can be used on this <code class="classname">gio.Seekable</code>.
- </p></div><div class="refsect2" title="gio.Seekable.seek"><a name="method-gioseekable--seek"></a><h3>gio.Seekable.seek</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">seek</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset that is added to the position determined by the <code class="literal">type</code> parameter.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>0=current position, 1=start of the file, 2=end of the file.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>a <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful seek,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- Seeks in the stream by the given <code class="literal">offset</code>, modified by <code class="literal">type</code>.
- </p><p>
- If <code class="literal">cancellable</code> is not <code class="literal">None</code>, then the
- operation can be cancelled by triggering the cancellable object from another thread.
- </p></div><div class="refsect2" title="gio.Seekable.can_truncate"><a name="method-gioseekable--can_truncate"></a><h3>gio.Seekable.can_truncate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_truncate</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if this
- <code class="classname">gio.Seekable</code> can be truncated with
- the <code class="methodname">truncate</code>() method, <code class="literal">False</code>
- if not. </td></tr></tbody></table><p>
- The <code class="methodname">can_truncate</code>() method checks if the
- <a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate"><code class="methodname">truncate</code>()</a>
- can be used on this <code class="classname">gio.Seekable</code>.
- </p></div><div class="refsect2" title="gio.Seekable.truncate"><a name="method-gioseekable--truncate"></a><h3>gio.Seekable.truncate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">truncate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset at which the stream should be truncated
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>a <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if successful,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- Truncates a stream with a given <code class="literal">offset</code>.
- </p><p>
- If <code class="literal">cancellable</code> is not <code class="literal">None</code>, then the
- operation can be cancelled by triggering the cancellable object from another thread.
- </p><p>
- If an operation was partially finished when the operation was cancelled the
- partial result will be returned, without an error.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giooutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giosimpleasyncresult.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.OutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.SimpleAsyncResult</td></tr></table></div></body></html>
diff --git a/docs/html/class-giosimpleasyncresult.html b/docs/html/class-giosimpleasyncresult.html
deleted file mode 100644
index 6119618..0000000
--- a/docs/html/class-giosimpleasyncresult.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.SimpleAsyncResult</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioseekable.html" title="gio.Seekable"><link rel="next" href="class-giothemedicon.html" title="gio.ThemedIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.SimpleAsyncResult</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioseekable.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giothemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.SimpleAsyncResult"><a name="class-giosimpleasyncresult"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.SimpleAsyncResult</h2><p>gio.SimpleAsyncResult — Simple asynchronous results implementation.</p></div><div class="refsect1" title="Synopsis"><a name="id527016"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.SimpleAsyncResult</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete" title="gio.SimpleAsyncResult.complete">complete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">complete_in_idle</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean" title="gio.SimpleAsyncResult.get_op_res_gboolean">get_op_res_gboolean</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize" title="gio.SimpleAsyncResult.get_op_res_gssize">get_op_res_gssize</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error" title="gio.SimpleAsyncResult.propagate_error">propagate_error</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation" title="gio.SimpleAsyncResult.set_handle_cancellation">set_handle_cancellation</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle_cancellation</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean" title="gio.SimpleAsyncResult.set_op_res_gboolean">set_op_res_gboolean</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize" title="gio.SimpleAsyncResult.set_op_res_gssize">set_op_res_gssize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id527227"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult">gio.SimpleAsyncResult</a>
-</pre></div><div class="refsect1" title="Implemented Interface"><a name="id527253"></a><h2>Implemented Interface</h2><p>
- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a> implements
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </p></div><div class="refsect1" title="Description"><a name="id527278"></a><h2>Description</h2><p>
- Implements <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- for simple cases. Most of the time, this will be all an application needs, and will be used transparently
- Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions.
- </p><p>
- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>
- handles GAsyncReadyCallbacks, error reporting, operation cancellation and the final state of an
- operation, completely transparent to the application. Results can be returned as a pointer e.g.
- for functions that return data that is collected asynchronously, a boolean value for checking the
- success or failure of an operation, or a gssize for operations which return the number of bytes modified
- by the operation; all of the simple return cases are covered.
- </p><p>
- Most of the time, an application will not need to know of the details of this API; it is handled
- transparently, and any necessary operations are handled by GAsyncResult's interface. However, if
- implementing a new GIO module, for writing language bindings, or for complex applications that need
- better control of how asynchronous operations are completed, it is important to understand this functionality.
- </p><p>
- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>
- are tagged with the calling function to ensure that asynchronous functions and
- their finishing functions are used together correctly.
- </p><p>
- An asynchronous operation can be made to ignore a cancellation event by calling
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation" title="gio.SimpleAsyncResult.set_handle_cancellation">gio.SimpleAsyncResult.set_handle_cancellation</a></code>()
- with a
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- for the operation and <code class="literal">False</code>. This is useful for operations that are dangerous to cancel,
- such as close (which would cause a leak if cancelled before being run).
- </p><p>
- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
- can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available.
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete" title="gio.SimpleAsyncResult.complete">gio.SimpleAsyncResult.complete</a></code>()
- will finish an I/O task directly within the main event loop.
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">gio.SimpleAsyncResult.complete_in_idle</a></code>()
- will integrate the I/O task into the main event loop as an idle function.
-
- </p><p>
- To set the results of an asynchronous function,
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean" title="gio.SimpleAsyncResult.set_op_res_gboolean">gio.SimpleAsyncResult.set_op_res_gboolean</a></code>(), and
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize" title="gio.SimpleAsyncResult.set_op_res_gssize">gio.SimpleAsyncResult.set_op_res_gssize</a></code>()
- are provided, setting the operation's result to a gboolean, or gssize, respectively.
- </p><p>
- Likewise, to get the result of an asynchronous function,
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean" title="gio.SimpleAsyncResult.get_op_res_gboolean">gio.SimpleAsyncResult.get_op_res_gboolean</a></code>() and
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize" title="gio.SimpleAsyncResult.get_op_res_gssize">gio.SimpleAsyncResult.get_op_res_gssize</a></code>()
- are provided, getting the operation's result as a gboolean and gssize, respectively.
- </p></div><div class="refsect1" title="Methods"><a name="id527441"></a><h2>Methods</h2><div class="refsect2" title="gio.SimpleAsyncResult.complete"><a name="method-giosimpleasyncresult--complete"></a><h3>gio.SimpleAsyncResult.complete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">complete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">complete</code>() method completes an asynchronous I/O job.
- Must be called in the main thread, as it invokes the callback that should be called
- in the main thread. If you are in a different thread use
- <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">gio.SimpleAsyncResult.complete_in_idle</a></code>().
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.complete_in_idle"><a name="method-giosimpleasyncresult--complete-in-idle"></a><h3>gio.SimpleAsyncResult.complete_in_idle</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">complete_in_idle</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
- The <code class="methodname">complete_in_idle</code>() method completes an asynchronous
- function in the main event loop using an idle function.
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.get_op_res_gboolean"><a name="method-giosimpleasyncresult--get-op-res-gboolean"></a><h3>gio.SimpleAsyncResult.get_op_res_gboolean</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_op_res_gboolean</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation's result was
- <code class="literal">True</code>, <code class="literal">False</code> if the operation's result
- was <code class="literal">False</code>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_op_res_gboolean</code>() method gets the operation
- result boolean from within the asynchronous result.
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.get_op_res_gssize"><a name="method-giosimpleasyncresult--get-op-res-gssize"></a><h3>gio.SimpleAsyncResult.get_op_res_gssize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_op_res_gssize</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a gssize returned from the asynchronous function.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_op_res_gssize</code>() method gets a gssize
- from the asynchronous result.
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.propagate_error"><a name="method-giosimpleasyncresult--propagate-error"></a><h3>gio.SimpleAsyncResult.propagate_error</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">propagate_error</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the error was propegated
- to dest. <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">propagate_error</code>() method propagates an error
- from within the simple asynchronous result to a given destination.
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_handle_cancellation"><a name="method-giosimpleasyncresult--set-handle-cancellation"></a><h3>gio.SimpleAsyncResult.set_handle_cancellation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_handle_cancellation</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle_cancellation</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>handle_cancellation</code></strong> :</span></p></td><td>a boolean.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_handle_cancellation</code>() method sets whether
- to handle cancellation within the asynchronous operation.
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_op_res_gboolean"><a name="method-giosimpleasyncresult--set-op-res-gboolean"></a><h3>gio.SimpleAsyncResult.set_op_res_gboolean</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_op_res_gboolean</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>op_res</code></strong> :</span></p></td><td>a boolean.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_op_res_gboolean</code>() method sets the operation
- result to a boolean within the asynchronous result.
- </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_op_res_gssize"><a name="method-giosimpleasyncresult--set-op-res-gssize"></a><h3>gio.SimpleAsyncResult.set_op_res_gssize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_op_res_gssize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>op_res</code></strong> :</span></p></td><td>a gssize.
- </td></tr></tbody></table><p>
- The <code class="methodname">set_op_res_gssize</code>() method sets the operation
- result within the asynchronous result to the given op_res.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioseekable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giothemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Seekable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.ThemedIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-giothemedicon.html b/docs/html/class-giothemedicon.html
deleted file mode 100644
index 83d24de..0000000
--- a/docs/html/class-giothemedicon.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.ThemedIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><link rel="next" href="class-giovolume.html" title="gio.Volume"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.ThemedIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giosimpleasyncresult.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giovolume.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.ThemedIcon"><a name="class-giothemedicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.ThemedIcon</h2><p>gio.ThemedIcon — Icon theming support.</p></div><div class="refsect1" title="Synopsis"><a name="id527988"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.ThemedIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giothemedicon.html#constructor-giothemedicon" title="Constructor">gio.ThemedIcon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--append-name" title="gio.ThemedIcon.append_name">append_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--get-names" title="gio.ThemedIcon.get_names">get_names</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--prepend-name" title="gio.ThemedIcon.prepend_name">prepend_name</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id528097"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon">gio.ThemedIcon</a>
-</pre></div><div class="refsect1" title="gio.ThemedIcon Properties"><a name="properties-giomountoperation"></a><h2>gio.ThemedIcon Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"name"</td><td valign="top">Write/Contruct Only</td><td valign="top">
- The icon name. Default value: <code class="literal">None</code>
- </td></tr><tr valign="top"><td valign="top">"names"</td><td valign="top">Read/Write/Contruct Only</td><td valign="top">
- A list of icon names.
- </td></tr><tr valign="top"><td valign="top">"use-default-fallbacks"</td><td valign="top">Read/Write/Contruct Only</td><td valign="top">
- Whether to use the default fallbacks found by shortening the
- icon name at '-' characters. If the "names" array has more
- than one element, ignores any past the first.
- </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id528241"></a><h2>Description</h2><p>
- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
- is an implementation of <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon
- theme, so that icons can be looked up quickly.
- </p><p>
- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
- does not provide actual pixmaps for icons, just the icon names. Ideally something like
- <code class="methodname"><PYGTKDOCLINK HREF="method-gtkicontheme--choose-icon">gtk.IconTheme.choose_icon</PYGTKDOCLINK></code>()
- should be used to resolve the list of names so that fallback icons work nicely
- with themes that inherit other themes
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giothemedicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.ThemedIcon</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>use_default_fallbacks</code></em></span><span class="initializer">=False</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td><td>a string containing an icon name.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>.
- </td></tr></tbody></table><p>
- Creates a new themed icon from icon name, if instead of an icon name you
- provide a list of icon names, the <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
- will be constructed using the items in the list.
- </p></div><div class="refsect1" title="Methods"><a name="id528396"></a><h2>Methods</h2><div class="refsect2" title="gio.ThemedIcon.append_name"><a name="method-giothemedicon--append-name"></a><h3>gio.ThemedIcon.append_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>name of icon to append to list of icons from within icon.
- </td></tr></tbody></table><p>
- The <code class="methodname">append_name</code>() method appends a name to
- the list of icons from within icon.
- </p></div><div class="refsect2" title="gio.ThemedIcon.get_names"><a name="method-giothemedicon--get-names"></a><h3>gio.ThemedIcon.get_names</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_names</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of icon names.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_names</code>() method gets the names
- of icons from within icon.
- </p></div><div class="refsect2" title="gio.ThemedIcon.prepend_name"><a name="method-giothemedicon--prepend-name"></a><h3>gio.ThemedIcon.prepend_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">prepend_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>name of icon to prepend to list of icons from within icon.
- </td></tr></tbody></table><p>
- The <code class="methodname">prepend_name</code>() method prepends a name to
- the list of icons from within icon.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giosimpleasyncresult.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giovolume.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.SimpleAsyncResult </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Volume</td></tr></table></div></body></html>
diff --git a/docs/html/class-giounixinputstream.html b/docs/html/class-giounixinputstream.html
deleted file mode 100644
index 4059661..0000000
--- a/docs/html/class-giounixinputstream.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.unix.InputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="prev" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="next" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.unix.InputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="giounix-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGio Unix Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giounixoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.unix.InputStream"><a name="class-giounixinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.unix.InputStream</h2><p>gio.unix.InputStream — Streaming input operations for UNIX file descriptors.</p></div><div class="refsect1" title="Synopsis"><a name="id457436"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.unix.InputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giounixinputstream.html#constructor-giounixinputstream" title="Constructor">gio.unix.InputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--get-close-fd" title="gio.unix.InputStream.get_close_fd">get_close_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--get-fd" title="gio.unix.InputStream.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--set-close-fd" title="gio.unix.InputStream.set_close_fd">set_close_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id457313"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
- +-- <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream">gio.unix.InputStream</a>
-</pre></div><div class="refsect1" title="gio.unix.InputStream Properties"><a name="properties-giounixinputstream"></a><h2>gio.unix.InputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"close-fd"</td><td valign="top">Read - Write</td><td valign="top">Whether to close the file descriptor when the stream is closed.
- Default value: <code class="literal">True</code>.</td></tr><tr valign="top"><td valign="top">"fd"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The file descriptor that the stream reads from. Default value: -1.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id459369"></a><h2>Description</h2><p>
- <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
- implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
- for reading from a UNIX file descriptor, including asynchronous operations.
- The file descriptor must be selectable, so it doesn't work with opened files.
- </p><p>
- Note that <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
- belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
- when using it.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giounixinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.unix.InputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a UNIX file descriptor.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>close_fd</code></em> :</span></p></td><td><code class="literal">True</code>
- to close the file descriptor when done
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
- from the given fd.
- </p><p>
- If close_fd is <code class="literal">True</code>, the file descriptor will be closed when the stream is closed.
- </p></div><div class="refsect1" title="Methods"><a name="id460154"></a><h2>Methods</h2><div class="refsect2" title="gio.unix.InputStream.get_close_fd"><a name="method-giounixinputstream--get-close-fd"></a><h3>gio.unix.InputStream.get_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file descriptor is closed when done.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_close_fd</code>() method returns whether the file
- descriptor of stream will be closed when the stream is closed.
- </p></div><div class="refsect2" title="gio.unix.InputStream.get_fd"><a name="method-giounixinputstream--get-fd"></a><h3>gio.unix.InputStream.get_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The file descriptor of stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_fd</code>() method return the UNIX file descriptor
- that the stream reads from.
- </p></div><div class="refsect2" title="gio.unix.InputStream.set_close_fd"><a name="method-giounixinputstream--set-close-fd"></a><h3>gio.unix.InputStream.set_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_fd</code></strong> :</span></p></td><td><code class="literal">True</code> to close the file descriptor when done .
- </td></tr></tbody></table><p>
- The <code class="methodname">set_close_fd</code>() method sets whether the file descriptor
- of stream shall be closed when the stream is closed.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="giounix-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="giounix-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giounixoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGio Unix Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.unix.OutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giounixoutputstream.html b/docs/html/class-giounixoutputstream.html
deleted file mode 100644
index 8b9b647..0000000
--- a/docs/html/class-giounixoutputstream.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.unix.OutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="prev" href="class-giounixinputstream.html" title="gio.unix.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.unix.OutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giounixinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Unix Class Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="gio.unix.OutputStream"><a name="class-giounixoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.unix.OutputStream</h2><p>gio.unix.OutputStream — Streaming output operations for UNIX file descriptors.</p></div><div class="refsect1" title="Synopsis"><a name="id430504"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.unix.OutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-giounixoutputstream.html#constructor-giounixoutputstream" title="Constructor">gio.unix.OutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd" title="gio.unix.OutputStream.get_close_fd">get_close_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--get-fd" title="gio.unix.OutputStream.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd" title="gio.unix.OutputStream.set_close_fd">set_close_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id500640"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
- +-- <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream">gio.unix.OutputStream</a>
-</pre></div><div class="refsect1" title="gio.unix.OutputStream Properties"><a name="properties-giounixoutputstream"></a><h2>gio.unix.OutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"close-fd"</td><td valign="top">Read - Write</td><td valign="top">Whether to close the file descriptor when the stream is closed.
- Default value: <code class="literal">True</code>.</td></tr><tr valign="top"><td valign="top">"fd"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The file descriptor that the stream writes to. Default value: -1.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id510688"></a><h2>Description</h2><p>
- <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
- implements <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
- for writing to a UNIX file descriptor, including asynchronous operations.
- The file descriptor must be selectable, so it doesn't work with opened files.
- </p><p>
- Note that <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
- belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
- when using it.
- </p></div><div class="refsect1" title="Constructor"><a name="constructor-giounixoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gio.unix.OutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a UNIX file descriptor.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>close_fd</code></em> :</span></p></td><td><code class="literal">True</code>
- to close the file descriptor when done
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
- <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
- </td></tr></tbody></table><p>
- Creates a new <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
- from the given fd.
- </p><p>
- If close_fd is <code class="literal">True</code>, the file descriptor will be closed when the stream is closed.
- </p></div><div class="refsect1" title="Methods"><a name="id461727"></a><h2>Methods</h2><div class="refsect2" title="gio.unix.OutputStream.get_close_fd"><a name="method-giounixoutputstream--get-close-fd"></a><h3>gio.unix.OutputStream.get_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_close_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file descriptor is closed when done.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_close_fd</code>() method returns whether the file
- descriptor of stream will be closed when the stream is closed.
- </p></div><div class="refsect2" title="gio.unix.OutputStream.get_fd"><a name="method-giounixoutputstream--get-fd"></a><h3>gio.unix.OutputStream.get_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The file descriptor of stream.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_fd</code>() method return the UNIX file descriptor
- that the stream reads from.
- </p></div><div class="refsect2" title="gio.unix.OutputStream.set_close_fd"><a name="method-giounixoutputstream--set-close-fd"></a><h3>gio.unix.OutputStream.set_close_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_close_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_fd</code></strong> :</span></p></td><td><code class="literal">True</code> to close the file descriptor when done .
- </td></tr></tbody></table><p>
- The <code class="methodname">set_close_fd</code>() method sets whether the file descriptor
- of stream shall be closed when the stream is closed.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giounixinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="giounix-class-reference.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">gio.unix.InputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/docs/html/class-giovolume.html b/docs/html/class-giovolume.html
deleted file mode 100644
index ff6512a..0000000
--- a/docs/html/class-giovolume.html
+++ /dev/null
@@ -1,176 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Volume</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giothemedicon.html" title="gio.ThemedIcon"><link rel="next" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Volume</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giothemedicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giovolumemonitor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Volume"><a name="class-giovolume"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Volume</h2><p>gio.Volume — Volume management.</p></div><div class="refsect1" title="Synopsis"><a name="id528601"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Volume</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--can-eject" title="gio.Volume.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--can-mount" title="gio.Volume.can_mount">can_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject" title="gio.Volume.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject-finish" title="gio.Volume.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--enumerate-identifiers" title="gio.Volume.enumerate_identifiers">enumerate_identifiers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-activation-root" title="gio.Volume.get_activation_root">get_activation_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-drive" title="gio.Volume.get_drive">get_drive</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-icon" title="gio.Volume.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">get_identifier</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">get_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-name" title="gio.Volume.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-uuid" title="gio.Volume.get_uuid">get_uuid</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount" title="gio.Volume.mount">mount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">mount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--should-automount" title="gio.Volume.should_automount">should_automount</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id529090"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
- +-- <a class="link" href="class-giovolume.html" title="gio.Volume">gio.Volume</a>
-</pre></div><div class="refsect1" title="Prerequisites"><a name="id529116"></a><h2>Prerequisites</h2><p>
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a> requires
- <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
- </p></div><div class="refsect1" title="gio.Volume Signal Prototypes"><a name="signal-prototypes-giovolume"></a><h2>gio.Volume Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giovolume.html#signal-giovolume--changed" title='The "changed" gio.Volume Signal'>"changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolume.html#signal-giovolume--removed" title='The "removed" gio.Volume Signal'>"removed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id529280"></a><h2>Description</h2><p>
- The <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- interface represents user-visible objects that can be mounted. Note, when porting
- from GnomeVFS, <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- is the moral equivalent of GnomeVFSDrive.
- </p><p>
- Mounting a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- instance is an asynchronous operation. For more information about asynchronous operations.
- To mount a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>, first call
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount" title="gio.Volume.mount">gio.Volume.mount</a></code>()
- with (at least) the <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- instance, optionally a
- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- object and a GAsyncReadyCallback.
- </p><p>
- Typically, one will only want to pass <code class="literal">None</code> for the GMountOperation
- if automounting all volumes when a desktop session starts since it's not desirable
- to put up a lot of dialogs asking for credentials.
- </p><p>
- The callback will be fired when the operation has resolved (either with success or failure),
- and a GAsyncReady structure will be passed to the callback. That callback should then call
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
- with the GVolume instance and the GAsyncReady data to see if the operation was completed
- successfully. If an error is present when
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
- is called, then it will be filled with any error information.
- </p><p>
- It is sometimes necessary to directly access the underlying operating system object behind a volume
- (e.g. for passing a volume to an application via the commandline). For this purpose, GIO allows to obtain
- an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs,
- filesystem labels, traditional Unix devices (e.g. /dev/sda2), uuids. GIO uses predefind strings
- as names for the different kinds of identifiers:
- "hal-udi", "label", etc. Use
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">gio.Volume.get_identifier</a></code>()
- to obtain an identifier for a volume.
- </p></div><div class="refsect1" title="Methods"><a name="id529397"></a><h2>Methods</h2><div class="refsect2" title="gio.Volume.can_eject"><a name="method-giovolume--can-eject"></a><h3>gio.Volume.can_eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume can be ejected,
- <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_eject</code>() method checks if a volume can be ejected.
- </p></div><div class="refsect2" title="gio.Volume.can_mount"><a name="method-giovolume--can-mount"></a><h3>gio.Volume.can_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">can_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume can be mounted
- for media changes, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">can_mount</code>() method checks if a volume
- can be mounted.
- </p></div><div class="refsect2" title="gio.Volume.eject"><a name="method-giovolume--eject"></a><h3>gio.Volume.eject</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject</code>() method asynchronously ejects a volume.
- </p><p>
- When the operation is finished, callback will be called. You can then call
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject-finish" title="gio.Volume.eject_finish">gio.Volume.eject_finish</a></code>()
- to obtain the result of the operation.
- </p></div><div class="refsect2" title="gio.Volume.eject_finish"><a name="method-giovolume--eject-finish"></a><h3>gio.Volume.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume has been ejected
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">eject_finish</code>() method finishes ejecting a volume.
- If any errors occured during the operation, error will be set to contain the
- errors and <code class="literal">False</code> will be returned.
- </p></div><div class="refsect2" title="gio.Volume.enumerate_identifiers"><a name="method-giovolume--enumerate-identifiers"></a><h3>gio.Volume.enumerate_identifiers</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enumerate_identifiers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of strings containing kinds of identifiers.
- </td></tr></tbody></table><p>
- The <code class="methodname">enumerate_identifiers</code>() method gets the kinds
- of identifiers that volume has. Use
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">gio.Volume.get_identifier</a></code>()
- to obtain the identifiers themselves.
- </p></div><div class="refsect2" title="gio.Volume.get_activation_root"><a name="method-giovolume--get-activation-root"></a><h3>gio.Volume.get_activation_root</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_activation_root</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the activation root of volume or <code class="literal">None</code>.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_activation_root</code>() method gets the activation
- root for a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- if it is known ahead of mount time. Returns <code class="literal">None</code> otherwise.
- If not <code class="literal">None</code> and if volume is mounted, then the result of
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-root" title="gio.Mount.get_root">gio.Mount.get_root</a></code>()
- on the GMount object obtained from
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">gio.Volume.get_mount</a></code>()
- will always either be equal or a prefix of what this function returns.
- In other words, in code:
- </p><pre class="programlisting">
-mount = volume.get_mount() # mounted, so never None
-mount_root = mount.get_root()
-volume_activation_root = volume.get_activation_root() # assume not None
-</pre><p>
- then the expression
- </p><pre class="programlisting">
-volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mount_root)
-</pre><p>
- will always be <code class="literal">True</code>.
- </p><p>
- Activation roots are typically used in
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- implementations to find the underlying mount to shadow, see
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
- for more details.
- </p></div><div class="refsect2" title="gio.Volume.get_drive"><a name="method-giovolume--get-drive"></a><h3>gio.Volume.get_drive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_drive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
- or <code class="literal">None</code> if volume is not associated with a drive.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_drive</code>() method gets the drive for the volume.
- </p></div><div class="refsect2" title="gio.Volume.get_icon"><a name="method-giovolume--get-icon"></a><h3>gio.Volume.get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- for the volume.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_icon</code>() method gets the icon for volume.
- </p></div><div class="refsect2" title="gio.Volume.get_identifier"><a name="method-giovolume--get-identifier"></a><h3>gio.Volume.get_identifier</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_identifier</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing the requested identfier, or
- <code class="literal">None</code> if the
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- doesn't have this kind of identifier.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_identifier</code>() method gets the identifier of
- the given kind for volume.
- </p></div><div class="refsect2" title="gio.Volume.get_mount"><a name="method-giovolume--get-mount"></a><h3>gio.Volume.get_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- or <code class="literal">None</code> if volume isn't mounted.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_mount</code>() method gets the mount for the volume.
- </p></div><div class="refsect2" title="gio.Volume.get_name"><a name="method-giovolume--get-name"></a><h3>gio.Volume.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing volume's name.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_name</code>() method gets the name of volume.
- </p></div><div class="refsect2" title="gio.Volume.get_uuid"><a name="method-giovolume--get-uuid"></a><h3>gio.Volume.get_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_uuid</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the UUID for volume or <code class="literal">None</code>
- if no UUID can be computed.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_uuid</code>() method gets the UUID for the volume.
- The reference is typically based on the file system UUID for the volume in
- question and should be considered an opaque string.
- Returns <code class="literal">None</code> if there is no UUID available.
- </p></div><div class="refsect2" title="gio.Volume.mount"><a name="method-giovolume--mount"></a><h3>gio.Volume.mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>mount_operation</code></strong> :</span></p></td><td>A
- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
- or <code class="literal">None</code> to avoid user interaction.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>Flags affecting the operation
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
- object, <code class="literal">None</code> to ignore.
- </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
- </td></tr></tbody></table><p>
- The <code class="methodname">mount</code>() method mounts a volume. This is an
- asynchronous operation, and is finished by calling
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
- with the volume and GAsyncResult returned in the callback.
- </p></div><div class="refsect2" title="gio.Volume.mount_finish"><a name="method-giovolume--mount-finish"></a><h3>gio.Volume.mount_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">mount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume has been mounted
- successfully, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">mounted</code>() method finishes mounting a volume.
- If any errors occured during the operation, error will be set to contain
- the errors and <code class="literal">False</code> will be returned.
- </p><p>
- If the mount operation succeeded,
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">get_mount</a></code>()
- on volume is guaranteed to return the mount right after calling this function;
- there's no need to listen for the 'mount-added' signal on
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>.
- </p></div><div class="refsect2" title="gio.Volume.should_automount"><a name="method-giovolume--should-automount"></a><h3>gio.Volume.should_automount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">should_automount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume should
- be automatically mounted.
- </td></tr></tbody></table><p>
- The <code class="methodname">should_automount</code>() method returns whether
- the volume should be automatically mounted.
- </p></div></div><div class="refsect1" title="Signals"><a name="id530955"></a><h2>Signals</h2><div class="refsect2" title='The "changed" gio.Volume Signal'><a name="signal-giovolume--changed"></a><h3>The "changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>the volume</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when the volume has been changed.
- </p></div><div class="refsect2" title='The "removed" gio.Volume Signal'><a name="signal-giovolume--removed"></a><h3>The "removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>the volume</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- This signal is emitted when the
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- have been removed. If the recipient is holding references to the object
- they should release them so the object can be finalized.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giothemedicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giovolumemonitor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.ThemedIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.VolumeMonitor</td></tr></table></div></body></html>
diff --git a/docs/html/class-giovolumemonitor.html b/docs/html/class-giovolumemonitor.html
deleted file mode 100644
index bd59ccc..0000000
--- a/docs/html/class-giovolumemonitor.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.VolumeMonitor</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giovolume.html" title="gio.Volume"><link rel="next" href="gio-functions.html" title="gio Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.VolumeMonitor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giovolume.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.VolumeMonitor"><a name="class-giovolumemonitor"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.VolumeMonitor</h2><p>gio.VolumeMonitor — Volume Monitor.</p></div><div class="refsect1" title="Synopsis"><a name="id531245"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.VolumeMonitor</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives" title="gio.VolumeMonitor.get_connected_drives">get_connected_drives</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid" title="gio.VolumeMonitor.get_mount_for_uuid">get_mount_for_uuid</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-mounts" title="gio.VolumeMonitor.get_mounts">get_mounts</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid" title="gio.VolumeMonitor.get_volume_for_uuid">get_volume_for_uuid</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-volumes" title="gio.VolumeMonitor.get_volumes">get_volumes</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
-<span class="bold"><strong>Functions</strong></span>
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount" title="gio.volume_monitor_adopt_orphan_mount">gio.volume_monitor_adopt_orphan_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-get" title="gio.volume_monitor_get">gio.volume_monitor_get</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id531439"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
- +-- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor">gio.VolumeMonitor</a>
-</pre></div><div class="refsect1" title="gio.VolumeMonitor Signal Prototypes"><a name="signal-prototypes-giovolumemonitor"></a><h2>gio.VolumeMonitor Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed" title='The "drive-changed" gio.Volume Signal'>"drive-changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected" title='The "drive-connected" gio.Volume Signal'>"drive-connected"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected" title='The "drive-disconnected" gio.Volume Signal'>"drive-disconnected"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button" title='The "drive-eject-button" gio.Volume Signal'>"drive-eject-button"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-added" title='The "mount-added" gio.Volume Signal'>"mount-added"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed" title='The "mount-changed" gio.Volume Signal'>"mount-changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount" title='The "mount-pre-unmount" gio.Volume Signal'>"mount-pre-unmount"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed" title='The "mount-removed" gio.Volume Signal'>"mount-removed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-added" title='The "volume-added" gio.Volume Signal'>"volume-added"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed" title='The "volume-changed" gio.Volume Signal'>"volume-changed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed" title='The "volume-removed" gio.Volume Signal'>"volume-removed"</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id532257"></a><h2>Description</h2><p>
- The <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- is for listing the user interesting devices and volumes on the computer. In other words,
- what a file selector or file manager would show in a sidebar.
- </p></div><div class="refsect1" title="Methods"><a name="id532277"></a><h2>Methods</h2><div class="refsect2" title="gio.VolumeMonitor.get_connected_drives"><a name="method-giovolumemonitor--get-connected-drives"></a><h3>gio.VolumeMonitor.get_connected_drives</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_connected_drives</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of connected
- <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a> objects.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_connected_drives</code>() method gets a list
- of drives connected to the system.
- </p></div><div class="refsect2" title="gio.VolumeMonitor.get_mount_for_uuid"><a name="method-giovolumemonitor--get-mount-for-uuid"></a><h3>gio.VolumeMonitor.get_mount_for_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_mount_for_uuid</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uuid</code></strong> :</span></p></td><td>The UUID to look for.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- or <code class="literal">None</code> if no such mount is available.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_mount_for_uuid</code>() method finds a
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- object by it's UUID (see
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">gio.Mount.get_uuid</a></code>())
- </p></div><div class="refsect2" title="gio.VolumeMonitor.get_mounts"><a name="method-giovolumemonitor--get-mounts"></a><h3>gio.VolumeMonitor.get_mounts</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_mounts</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- objects.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_mounts</code>() method gets a list of the mounts on the system.
- </p></div><div class="refsect2" title="gio.VolumeMonitor.get_volume_for_uuid"><a name="method-giovolumemonitor--get-volume-for-uuid"></a><h3>gio.VolumeMonitor.get_volume_for_uuid</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volume_for_uuid</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uuid</code></strong> :</span></p></td><td>The UUID to look for.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- or <code class="literal">None</code> if no such volume is available.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_mount_for_uuid</code>() method finds a
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- object by it's UUID (see
- <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">gio.Mount.get_uuid</a></code>())
- </p></div><div class="refsect2" title="gio.VolumeMonitor.get_volumes"><a name="method-giovolumemonitor--get-volumes"></a><h3>gio.VolumeMonitor.get_volumes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- objects.
- </td></tr></tbody></table><p>
- The <code class="methodname">get_volumes</code>() method gets a list of the volumes on the system.
- </p></div></div><div class="refsect1" title="Functions"><a name="id532706"></a><h2>Functions</h2><div class="refsect2" title="gio.volume_monitor_adopt_orphan_mount"><a name="function-gio--volume-monitor-adopt-orphan-mount"></a><h3>gio.volume_monitor_adopt_orphan_mount</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">volume_monitor_adopt_orphan_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- object that is the parent for mount or <code class="literal">None</code> if no wants to adopt the
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>.
- </td></tr></tbody></table><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method will be deprecated starting from GIO 2.20</p></div><p>
- The <code class="methodname">volume_monitor_adopt_orphan_mount</code>() function should
- be called by any <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- implementation when a new <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- object is created that is not associated with a
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a> object.
- It must be called just before emitting the mount_added signal.
- </p><p>
- If the return value is not <code class="literal">None</code>, the caller must associate the returned
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- object with the
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>.
- This involves returning it in it's
- <code class="methodname"><PYGTKDOCLINK HREF="method-giomount--get-volumes">gio.Mount.get_volumes</PYGTKDOCLINK></code>()
- implementation. The caller must also listen for the "removed" signal on the
- returned object and give up it's reference when handling that signal
- </p><p>
- Similary, if implementing
- <code class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount" title="gio.volume_monitor_adopt_orphan_mount">gio.volume_monitor_adopt_orphan_mount</a></code>(),
- the implementor must take a reference to mount and return it in it's
- <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">gio.Volume.get_mount</a></code>()
- implemented. Also, the implementor must listen for the "unmounted" signal
- on mount and give up it's reference upon handling that signal.
- </p><p>
- There are two main use cases for this function.
- </p><p>
- One is when implementing a user space file system driver that reads blocks of
- a block device that is already represented by the native volume monitor
- (for example a CD Audio file system driver). Such a driver will generate it's own
- <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
- object that needs to be assoicated with the
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- object that represents the volume.
- </p><p>
- The other is for implementing a
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- whose sole purpose is to return
- <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
- objects representing entries in the users "favorite servers" list or similar.
- </p></div><div class="refsect2" title="gio.volume_monitor_get"><a name="function-gio--volume-monitor-get"></a><h3>gio.volume_monitor_get</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">volume_monitor_get</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A reference to the
- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
- used by gio.
- </td></tr></tbody></table><p>
- The <code class="methodname">volume_monitor_get</code>() function gets the
- volume monitor used by gio.
- </p></div></div><div class="refsect1" title="Signals"><a name="id532987"></a><h2>Signals</h2><div class="refsect2" title='The "drive-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-changed"></a><h3>The "drive-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that changed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a drive changes.
- </p></div><div class="refsect2" title='The "drive-connected" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-connected"></a><h3>The "drive-connected" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that was connected</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a drive is connected to the system.
- </p></div><div class="refsect2" title='The "drive-disconnected" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-disconnected"></a><h3>The "drive-disconnected" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that was disconnected</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a drive is disconnected from the system.
- </p></div><div class="refsect2" title='The "drive-eject-button" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-eject-button"></a><h3>The "drive-eject-button" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive where the eject button was pressed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when the eject button is pressed on drive.
- </p></div><div class="refsect2" title='The "mount-added" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-added"></a><h3>The "mount-added" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>a Mount that was added.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a mount is added.
- </p></div><div class="refsect2" title='The "mount-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-changed"></a><h3>The "mount-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that changed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a mount changes.
- </p></div><div class="refsect2" title='The "mount-pre-unmount" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-pre-unmount"></a><h3>The "mount-pre-unmount" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that is being unmounted.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a mount is about to be removed.
- </p></div><div class="refsect2" title='The "mount-removed" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-removed"></a><h3>The "mount-removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that was removed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a mount is removed.
- </p></div><div class="refsect2" title='The "volume-added" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-added"></a><h3>The "volume-added" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that was added.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a mountable volume is added to the system.
- </p></div><div class="refsect2" title='The "volume-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-changed"></a><h3>The "volume-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that changed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when mountable volume is changed.
- </p></div><div class="refsect2" title='The "volume-removed" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-removed"></a><h3>The "volume-removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that was removed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
- with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
- method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
- Emitted when a mountable volume is removed from the system.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giovolume.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Volume </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-glibmaincontext.html b/docs/html/class-glibmaincontext.html
index 9f815f6..48cf28b 100644
--- a/docs/html/class-glibmaincontext.html
+++ b/docs/html/class-glibmaincontext.html
@@ -1,7 +1,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib.MainContext</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="next" href="class-glibmainloop.html" title="glib.MainLoop"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib.MainContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-glibmainloop.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib.MainContext"><a name="class-glibmaincontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib.MainContext</h2><p>glib.MainContext — an object representing a set of event sources to be handled
-in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</p></div><div class="refsect1" title="Synopsis"><a name="id392555"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">glib.MainContext</span></span>:
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-glibmaincontext.html#constructor-glibmaincontext" title="Constructor">glib.MainContext</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration">iteration</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>may_block</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmaincontext.html#method-glibmaincontext--pending" title="glib.MainContext.pending">pending</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id392487"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-glibmaincontext.html" title="glib.MainContext">glib.MainContext</a>
-</pre></div><div class="refsect1" title="Description"><a name="id392470"></a><h2>Description</h2><p>A <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+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="id524298"></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="id524228"></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="id524211"></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,7 +13,7 @@ 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="id392378"></a><h2>Methods</h2><div class="refsect2" title="glib.MainContext.iteration"><a name="method-glibmaincontext--iteration"></a><h3>glib.MainContext.iteration</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iteration</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>may_block</code></em> :</span></p></td><td>if <code class="literal">True</code> the call may block
+object.</p></div><div class="refsect1" title="Methods"><a name="id524119"></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
diff --git a/docs/html/class-glibmainloop.html b/docs/html/class-glibmainloop.html
index f5ba208..38df43a 100644
--- a/docs/html/class-glibmainloop.html
+++ b/docs/html/class-glibmainloop.html
@@ -1,7 +1,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib.MainLoop</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmaincontext.html" title="glib.MainContext"><link rel="next" href="glib-functions.html" title="glib Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib.MainLoop</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmaincontext.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib.MainLoop"><a name="class-glibmainloop"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib.MainLoop</h2><p>glib.MainLoop — an object representing the main event loop of a PyGTK
- application.</p></div><div class="refsect1" title="Synopsis"><a name="id394804"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">glib.MainLoop</span></span>:
-<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-glibmainloop.html#constructor-glibmainloop" title="Constructor">glib.MainLoop</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>context</code></em></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>is_running</code></em></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--get-context" title="glib.MainLoop.get_context">get_context</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--is-running" title="glib.MainLoop.is_running">is_running</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit">quit</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run">run</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id395291"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-glibmainloop.html" title="glib.MainLoop">glib.MainLoop</a>
-</pre></div><div class="refsect1" title="Description"><a name="id394716"></a><h2>Description</h2><p><a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+ application.</p></div><div class="refsect1" title="Synopsis"><a name="id522445"></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="id537351"></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="id509526"></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>
@@ -24,7 +24,7 @@ functions.</p></div><div class="refsect1" title="Constructor"><a name="construct
method will set this to <code class="literal">True</code>
anyway.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
object.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
-object.</p></div><div class="refsect1" title="Methods"><a name="id385752"></a><h2>Methods</h2><div class="refsect2" title="glib.MainLoop.get_context"><a name="method-glibmainloop--get-context"></a><h3>glib.MainLoop.get_context</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_context</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+object.</p></div><div class="refsect1" title="Methods"><a name="id469591"></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
diff --git a/docs/html/class-gobject.html b/docs/html/class-gobject.html
index 1a71df7..e8eae25 100644
--- a/docs/html/class-gobject.html
+++ b/docs/html/class-gobject.html
@@ -1,6 +1,6 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GObject</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="next" href="class-gobjectgboxed.html" title="gobject.GBoxed"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GObject</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GObject"><a name="class-gobject"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gobject.GObject</span></h2><p>gobject.GObject — the base class</p></div><div class="refsect1" title="Synopsis"><a name="id438474"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GObject</span></span>:
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property">get_property</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-properties" title="gobject.GObject.get_properties">get_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>first_property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property">set_property</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-properties" title="gobject.GObject.set_properties">set_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span><span class="initializer">=value</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--freeze-notify" title="gobject.GObject.freeze_notify">freeze_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--notify" title="gobject.GObject.notify">notify</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--thaw-notify" title="gobject.GObject.thaw_notify">thaw_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-data" title="gobject.GObject.get_data">get_data</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-data" title="gobject.GObject.set_data">set_data</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>data</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect">connect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-after" title="gobject.GObject.connect_after">connect_after</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-object" title="gobject.GObject.connect_object">connect_object</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-object-after" title="gobject.GObject.connect_object_after">connect_object_after</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--disconnect" title="gobject.GObject.disconnect">disconnect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-disconnect" title="gobject.GObject.handler_disconnect">handler_disconnect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-is-connected" title="gobject.GObject.handler_is_connected">handler_is_connected</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-block" title="gobject.GObject.handler_block">handler_block</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-unblock" title="gobject.GObject.handler_unblock">handler_unblock</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-block-by-func" title="gobject.GObject.handler_block_by_func">handler_block_by_func</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-unblock-by-func" title="gobject.GObject.handler_unblock_by_func">handler_unblock_by_func</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit">emit</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission">stop_emission</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--emit-stop-by-name" title="gobject.GObject.emit_stop_by_name">emit_stop_by_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--chain" title="gobject.GObject.chain">chain</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id360340"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
-</pre></div><div class="refsect1" title="Attributes"><a name="id360346"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"props"</td><td valign="top">Read/Write</td><td valign="top">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GObject</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="next" href="class-gobjectgboxed.html" title="gobject.GBoxed"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GObject</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GObject"><a name="class-gobject"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gobject.GObject</span></h2><p>gobject.GObject — the base class</p></div><div class="refsect1" title="Synopsis"><a name="id552877"></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="id510735"></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="id478802"></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="id365926"></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="id493246"></a><h2>Description</h2><p>The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
class is the base class providing the common attributes and methods for
the PyGTK classes. The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
class is not a user interface widget class.</p><p>The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
class provides the signal management methods, the object property access
- methods and the object data management methods.</p></div><div class="refsect1" title="Methods"><a name="id365893"></a><h2>Methods</h2><div class="refsect2" title="gobject.GObject.get_property"><a name="method-gobject--get-property"></a><h3>gobject.GObject.get_property</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_property</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing the property name for the
+ methods and the object data management methods.</p></div><div class="refsect1" title="Methods"><a name="id493213"></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
@@ -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="id357922"></a><h2>Signals</h2><div class="refsect2" title='The GObject "notify" Signal'><a name="signal-gobject--notify"></a><h3>The GObject "notify" Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>property_spec</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>the gobject that received the
+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="id513981"></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>
diff --git a/docs/html/class-gobjectgboxed.html b/docs/html/class-gobjectgboxed.html
index 30b7dc5..0d4a4cb 100644
--- a/docs/html/class-gobjectgboxed.html
+++ b/docs/html/class-gobjectgboxed.html
@@ -1,9 +1,9 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GBoxed</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobject.html" title="gobject.GObject"><link rel="next" href="class-gobjectgpointer.html" title="gobject.GPointer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GBoxed</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GBoxed"><a name="class-gobjectgboxed"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GBoxed</h2><p>gobject.GBoxed — an object containing an opaque chunk of data</p></div><div class="refsect1" title="Synopsis"><a name="id411403"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GBoxed</span></span>:
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gobjectgboxed.html#method-gobjectgboxed--copy" title="gobject.GBoxed.copy">copy</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id430702"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed">gobject.GBoxed</a>
-</pre></div><div class="refsect1" title="Description"><a name="id365742"></a><h2>Description</h2><p><a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GBoxed</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobject.html" title="gobject.GObject"><link rel="next" href="class-gobjectgpointer.html" title="gobject.GPointer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GBoxed</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GBoxed"><a name="class-gobjectgboxed"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GBoxed</h2><p>gobject.GBoxed — an object containing an opaque chunk of data</p></div><div class="refsect1" title="Synopsis"><a name="id512543"></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="id483101"></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="id490680"></a><h2>Description</h2><p><a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
is an abstract base class that encapsulates an opaque chunk of data to
provide an object-oriented interface and a type that is registered with the
<code class="literal">GLIB</code> type system. A boxed type is registered with
functions that provide for the copying and freeing of the underlying data
-structure - this allows PyGTK to encapsulate these as Python objects.</p></div><div class="refsect1" title="Methods"><a name="id422177"></a><h2>Methods</h2><div class="refsect2" title="gobject.GBoxed.copy"><a name="method-gobjectgboxed--copy"></a><h3>gobject.GBoxed.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a copy of the <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
+structure - this allows PyGTK to encapsulate these as Python objects.</p></div><div class="refsect1" title="Methods"><a name="id481935"></a><h2>Methods</h2><div class="refsect2" title="gobject.GBoxed.copy"><a name="method-gobjectgboxed--copy"></a><h3>gobject.GBoxed.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a copy of the <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
object</td></tr></tbody></table><p>The <code class="methodname">copy</code>() method makes and returns a copy of the boxed object.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GObject </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GPointer</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectginterface.html b/docs/html/class-gobjectginterface.html
index 5156c43..ab948f4 100644
--- a/docs/html/class-gobjectginterface.html
+++ b/docs/html/class-gobjectginterface.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GInterface</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgpointer.html" title="gobject.GPointer"><link rel="next" href="gobject-functions.html" title="gobject Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GInterface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GInterface"><a name="class-gobjectginterface"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GInterface</h2><p>gobject.GInterface — an object representing a GInterface</p></div><div class="refsect1" title="Synopsis"><a name="id367430"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GInterface</span></span>:
-</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id357622"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
-</pre></div><div class="refsect1" title="Description"><a name="id358624"></a><h2>Description</h2><p><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface"><code class="classname">gobject.GInterface</code></a>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GInterface</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgpointer.html" title="gobject.GPointer"><link rel="next" href="gobject-functions.html" title="gobject Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GInterface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GInterface"><a name="class-gobjectginterface"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GInterface</h2><p>gobject.GInterface — an object representing a GInterface</p></div><div class="refsect1" title="Synopsis"><a name="id516319"></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="id545183"></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="id511551"></a><h2>Description</h2><p><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface"><code class="classname">gobject.GInterface</code></a>
is an abstract base class that encapsulates a GInterface.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GPointer </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectgpointer.html b/docs/html/class-gobjectgpointer.html
index 258a160..2d01e39 100644
--- a/docs/html/class-gobjectgpointer.html
+++ b/docs/html/class-gobjectgpointer.html
@@ -1,7 +1,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GPointer</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgboxed.html" title="gobject.GBoxed"><link rel="next" href="class-gobjectginterface.html" title="gobject.GInterface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GPointer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgboxed.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectginterface.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GPointer"><a name="class-gobjectgpointer"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GPointer</h2><p>gobject.GPointer — an object containing a completely opaque chunk of
- data</p></div><div class="refsect1" title="Synopsis"><a name="id357742"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GPointer</span></span>:
-</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id357261"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectgpointer.html" title="gobject.GPointer">gobject.GPointer</a>
-</pre></div><div class="refsect1" title="Description"><a name="id376068"></a><h2>Description</h2><p><a class="link" href="class-gobjectgpointer.html" title="gobject.GPointer"><code class="classname">gobject.GPointer</code></a>
+ data</p></div><div class="refsect1" title="Synopsis"><a name="id480867"></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="id521079"></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="id477187"></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
diff --git a/docs/html/gio-class-reference.html b/docs/html/gio-class-reference.html
deleted file mode 100644
index 9b0f9b6..0000000
--- a/docs/html/gio-class-reference.html
+++ /dev/null
@@ -1 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGio Class Reference</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="gobject-constants.html" title="gobject Constants"><link rel="next" href="class-gioappinfo.html" title="gio.AppInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGio Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-gioappinfo.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGio Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="gio-class-reference"></a>PyGio Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-gioappinfo.html">gio.AppInfo</a></span><span class="refpurpose"> — Information about an installed application and methods to launch it (with file arguments).</span></dt><dt><span class="refentrytitle"><a href="class-gioapplaunchcontext.html">gio.AppLaunchContext</a></span><span class="refpurpose"> — Application launch context.</span></dt><dt><span class="refentrytitle"><a href="class-gioasyncresult.html">gio.AsyncResult</a></span><span class="refpurpose"> — Asynchronous Function Results.</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedinputstream.html">gio.BufferedInputStream</a></span><span class="refpurpose"> — Buffered Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedoutputstream.html">gio.BufferedOutputStream</a></span><span class="refpurpose"> — Buffered Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giocancellable.html">gio.Cancellable</a></span><span class="refpurpose"> — Thread-safe Operation Cancellation Stack.</span></dt><dt><span class="refentrytitle"><a href="class-giodatainputstream.html">gio.DataInputStream</a></span><span class="refpurpose"> — Data Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodataoutputstream.html">gio.DataOutputStream</a></span><span class="refpurpose"> — Data Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodrive.html">gio.Drive</a></span><span class="refpurpose"> — Virtual File System drive management.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblem.html">gio.Emblem</a></span><span class="refpurpose"> — An object for emblems.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblemedicon.html">gio.EmblemedIcon</a></span><span class="refpurpose"> — Icon with emblems.</span></dt><dt><span class="refentrytitle"><a href="class-giofile.html">gio.File</a></span><span class="refpurpose"> — File and Directory Handling.</span></dt><dt><span class="refentrytitle"><a href="class-giofileattributeinfo.html">gio.FileAttributeInfo</a></span><span class="refpurpose"> — Information about a specific attribute.</span></dt><dt><span class="refentrytitle"><a href="class-giofileenumerator.html">gio.FileEnumerator</a></span><span class="refpurpose"> — Enumerated Files Routines.</span></dt><dt><span class="refentrytitle"><a href="class-giofileicon.html">gio.FileIcon</a></span><span class="refpurpose"> — Icons pointing to an image file.</span></dt><dt><span class="refentrytitle"><a href="class-giofileinfo.html">gio.FileInfo</a></span><span class="refpurpose"> — File Information and Attributes</span></dt><dt><span class="refentrytitle"><a href="class-giofileinputstream.html">gio.FileInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilemonitor.html">gio.FileMonitor</a></span><span class="refpurpose"> — File Monitor</span></dt><dt><span class="refentrytitle"><a href="class-giofileoutputstream.html">gio.FileOutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilterinputstream.html">gio.FilterInputStream</a></span><span class="refpurpose"> — Filter Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giofilteroutputstream.html">gio.FilterOutputStream</a></span><span class="refpurpose"> — Filter Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-gioicon.html">gio.Icon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-gioinputstream.html">gio.InputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioloadableicon.html">gio.LoadableIcon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryinputstream.html">gio.MemoryInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryoutputstream.html">gio.MemoryOutputStream</a></span><span class="refpurpose"> — Streaming output operations on memory chunks</span></dt><dt><span class="refentrytitle"><a href="class-giomount.html">gio.Mount</a></span><span class="refpurpose"> — Mount management</span></dt><dt><span class="refentrytitle"><a href="class-giomountoperation.html">gio.MountOperation</a></span><span class="refpurpose"> — Authentication methods for mountable locations.</span></dt><dt><span class="refentrytitle"><a href="class-giooutputstream.html">gio.OutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioseekable.html">gio.Seekable</a></span><span class="refpurpose"> — Stream seeking interface.</span></dt><dt><span class="refentrytitle"><a href="class-giosimpleasyncresult.html">gio.SimpleAsyncResult</a></span><span class="refpurpose"> — Simple asynchronous results implementation.</span></dt><dt><span class="refentrytitle"><a href="class-giothemedicon.html">gio.ThemedIcon</a></span><span class="refpurpose"> — Icon theming support.</span></dt><dt><span class="refentrytitle"><a href="class-giovolume.html">gio.Volume</a></span><span class="refpurpose"> — Volume management.</span></dt><dt><span class="refentrytitle"><a href="class-giovolumemonitor.html">gio.VolumeMonitor</a></span><span class="refpurpose"> — Volume Monitor.</span></dt><dt><span class="refentrytitle"><a href="gio-functions.html">gio Functions</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="gio-constants.html">gio Constants</a></span><span class="refpurpose"> — the built-in constants of the gio module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-gioappinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AppInfo</td></tr></table></div></body></html>
diff --git a/docs/html/gio-constants.html b/docs/html/gio-constants.html
deleted file mode 100644
index 074b1d4..0000000
--- a/docs/html/gio-constants.html
+++ /dev/null
@@ -1,414 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="gio-functions.html" title="gio Functions"><link rel="next" href="giounix-class-reference.html" title="PyGio Unix Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-functions.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="giounix-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio Constants"><a name="gio-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio Constants</h2><p>gio Constants — the built-in constants of the gio module</p></div><div class="refsect1" title="Synopsis"><a name="id536207"></a><h2>Synopsis</h2><pre class="programlisting">
-<a class="xref" href="gio-constants.html#gio-app-info-constants" title="Gio AppInfo Create Flags Constants">Gio AppInfo Create Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-ask-password-flags-constants" title="Gio Ask Password Flags Constants">Gio Ask Password Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>
-<a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a>
-<a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
-<a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-attribute-constants" title="Gio File Attribute Constants">Gio File Attribute Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-attribute-flags-constants" title="Gio File Attribute Flags Constants">Gio File Attribute Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
-<a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
-<a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>
-<a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
-</pre></div><div class="refsect1" title="Description"><a name="gio-constants-description"></a><h2>Description</h2><div class="refsect2" title="Gio Ask Password Flags Constants"><a name="gio-ask-password-flags-constants"></a><h3>Gio Ask Password Flags Constants</h3><p>
- Flags that are used to request specific information from the user, or to
- notify the user of their choices in an authentication situation.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED</code></span></p></td><td>operation supports anonymous users.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_DOMAIN</code></span></p></td><td>operation requires a domain.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_PASSWORD</code></span></p></td><td>operation requires a password.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_USERNAME</code></span></p></td><td>operation requires a username.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_SAVING_SUPPORTED</code></span></p></td><td>operation supports saving settings.</td></tr></tbody></table></div><div class="refsect2" title="Gio AppInfo Create Flags Constants"><a name="gio-app-info-constants"></a><h3>Gio AppInfo Create Flags Constants</h3><p>
- Flags used when creating a <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_NONE</code></span></p></td><td>No flags.</td></tr><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_NEEDS_TERMINAL</code></span></p></td><td>Application opens in a terminal window. </td></tr><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_SUPPORTS_URIS</code></span></p></td><td>Application supports URI arguments. </td></tr></tbody></table></div><div class="refsect2" title="Gio Data Stream Byte Order Constants"><a name="gio-data-stream-byte-order-constants"></a><h3>Gio Data Stream Byte Order Constants</h3><p>
- Used to ensure proper endianness of streaming data sources across various machine architectures.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</code></span></p></td><td>Selects Big Endian byte order.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_HOST_ENDIAN</code></span></p></td><td>Selects endianness based on host machine's architecture.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN</code></span></p></td><td>Selects Little Endian byte order.</td></tr></tbody></table></div><div class="refsect2" title="Gio Data Stream Newline Type Constants"><a name="gio-data-stream-newline-type-constants"></a><h3>Gio Data Stream Newline Type Constants</h3><p>
- Used when checking for or setting the line endings for a given file.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_LF</code></span></p></td><td>Selects "LF" line endings, common on most modern UNIX platforms.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_CR</code></span></p></td><td>Selects "CR" line endings.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_CR_LF</code></span></p></td><td>Selects "CR, LF" line ending, common on Microsoft Windows.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_ANY</code></span></p></td><td>Automatically try to handle any line ending type.</td></tr></tbody></table></div><div class="refsect2" title="Gio Emblem Origin Constants"><a name="gio-emblem-origin-constants"></a><h3>Gio Emblem Origin Constants</h3><p>
- GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_DEVICE</code></span></p></td><td>Embleme adds device-specific information.</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_LIVEMETADATA</code></span></p></td><td>Emblem depicts live metadata, such as "readonly".</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_TAG</code></span></p></td><td>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future).</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_UNKNOWN</code></span></p></td><td>Emblem of unknown origin.</td></tr></tbody></table></div><div class="refsect2" title="Gio Error Constants"><a name="gio-error-constants"></a><h3>Gio Error Constants</h3><p>
- GIOError Error codes returned by GIO functions.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.ERROR_ALREADY_MOUNTED</code></span></p></td><td>File is already mounted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_BUSY</code></span></p></td><td>File is busy.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CANCELLED</code></span></p></td><td>Operation was cancelled. See
- <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CANT_CREATE_BACKUP</code></span></p></td><td>Backup couldn't be created.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CLOSED</code></span></p></td><td>File was closed.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_EXISTS</code></span></p></td><td>File already exists error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FAILED</code></span></p></td><td>Generic error condition for when any operation fails.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FAILED_HANDLED</code></span></p></td><td>Operation failed and a helper program has already interacted with
- the user. Do not display any error dialog. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FILENAME_TOO_LONG</code></span></p></td><td>Filename is too many characters.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_HOST_NOT_FOUND</code></span></p></td><td>Host couldn't be found (remote operations).</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_INVALID_ARGUMENT</code></span></p></td><td>Invalid argument.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_INVALID_FILENAME</code></span></p></td><td>Filename is invalid or contains invalid characters.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_IS_DIRECTORY</code></span></p></td><td>File is a directory error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_DIRECTORY</code></span></p></td><td>File is not a directory.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_EMPTY</code></span></p></td><td>File is a directory that isn't empty.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_FOUND</code></span></p></td><td>File not found error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_MOUNTABLE_FILE</code></span></p></td><td>File cannot be mounted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_MOUNTED</code></span></p></td><td>File isn't mounted. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_REGULAR_FILE</code></span></p></td><td>File is not a regular file.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_SUPPORTED</code></span></p></td><td>Operation not supported for the current backend.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_SYMBOLIC_LINK</code></span></p></td><td>File is not a symbolic link.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NO_SPACE</code></span></p></td><td>No space left on drive. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_PENDING</code></span></p></td><td>Operations are still pending.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_PERMISSION_DENIED</code></span></p></td><td>Permission denied.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_READ_ONLY</code></span></p></td><td>File is read only. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TIMED_OUT</code></span></p></td><td>Operation timed out. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TOO_MANY_LINKS</code></span></p></td><td>File contains too many symbolic links. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TOO_MANY_OPEN_FILES</code></span></p></td><td>The current process has too many files open and can't open any
- more. Duplicate descriptors do count toward this limit. Since 2.20</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_BLOCK</code></span></p></td><td>Operation would block.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_MERGE</code></span></p></td><td>Operation would merge files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_RECURSE</code></span></p></td><td>Operation would be recursive.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WRONG_ETAG</code></span></p></td><td>File's Entity Tag was incorrect. </td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Constants"><a name="gio-file-attribute-constants"></a><h3>Gio File Attribute Constants</h3><p>
- The file attributes.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_TYPE</code></span></p></td><td>
- "standard::type" A key in the "standard" namespace for storing file types. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a
- <a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</code></span></p></td><td>
- "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP</code></span></p></td><td>
- "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</code></span></p></td><td>
- "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink.
- Typically the actual type is something else, if we followed the symlink to get the type. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</code></span></p></td><td>
- "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_NAME</code></span></p></td><td>
- "standard::name" A key in the "standard" namespace for getting the name of the file.
- The name is the on-disk filename which may not be in any known encoding,
- and can thus not be generally displayed as is. Use
- gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user
- interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</code></span></p></td><td>
- "standard::display-name" A key in the "standard" namespace for getting the display
- name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed
- in the UI. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME</code></span></p></td><td>
- "standard::edit-name" A key in the "standard" namespace for edit name of the file.
- An edit name is similar to the display name, but it is meant to be used when you want
- to rename the file in the UI. The display name might contain information you don't
- want in the new filename (such as "(invalid unicode)" if the filename was in an
- invalid encoding). Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME</code></span></p></td><td>
- "standard::copy-name" A key in the "standard" namespace for getting the copy
- name of the file. The copy name is an optional version of the name. If available
- it's always in UTF8, and corresponds directly to the original filename (only transcoded
- to UTF8). This is useful if you want to copy the file to another filesystem that might
- have a different encoding. If the filename is not a valid string in the encoding selected
- for the filesystem it is in then the copy name will not be set. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_ICON</code></span></p></td><td>
- "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</code></span></p></td><td>
- "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</code></span></p></td><td>
- "standard::fast-content-type" A key in the "standard" namespace for getting the fast
- content type. The fast content type isn't as reliable as the regular one, as it
- only uses the filename to guess it, but it is faster to calculate than the regular
- content type. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SIZE</code></span></p></td><td>
- "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</code></span></p></td><td>
- "standard::symlink-target" A key in the "standard" namespace for getting the target URI
- for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER</code></span></p></td><td>
- "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this
- key to set the order files are displayed. Files with smaller sort order should be sorted first,
- and files without sort order as if sort order was zero.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ETAG_VALUE</code></span></p></td><td>
- "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ID_FILE</code></span></p></td><td>
- "id::file" A key in the "id" namespace for getting a file identifier. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files,
- to avoid recursive directory scanning.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ID_FILESYSTEM</code></span></p></td><td>
- "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and
- drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_READ</code></span></p></td><td>
- "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
- if the user is able to read the file.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE</code></span></p></td><td>
- "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
- if the user is able to write to the file.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</code></span></p></td><td>
- "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
- if the user is able to execute the file.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE</code></span></p></td><td>
- "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
- if the user is able to delete the file.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH</code></span></p></td><td>
- "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
- if the user is able to move the file to the trash.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME</code></span></p></td><td>
- "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
- if the user is able to rename the file.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</code></span></p></td><td>
- "mountable::can-mount" A key in the "mountable" namespace for checking if
- a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</code></span></p></td><td>
- "mountable::can-unmount" A key in the "mountable" namespace for checking if a file
- (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</code></span></p></td><td>
- "mountable::can-eject" A key in the "mountable" namespace for checking if a file
- (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</code></span></p></td><td>
- "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</code></span></p></td><td>
- "mountable::hal-udi" A key in the "mountable" namespace for getting the
- HAL UDI for the mountable file. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_MODIFIED</code></span></p></td><td>
- "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC</code></span></p></td><td>
- "time::modified-usec" A key in the "time" namespace for getting the miliseconds
- of the time the file was last modified. This should be used in conjunction
- with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_ACCESS</code></span></p></td><td>
- "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC</code></span></p></td><td>
- "time::access-usec" A key in the "time" namespace for getting the microseconds of
- the time the file was last accessed. This should be used in conjunction
- with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CHANGED</code></span></p></td><td>
- "time::changed" A key in the "time" namespace for getting the time the
- file was last changed. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed.
- This corresponds to the traditional UNIX ctime.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC</code></span></p></td><td>
- "time::changed-usec" A key in the "time" namespace for getting the microseconds
- of the time the file was last changed. This should be used in conjunction
- with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CREATED</code></span></p></td><td>
- "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created.
- This corresponds to the NTFS ctime.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CREATED_USEC</code></span></p></td><td>
- "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the
- file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_DEVICE</code></span></p></td><td>
- "unix::device" A key in the "unix" namespace for getting the device id of the device the file
- is located on (see stat() documentation). This attribute is only available
- for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_INODE</code></span></p></td><td>
- "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only
- available for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_MODE</code></span></p></td><td>
- "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g.
- whether the file is a regular file, symlink, etc). See lstat() documentation.
- This attribute is only available for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_NLINK</code></span></p></td><td>
- "unix::nlink" A key in the "unix" namespace for getting the number of hard links
- for a file. See lstat() documentation. This attribute is only available for UNIX
- file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_UID</code></span></p></td><td>
- "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute
- is only available for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_GID</code></span></p></td><td>
- "unix::gid" A key in the "unix" namespace for getting the group ID for the file.
- This attribute is only available for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_RDEV</code></span></p></td><td>
- "unix::rdev" A key in the "unix" namespace for getting the device ID for the file
- (if it is a special file). See lstat() documentation. This attribute is only available
- for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</code></span></p></td><td>
- "unix::block-size" A key in the "unix" namespace for getting the block size for
- the file system. This attribute is only available for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_BLOCKS</code></span></p></td><td>
- "unix::blocks" A key in the "unix" namespace for getting the number of blocks allocated
- for the file. This attribute is only available for UNIX file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</code></span></p></td><td>
- "unix::is-mountpoint" A key in the "unix" namespace for checking if the file represents
- a UNIX mount point. This attribute is <code class="literal">True</code> if the file is a UNIX mount point.
- This attribute is only available for UNIX file systems. Corresponding
- GFileAttributeType
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_DOS_IS_ARCHIVE</code></span></p></td><td>
- "dos::is-archive" A key in the "dos" namespace for checking if the file's archive
- flag is set. This attribute is <code class="literal">True</code> if the archive flag is set.
- This attribute is only available for DOS file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_DOS_IS_SYSTEM</code></span></p></td><td>
- "dos::is-system" A key in the "dos" namespace for checking if the file's backup
- flag is set. This attribute is <code class="literal">True</code> if the backup flag is set.
- This attribute is only available for DOS file systems. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
- G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_USER</code></span></p></td><td>
- "owner::user" A key in the "owner" namespace for getting the user name
- of the file's owner. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_USER_REAL</code></span></p></td><td>
- "owner::user-real" A key in the "owner" namespace for getting the real name
- of the user that owns the file. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
- G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_GROUP</code></span></p></td><td>
- "owner::group" A key in the "owner" namespace for getting the file owner's
- group. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_THUMBNAIL_PATH</code></span></p></td><td>
- "thumbnail::path" A key in the "thumbnail" namespace for getting the path
- to the thumbnail image. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_THUMBNAILING_FAILED</code></span></p></td><td>
- "thumbnail::failed" A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute
- is <code class="literal">True</code> if thumbnailing failed. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
- G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_PREVIEW_ICON</code></span></p></td><td>
- "preview::icon" A key in the "preview" namespace for getting a
- <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- that can be used to get preview of the file. For example, it
- may be a low resolution thumbnail without metadata. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
- G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a GIcon.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE</code></span></p></td><td>
- "filesystem::size" A key in the "filesystem" namespace for getting the total
- size (in bytes) of the file system, used in
- <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></code>().
- Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_FREE</code></span></p></td><td>
- "filesystem::free" A key in the "filesystem" namespace for getting the number of bytes of free space left
- on the file system. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE</code></span></p></td><td>
- "filesystem::type" A key in the "filesystem" namespace for getting the file system's type. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_READONLY</code></span></p></td><td>
- "filesystem::readonly" A key in the "filesystem" namespace for checking if the
- file system is read only. Is set to <code class="literal">True</code> if the file system
- is read only. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_GVFS_BACKEND</code></span></p></td><td>
- "gvfs::backend" A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_SELINUX_CONTEXT</code></span></p></td><td>
- "selinux::context" A key in the "selinux" namespace for getting the file's SELinux context. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- Note that this attribute is only available if GLib has been built with SELinux support.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TRASH_ITEM_COUNT</code></span></p></td><td>
- "trash::item-count" A key in the "trash" namespace. When requested against "trash:///" returns the number
- of (toplevel) items in the trash folder. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_UINT32.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</code></span></p></td><td>
- "filesystem::use-preview" A key in the "filesystem" namespace for hinting a file manager
- application whether it should preview (e.g. thumbnail) files on the file system.
- The value for this key contain a GFilesystemPreviewType.
- </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_DESCRIPTION</code></span></p></td><td>
- "standard::description" A key in the "standard" namespace for getting the description
- of the file. The description is a utf8 string that describes the file, generally containing
- the filename, but can also contain furter information. Example descriptions could be
- "filename (on hostname)" for a remote file or "filename (in trash)" for a
- file in the trash. This is useful for instance as the window title when
- displaying a directory or for a bookmarks menu. Corresponding
- <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Type Constants"><a name="gio-file-attribute-type-constants"></a><h3>Gio File Attribute Type Constants</h3><p>
- The data types for file attributes.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</code></span></p></td><td>a boolean value.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</code></span></p></td><td>a zero terminated string of non-zero bytes.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INT32</code></span></p></td><td>a signed 4-byte/32-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INT64</code></span></p></td><td>a signed 8-byte/64-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INVALID</code></span></p></td><td>indicates an invalid or uninitalized type.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_OBJECT</code></span></p></td><td>a <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_STRING</code></span></p></td><td>a null terminated UTF8 string.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_UINT32</code></span></p></td><td>an unsigned 4-byte/32-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_UINT64</code></span></p></td><td>an unsigned 8-byte/64-bit integer.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Flags Constants"><a name="gio-file-attribute-flags-constants"></a><h3>Gio File Attribute Flags Constants</h3><p>
- Flags specifying the behaviour of an attribute.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_NONE</code></span></p></td><td>no flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</code></span></p></td><td>copy the attribute values when the file is copied.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</code></span></p></td><td>copy the attribute values when the file is moved.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Create Flags Constants"><a name="gio-file-create-flags-constants"></a><h3>Gio File Create Flags Constants</h3><p>
- Flags used when an operation may create a file.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_PRIVATE</code></span></p></td><td>Create a file that can only be accessed by the current user.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_REPLACE_DESTINATION</code></span></p></td><td>
- Replace the destination as if it didn't exist before. Don't try
- to keep any old permissions, replace instead of following links. This is
- generally useful if you're doing a "copy over" rather than a "save new version of"
- replace operation. You can think of it as "unlink destination" before writing
- to it, although the implementation may not be exactly like that.
- </td></tr></tbody></table></div><div class="refsect2" title="Gio File Copy Flags Constants"><a name="gio-file-copy-flags-constants"></a><h3>Gio File Copy Flags Constants</h3><p>
- Flags used when copying or moving files.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_OVERWRITE</code></span></p></td><td>Overwrite any existing files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_BACKUP</code></span></p></td><td>Make a backup of any existing files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NOFOLLOW_SYMLINKS</code></span></p></td><td>Don't follow symlinks.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_ALL_METADATA</code></span></p></td><td>Copy all file metadata instead of just default set used for copy
- (see <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NO_FALLBACK_FOR_MOVE</code></span></p></td><td>Don't use copy and delete fallback if native move not supported.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_TARGET_DEFAULT_PERMS</code></span></p></td><td>Leaves target file with default perms, instead of setting the source file perms.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Monitor Flags Constants"><a name="gio-file-monitor-flags-constants"></a><h3>Gio File Monitor Flags Constants</h3><p>
- Flags used to set what a
- <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
- will watch for.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_MONITOR_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_MONITOR_WATCH_MOUNTS</code></span></p></td><td>Watch for mount events.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Query Info Flags Constants"><a name="gio-file-query-info-flags-constants"></a><h3>Gio File Query Info Flags Constants</h3><p>
- Flags used when querying a
- <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.FileInfo</code></a>.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_QUERY_INFO_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</code></span></p></td><td>Don't follow symlinks.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Type Constants"><a name="gio-file-type-constants"></a><h3>Gio File Type Constants</h3><p>
- Indicates the file's on-disk type.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_DIRECTORY</code></span></p></td><td>File handle represents a directory.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_MOUNTABLE</code></span></p></td><td>File is a mountable location.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_REGULAR</code></span></p></td><td>File handle represents a regular file.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SHORTCUT</code></span></p></td><td>File is a shortcut (Windows systems).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SPECIAL</code></span></p></td><td>File is a "special" file, such as a socket, fifo, block device, or character device.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SYMBOLIC_LINK</code></span></p></td><td>File handle represents a symbolic link (Unix systems).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_UNKNOWN</code></span></p></td><td>File's type is unknown.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Mount Flags Constants"><a name="gio-mount-mount-flags-constants"></a><h3>Gio Mount Mount Flags Constants</h3><p>
- Flags used when mounting a mount.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_MOUNT_NONE</code></span></p></td><td>No flags set.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Unmount Flags Constants"><a name="gio-mount-unmount-flags-constants"></a><h3>Gio Mount Unmount Flags Constants</h3><p>
- Flags used when unmounting a mount.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_UNMOUNT_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_UNMOUNT_FORCE</code></span></p></td><td>Unmount even if there are outstanding file operations on the mount.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Operation Result Constants"><a name="gio-mount-operation-result-constants"></a><h3>Gio Mount Operation Result Constants</h3><p>
- returned as a result when a request for information is send by the mounting operation.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_HANDLED</code></span></p></td><td>The request was fulfilled and the user specified data is now available.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_ABORTED</code></span></p></td><td>The user requested the mount operation to be aborted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_UNHANDLED</code></span></p></td><td>The request was unhandled (i.e. not implemented).</td></tr></tbody></table></div><div class="refsect2" title="Gio Password Save Constants"><a name="gio-password-save-constants"></a><h3>Gio Password Save Constants</h3><p>
- is used to indicate the lifespan of a saved password.
- </p><p>
- Gvfs stores passwords in the Gnome keyring when this flag allows it to,
- and later retrieves it again from there.
- </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_FOR_SESSION</code></span></p></td><td>save a password for the session.</td></tr><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_NEVER</code></span></p></td><td>never save a password.</td></tr><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_PERMANENTLY</code></span></p></td><td>save a password permanently.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="giounix-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGio Unix Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/gio-functions.html b/docs/html/gio-functions.html
deleted file mode 100644
index 77a4ff7..0000000
--- a/docs/html/gio-functions.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><link rel="next" href="gio-constants.html" title="gio Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giovolumemonitor.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio Functions"><a name="gio-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio Functions</h2><p>gio Functions</p></div><div class="refsect1" title="Synopsis"><a name="id534717"></a><h2>Synopsis</h2><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-can-be-executable" title="gio.content_type_can_be_executable">gio.content_type_can_be_executable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-equals" title="gio.content_type_equals">gio.content_type_equals</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type2</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-from-mime-type" title="gio.content_type_from_mime_type">gio.content_type_from_mime_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mime_type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-description" title="gio.content_type_get_description">gio.content_type_get_description</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-icon" title="gio.content_type_get_icon">gio.content_type_get_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-mime-type" title="gio.content_type_get_mime_type">gio.content_type_get_mime_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-guess" title="gio.content_type_guess">gio.content_type_guess</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>want_uncertain</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-is-a" title="gio.content_type_is_a">gio.content_type_is_a</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>supertype</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-is-unknown" title="gio.content_type_is_unknown">gio.content_type_is_unknown</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-types-get-registered" title="gio.content_types_get_registered">gio.content_types_get_registered</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--io-error-from-errno" title="gio.io_error_from_errno">gio.io_error_from_errno</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>err_no</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id535062"></a><h2>Description</h2><p>
- These functions are part of the <code class="literal">PyGObject</code> gio module
- but are not directly associated with a specific class
- </p></div><div class="refsect1" title="Functions"><a name="id535080"></a><h2>Functions</h2><div class="refsect2" title="gio.content_type_can_be_executable"><a name="function-gio--content-type-can-be-executable"></a><h3>gio.content_type_can_be_executable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_can_be_executable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file type corresponds
- to a type that can be executable, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_can_be_executable</code>() function checks
- if a content type can be executable. Note that for instance things like text files
- can be executables (i.e. scripts and batch files).
- </p></div><div class="refsect2" title="gio.content_type_equals"><a name="function-gio--content-type-equals"></a><h3>gio.content_type_equals</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_equals</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type1</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type2</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the two strings are
- identical or equivalent, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_equals</code>() function compares
- two content types for equality.
- </p></div><div class="refsect2" title="gio.content_type_from_mime_type"><a name="function-gio--content-type-from-mime-type"></a><h3>gio.content_type_from_mime_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_from_mime_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mime_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td><td>a mime type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The content type or <code class="literal">None</code> when does not know.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_from_mime_type</code>() function tries
- to find a content type based on the mime type name.
- </p></div><div class="refsect2" title="gio.content_type_get_description"><a name="function-gio--content-type-get-description"></a><h3>gio.content_type_get_description</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_get_description</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a short description of the content type type.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_get_description</code>() function
- gets the human readable description of the content type.
- </p></div><div class="refsect2" title="gio.content_type_get_icon"><a name="function-gio--content-type-get-icon"></a><h3>gio.content_type_get_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_get_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
- corresponding to the content type.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_get_icon</code>() function
- gets the icon for a content type.
- </p></div><div class="refsect2" title="gio.content_type_get_mime_type"><a name="function-gio--content-type-get-mime-type"></a><h3>gio.content_type_get_mime_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_get_mime_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the registered mime-type for the given type,
- or <code class="literal">None</code> if unknown.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_get_mime_type</code>() function
- gets the mime-type for the content type. If one is registered
- </p></div><div class="refsect2" title="gio.content_type_guess"><a name="function-gio--content-type-guess"></a><h3>gio.content_type_guess</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_guess</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>want_uncertain</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td><td>a string, or <code class="literal">None</code>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>a stream of data, or <code class="literal">None</code>.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>want_uncertain</code></em> :</span></p></td><td>a flag indicating the certainty of the result.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string indicating a guessed content type for the given data.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_guess</code>() function guesses
- the content type based on example data. If the function is uncertain,
- result_uncertain will be set to <code class="literal">True</code>. Either filename
- or data may be <code class="literal">None</code>, in which case the guess will be
- based solely on the other argument.
- </p></div><div class="refsect2" title="gio.content_type_is_a"><a name="function-gio--content-type-is-a"></a><h3>gio.content_type_is_a</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_is_a</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>supertype</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><em class="parameter"><code>supertype</code></em> :</span></p></td><td>a string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if type is a kind of
- supertype, <code class="literal">False</code> otherwise.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_is_a</code>() function determines
- if type is a subset of supertype.
- </p></div><div class="refsect2" title="gio.content_type_is_unknown"><a name="function-gio--content-type-is-unknown"></a><h3>gio.content_type_is_unknown</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_type_is_unknown</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the type is the unknown type.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_type_is_unknown</code>() function checks if
- the content type is the generic "unknown" type. On unix this is the
- "application/octet-stream" mimetype, while on win32 it is "*".
- </p></div><div class="refsect2" title="gio.content_types_get_registered"><a name="function-gio--content-types-get-registered"></a><h3>gio.content_types_get_registered</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">content_types_get_registered</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the registered content types.
- </td></tr></tbody></table><p>
- The <code class="methodname">content_types_get_registered</code>() function
- gets a list of strings containing all the registered content types
- known to the system.
- </p></div><div class="refsect2" title="gio.io_error_from_errno"><a name="function-gio--io-error-from-errno"></a><h3>gio.io_error_from_errno</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">io_error_from_errno</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>err_no</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>err_no</code></em> :</span></p></td><td>Error number.
- </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
- <a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
- </td></tr></tbody></table><p>
- The <code class="methodname">io_error_from_errno</code>() function converts
- error codes into GIO error codes.
- </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giovolumemonitor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.VolumeMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio Constants</td></tr></table></div></body></html>
diff --git a/docs/html/giounix-class-reference.html b/docs/html/giounix-class-reference.html
deleted file mode 100644
index e91aa73..0000000
--- a/docs/html/giounix-class-reference.html
+++ /dev/null
@@ -1 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGio Unix Class Reference</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="gio-constants.html" title="gio Constants"><link rel="next" href="class-giounixinputstream.html" title="gio.unix.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGio Unix Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-giounixinputstream.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGio Unix Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="giounix-class-reference"></a>PyGio Unix Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-giounixinputstream.html">gio.unix.InputStream</a></span><span class="refpurpose"> — Streaming input operations for UNIX file descriptors.</span></dt><dt><span class="refentrytitle"><a href="class-giounixoutputstream.html">gio.unix.OutputStream</a></span><span class="refpurpose"> — Streaming output operations for UNIX file descriptors.</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-giounixinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.unix.InputStream</td></tr></table></div></body></html>
diff --git a/docs/html/glib-constants.html b/docs/html/glib-constants.html
index 4e56956..4589a6b 100644
--- a/docs/html/glib-constants.html
+++ b/docs/html/glib-constants.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-functions.html" title="glib Functions"><link rel="next" href="gobject-class-reference.html" title="PyGObject Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Constants"><a name="glib-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Constants</h2><p>glib Constants — the built-in constants of the glib module</p></div><div class="refsect1" title="Synopsis"><a name="id400400"></a><h2>Synopsis</h2><pre class="programlisting">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-functions.html" title="glib Functions"><link rel="next" href="gobject-class-reference.html" title="PyGObject Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Constants"><a name="glib-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Constants</h2><p>glib Constants — the built-in constants of the glib module</p></div><div class="refsect1" title="Synopsis"><a name="id526976"></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>
diff --git a/docs/html/glib-functions.html b/docs/html/glib-functions.html
index ffb796f..d59f6ec 100644
--- a/docs/html/glib-functions.html
+++ b/docs/html/glib-functions.html
@@ -1,6 +1,6 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmainloop.html" title="glib.MainLoop"><link rel="next" href="glib-constants.html" title="glib Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Functions"><a name="glib-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Functions</h2><p>glib Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id406219"></a><h2>Synopsis</h2><pre class="programlisting">
-<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add">glib.idle_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add">glib.timeout_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add-seconds" title="glib.timeout_add_seconds">glib.timeout_add_seconds</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch">glib.io_add_watch</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--source-remove" title="glib.source_remove">glib.source_remove</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-context-default" title="glib.main_context_default">glib.main_context_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--markup-escape-text" title="glib.markup_escape_text">glib.markup_escape_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--child-watch-add" title="glib.child_watch_add">glib.child_watch_add</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async">glib.spawn_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-current-time" title="glib.get_current_time">glib.get_current_time</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-cache-dir" title="glib.get_user_cache_dir">glib.get_user_cache_dir</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-config-dir" title="glib.get_user_config_dir">glib.get_user_config_dir</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-data-dir" title="glib.get_user_data_dir">glib.get_user_data_dir</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir">glib.get_user_special_dir</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>directory</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-depth" title="glib.main_depth">glib.main_depth</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--threads-init" title="glib.threads_init">glib.threads_init</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name">glib.filename_display_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename">glib.filename_display_basename</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-from-utf8" title="glib.filename_from_utf8">glib.filename_from_utf8</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id395853"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGObject</code> glib
-module but are not directly associated with a specific class.</p></div><div class="refsect1" title="Functions"><a name="id403508"></a><h2>Functions</h2><div class="refsect2" title="glib.idle_add"><a name="function-glib--idle-add"></a><h3>glib.idle_add</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">glib.idle_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call when
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmainloop.html" title="glib.MainLoop"><link rel="next" href="glib-constants.html" title="glib Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Functions"><a name="glib-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Functions</h2><p>glib Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id532546"></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="id524851"></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="id516831"></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
diff --git a/docs/html/gobject-constants.html b/docs/html/gobject-constants.html
index 6ff3ee5..e7d56e1 100644
--- a/docs/html/gobject-constants.html
+++ b/docs/html/gobject-constants.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-functions.html" title="gobject Functions"><link rel="next" href="gio-class-reference.html" title="PyGio Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Constants"><a name="gobject-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Constants</h2><p>gobject Constants — the built-in constants of the gobject module</p></div><div class="refsect1" title="Synopsis"><a name="id374449"></a><h2>Synopsis</h2><pre class="programlisting">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-functions.html" title="gobject Functions"></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"> </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="id504905"></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>
@@ -60,4 +60,4 @@ by gobject.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left
type.</td></tr></tbody></table></div><div class="refsect2" title="GObject Version Constants"><a name="gobject-version-constants"></a><h3>GObject Version Constants</h3><p>The Version constants specify the version of
<code class="literal">GLIB</code> used by PyGTK as a 3-tuple containing the major,
minor and patch release numbers.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.glib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
- numbers.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGio Class Reference</td></tr></table></div></body></html>
+ numbers.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">gobject Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/docs/html/gobject-functions.html b/docs/html/gobject-functions.html
index 3853a06..c1cc6fc 100644
--- a/docs/html/gobject-functions.html
+++ b/docs/html/gobject-functions.html
@@ -1,12 +1,12 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectginterface.html" title="gobject.GInterface"><link rel="next" href="gobject-constants.html" title="gobject Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectginterface.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Functions"><a name="gobject-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Functions</h2><p>gobject Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id361138"></a><h2>Synopsis</h2><pre class="programlisting">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectginterface.html" title="gobject.GInterface"><link rel="next" href="gobject-constants.html" title="gobject Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectginterface.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Functions"><a name="gobject-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Functions</h2><p>gobject Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id522069"></a><h2>Synopsis</h2><pre class="programlisting">
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-name" title="gobject.type_name">gobject.type_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-from-name" title="gobject.type_from_name">gobject.type_from_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type_name</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-parent" title="gobject.type_parent">gobject.type_parent</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-is-a" title="gobject.type_is_a">gobject.type_is_a</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>parent_type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-children" title="gobject.type_children">gobject.type_children</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-interfaces" title="gobject.type_interfaces">gobject.type_interfaces</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-register" title="gobject.type_register">gobject.type_register</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>class</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-new" title="gobject.signal_new">gobject.signal_new</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>signal_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>return_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>param_types</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-list-names" title="gobject.signal_list_names">gobject.signal_list_names</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-list-ids" title="gobject.signal_list_ids">gobject.signal_list_ids</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup">gobject.signal_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-name" title="gobject.signal_name">gobject.signal_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-query1" title="gobject.signal_query">gobject.signal_query</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-query2" title="gobject.signal_query">gobject.signal_query</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--list-properties" title="gobject.list_properties">gobject.list_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--new" title="gobject.new">gobject.new</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-accumulator-true-handled" title="gobject.signal_accumulator_true_handled">gobject.signal_accumulator_true_handled</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--add-emission-hook" title="gobject.add_emission_hook">gobject.add_emission_hook</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--remove-emission-hook" title="gobject.remove_emission_hook">gobject.remove_emission_hook</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hook_id</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject---install-metaclass" title="gobject._install_metaclass">gobject._install_metaclass</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>metaclass</code></em></span></span>)</code>
- </pre></div><div class="refsect1" title="Description"><a name="id363851"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGTK</code> gobject
+ </pre></div><div class="refsect1" title="Description"><a name="id522125"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGTK</code> gobject
module but are not directly associated with a specific class.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Many functions that previously were in this namespace got moved to <a class="link" href="glib-functions.html" title="glib Functions"><code class="literal">glib</code></a> namespace instead. They
are still available in <code class="literal">gobject</code> for backward compatibility, but
not documented here. If you miss documentation for some function, be sure to
check <a class="link" href="glib-functions.html" title="glib Functions"><code class="literal">glib</code></a> first.
- </p></div></div><div class="refsect1" title="Functions"><a name="id427695"></a><h2>Functions</h2><div class="refsect2" title="gobject.type_name"><a name="function-gobject--type-name"></a><h3>gobject.type_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gobject.type_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+ </p></div></div><div class="refsect1" title="Functions"><a name="id531867"></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
diff --git a/docs/html/index.html b/docs/html/index.html
index f5b135d..a8a36bf 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -1,6 +1,6 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGObject Reference Manual</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content="This reference describes the classes of the python gobject module."><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="next" href="pygobject-introduction.html" title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGObject Reference Manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr></table><hr></div><div class="book" title="PyGObject Reference Manual"><div class="titlepage"><div><div><h1 class="title"><a name="pygobject-reference"></a>PyGObject Reference Manual</h1></div><div><p class="releaseinfo">for PyGObject version 2.28.6</p></div><div><p class="pubdate">2011-06-13
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGObject Reference Manual</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content="This reference describes the classes of the python gobject module."><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="next" href="pygobject-introduction.html" title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGObject Reference Manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr></table><hr></div><div class="book" title="PyGObject Reference Manual"><div class="titlepage"><div><div><h1 class="title"><a name="pygobject-reference"></a>PyGObject Reference Manual</h1></div><div><p class="releaseinfo">for PyGObject version 2.90.1</p></div><div><p class="pubdate">2011-08-14
</p></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>This reference describes the classes of the python gobject
module.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="pygobject-introduction.html">Introduction</a></span></dt><dd><dl><dt><span class="sect1"><a href="pygobject-introduction.html#pygobject-reference-format">Reference Page Format</a></span></dt></dl></dd><dt><span class="chapter"><a href="glib-class-reference.html">PyGlibClass Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-glibmaincontext.html">glib.MainContext</a></span><span class="refpurpose"> — an object representing a set of event sources to be handled
in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</span></dt><dt><span class="refentrytitle"><a href="class-glibmainloop.html">glib.MainLoop</a></span><span class="refpurpose"> — an object representing the main event loop of a PyGTK
application.</span></dt><dt><span class="refentrytitle"><a href="glib-functions.html">glib Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="glib-constants.html">glib Constants</a></span><span class="refpurpose"> — the built-in constants of the glib module</span></dt></dl></dd><dt><span class="chapter"><a href="gobject-class-reference.html">PyGObject Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-gobject.html">gobject.GObject</a></span><span class="refpurpose"> — the base class</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgboxed.html">gobject.GBoxed</a></span><span class="refpurpose"> — an object containing an opaque chunk of data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgpointer.html">gobject.GPointer</a></span><span class="refpurpose"> — an object containing a completely opaque chunk of
- data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectginterface.html">gobject.GInterface</a></span><span class="refpurpose"> — an object representing a GInterface</span></dt><dt><span class="refentrytitle"><a href="gobject-functions.html">gobject Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="gobject-constants.html">gobject Constants</a></span><span class="refpurpose"> — the built-in constants of the gobject module</span></dt></dl></dd><dt><span class="chapter"><a href="gio-class-reference.html">PyGio Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-gioappinfo.html">gio.AppInfo</a></span><span class="refpurpose"> — Information about an installed application and methods to launch it (with file arguments).</span></dt><dt><span class="refentrytitle"><a href="class-gioapplaunchcontext.html">gio.AppLaunchContext</a></span><span class="refpurpose"> — Application launch context.</span></dt><dt><span class="refentrytitle"><a href="class-gioasyncresult.html">gio.AsyncResult</a></span><span class="refpurpose"> — Asynchronous Function Results.</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedinputstream.html">gio.BufferedInputStream</a></span><span class="refpurpose"> — Buffered Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedoutputstream.html">gio.BufferedOutputStream</a></span><span class="refpurpose"> — Buffered Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giocancellable.html">gio.Cancellable</a></span><span class="refpurpose"> — Thread-safe Operation Cancellation Stack.</span></dt><dt><span class="refentrytitle"><a href="class-giodatainputstream.html">gio.DataInputStream</a></span><span class="refpurpose"> — Data Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodataoutputstream.html">gio.DataOutputStream</a></span><span class="refpurpose"> — Data Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodrive.html">gio.Drive</a></span><span class="refpurpose"> — Virtual File System drive management.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblem.html">gio.Emblem</a></span><span class="refpurpose"> — An object for emblems.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblemedicon.html">gio.EmblemedIcon</a></span><span class="refpurpose"> — Icon with emblems.</span></dt><dt><span class="refentrytitle"><a href="class-giofile.html">gio.File</a></span><span class="refpurpose"> — File and Directory Handling.</span></dt><dt><span class="refentrytitle"><a href="class-giofileattributeinfo.html">gio.FileAttributeInfo</a></span><span class="refpurpose"> — Information about a specific attribute.</span></dt><dt><span class="refentrytitle"><a href="class-giofileenumerator.html">gio.FileEnumerator</a></span><span class="refpurpose"> — Enumerated Files Routines.</span></dt><dt><span class="refentrytitle"><a href="class-giofileicon.html">gio.FileIcon</a></span><span class="refpurpose"> — Icons pointing to an image file.</span></dt><dt><span class="refentrytitle"><a href="class-giofileinfo.html">gio.FileInfo</a></span><span class="refpurpose"> — File Information and Attributes</span></dt><dt><span class="refentrytitle"><a href="class-giofileinputstream.html">gio.FileInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilemonitor.html">gio.FileMonitor</a></span><span class="refpurpose"> — File Monitor</span></dt><dt><span class="refentrytitle"><a href="class-giofileoutputstream.html">gio.FileOutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilterinputstream.html">gio.FilterInputStream</a></span><span class="refpurpose"> — Filter Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giofilteroutputstream.html">gio.FilterOutputStream</a></span><span class="refpurpose"> — Filter Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-gioicon.html">gio.Icon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-gioinputstream.html">gio.InputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioloadableicon.html">gio.LoadableIcon</a></span><span class="refpurpose"> — Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryinputstream.html">gio.MemoryInputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryoutputstream.html">gio.MemoryOutputStream</a></span><span class="refpurpose"> — Streaming output operations on memory chunks</span></dt><dt><span class="refentrytitle"><a href="class-giomount.html">gio.Mount</a></span><span class="refpurpose"> — Mount management</span></dt><dt><span class="refentrytitle"><a href="class-giomountoperation.html">gio.MountOperation</a></span><span class="refpurpose"> — Authentication methods for mountable locations.</span></dt><dt><span class="refentrytitle"><a href="class-giooutputstream.html">gio.OutputStream</a></span><span class="refpurpose"> — Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioseekable.html">gio.Seekable</a></span><span class="refpurpose"> — Stream seeking interface.</span></dt><dt><span class="refentrytitle"><a href="class-giosimpleasyncresult.html">gio.SimpleAsyncResult</a></span><span class="refpurpose"> — Simple asynchronous results implementation.</span></dt><dt><span class="refentrytitle"><a href="class-giothemedicon.html">gio.ThemedIcon</a></span><span class="refpurpose"> — Icon theming support.</span></dt><dt><span class="refentrytitle"><a href="class-giovolume.html">gio.Volume</a></span><span class="refpurpose"> — Volume management.</span></dt><dt><span class="refentrytitle"><a href="class-giovolumemonitor.html">gio.VolumeMonitor</a></span><span class="refpurpose"> — Volume Monitor.</span></dt><dt><span class="refentrytitle"><a href="gio-functions.html">gio Functions</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="gio-constants.html">gio Constants</a></span><span class="refpurpose"> — the built-in constants of the gio module</span></dt></dl></dd><dt><span class="chapter"><a href="giounix-class-reference.html">PyGio Unix Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-giounixinputstream.html">gio.unix.InputStream</a></span><span class="refpurpose"> — Streaming input operations for UNIX file descriptors.</span></dt><dt><span class="refentrytitle"><a href="class-giounixoutputstream.html">gio.unix.OutputStream</a></span><span class="refpurpose"> — Streaming output operations for UNIX file descriptors.</span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Introduction</td></tr></table></div></body></html>
+ data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectginterface.html">gobject.GInterface</a></span><span class="refpurpose"> — an object representing a GInterface</span></dt><dt><span class="refentrytitle"><a href="gobject-functions.html">gobject Functions</a></span><span class="refpurpose"> — miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="gobject-constants.html">gobject Constants</a></span><span class="refpurpose"> — the built-in constants of the gobject module</span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Introduction</td></tr></table></div></body></html>
diff --git a/docs/html/index.sgml b/docs/html/index.sgml
index e9b5432..93c0942 100644
--- a/docs/html/index.sgml
+++ b/docs/html/index.sgml
@@ -96,437 +96,4 @@
<ANCHOR id="gobject-spawn-flag-constants" href="pygobject/gobject-constants.html#gobject-spawn-flag-constants">
<ANCHOR id="gobject-type-constants" href="pygobject/gobject-constants.html#gobject-type-constants">
<ANCHOR id="gobject-version-constants" href="pygobject/gobject-constants.html#gobject-version-constants">
- <ANCHOR id="class-gioappinfo" href="pygobject/class-gioappinfo.html">
- <ANCHOR id="constructor-gioappinfo" href="pygobject/class-gioappinfo.html#constructor-gioappinfo">
- <ANCHOR id="method-gioappinfo--add-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--add-supports-type">
- <ANCHOR id="method-gioappinfo--can-delete" href="pygobject/class-gioappinfo.html#method-gioappinfo--can-delete">
- <ANCHOR id="method-gioappinfo--can-remove-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--can-remove-supports-type">
- <ANCHOR id="method-gioappinfo--delete" href="pygobject/class-gioappinfo.html#method-gioappinfo--delete">
- <ANCHOR id="method-gioappinfo--dup" href="pygobject/class-gioappinfo.html#method-gioappinfo--dup">
- <ANCHOR id="method-gioappinfo--equal" href="pygobject/class-gioappinfo.html#method-gioappinfo--equal">
- <ANCHOR id="method-gioappinfo--get-commandline" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-commandline">
- <ANCHOR id="method-gioappinfo--get-description" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-description">
- <ANCHOR id="method-gioappinfo--get-executable" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-executable">
- <ANCHOR id="method-gioappinfo--get-icon" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-icon">
- <ANCHOR id="method-gioappinfo--get-id" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-id">
- <ANCHOR id="method-gioappinfo--get-name" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-name">
- <ANCHOR id="method-gioappinfo--launch" href="pygobject/class-gioappinfo.html#method-gioappinfo--launch">
- <ANCHOR id="method-gioappinfo--launch-uris" href="pygobject/class-gioappinfo.html#method-gioappinfo--launch-uris">
- <ANCHOR id="method-gioappinfo--remove-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--remove-supports-type">
- <ANCHOR id="method-gioappinfo--set-as-default-for-extension" href="pygobject/class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension">
- <ANCHOR id="method-gioappinfo--set-as-default-for-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--set-as-default-for-type">
- <ANCHOR id="method-gioappinfo--should-show" href="pygobject/class-gioappinfo.html#method-gioappinfo--should-show">
- <ANCHOR id="method-gioappinfo--supports-files" href="pygobject/class-gioappinfo.html#method-gioappinfo--supports-files">
- <ANCHOR id="method-gioappinfo--supports-uris" href="pygobject/class-gioappinfo.html#method-gioappinfo--supports-uris">
- <ANCHOR id="function-gio--app-info-get-all" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-all">
- <ANCHOR id="function-gio--app-info-get-all-for-type" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-all-for-type">
- <ANCHOR id="function-gio--app-info-get-default-for-type" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-default-for-type">
- <ANCHOR id="function-gio--app-info-get-default-for-uri-scheme" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme">
- <ANCHOR id="function-gio--app-info-reset-type-association" href="pygobject/class-gioappinfo.html#function-gio--app-info-reset-type-association">
- <ANCHOR id="class-gioapplaunchcontext" href="pygobject/class-gioapplaunchcontext.html">
- <ANCHOR id="constructor-gioapplaunchcontext" href="pygobject/class-gioapplaunchcontext.html#constructor-gioapplaunchcontext">
- <ANCHOR id="method-gioapplaunchcontext--get-display" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display">
- <ANCHOR id="method-gioapplaunchcontext--get-startup-notify-id" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id">
- <ANCHOR id="method-gioapplaunchcontext--launch-failed" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed">
- <ANCHOR id="class-gioasyncresult" href="pygobject/class-gioasyncresult.html">
- <ANCHOR id="method-gioasyncresult--get-source-object" href="pygobject/class-gioasyncresult.html#method-gioasyncresult--get-source-object">
- <ANCHOR id="class-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html">
- <ANCHOR id="properties-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html#properties-giobufferedinputstream">
- <ANCHOR id="constructor-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html#constructor-giobufferedinputstream">
- <ANCHOR id="method-giobufferedinputstream--fill" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill">
- <ANCHOR id="method-giobufferedinputstream--fill-async" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async">
- <ANCHOR id="method-giobufferedinputstream--fill-finish" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish">
- <ANCHOR id="method-giobufferedinputstream--get-available" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--get-available">
- <ANCHOR id="method-giobufferedinputstream--get-buffer-size" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size">
- <ANCHOR id="method-giobufferedinputstream--read-byte" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte">
- <ANCHOR id="method-giobufferedinputstream--set-buffer-size" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size">
- <ANCHOR id="function-gio--buffered-input-stream-new-sized" href="pygobject/class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized">
- <ANCHOR id="class-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html">
- <ANCHOR id="properties-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html#properties-giobufferedoutputstream">
- <ANCHOR id="constructor-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html#constructor-giobufferedoutputstream">
- <ANCHOR id="method-giobufferedoutputstream--get-auto-grow" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow">
- <ANCHOR id="method-giobufferedoutputstream--get-buffer-size" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size">
- <ANCHOR id="method-giobufferedoutputstream--set-auto-grow" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow">
- <ANCHOR id="method-giobufferedoutputstream--set-buffer-size" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size">
- <ANCHOR id="function-gio--buffered-output-stream-new-sized" href="pygobject/class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized">
- <ANCHOR id="class-giocancellable" href="pygobject/class-giocancellable.html">
- <ANCHOR id="constructor-giocancellable" href="pygobject/class-giocancellable.html#constructor-giocancellable">
- <ANCHOR id="method-giocancellable--cancel" href="pygobject/class-giocancellable.html#method-giocancellable--cancel">
- <ANCHOR id="method-giocancellable--get-fd" href="pygobject/class-giocancellable.html#method-giocancellable--get-fd">
- <ANCHOR id="method-giocancellable--is-cancelled" href="pygobject/class-giocancellable.html#method-giocancellable--is-cancelled">
- <ANCHOR id="method-giocancellable--pop-current" href="pygobject/class-giocancellable.html#method-giocancellable--pop-current">
- <ANCHOR id="method-giocancellable--push-current" href="pygobject/class-giocancellable.html#method-giocancellable--push-current">
- <ANCHOR id="method-giocancellable--reset" href="pygobject/class-giocancellable.html#method-giocancellable--reset">
- <ANCHOR id="method-giocancellable--set-error-if-cancelled" href="pygobject/class-giocancellable.html#method-giocancellable--set-error-if-cancelled">
- <ANCHOR id="function-gio--cancellable-get-current" href="pygobject/class-giocancellable.html#function-gio--cancellable-get-current">
- <ANCHOR id="class-giodatainputstream" href="pygobject/class-giodatainputstream.html">
- <ANCHOR id="properties-giodatainputstream" href="pygobject/class-giodatainputstream.html#properties-giodatainputstream">
- <ANCHOR id="constructor-giodatainputstream" href="pygobject/class-giodatainputstream.html#constructor-giodatainputstream">
- <ANCHOR id="method-giodatainputstream--get-byte-order" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--get-byte-order">
- <ANCHOR id="method-giodatainputstream--get-newline-type" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--get-newline-type">
- <ANCHOR id="method-giodatainputstream--read-byte" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-byte">
- <ANCHOR id="method-giodatainputstream--read-int16" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int16">
- <ANCHOR id="method-giodatainputstream--read-int32" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int32">
- <ANCHOR id="method-giodatainputstream--read-int64" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int64">
- <ANCHOR id="method-giodatainputstream--read-line" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line">
- <ANCHOR id="method-giodatainputstream--read-line-async" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line-async">
- <ANCHOR id="method-giodatainputstream--read-line-finish" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line-finish">
- <ANCHOR id="method-giodatainputstream--read-uint16" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint16">
- <ANCHOR id="method-giodatainputstream--read-uint32" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint32">
- <ANCHOR id="method-giodatainputstream--read-uint64" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint64">
- <ANCHOR id="method-giodatainputstream--read-until" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until">
- <ANCHOR id="method-giodatainputstream--read-until-async" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until-async">
- <ANCHOR id="method-giodatainputstream--read-until-finish" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until-finish">
- <ANCHOR id="method-giodatainputstream--set-byte-order" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--set-byte-order">
- <ANCHOR id="method-giodatainputstream--set-newline-type" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--set-newline-type">
- <ANCHOR id="class-giodataoutputstream" href="pygobject/class-giodataoutputstream.html">
- <ANCHOR id="properties-giodataoutputstream" href="pygobject/class-giodataoutputstream.html#properties-giodataoutputstream">
- <ANCHOR id="constructor-giodataoutputstream" href="pygobject/class-giodataoutputstream.html#constructor-giodataoutputstream">
- <ANCHOR id="method-giodataoutputstream--get-byte-order" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order">
- <ANCHOR id="method-giodataoutputstream--put-byte" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-byte">
- <ANCHOR id="method-giodataoutputstream--put-int16" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int16">
- <ANCHOR id="method-giodataoutputstream--put-int32" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int32">
- <ANCHOR id="method-giodataoutputstream--put-int64" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int64">
- <ANCHOR id="method-giodataoutputstream--put-string" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-string">
- <ANCHOR id="method-giodataoutputstream--put-uint16" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint16">
- <ANCHOR id="method-giodataoutputstream--put-uint32" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint32">
- <ANCHOR id="method-giodataoutputstream--put-uint64" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint64">
- <ANCHOR id="method-giodataoutputstream--set-byte-order" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order">
- <ANCHOR id="class-giodrive" href="pygobject/class-giodrive.html">
- <ANCHOR id="method-giodrive--can-eject" href="pygobject/class-giodrive.html#method-giodrive--can-eject">
- <ANCHOR id="method-giodrive--can-poll-for-media" href="pygobject/class-giodrive.html#method-giodrive--can-poll-for-media">
- <ANCHOR id="method-giodrive--eject" href="pygobject/class-giodrive.html#method-giodrive--eject">
- <ANCHOR id="method-giodrive--eject-finish" href="pygobject/class-giodrive.html#method-giodrive--eject-finish">
- <ANCHOR id="method-giodrive--enumerate-identifiers" href="pygobject/class-giodrive.html#method-giodrive--enumerate-identifiers">
- <ANCHOR id="method-giodrive--get-icon" href="pygobject/class-giodrive.html#method-giodrive--get-icon">
- <ANCHOR id="method-giodrive--get-identifier" href="pygobject/class-giodrive.html#method-giodrive--get-identifier">
- <ANCHOR id="method-giodrive--get-name" href="pygobject/class-giodrive.html#method-giodrive--get-name">
- <ANCHOR id="method-giodrive--get-volumes" href="pygobject/class-giodrive.html#method-giodrive--get-volumes">
- <ANCHOR id="method-giodrive--has-media" href="pygobject/class-giodrive.html#method-giodrive--has-media">
- <ANCHOR id="method-giodrive--has-volumes" href="pygobject/class-giodrive.html#method-giodrive--has-volumes">
- <ANCHOR id="method-giodrive--is-media-check-automatic" href="pygobject/class-giodrive.html#method-giodrive--is-media-check-automatic">
- <ANCHOR id="method-giodrive--is-media-removable" href="pygobject/class-giodrive.html#method-giodrive--is-media-removable">
- <ANCHOR id="method-giodrive--poll-for-media" href="pygobject/class-giodrive.html#method-giodrive--poll-for-media">
- <ANCHOR id="method-giodrive--poll-for-media-finish" href="pygobject/class-giodrive.html#method-giodrive--poll-for-media-finish">
- <ANCHOR id="class-gioemblem" href="pygobject/class-gioemblem.html">
- <ANCHOR id="properties-gioemblem" href="pygobject/class-gioemblem.html#properties-gioemblem">
- <ANCHOR id="constructor-gioemblem" href="pygobject/class-gioemblem.html#constructor-gioemblem">
- <ANCHOR id="method-gioemblem--get-icon" href="pygobject/class-gioemblem.html#method-gioemblem--get-icon">
- <ANCHOR id="method-gioemblem--get-origin" href="pygobject/class-gioemblem.html#method-gioemblem--get-origin">
- <ANCHOR id="function-gio--emblem-new-with-origin" href="pygobject/class-gioemblem.html#function-gio--emblem-new-with-origin">
- <ANCHOR id="class-gioemblemedicon" href="pygobject/class-gioemblemedicon.html">
- <ANCHOR id="constructor-gioemblemedicon" href="pygobject/class-gioemblemedicon.html#constructor-gioemblemedicon">
- <ANCHOR id="method-gioemblemedicon--add-emblem" href="pygobject/class-gioemblemedicon.html#method-gioemblemedicon--add-emblem">
- <ANCHOR id="method-gioemblemedicon--get-icon" href="pygobject/class-gioemblemedicon.html#method-gioemblemedicon--get-icon">
- <ANCHOR id="class-giofile" href="pygobject/class-giofile.html">
- <ANCHOR id="constructor-giofile" href="pygobject/class-giofile.html#constructor-giofile">
- <ANCHOR id="method-giofile--append-to" href="pygobject/class-giofile.html#method-giofile--append-to">
- <ANCHOR id="method-giofile--append-to-async" href="pygobject/class-giofile.html#method-giofile--append-to-async">
- <ANCHOR id="method-giofile--append-to-finish" href="pygobject/class-giofile.html#method-giofile--append-to-finish">
- <ANCHOR id="method-giofile--copy" href="pygobject/class-giofile.html#method-giofile--copy">
- <ANCHOR id="method-giofile--copy-async" href="pygobject/class-giofile.html#method-giofile--copy-async">
- <ANCHOR id="method-giofile--copy-attributes" href="pygobject/class-giofile.html#method-giofile--copy-attributes">
- <ANCHOR id="method-giofile--copy-finish" href="pygobject/class-giofile.html#method-giofile--copy-finish">
- <ANCHOR id="method-giofile--create" href="pygobject/class-giofile.html#method-giofile--create">
- <ANCHOR id="method-giofile--create-async" href="pygobject/class-giofile.html#method-giofile--create-async">
- <ANCHOR id="method-giofile--create-finish" href="pygobject/class-giofile.html#method-giofile--create-finish">
- <ANCHOR id="method-giofile--delete" href="pygobject/class-giofile.html#method-giofile--delete">
- <ANCHOR id="method-giofile--dup" href="pygobject/class-giofile.html#method-giofile--dup">
- <ANCHOR id="method-giofile--eject-mountable" href="pygobject/class-giofile.html#method-giofile--eject-mountable">
- <ANCHOR id="method-giofile--eject-mountable-finish" href="pygobject/class-giofile.html#method-giofile--eject-mountable-finish">
- <ANCHOR id="method-giofile--enumerate-children" href="pygobject/class-giofile.html#method-giofile--enumerate-children">
- <ANCHOR id="method-giofile--enumerate-children-async" href="pygobject/class-giofile.html#method-giofile--enumerate-children-async">
- <ANCHOR id="method-giofile--enumerate-children-finish" href="pygobject/class-giofile.html#method-giofile--enumerate-children-finish">
- <ANCHOR id="method-giofile--equal" href="pygobject/class-giofile.html#method-giofile--equal">
- <ANCHOR id="method-giofile--find-enclosing-mount" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount">
- <ANCHOR id="method-giofile--find-enclosing-mount-async" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount-async">
- <ANCHOR id="method-giofile--find-enclosing-mount-finish" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount-finish">
- <ANCHOR id="method-giofile--get-basename" href="pygobject/class-giofile.html#method-giofile--get-basename">
- <ANCHOR id="method-giofile--get-child" href="pygobject/class-giofile.html#method-giofile--get-child">
- <ANCHOR id="method-giofile--get-child-for-display-name" href="pygobject/class-giofile.html#method-giofile--get-child-for-display-name">
- <ANCHOR id="method-giofile--get-parent" href="pygobject/class-giofile.html#method-giofile--get-parent">
- <ANCHOR id="method-giofile--get-parse-name" href="pygobject/class-giofile.html#method-giofile--get-parse-name">
- <ANCHOR id="method-giofile--get-path" href="pygobject/class-giofile.html#method-giofile--get-path">
- <ANCHOR id="method-giofile--get-relative-path" href="pygobject/class-giofile.html#method-giofile--get-relative-path">
- <ANCHOR id="method-giofile--get-uri" href="pygobject/class-giofile.html#method-giofile--get-uri">
- <ANCHOR id="method-giofile--get-uri-scheme" href="pygobject/class-giofile.html#method-giofile--get-uri-scheme">
- <ANCHOR id="method-giofile--has-prefix" href="pygobject/class-giofile.html#method-giofile--has-prefix">
- <ANCHOR id="method-giofile--has-uri-scheme" href="pygobject/class-giofile.html#method-giofile--has-uri-scheme">
- <ANCHOR id="method-giofile--is-native" href="pygobject/class-giofile.html#method-giofile--is-native">
- <ANCHOR id="method-giofile--load-contents" href="pygobject/class-giofile.html#method-giofile--load-contents">
- <ANCHOR id="method-giofile--load-contents-async" href="pygobject/class-giofile.html#method-giofile--load-contents-async">
- <ANCHOR id="method-giofile--load-contents-finish" href="pygobject/class-giofile.html#method-giofile--load-contents-finish">
- <ANCHOR id="method-giofile--make-directory" href="pygobject/class-giofile.html#method-giofile--make-directory">
- <ANCHOR id="method-giofile--make-directory-with-parents" href="pygobject/class-giofile.html#method-giofile--make-directory-with-parents">
- <ANCHOR id="method-giofile--make-symbolic-link" href="pygobject/class-giofile.html#method-giofile--make-symbolic-link">
- <ANCHOR id="method-giofile--monitor" href="pygobject/class-giofile.html#method-giofile--monitor">
- <ANCHOR id="method-giofile--monitor-directory" href="pygobject/class-giofile.html#method-giofile--monitor-directory">
- <ANCHOR id="method-giofile--monitor-file" href="pygobject/class-giofile.html#method-giofile--monitor-file">
- <ANCHOR id="method-giofile--mount-enclosing-volume" href="pygobject/class-giofile.html#method-giofile--mount-enclosing-volume">
- <ANCHOR id="method-giofile--mount-enclosing-volume-finish" href="pygobject/class-giofile.html#method-giofile--mount-enclosing-volume-finish">
- <ANCHOR id="method-giofile--mount-mountable" href="pygobject/class-giofile.html#method-giofile--mount-mountable">
- <ANCHOR id="method-giofile--mount-mountable-finish" href="pygobject/class-giofile.html#method-giofile--mount-mountable-finish">
- <ANCHOR id="method-giofile--move" href="pygobject/class-giofile.html#method-giofile--move">
- <ANCHOR id="method-giofile--query-default-handler" href="pygobject/class-giofile.html#method-giofile--query-default-handler">
- <ANCHOR id="method-giofile--query-exists" href="pygobject/class-giofile.html#method-giofile--query-exists">
- <ANCHOR id="method-giofile--query-file-type" href="pygobject/class-giofile.html#method-giofile--query-file-type">
- <ANCHOR id="method-giofile--query-filesystem-info" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info">
- <ANCHOR id="method-giofile--query-filesystem-info-async" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info-async">
- <ANCHOR id="method-giofile--query-filesystem-info-finish" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info-finish">
- <ANCHOR id="method-giofile--query-info" href="pygobject/class-giofile.html#method-giofile--query-info">
- <ANCHOR id="method-giofile--query-info-async" href="pygobject/class-giofile.html#method-giofile--query-info-async">
- <ANCHOR id="method-giofile--query-info-finish" href="pygobject/class-giofile.html#method-giofile--query-info-finish">
- <ANCHOR id="method-giofile--query-settable-attributes" href="pygobject/class-giofile.html#method-giofile--query-settable-attributes">
- <ANCHOR id="method-giofile--query-writable-namespace" href="pygobject/class-giofile.html#method-giofile--query-writable-namespace">
- <ANCHOR id="method-giofile--read" href="pygobject/class-giofile.html#method-giofile--read">
- <ANCHOR id="method-giofile--read-async" href="pygobject/class-giofile.html#method-giofile--read-async">
- <ANCHOR id="method-giofile--read-finish" href="pygobject/class-giofile.html#method-giofile--read-finish">
- <ANCHOR id="method-giofile--replace" href="pygobject/class-giofile.html#method-giofile--replace">
- <ANCHOR id="method-giofile--replace-async" href="pygobject/class-giofile.html#method-giofile--replace-async">
- <ANCHOR id="method-giofile--replace-contents" href="pygobject/class-giofile.html#method-giofile--replace-contents">
- <ANCHOR id="method-giofile--replace-contents-async" href="pygobject/class-giofile.html#method-giofile--replace-contents-async">
- <ANCHOR id="method-giofile--replace-contents-finish" href="pygobject/class-giofile.html#method-giofile--replace-contents-finish">
- <ANCHOR id="method-giofile--replace-finish" href="pygobject/class-giofile.html#method-giofile--replace-finish">
- <ANCHOR id="method-giofile--resolve-relative-path" href="pygobject/class-giofile.html#method-giofile--resolve-relative-path">
- <ANCHOR id="method-giofile--set-attribute" href="pygobject/class-giofile.html#method-giofile--set-attribute">
- <ANCHOR id="method-giofile--set-attribute-byte-string" href="pygobject/class-giofile.html#method-giofile--set-attribute-byte-string">
- <ANCHOR id="method-giofile--set-attribute-int32" href="pygobject/class-giofile.html#method-giofile--set-attribute-int32">
- <ANCHOR id="method-giofile--set-attribute-int64" href="pygobject/class-giofile.html#method-giofile--set-attribute-int64">
- <ANCHOR id="method-giofile--set-attribute-string" href="pygobject/class-giofile.html#method-giofile--set-attribute-string">
- <ANCHOR id="method-giofile--set-attribute-uint32" href="pygobject/class-giofile.html#method-giofile--set-attribute-uint32">
- <ANCHOR id="method-giofile--set-attribute-uint64" href="pygobject/class-giofile.html#method-giofile--set-attribute-uint64">
- <ANCHOR id="method-giofile--set-attributes-async" href="pygobject/class-giofile.html#method-giofile--set-attributes-async">
- <ANCHOR id="method-giofile--set-attributes-finish" href="pygobject/class-giofile.html#method-giofile--set-attributes-finish">
- <ANCHOR id="method-giofile--set-attributes-from-info" href="pygobject/class-giofile.html#method-giofile--set-attributes-from-info">
- <ANCHOR id="method-giofile--set-display-name" href="pygobject/class-giofile.html#method-giofile--set-display-name">
- <ANCHOR id="method-giofile--set-display-name-async" href="pygobject/class-giofile.html#method-giofile--set-display-name-async">
- <ANCHOR id="method-giofile--set-display-name-finish" href="pygobject/class-giofile.html#method-giofile--set-display-name-finish">
- <ANCHOR id="method-giofile--trash" href="pygobject/class-giofile.html#method-giofile--trash">
- <ANCHOR id="method-giofile--unmount-mountable" href="pygobject/class-giofile.html#method-giofile--unmount-mountable">
- <ANCHOR id="method-giofile--unmount-mountable-finish" href="pygobject/class-giofile.html#method-giofile--unmount-mountable-finish">
- <ANCHOR id="function-gio--file-parse-name" href="pygobject/class-giofile.html#function-gio--file-parse-name">
- <ANCHOR id="class-giofileattributeinfo" href="pygobject/class-giofileattributeinfo.html">
- <ANCHOR id="attributes-giofileattributeinfo" href="pygobject/class-giofileattributeinfo.html#attributes-giofileattributeinfo">
- <ANCHOR id="class-giofileenumerator" href="pygobject/class-giofileenumerator.html">
- <ANCHOR id="properties-giofileenumerator" href="pygobject/class-giofileenumerator.html#properties-giofileenumerator">
- <ANCHOR id="method-giofileenumerator--close" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close">
- <ANCHOR id="method-giofileenumerator--close-async" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close-async">
- <ANCHOR id="method-giofileenumerator--close-finish" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close-finish">
- <ANCHOR id="method-giofileenumerator--get-container" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--get-container">
- <ANCHOR id="method-giofileenumerator--has-pending" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--has-pending">
- <ANCHOR id="method-giofileenumerator--is-closed" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--is-closed">
- <ANCHOR id="method-giofileenumerator--next-file" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-file">
- <ANCHOR id="method-giofileenumerator--next-files-async" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-files-async">
- <ANCHOR id="method-giofileenumerator--next-files-finish" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-files-finish">
- <ANCHOR id="method-giofileenumerator--set-pending" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--set-pending">
- <ANCHOR id="class-giofileicon" href="pygobject/class-giofileicon.html">
- <ANCHOR id="constructor-giofileicon" href="pygobject/class-giofileicon.html#constructor-giofileicon">
- <ANCHOR id="method-giofileicon--get-file" href="pygobject/class-giofileicon.html#method-giofileicon--get-file">
- <ANCHOR id="class-giofileinfo" href="pygobject/class-giofileinfo.html">
- <ANCHOR id="constructor-giofileinfo" href="pygobject/class-giofileinfo.html#constructor-giofileinfo">
- <ANCHOR id="class-giofileinputstream" href="pygobject/class-giofileinputstream.html">
- <ANCHOR id="method-giofileinputstream--query-info" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info">
- <ANCHOR id="method-giofileinputstream--query-info-async" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info-async">
- <ANCHOR id="method-giofileinputstream--query-info-finish" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info-finish">
- <ANCHOR id="class-giofilemonitor" href="pygobject/class-giofilemonitor.html">
- <ANCHOR id="properties-giofilemonitor" href="pygobject/class-giofilemonitor.html#properties-giofilemonitor">
- <ANCHOR id="signal-prototypes-giofilemonitor" href="pygobject/class-giofilemonitor.html#signal-prototypes-giofilemonitor">
- <ANCHOR id="class-giofileoutputstream" href="pygobject/class-giofileoutputstream.html">
- <ANCHOR id="method-giofileoutputstream--get-etag" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--get-etag">
- <ANCHOR id="method-giofileoutputstream--query-info" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info">
- <ANCHOR id="method-giofileoutputstream--query-info-async" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info-async">
- <ANCHOR id="method-giofileoutputstream--query-info-finish" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish">
- <ANCHOR id="class-giofilterinputstream" href="pygobject/class-giofilterinputstream.html">
- <ANCHOR id="properties-giofilterinputstream" href="pygobject/class-giofilterinputstream.html#properties-giofilterinputstream">
- <ANCHOR id="method-giofilterinputstream--get-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream">
- <ANCHOR id="method-giofilterinputstream--get-close-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream">
- <ANCHOR id="method-giofilterinputstream--set-close-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream">
- <ANCHOR id="class-giofilteroutputstream" href="pygobject/class-giofilteroutputstream.html">
- <ANCHOR id="properties-giofilteroutputstream" href="pygobject/class-giofilteroutputstream.html#properties-giofilteroutputstream">
- <ANCHOR id="method-giofilteroutputstream--get-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream">
- <ANCHOR id="method-giofilteroutputstream--get-close-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream">
- <ANCHOR id="method-giofilteroutputstream--set-close-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream">
- <ANCHOR id="class-gioicon" href="pygobject/class-gioicon.html">
- <ANCHOR id="method-gioicon--equal" href="pygobject/class-gioicon.html#method-gioicon--equal">
- <ANCHOR id="method-gioicon--to-string" href="pygobject/class-gioicon.html#method-gioicon--to-string">
- <ANCHOR id="function-gio--icon-new-from-string" href="pygobject/class-gioicon.html#function-gio--icon-new-from-string">
- <ANCHOR id="class-gioinputstream" href="pygobject/class-gioinputstream.html">
- <ANCHOR id="method-gioinputstream--clear-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--clear-pending">
- <ANCHOR id="method-gioinputstream--close" href="pygobject/class-gioinputstream.html#method-gioinputstream--close">
- <ANCHOR id="method-gioinputstream--close-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--close-async">
- <ANCHOR id="method-gioinputstream--close-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--close-finish">
- <ANCHOR id="method-gioinputstream--has-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--has-pending">
- <ANCHOR id="method-gioinputstream--is-closed" href="pygobject/class-gioinputstream.html#method-gioinputstream--is-closed">
- <ANCHOR id="method-gioinputstream--read" href="pygobject/class-gioinputstream.html#method-gioinputstream--read">
- <ANCHOR id="method-gioinputstream--read-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-async">
- <ANCHOR id="method-gioinputstream--read-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-finish">
- <ANCHOR id="method-gioinputstream--read-part" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-part">
- <ANCHOR id="method-gioinputstream--set-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--set-pending">
- <ANCHOR id="method-gioinputstream--skip" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip">
- <ANCHOR id="method-gioinputstream--skip-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip-async">
- <ANCHOR id="method-gioinputstream--skip-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip-finish">
- <ANCHOR id="class-gioloadableicon" href="pygobject/class-gioloadableicon.html">
- <ANCHOR id="method-gioloadableicon--load" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load">
- <ANCHOR id="method-gioloadableicon--load-async" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load-async">
- <ANCHOR id="method-gioloadableicon--load-finish" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load-finish">
- <ANCHOR id="class-giomemoryinputstream" href="pygobject/class-giomemoryinputstream.html">
- <ANCHOR id="constructor-giomemoryinputstream" href="pygobject/class-giomemoryinputstream.html#constructor-giomemoryinputstream">
- <ANCHOR id="method-giomemoryinputstream--add-data" href="pygobject/class-giomemoryinputstream.html#method-giomemoryinputstream--add-data">
- <ANCHOR id="function-gio--memory-input-stream-new-from-data" href="pygobject/class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data">
- <ANCHOR id="class-giomemoryoutputstream" href="pygobject/class-giomemoryoutputstream.html">
- <ANCHOR id="constructor-giomemoryoutputstream" href="pygobject/class-giomemoryoutputstream.html#constructor-giomemoryoutputstream">
- <ANCHOR id="method-giomemoryoutputstream--get-contents" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents">
- <ANCHOR id="method-giomemoryoutputstream--get-data-size" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size">
- <ANCHOR id="method-giomemoryoutputstream--get-size" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size">
- <ANCHOR id="class-giomount" href="pygobject/class-giomount.html">
- <ANCHOR id="signal-prototypes-giomount" href="pygobject/class-giomount.html#signal-prototypes-giomount">
- <ANCHOR id="method-giomount--can-eject" href="pygobject/class-giomount.html#method-giomount--can-eject">
- <ANCHOR id="method-giomount--can-unmount" href="pygobject/class-giomount.html#method-giomount--can-unmount">
- <ANCHOR id="method-giomount--eject" href="pygobject/class-giomount.html#method-giomount--eject">
- <ANCHOR id="method-giomount--eject-finish" href="pygobject/class-giomount.html#method-giomount--eject-finish">
- <ANCHOR id="method-giomount--get-drive" href="pygobject/class-giomount.html#method-giomount--get-drive">
- <ANCHOR id="method-giomount--get-icon" href="pygobject/class-giomount.html#method-giomount--get-icon">
- <ANCHOR id="method-giomount--get-name" href="pygobject/class-giomount.html#method-giomount--get-name">
- <ANCHOR id="method-giomount--get-root" href="pygobject/class-giomount.html#method-giomount--get-root">
- <ANCHOR id="method-giomount--get-uuid" href="pygobject/class-giomount.html#method-giomount--get-uuid">
- <ANCHOR id="method-giomount--get-volume" href="pygobject/class-giomount.html#method-giomount--get-volume">
- <ANCHOR id="method-giomount--guess-content-type" href="pygobject/class-giomount.html#method-giomount--guess-content-type">
- <ANCHOR id="method-giomount--guess-content-type-finish" href="pygobject/class-giomount.html#method-giomount--guess-content-type-finish">
- <ANCHOR id="method-giomount--guess-content-type-sync" href="pygobject/class-giomount.html#method-giomount--guess-content-type-sync">
- <ANCHOR id="method-giomount--is-shadowed" href="pygobject/class-giomount.html#method-giomount--is-shadowed">
- <ANCHOR id="method-giomount--remount" href="pygobject/class-giomount.html#method-giomount--remount">
- <ANCHOR id="method-giomount--remount-finish" href="pygobject/class-giomount.html#method-giomount--remount-finish">
- <ANCHOR id="method-giomount--shadow" href="pygobject/class-giomount.html#method-giomount--shadow">
- <ANCHOR id="method-giomount--unmount" href="pygobject/class-giomount.html#method-giomount--unmount">
- <ANCHOR id="method-giomount--unmount-finish" href="pygobject/class-giomount.html#method-giomount--unmount-finish">
- <ANCHOR id="method-giomount--unshadow" href="pygobject/class-giomount.html#method-giomount--unshadow">
- <ANCHOR id="signal-giomount--aborted" href="pygobject/class-giomount.html#signal-giomount--aborted">
- <ANCHOR id="signal-giomount--changed" href="pygobject/class-giomount.html#signal-giomount--changed">
- <ANCHOR id="signal-giomount--unmounted" href="pygobject/class-giomount.html#signal-giomount--unmounted">
- <ANCHOR id="class-giomountoperation" href="pygobject/class-giomountoperation.html">
- <ANCHOR id="properties-giomountoperation" href="pygobject/class-giomountoperation.html#properties-giomountoperation">
- <ANCHOR id="signal-prototypes-giomountoperation" href="pygobject/class-giomountoperation.html#signal-prototypes-giomountoperation">
- <ANCHOR id="constructor-giomountoperation" href="pygobject/class-giomountoperation.html#constructor-giomountoperation">
- <ANCHOR id="method-giomountoperation--get-anonymous" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-anonymous">
- <ANCHOR id="method-giomountoperation--get-choice" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-choice">
- <ANCHOR id="method-giomountoperation--get-domain" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-domain">
- <ANCHOR id="method-giomountoperation--get-password" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-password">
- <ANCHOR id="method-giomountoperation--get-password-save" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-password-save">
- <ANCHOR id="method-giomountoperation--get-username" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-username">
- <ANCHOR id="method-giomountoperation--reply" href="pygobject/class-giomountoperation.html#method-giomountoperation--reply">
- <ANCHOR id="method-giomountoperation--set-anonymous" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-anonymous">
- <ANCHOR id="method-giomountoperation--set-choice" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-choice">
- <ANCHOR id="method-giomountoperation--set-domain" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-domain">
- <ANCHOR id="method-giomountoperation--set-password" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-password">
- <ANCHOR id="method-giomountoperation--set-password-save" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-password-save">
- <ANCHOR id="method-giomountoperation--set-username" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-username">
- <ANCHOR id="signal-giomountoperation--aborted" href="pygobject/class-giomountoperation.html#signal-giomountoperation--aborted">
- <ANCHOR id="signal-giomountoperation--ask-password" href="pygobject/class-giomountoperation.html#signal-giomountoperation--ask-password">
- <ANCHOR id="signal-giomountoperation--ask-question" href="pygobject/class-giomountoperation.html#signal-giomountoperation--ask-question">
- <ANCHOR id="signal-giomountoperation--reply" href="pygobject/class-giomountoperation.html#signal-giomountoperation--reply">
- <ANCHOR id="class-giooutputstream" href="pygobject/class-giooutputstream.html">
- <ANCHOR id="class-gioseekable" href="pygobject/class-gioseekable.html">
- <ANCHOR id="method-gioseekable--tell" href="pygobject/class-gioseekable.html#method-gioseekable--tell">
- <ANCHOR id="method-gioseekable--can_seek" href="pygobject/class-gioseekable.html#method-gioseekable--can_seek">
- <ANCHOR id="method-gioseekable--seek" href="pygobject/class-gioseekable.html#method-gioseekable--seek">
- <ANCHOR id="method-gioseekable--can_truncate" href="pygobject/class-gioseekable.html#method-gioseekable--can_truncate">
- <ANCHOR id="method-gioseekable--truncate" href="pygobject/class-gioseekable.html#method-gioseekable--truncate">
- <ANCHOR id="class-giosimpleasyncresult" href="pygobject/class-giosimpleasyncresult.html">
- <ANCHOR id="method-giosimpleasyncresult--complete" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete">
- <ANCHOR id="method-giosimpleasyncresult--complete-in-idle" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle">
- <ANCHOR id="method-giosimpleasyncresult--get-op-res-gboolean" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean">
- <ANCHOR id="method-giosimpleasyncresult--get-op-res-gssize" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize">
- <ANCHOR id="method-giosimpleasyncresult--propagate-error" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error">
- <ANCHOR id="method-giosimpleasyncresult--set-handle-cancellation" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation">
- <ANCHOR id="method-giosimpleasyncresult--set-op-res-gboolean" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean">
- <ANCHOR id="method-giosimpleasyncresult--set-op-res-gssize" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize">
- <ANCHOR id="class-giothemedicon" href="pygobject/class-giothemedicon.html">
- <ANCHOR id="properties-giomountoperation" href="pygobject/class-giothemedicon.html#properties-giomountoperation">
- <ANCHOR id="constructor-giothemedicon" href="pygobject/class-giothemedicon.html#constructor-giothemedicon">
- <ANCHOR id="method-giothemedicon--append-name" href="pygobject/class-giothemedicon.html#method-giothemedicon--append-name">
- <ANCHOR id="method-giothemedicon--get-names" href="pygobject/class-giothemedicon.html#method-giothemedicon--get-names">
- <ANCHOR id="method-giothemedicon--prepend-name" href="pygobject/class-giothemedicon.html#method-giothemedicon--prepend-name">
- <ANCHOR id="class-giovolume" href="pygobject/class-giovolume.html">
- <ANCHOR id="signal-prototypes-giovolume" href="pygobject/class-giovolume.html#signal-prototypes-giovolume">
- <ANCHOR id="method-giovolume--can-eject" href="pygobject/class-giovolume.html#method-giovolume--can-eject">
- <ANCHOR id="method-giovolume--can-mount" href="pygobject/class-giovolume.html#method-giovolume--can-mount">
- <ANCHOR id="method-giovolume--eject" href="pygobject/class-giovolume.html#method-giovolume--eject">
- <ANCHOR id="method-giovolume--eject-finish" href="pygobject/class-giovolume.html#method-giovolume--eject-finish">
- <ANCHOR id="method-giovolume--enumerate-identifiers" href="pygobject/class-giovolume.html#method-giovolume--enumerate-identifiers">
- <ANCHOR id="method-giovolume--get-activation-root" href="pygobject/class-giovolume.html#method-giovolume--get-activation-root">
- <ANCHOR id="method-giovolume--get-drive" href="pygobject/class-giovolume.html#method-giovolume--get-drive">
- <ANCHOR id="method-giovolume--get-icon" href="pygobject/class-giovolume.html#method-giovolume--get-icon">
- <ANCHOR id="method-giovolume--get-identifier" href="pygobject/class-giovolume.html#method-giovolume--get-identifier">
- <ANCHOR id="method-giovolume--get-mount" href="pygobject/class-giovolume.html#method-giovolume--get-mount">
- <ANCHOR id="method-giovolume--get-name" href="pygobject/class-giovolume.html#method-giovolume--get-name">
- <ANCHOR id="method-giovolume--get-uuid" href="pygobject/class-giovolume.html#method-giovolume--get-uuid">
- <ANCHOR id="method-giovolume--mount" href="pygobject/class-giovolume.html#method-giovolume--mount">
- <ANCHOR id="method-giovolume--mount-finish" href="pygobject/class-giovolume.html#method-giovolume--mount-finish">
- <ANCHOR id="method-giovolume--should-automount" href="pygobject/class-giovolume.html#method-giovolume--should-automount">
- <ANCHOR id="signal-giovolume--changed" href="pygobject/class-giovolume.html#signal-giovolume--changed">
- <ANCHOR id="signal-giovolume--removed" href="pygobject/class-giovolume.html#signal-giovolume--removed">
- <ANCHOR id="class-giovolumemonitor" href="pygobject/class-giovolumemonitor.html">
- <ANCHOR id="signal-prototypes-giovolumemonitor" href="pygobject/class-giovolumemonitor.html#signal-prototypes-giovolumemonitor">
- <ANCHOR id="method-giovolumemonitor--get-connected-drives" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives">
- <ANCHOR id="method-giovolumemonitor--get-mount-for-uuid" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid">
- <ANCHOR id="method-giovolumemonitor--get-mounts" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-mounts">
- <ANCHOR id="method-giovolumemonitor--get-volume-for-uuid" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid">
- <ANCHOR id="method-giovolumemonitor--get-volumes" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-volumes">
- <ANCHOR id="function-gio--volume-monitor-adopt-orphan-mount" href="pygobject/class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount">
- <ANCHOR id="function-gio--volume-monitor-get" href="pygobject/class-giovolumemonitor.html#function-gio--volume-monitor-get">
- <ANCHOR id="signal-giovolumemonitor--drive-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed">
- <ANCHOR id="signal-giovolumemonitor--drive-connected" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected">
- <ANCHOR id="signal-giovolumemonitor--drive-disconnected" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected">
- <ANCHOR id="signal-giovolumemonitor--drive-eject-button" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button">
- <ANCHOR id="signal-giovolumemonitor--mount-added" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-added">
- <ANCHOR id="signal-giovolumemonitor--mount-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed">
- <ANCHOR id="signal-giovolumemonitor--mount-pre-unmount" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount">
- <ANCHOR id="signal-giovolumemonitor--mount-removed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed">
- <ANCHOR id="signal-giovolumemonitor--volume-added" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-added">
- <ANCHOR id="signal-giovolumemonitor--volume-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed">
- <ANCHOR id="signal-giovolumemonitor--volume-removed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed">
- <ANCHOR id="gio-functions" href="pygobject/gio-functions.html">
- <ANCHOR id="function-gio--content-type-can-be-executable" href="pygobject/gio-functions.html#function-gio--content-type-can-be-executable">
- <ANCHOR id="function-gio--content-type-equals" href="pygobject/gio-functions.html#function-gio--content-type-equals">
- <ANCHOR id="function-gio--content-type-from-mime-type" href="pygobject/gio-functions.html#function-gio--content-type-from-mime-type">
- <ANCHOR id="function-gio--content-type-get-description" href="pygobject/gio-functions.html#function-gio--content-type-get-description">
- <ANCHOR id="function-gio--content-type-get-icon" href="pygobject/gio-functions.html#function-gio--content-type-get-icon">
- <ANCHOR id="function-gio--content-type-get-mime-type" href="pygobject/gio-functions.html#function-gio--content-type-get-mime-type">
- <ANCHOR id="function-gio--content-type-guess" href="pygobject/gio-functions.html#function-gio--content-type-guess">
- <ANCHOR id="function-gio--content-type-is-a" href="pygobject/gio-functions.html#function-gio--content-type-is-a">
- <ANCHOR id="function-gio--content-type-is-unknown" href="pygobject/gio-functions.html#function-gio--content-type-is-unknown">
- <ANCHOR id="function-gio--content-types-get-registered" href="pygobject/gio-functions.html#function-gio--content-types-get-registered">
- <ANCHOR id="function-gio--io-error-from-errno" href="pygobject/gio-functions.html#function-gio--io-error-from-errno">
- <ANCHOR id="gio-constants" href="pygobject/gio-constants.html">
- <ANCHOR id="gio-constants-description" href="pygobject/gio-constants.html#gio-constants-description">
- <ANCHOR id="gio-ask-password-flags-constants" href="pygobject/gio-constants.html#gio-ask-password-flags-constants">
- <ANCHOR id="gio-app-info-constants" href="pygobject/gio-constants.html#gio-app-info-constants">
- <ANCHOR id="gio-data-stream-byte-order-constants" href="pygobject/gio-constants.html#gio-data-stream-byte-order-constants">
- <ANCHOR id="gio-data-stream-newline-type-constants" href="pygobject/gio-constants.html#gio-data-stream-newline-type-constants">
- <ANCHOR id="gio-emblem-origin-constants" href="pygobject/gio-constants.html#gio-emblem-origin-constants">
- <ANCHOR id="gio-error-constants" href="pygobject/gio-constants.html#gio-error-constants">
- <ANCHOR id="gio-file-attribute-constants" href="pygobject/gio-constants.html#gio-file-attribute-constants">
- <ANCHOR id="gio-file-attribute-type-constants" href="pygobject/gio-constants.html#gio-file-attribute-type-constants">
- <ANCHOR id="gio-file-attribute-flags-constants" href="pygobject/gio-constants.html#gio-file-attribute-flags-constants">
- <ANCHOR id="gio-file-create-flags-constants" href="pygobject/gio-constants.html#gio-file-create-flags-constants">
- <ANCHOR id="gio-file-copy-flags-constants" href="pygobject/gio-constants.html#gio-file-copy-flags-constants">
- <ANCHOR id="gio-file-monitor-flags-constants" href="pygobject/gio-constants.html#gio-file-monitor-flags-constants">
- <ANCHOR id="gio-file-query-info-flags-constants" href="pygobject/gio-constants.html#gio-file-query-info-flags-constants">
- <ANCHOR id="gio-file-type-constants" href="pygobject/gio-constants.html#gio-file-type-constants">
- <ANCHOR id="gio-mount-mount-flags-constants" href="pygobject/gio-constants.html#gio-mount-mount-flags-constants">
- <ANCHOR id="gio-mount-unmount-flags-constants" href="pygobject/gio-constants.html#gio-mount-unmount-flags-constants">
- <ANCHOR id="gio-mount-operation-result-constants" href="pygobject/gio-constants.html#gio-mount-operation-result-constants">
- <ANCHOR id="gio-password-save-constants" href="pygobject/gio-constants.html#gio-password-save-constants">
- <ANCHOR id="class-giounixinputstream" href="pygobject/class-giounixinputstream.html">
- <ANCHOR id="properties-giounixinputstream" href="pygobject/class-giounixinputstream.html#properties-giounixinputstream">
- <ANCHOR id="constructor-giounixinputstream" href="pygobject/class-giounixinputstream.html#constructor-giounixinputstream">
- <ANCHOR id="method-giounixinputstream--get-close-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--get-close-fd">
- <ANCHOR id="method-giounixinputstream--get-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--get-fd">
- <ANCHOR id="method-giounixinputstream--set-close-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--set-close-fd">
- <ANCHOR id="class-giounixoutputstream" href="pygobject/class-giounixoutputstream.html">
- <ANCHOR id="properties-giounixoutputstream" href="pygobject/class-giounixoutputstream.html#properties-giounixoutputstream">
- <ANCHOR id="constructor-giounixoutputstream" href="pygobject/class-giounixoutputstream.html#constructor-giounixoutputstream">
- <ANCHOR id="method-giounixoutputstream--get-close-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd">
- <ANCHOR id="method-giounixoutputstream--get-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--get-fd">
- <ANCHOR id="method-giounixoutputstream--set-close-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd">
\ No newline at end of file
diff --git a/docs/html/pygobject.devhelp b/docs/html/pygobject.devhelp
index b37be2a..7a030e8 100644
--- a/docs/html/pygobject.devhelp
+++ b/docs/html/pygobject.devhelp
@@ -18,70 +18,10 @@
<sub name="gobject Functions" link="gobject-functions.html"/>
<sub name="gobject Constants" link="gobject-constants.html"/>
</sub>
- <sub name="PyGio Class Reference" link="gio-class-reference.html">
- <sub name="gio.AppInfo" link="class-gioappinfo.html"/>
- <sub name="gio.AppLaunchContext" link="class-gioapplaunchcontext.html"/>
- <sub name="gio.AsyncResult" link="class-gioasyncresult.html"/>
- <sub name="gio.BufferedInputStream" link="class-giobufferedinputstream.html"/>
- <sub name="gio.BufferedOutputStream" link="class-giobufferedoutputstream.html"/>
- <sub name="gio.Cancellable" link="class-giocancellable.html"/>
- <sub name="gio.DataInputStream" link="class-giodatainputstream.html"/>
- <sub name="gio.DataOutputStream" link="class-giodataoutputstream.html"/>
- <sub name="gio.Drive" link="class-giodrive.html"/>
- <sub name="gio.Emblem" link="class-gioemblem.html"/>
- <sub name="gio.EmblemedIcon" link="class-gioemblemedicon.html"/>
- <sub name="gio.File" link="class-giofile.html"/>
- <sub name="gio.FileAttributeInfo" link="class-giofileattributeinfo.html"/>
- <sub name="gio.FileEnumerator" link="class-giofileenumerator.html"/>
- <sub name="gio.FileIcon" link="class-giofileicon.html"/>
- <sub name="gio.FileInfo" link="class-giofileinfo.html"/>
- <sub name="gio.FileInputStream" link="class-giofileinputstream.html"/>
- <sub name="gio.FileMonitor" link="class-giofilemonitor.html"/>
- <sub name="gio.FileOutputStream" link="class-giofileoutputstream.html"/>
- <sub name="gio.FilterInputStream" link="class-giofilterinputstream.html"/>
- <sub name="gio.FilterOutputStream" link="class-giofilteroutputstream.html"/>
- <sub name="gio.Icon" link="class-gioicon.html"/>
- <sub name="gio.InputStream" link="class-gioinputstream.html"/>
- <sub name="gio.LoadableIcon" link="class-gioloadableicon.html"/>
- <sub name="gio.MemoryInputStream" link="class-giomemoryinputstream.html"/>
- <sub name="gio.MemoryOutputStream" link="class-giomemoryoutputstream.html"/>
- <sub name="gio.Mount" link="class-giomount.html"/>
- <sub name="gio.MountOperation" link="class-giomountoperation.html"/>
- <sub name="gio.OutputStream" link="class-giooutputstream.html"/>
- <sub name="gio.Seekable" link="class-gioseekable.html"/>
- <sub name="gio.SimpleAsyncResult" link="class-giosimpleasyncresult.html"/>
- <sub name="gio.ThemedIcon" link="class-giothemedicon.html"/>
- <sub name="gio.Volume" link="class-giovolume.html"/>
- <sub name="gio.VolumeMonitor" link="class-giovolumemonitor.html"/>
- <sub name="gio Functions" link="gio-functions.html"/>
- <sub name="gio Constants" link="gio-constants.html"/>
- </sub>
- <sub name="PyGio Unix Class Reference" link="giounix-class-reference.html">
- <sub name="gio.unix.InputStream" link="class-giounixinputstream.html"/>
- <sub name="gio.unix.OutputStream" link="class-giounixoutputstream.html"/>
- </sub>
</chapters>
<functions>
<function name="glib.MainContext" link="class-glibmaincontext.html#constructor-glibmaincontext"/>
<function name="glib.MainLoop" link="class-glibmainloop.html#constructor-glibmainloop"/>
- <function name="gio.AppInfo" link="class-gioappinfo.html#constructor-gioappinfo"/>
- <function name="gio.AppLaunchContext" link="class-gioapplaunchcontext.html#constructor-gioapplaunchcontext"/>
- <function name="gio.BufferedInputStream" link="class-giobufferedinputstream.html#constructor-giobufferedinputstream"/>
- <function name="gio.BufferedOutputStream" link="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream"/>
- <function name="gio.Cancellable" link="class-giocancellable.html#constructor-giocancellable"/>
- <function name="gio.DataInputStream" link="class-giodatainputstream.html#constructor-giodatainputstream"/>
- <function name="gio.DataOutputStream" link="class-giodataoutputstream.html#constructor-giodataoutputstream"/>
- <function name="gio.Emblem" link="class-gioemblem.html#constructor-gioemblem"/>
- <function name="gio.EmblemedIcon" link="class-gioemblemedicon.html#constructor-gioemblemedicon"/>
- <function name="gio.File" link="class-giofile.html#constructor-giofile"/>
- <function name="gio.FileIcon" link="class-giofileicon.html#constructor-giofileicon"/>
- <function name="gio.FileInfo" link="class-giofileinfo.html#constructor-giofileinfo"/>
- <function name="gio.MemoryInputStream" link="class-giomemoryinputstream.html#constructor-giomemoryinputstream"/>
- <function name="gio.MemoryOutputStream" link="class-giomemoryoutputstream.html#constructor-giomemoryoutputstream"/>
- <function name="gio.MountOperation" link="class-giomountoperation.html#constructor-giomountoperation"/>
- <function name="gio.ThemedIcon" link="class-giothemedicon.html#constructor-giothemedicon"/>
- <function name="gio.unix.InputStream" link="class-giounixinputstream.html#constructor-giounixinputstream"/>
- <function name="gio.unix.OutputStream" link="class-giounixoutputstream.html#constructor-giounixoutputstream"/>
<function name="glib.MainContext.iteration" link="class-glibmaincontext.html#method-glibmaincontext--iteration"/>
<function name="glib.MainContext.pending" link="class-glibmaincontext.html#method-glibmaincontext--pending"/>
<function name="glib.MainLoop.get_context" link="class-glibmainloop.html#method-glibmainloop--get-context"/>
@@ -164,362 +104,5 @@
<function name="GObject Spawn Flag Constants" link="gobject-constants.html#gobject-spawn-flag-constants"/>
<function name="GObject Built-in Type Constants" link="gobject-constants.html#gobject-type-constants"/>
<function name="GObject Version Constants" link="gobject-constants.html#gobject-version-constants"/>
- <function name="gio.AppInfo.add_supports_type" link="class-gioappinfo.html#method-gioappinfo--add-supports-type"/>
- <function name="gio.AppInfo.can_delete" link="class-gioappinfo.html#method-gioappinfo--can-delete"/>
- <function name="gio.AppInfo.can_remove_supports_type" link="class-gioappinfo.html#method-gioappinfo--can-remove-supports-type"/>
- <function name="gio.AppInfo.delete" link="class-gioappinfo.html#method-gioappinfo--delete"/>
- <function name="gio.AppInfo.dup" link="class-gioappinfo.html#method-gioappinfo--dup"/>
- <function name="gio.AppInfo.equal" link="class-gioappinfo.html#method-gioappinfo--equal"/>
- <function name="gio.AppInfo.get_commandline" link="class-gioappinfo.html#method-gioappinfo--get-commandline"/>
- <function name="gio.AppInfo.get_description" link="class-gioappinfo.html#method-gioappinfo--get-description"/>
- <function name="gio.AppInfo.get_executable" link="class-gioappinfo.html#method-gioappinfo--get-executable"/>
- <function name="gio.AppInfo.get_icon" link="class-gioappinfo.html#method-gioappinfo--get-icon"/>
- <function name="gio.AppInfo.get_id" link="class-gioappinfo.html#method-gioappinfo--get-id"/>
- <function name="gio.AppInfo.get_name" link="class-gioappinfo.html#method-gioappinfo--get-name"/>
- <function name="gio.AppInfo.launch" link="class-gioappinfo.html#method-gioappinfo--launch"/>
- <function name="gio.AppInfo.launch_uris" link="class-gioappinfo.html#method-gioappinfo--launch-uris"/>
- <function name="gio.AppInfo.remove_supports_type" link="class-gioappinfo.html#method-gioappinfo--remove-supports-type"/>
- <function name="gio.AppInfo.set_as_default_for_extension" link="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension"/>
- <function name="gio.AppInfo.set_as_default_for_type" link="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type"/>
- <function name="gio.AppInfo.should_show" link="class-gioappinfo.html#method-gioappinfo--should-show"/>
- <function name="gio.AppInfo.supports_files" link="class-gioappinfo.html#method-gioappinfo--supports-files"/>
- <function name="gio.AppInfo.supports_uris" link="class-gioappinfo.html#method-gioappinfo--supports-uris"/>
- <function name="gio.app_info_get_all" link="class-gioappinfo.html#function-gio--app-info-get-all"/>
- <function name="gio.app_info_get_all_for_type" link="class-gioappinfo.html#function-gio--app-info-get-all-for-type"/>
- <function name="gio.app_info_get_default_for_type" link="class-gioappinfo.html#function-gio--app-info-get-default-for-type"/>
- <function name="gio.app_info_get_default_for_uri_scheme" link="class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme"/>
- <function name="gio.app_info_reset_type_association" link="class-gioappinfo.html#function-gio--app-info-reset-type-association"/>
- <function name="gio.AppLaunchContext.get_display" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display"/>
- <function name="gio.AppLaunchContext.get_startup_notify_id" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id"/>
- <function name="gio.AppLaunchContext.launch_failed" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed"/>
- <function name="gio.AsyncResult.get_source_object" link="class-gioasyncresult.html#method-gioasyncresult--get-source-object"/>
- <function name="gio.BufferedInputStream.fill" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill"/>
- <function name="gio.BufferedInputStream.fill_async" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async"/>
- <function name="gio.BufferedInputStream.fill_finish" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish"/>
- <function name="gio.BufferedInputStream.get_available" link="class-giobufferedinputstream.html#method-giobufferedinputstream--get-available"/>
- <function name="gio.BufferedInputStream.get_buffer_size" link="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size"/>
- <function name="gio.BufferedInputStream.read_byte" link="class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte"/>
- <function name="gio.BufferedInputStream.set_buffer_size" link="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size"/>
- <function name="gio.buffered_input_stream_new_sized" link="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized"/>
- <function name="gio.BufferedOutputStream.get_auto_grow" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow"/>
- <function name="gio.BufferedOutputStream.get_buffer_size" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size"/>
- <function name="gio.BufferedOutputStream.set_auto_grow" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow"/>
- <function name="gio.BufferedOutputStream.set_buffer_size" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size"/>
- <function name="gio.buffered_output_stream_new_sized" link="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized"/>
- <function name="gio.Cancellable.cancel" link="class-giocancellable.html#method-giocancellable--cancel"/>
- <function name="gio.Cancellable.get_fd" link="class-giocancellable.html#method-giocancellable--get-fd"/>
- <function name="gio.Cancellable.is_cancelled" link="class-giocancellable.html#method-giocancellable--is-cancelled"/>
- <function name="gio.Cancellable.pop_current" link="class-giocancellable.html#method-giocancellable--pop-current"/>
- <function name="gio.Cancellable.push_current" link="class-giocancellable.html#method-giocancellable--push-current"/>
- <function name="gio.Cancellable.reset" link="class-giocancellable.html#method-giocancellable--reset"/>
- <function name="gio.Cancellable.set_error_if_cancelled" link="class-giocancellable.html#method-giocancellable--set-error-if-cancelled"/>
- <function name="gio.cancellable_get_current" link="class-giocancellable.html#function-gio--cancellable-get-current"/>
- <function name="gio.DataInputStream.get_byte_order" link="class-giodatainputstream.html#method-giodatainputstream--get-byte-order"/>
- <function name="gio.DataInputStream.get_newline_type" link="class-giodatainputstream.html#method-giodatainputstream--get-newline-type"/>
- <function name="gio.DataInputStream.read_byte" link="class-giodatainputstream.html#method-giodatainputstream--read-byte"/>
- <function name="gio.DataInputStream.read_int16" link="class-giodatainputstream.html#method-giodatainputstream--read-int16"/>
- <function name="gio.DataInputStream.read_int32" link="class-giodatainputstream.html#method-giodatainputstream--read-int32"/>
- <function name="gio.DataInputStream.read_int64" link="class-giodatainputstream.html#method-giodatainputstream--read-int64"/>
- <function name="gio.DataInputStream.read_line" link="class-giodatainputstream.html#method-giodatainputstream--read-line"/>
- <function name="gio.DataInputStream.read_line_async" link="class-giodatainputstream.html#method-giodatainputstream--read-line-async"/>
- <function name="gio.DataInputStream.read_line_finish" link="class-giodatainputstream.html#method-giodatainputstream--read-line-finish"/>
- <function name="gio.DataInputStream.read_uint16" link="class-giodatainputstream.html#method-giodatainputstream--read-uint16"/>
- <function name="gio.DataInputStream.read_uint32" link="class-giodatainputstream.html#method-giodatainputstream--read-uint32"/>
- <function name="gio.DataInputStream.read_uint64" link="class-giodatainputstream.html#method-giodatainputstream--read-uint64"/>
- <function name="gio.DataInputStream.read_until" link="class-giodatainputstream.html#method-giodatainputstream--read-until"/>
- <function name="gio.DataInputStream.read_until_async" link="class-giodatainputstream.html#method-giodatainputstream--read-until-async"/>
- <function name="gio.DataInputStream.read_until_finish" link="class-giodatainputstream.html#method-giodatainputstream--read-until-finish"/>
- <function name="gio.DataInputStream.set_byte_order" link="class-giodatainputstream.html#method-giodatainputstream--set-byte-order"/>
- <function name="gio.DataInputStream.set_newline_type" link="class-giodatainputstream.html#method-giodatainputstream--set-newline-type"/>
- <function name="gio.DataOutputStream.get_byte_order" link="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order"/>
- <function name="gio.DataOutputStream.put_byte" link="class-giodataoutputstream.html#method-giodataoutputstream--put-byte"/>
- <function name="gio.DataOutputStream.put_int16" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int16"/>
- <function name="gio.DataOutputStream.put_int32" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int32"/>
- <function name="gio.DataOutputStream.put_int64" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int64"/>
- <function name="gio.DataOutputStream.put_string" link="class-giodataoutputstream.html#method-giodataoutputstream--put-string"/>
- <function name="gio.DataOutputStream.put_uint16" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16"/>
- <function name="gio.DataOutputStream.put_uint32" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32"/>
- <function name="gio.DataOutputStream.put_uint64" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64"/>
- <function name="gio.DataOutputStream.set_byte_order" link="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order"/>
- <function name="gio.Drive.can_eject" link="class-giodrive.html#method-giodrive--can-eject"/>
- <function name="gio.Drive.can_poll_for_media" link="class-giodrive.html#method-giodrive--can-poll-for-media"/>
- <function name="gio.Drive.eject" link="class-giodrive.html#method-giodrive--eject"/>
- <function name="gio.Drive.eject_finish" link="class-giodrive.html#method-giodrive--eject-finish"/>
- <function name="gio.Drive.enumerate_identifiers" link="class-giodrive.html#method-giodrive--enumerate-identifiers"/>
- <function name="gio.Drive.get_icon" link="class-giodrive.html#method-giodrive--get-icon"/>
- <function name="gio.Drive.get_identifier" link="class-giodrive.html#method-giodrive--get-identifier"/>
- <function name="gio.Drive.get_name" link="class-giodrive.html#method-giodrive--get-name"/>
- <function name="gio.Drive.get_volumes" link="class-giodrive.html#method-giodrive--get-volumes"/>
- <function name="gio.Drive.has_media" link="class-giodrive.html#method-giodrive--has-media"/>
- <function name="gio.Drive.has_volumes" link="class-giodrive.html#method-giodrive--has-volumes"/>
- <function name="gio.Drive.is_media_check_automatic" link="class-giodrive.html#method-giodrive--is-media-check-automatic"/>
- <function name="gio.Drive.is_media_removable" link="class-giodrive.html#method-giodrive--is-media-removable"/>
- <function name="gio.Drive.poll_for_media" link="class-giodrive.html#method-giodrive--poll-for-media"/>
- <function name="gio.Drive.poll_for_media_finish" link="class-giodrive.html#method-giodrive--poll-for-media-finish"/>
- <function name="gio.Emblem.get_icon" link="class-gioemblem.html#method-gioemblem--get-icon"/>
- <function name="gio.Emblem.get_origin" link="class-gioemblem.html#method-gioemblem--get-origin"/>
- <function name="gio.emblem_new_with_origin" link="class-gioemblem.html#function-gio--emblem-new-with-origin"/>
- <function name="gio.EmblemedIcon.add_emblem" link="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem"/>
- <function name="gio.EmblemedIcon.get_icon" link="class-gioemblemedicon.html#method-gioemblemedicon--get-icon"/>
- <function name="gio.File.append_to" link="class-giofile.html#method-giofile--append-to"/>
- <function name="gio.File.append_to_async" link="class-giofile.html#method-giofile--append-to-async"/>
- <function name="gio.File.append_to_finish" link="class-giofile.html#method-giofile--append-to-finish"/>
- <function name="gio.File.copy" link="class-giofile.html#method-giofile--copy"/>
- <function name="gio.File.copy_async" link="class-giofile.html#method-giofile--copy-async"/>
- <function name="gio.File.copy_attributes" link="class-giofile.html#method-giofile--copy-attributes"/>
- <function name="gio.File.copy_finish" link="class-giofile.html#method-giofile--copy-finish"/>
- <function name="gio.File.create" link="class-giofile.html#method-giofile--create"/>
- <function name="gio.File.create_async" link="class-giofile.html#method-giofile--create-async"/>
- <function name="gio.File.create_finish" link="class-giofile.html#method-giofile--create-finish"/>
- <function name="gio.File.delete" link="class-giofile.html#method-giofile--delete"/>
- <function name="gio.File.dup" link="class-giofile.html#method-giofile--dup"/>
- <function name="gio.File.eject_mountable" link="class-giofile.html#method-giofile--eject-mountable"/>
- <function name="gio.File.eject_mountable_finish" link="class-giofile.html#method-giofile--eject-mountable-finish"/>
- <function name="gio.File.enumerate_children" link="class-giofile.html#method-giofile--enumerate-children"/>
- <function name="gio.File.enumerate_children_async" link="class-giofile.html#method-giofile--enumerate-children-async"/>
- <function name="gio.File.eject_mountable_finish" link="class-giofile.html#method-giofile--enumerate-children-finish"/>
- <function name="gio.File.equal" link="class-giofile.html#method-giofile--equal"/>
- <function name="gio.File.find_enclosing_mount" link="class-giofile.html#method-giofile--find-enclosing-mount"/>
- <function name="gio.File.find_enclosing_mount_async" link="class-giofile.html#method-giofile--find-enclosing-mount-async"/>
- <function name="gio.File.find_enclosing_mount_finish" link="class-giofile.html#method-giofile--find-enclosing-mount-finish"/>
- <function name="gio.File.get_basename" link="class-giofile.html#method-giofile--get-basename"/>
- <function name="gio.File.get_child" link="class-giofile.html#method-giofile--get-child"/>
- <function name="gio.File.get_child_for_display_name" link="class-giofile.html#method-giofile--get-child-for-display-name"/>
- <function name="gio.File.get_parent" link="class-giofile.html#method-giofile--get-parent"/>
- <function name="gio.File.get_parse_name" link="class-giofile.html#method-giofile--get-parse-name"/>
- <function name="gio.File.get_path" link="class-giofile.html#method-giofile--get-path"/>
- <function name="gio.File.get_relative_path" link="class-giofile.html#method-giofile--get-relative-path"/>
- <function name="gio.File.get_uri" link="class-giofile.html#method-giofile--get-uri"/>
- <function name="gio.File.get_uri_scheme" link="class-giofile.html#method-giofile--get-uri-scheme"/>
- <function name="gio.File.has_prefix" link="class-giofile.html#method-giofile--has-prefix"/>
- <function name="gio.File.has_uri_scheme" link="class-giofile.html#method-giofile--has-uri-scheme"/>
- <function name="gio.File.is_native" link="class-giofile.html#method-giofile--is-native"/>
- <function name="gio.File.load_contents" link="class-giofile.html#method-giofile--load-contents"/>
- <function name="gio.File.load_contents_async" link="class-giofile.html#method-giofile--load-contents-async"/>
- <function name="gio.File.load_contents_finish" link="class-giofile.html#method-giofile--load-contents-finish"/>
- <function name="gio.File.make_directory" link="class-giofile.html#method-giofile--make-directory"/>
- <function name="gio.File.make_directory_with_parents" link="class-giofile.html#method-giofile--make-directory-with-parents"/>
- <function name="gio.File.make_symbolic_link" link="class-giofile.html#method-giofile--make-symbolic-link"/>
- <function name="gio.File.monitor" link="class-giofile.html#method-giofile--monitor"/>
- <function name="gio.File.monitor_directory" link="class-giofile.html#method-giofile--monitor-directory"/>
- <function name="gio.File.monitor_file" link="class-giofile.html#method-giofile--monitor-file"/>
- <function name="gio.File.mount_enclosing_volume" link="class-giofile.html#method-giofile--mount-enclosing-volume"/>
- <function name="gio.File.mount_enclosing_volume_finish" link="class-giofile.html#method-giofile--mount-enclosing-volume-finish"/>
- <function name="gio.File.mount_mountable" link="class-giofile.html#method-giofile--mount-mountable"/>
- <function name="gio.File.mount_mountable_finish" link="class-giofile.html#method-giofile--mount-mountable-finish"/>
- <function name="gio.File.move" link="class-giofile.html#method-giofile--move"/>
- <function name="gio.File.query_default_handler" link="class-giofile.html#method-giofile--query-default-handler"/>
- <function name="gio.File.query_exists" link="class-giofile.html#method-giofile--query-exists"/>
- <function name="gio.File.query_file_type" link="class-giofile.html#method-giofile--query-file-type"/>
- <function name="gio.File.query_filesystem_info" link="class-giofile.html#method-giofile--query-filesystem-info"/>
- <function name="gio.File.query_filesystem_info_async" link="class-giofile.html#method-giofile--query-filesystem-info-async"/>
- <function name="gio.File.query_filesystem_info_finish" link="class-giofile.html#method-giofile--query-filesystem-info-finish"/>
- <function name="gio.File.query_filesystem_info" link="class-giofile.html#method-giofile--query-info"/>
- <function name="gio.File.query_info_async" link="class-giofile.html#method-giofile--query-info-async"/>
- <function name="gio.File.query_info_finish" link="class-giofile.html#method-giofile--query-info-finish"/>
- <function name="gio.File.query_settable_attributes" link="class-giofile.html#method-giofile--query-settable-attributes"/>
- <function name="gio.File.query_writable_namespace" link="class-giofile.html#method-giofile--query-writable-namespace"/>
- <function name="gio.File.read" link="class-giofile.html#method-giofile--read"/>
- <function name="gio.File.read_async" link="class-giofile.html#method-giofile--read-async"/>
- <function name="gio.File.read_finish" link="class-giofile.html#method-giofile--read-finish"/>
- <function name="gio.File.replace" link="class-giofile.html#method-giofile--replace"/>
- <function name="gio.File.replace_async" link="class-giofile.html#method-giofile--replace-async"/>
- <function name="gio.File.replace_contents" link="class-giofile.html#method-giofile--replace-contents"/>
- <function name="gio.File.replace_contents_async" link="class-giofile.html#method-giofile--replace-contents-async"/>
- <function name="gio.File.replace_contents_finish" link="class-giofile.html#method-giofile--replace-contents-finish"/>
- <function name="gio.File.replace_finish" link="class-giofile.html#method-giofile--replace-finish"/>
- <function name="gio.File.resolve_relative_path" link="class-giofile.html#method-giofile--resolve-relative-path"/>
- <function name="gio.File.set_attribute" link="class-giofile.html#method-giofile--set-attribute"/>
- <function name="gio.File.set_attribute_byte_string" link="class-giofile.html#method-giofile--set-attribute-byte-string"/>
- <function name="gio.File.set_attribute_int32" link="class-giofile.html#method-giofile--set-attribute-int32"/>
- <function name="gio.File.set_attribute_int64" link="class-giofile.html#method-giofile--set-attribute-int64"/>
- <function name="gio.File.set_attribute_string" link="class-giofile.html#method-giofile--set-attribute-string"/>
- <function name="gio.File.set_attribute_uint32" link="class-giofile.html#method-giofile--set-attribute-uint32"/>
- <function name="gio.File.set_attribute_uint64" link="class-giofile.html#method-giofile--set-attribute-uint64"/>
- <function name="gio.File.set_attributes_async" link="class-giofile.html#method-giofile--set-attributes-async"/>
- <function name="gio.File.set_attributes_finish" link="class-giofile.html#method-giofile--set-attributes-finish"/>
- <function name="gio.File.set_attributes_from_info" link="class-giofile.html#method-giofile--set-attributes-from-info"/>
- <function name="gio.File.set_display_name" link="class-giofile.html#method-giofile--set-display-name"/>
- <function name="gio.File.set_display_name_async" link="class-giofile.html#method-giofile--set-display-name-async"/>
- <function name="gio.File.set_display_name_finish" link="class-giofile.html#method-giofile--set-display-name-finish"/>
- <function name="gio.File.trash" link="class-giofile.html#method-giofile--trash"/>
- <function name="gio.File.unmount_mountable" link="class-giofile.html#method-giofile--unmount-mountable"/>
- <function name="gio.File.unmount_mountable_finish" link="class-giofile.html#method-giofile--unmount-mountable-finish"/>
- <function name="gio.file_parse_name" link="class-giofile.html#function-gio--file-parse-name"/>
- <function name="gio.FileEnumerator.close" link="class-giofileenumerator.html#method-giofileenumerator--close"/>
- <function name="gio.FileEnumerator.close_async" link="class-giofileenumerator.html#method-giofileenumerator--close-async"/>
- <function name="gio.FileEnumerator.close_finish" link="class-giofileenumerator.html#method-giofileenumerator--close-finish"/>
- <function name="gio.FileEnumerator.get_container" link="class-giofileenumerator.html#method-giofileenumerator--get-container"/>
- <function name="gio.FileEnumerator.has_pending" link="class-giofileenumerator.html#method-giofileenumerator--has-pending"/>
- <function name="gio.FileEnumerator.is_closed" link="class-giofileenumerator.html#method-giofileenumerator--is-closed"/>
- <function name="gio.FileEnumerator.next_file" link="class-giofileenumerator.html#method-giofileenumerator--next-file"/>
- <function name="gio.FileEnumerator.next_files_async" link="class-giofileenumerator.html#method-giofileenumerator--next-files-async"/>
- <function name="gio.FileEnumerator.next_files_finish" link="class-giofileenumerator.html#method-giofileenumerator--next-files-finish"/>
- <function name="gio.FileEnumerator.set_pending" link="class-giofileenumerator.html#method-giofileenumerator--set-pending"/>
- <function name="gio.FileIcon.get_file" link="class-giofileicon.html#method-giofileicon--get-file"/>
- <function name="gio.FileInputStream.query_info" link="class-giofileinputstream.html#method-giofileinputstream--query-info"/>
- <function name="gio.FileInputStream.query_info_async" link="class-giofileinputstream.html#method-giofileinputstream--query-info-async"/>
- <function name="gio.FileInputStream.query_info_finish" link="class-giofileinputstream.html#method-giofileinputstream--query-info-finish"/>
- <function name="gio.FileOutputStream.get_etag" link="class-giofileoutputstream.html#method-giofileoutputstream--get-etag"/>
- <function name="gio.FileOutputStream.query_info" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info"/>
- <function name="gio.FileOutputStream.query_info_async" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async"/>
- <function name="gio.FileOutputStream.query_info_finish" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish"/>
- <function name="gio.FilterInputStream.get_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream"/>
- <function name="gio.FilterInputStream.get_close_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream"/>
- <function name="gio.FilterInputStream.set_close_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream"/>
- <function name="gio.FilterOutputStream.get_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream"/>
- <function name="gio.FilterOutputStream.get_close_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream"/>
- <function name="gio.FilterOutputStream.set_close_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream"/>
- <function name="gio.Icon.equal" link="class-gioicon.html#method-gioicon--equal"/>
- <function name="gio.Icon.to_string" link="class-gioicon.html#method-gioicon--to-string"/>
- <function name="gio.icon_new_from_string" link="class-gioicon.html#function-gio--icon-new-from-string"/>
- <function name="gio.InputStream.clear_pending" link="class-gioinputstream.html#method-gioinputstream--clear-pending"/>
- <function name="gio.InputStream.close" link="class-gioinputstream.html#method-gioinputstream--close"/>
- <function name="gio.InputStream.close_async" link="class-gioinputstream.html#method-gioinputstream--close-async"/>
- <function name="gio.InputStream.close_finish" link="class-gioinputstream.html#method-gioinputstream--close-finish"/>
- <function name="gio.InputStream.has_pending" link="class-gioinputstream.html#method-gioinputstream--has-pending"/>
- <function name="gio.InputStream.is_closed" link="class-gioinputstream.html#method-gioinputstream--is-closed"/>
- <function name="gio.InputStream.read" link="class-gioinputstream.html#method-gioinputstream--read"/>
- <function name="gio.InputStream.read_async" link="class-gioinputstream.html#method-gioinputstream--read-async"/>
- <function name="gio.InputStream.read_finish" link="class-gioinputstream.html#method-gioinputstream--read-finish"/>
- <function name="gio.InputStream.read_part" link="class-gioinputstream.html#method-gioinputstream--read-part"/>
- <function name="gio.InputStream.set_pending" link="class-gioinputstream.html#method-gioinputstream--set-pending"/>
- <function name="gio.InputStream.skip" link="class-gioinputstream.html#method-gioinputstream--skip"/>
- <function name="gio.InputStream.skip_async" link="class-gioinputstream.html#method-gioinputstream--skip-async"/>
- <function name="gio.InputStream.skip_finish" link="class-gioinputstream.html#method-gioinputstream--skip-finish"/>
- <function name="gio.LoadableIcon.load" link="class-gioloadableicon.html#method-gioloadableicon--load"/>
- <function name="gio.LoadableIcon.load_async" link="class-gioloadableicon.html#method-gioloadableicon--load-async"/>
- <function name="gio.LoadableIcon.load_finish" link="class-gioloadableicon.html#method-gioloadableicon--load-finish"/>
- <function name="gio.MemoryInputStream.add_data" link="class-giomemoryinputstream.html#method-giomemoryinputstream--add-data"/>
- <function name="gio.memory_input_stream_new_from_data" link="class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data"/>
- <function name="gio.MemoryOutputStream.get_contents" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents"/>
- <function name="gio.MemoryOutputStream.get_data_size" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size"/>
- <function name="gio.MemoryOutputStream.get_size" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size"/>
- <function name="gio.Mount.can_eject" link="class-giomount.html#method-giomount--can-eject"/>
- <function name="gio.Mount.can_unmount" link="class-giomount.html#method-giomount--can-unmount"/>
- <function name="gio.Mount.eject" link="class-giomount.html#method-giomount--eject"/>
- <function name="gio.Mount.eject_finish" link="class-giomount.html#method-giomount--eject-finish"/>
- <function name="gio.Mount.get_drive" link="class-giomount.html#method-giomount--get-drive"/>
- <function name="gio.Mount.get_icon" link="class-giomount.html#method-giomount--get-icon"/>
- <function name="gio.Mount.get_name" link="class-giomount.html#method-giomount--get-name"/>
- <function name="gio.Mount.get_root" link="class-giomount.html#method-giomount--get-root"/>
- <function name="gio.Mount.get_uuid" link="class-giomount.html#method-giomount--get-uuid"/>
- <function name="gio.Mount.get_volume" link="class-giomount.html#method-giomount--get-volume"/>
- <function name="gio.Mount.guess_content_type" link="class-giomount.html#method-giomount--guess-content-type"/>
- <function name="gio.Mount.guess_content_type_finish" link="class-giomount.html#method-giomount--guess-content-type-finish"/>
- <function name="gio.Mount.guess_content_type_sync" link="class-giomount.html#method-giomount--guess-content-type-sync"/>
- <function name="gio.Mount.is_shadowed" link="class-giomount.html#method-giomount--is-shadowed"/>
- <function name="gio.Mount.remount" link="class-giomount.html#method-giomount--remount"/>
- <function name="gio.Mount.remount_finish" link="class-giomount.html#method-giomount--remount-finish"/>
- <function name="gio.Mount.shadow" link="class-giomount.html#method-giomount--shadow"/>
- <function name="gio.Mount.unmount" link="class-giomount.html#method-giomount--unmount"/>
- <function name="gio.Mount.unmount_finish" link="class-giomount.html#method-giomount--unmount-finish"/>
- <function name="gio.Mount.unshadow" link="class-giomount.html#method-giomount--unshadow"/>
- <function name="The &quot;aborted&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--aborted"/>
- <function name="The &quot;changed&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--changed"/>
- <function name="The &quot;unmounted&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--unmounted"/>
- <function name="gio.MountOperation.get_anonymous" link="class-giomountoperation.html#method-giomountoperation--get-anonymous"/>
- <function name="gio.MountOperation.get_choice" link="class-giomountoperation.html#method-giomountoperation--get-choice"/>
- <function name="gio.MountOperation.get_domain" link="class-giomountoperation.html#method-giomountoperation--get-domain"/>
- <function name="gio.MountOperation.get_password" link="class-giomountoperation.html#method-giomountoperation--get-password"/>
- <function name="gio.MountOperation.get_password_save" link="class-giomountoperation.html#method-giomountoperation--get-password-save"/>
- <function name="gio.MountOperation.get_username" link="class-giomountoperation.html#method-giomountoperation--get-username"/>
- <function name="gio.MountOperation.reply" link="class-giomountoperation.html#method-giomountoperation--reply"/>
- <function name="gio.MountOperation.set_anonymous" link="class-giomountoperation.html#method-giomountoperation--set-anonymous"/>
- <function name="gio.MountOperation.set_choice" link="class-giomountoperation.html#method-giomountoperation--set-choice"/>
- <function name="gio.MountOperation.set_domain" link="class-giomountoperation.html#method-giomountoperation--set-domain"/>
- <function name="gio.MountOperation.set_password" link="class-giomountoperation.html#method-giomountoperation--set-password"/>
- <function name="gio.MountOperation.set_password_save" link="class-giomountoperation.html#method-giomountoperation--set-password-save"/>
- <function name="gio.MountOperation.set_username" link="class-giomountoperation.html#method-giomountoperation--set-username"/>
- <function name="The &quot;aborted&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--aborted"/>
- <function name="The &quot;ask-password&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--ask-password"/>
- <function name="The &quot;ask-question&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--ask-question"/>
- <function name="The &quot;reply&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--reply"/>
- <function name="gio.Seekable.tell" link="class-gioseekable.html#method-gioseekable--tell"/>
- <function name="gio.Seekable.can_seek" link="class-gioseekable.html#method-gioseekable--can_seek"/>
- <function name="gio.Seekable.seek" link="class-gioseekable.html#method-gioseekable--seek"/>
- <function name="gio.Seekable.can_truncate" link="class-gioseekable.html#method-gioseekable--can_truncate"/>
- <function name="gio.Seekable.truncate" link="class-gioseekable.html#method-gioseekable--truncate"/>
- <function name="gio.SimpleAsyncResult.complete" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete"/>
- <function name="gio.SimpleAsyncResult.complete_in_idle" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle"/>
- <function name="gio.SimpleAsyncResult.get_op_res_gboolean" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean"/>
- <function name="gio.SimpleAsyncResult.get_op_res_gssize" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize"/>
- <function name="gio.SimpleAsyncResult.propagate_error" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error"/>
- <function name="gio.SimpleAsyncResult.set_handle_cancellation" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation"/>
- <function name="gio.SimpleAsyncResult.set_op_res_gboolean" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean"/>
- <function name="gio.SimpleAsyncResult.set_op_res_gssize" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize"/>
- <function name="gio.ThemedIcon.append_name" link="class-giothemedicon.html#method-giothemedicon--append-name"/>
- <function name="gio.ThemedIcon.get_names" link="class-giothemedicon.html#method-giothemedicon--get-names"/>
- <function name="gio.ThemedIcon.prepend_name" link="class-giothemedicon.html#method-giothemedicon--prepend-name"/>
- <function name="gio.Volume.can_eject" link="class-giovolume.html#method-giovolume--can-eject"/>
- <function name="gio.Volume.can_mount" link="class-giovolume.html#method-giovolume--can-mount"/>
- <function name="gio.Volume.eject" link="class-giovolume.html#method-giovolume--eject"/>
- <function name="gio.Volume.eject_finish" link="class-giovolume.html#method-giovolume--eject-finish"/>
- <function name="gio.Volume.enumerate_identifiers" link="class-giovolume.html#method-giovolume--enumerate-identifiers"/>
- <function name="gio.Volume.get_activation_root" link="class-giovolume.html#method-giovolume--get-activation-root"/>
- <function name="gio.Volume.get_drive" link="class-giovolume.html#method-giovolume--get-drive"/>
- <function name="gio.Volume.get_icon" link="class-giovolume.html#method-giovolume--get-icon"/>
- <function name="gio.Volume.get_identifier" link="class-giovolume.html#method-giovolume--get-identifier"/>
- <function name="gio.Volume.get_mount" link="class-giovolume.html#method-giovolume--get-mount"/>
- <function name="gio.Volume.get_name" link="class-giovolume.html#method-giovolume--get-name"/>
- <function name="gio.Volume.get_uuid" link="class-giovolume.html#method-giovolume--get-uuid"/>
- <function name="gio.Volume.mount" link="class-giovolume.html#method-giovolume--mount"/>
- <function name="gio.Volume.mount_finish" link="class-giovolume.html#method-giovolume--mount-finish"/>
- <function name="gio.Volume.should_automount" link="class-giovolume.html#method-giovolume--should-automount"/>
- <function name="The &quot;changed&quot; gio.Volume Signal" link="class-giovolume.html#signal-giovolume--changed"/>
- <function name="The &quot;removed&quot; gio.Volume Signal" link="class-giovolume.html#signal-giovolume--removed"/>
- <function name="gio.VolumeMonitor.get_connected_drives" link="class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives"/>
- <function name="gio.VolumeMonitor.get_mount_for_uuid" link="class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid"/>
- <function name="gio.VolumeMonitor.get_mounts" link="class-giovolumemonitor.html#method-giovolumemonitor--get-mounts"/>
- <function name="gio.VolumeMonitor.get_volume_for_uuid" link="class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid"/>
- <function name="gio.VolumeMonitor.get_volumes" link="class-giovolumemonitor.html#method-giovolumemonitor--get-volumes"/>
- <function name="gio.volume_monitor_adopt_orphan_mount" link="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount"/>
- <function name="gio.volume_monitor_get" link="class-giovolumemonitor.html#function-gio--volume-monitor-get"/>
- <function name="The &quot;drive-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed"/>
- <function name="The &quot;drive-connected&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected"/>
- <function name="The &quot;drive-disconnected&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected"/>
- <function name="The &quot;drive-eject-button&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button"/>
- <function name="The &quot;mount-added&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-added"/>
- <function name="The &quot;mount-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed"/>
- <function name="The &quot;mount-pre-unmount&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount"/>
- <function name="The &quot;mount-removed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed"/>
- <function name="The &quot;volume-added&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-added"/>
- <function name="The &quot;volume-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed"/>
- <function name="The &quot;volume-removed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed"/>
- <function name="gio.content_type_can_be_executable" link="gio-functions.html#function-gio--content-type-can-be-executable"/>
- <function name="gio.content_type_equals" link="gio-functions.html#function-gio--content-type-equals"/>
- <function name="gio.content_type_from_mime_type" link="gio-functions.html#function-gio--content-type-from-mime-type"/>
- <function name="gio.content_type_get_description" link="gio-functions.html#function-gio--content-type-get-description"/>
- <function name="gio.content_type_get_icon" link="gio-functions.html#function-gio--content-type-get-icon"/>
- <function name="gio.content_type_get_mime_type" link="gio-functions.html#function-gio--content-type-get-mime-type"/>
- <function name="gio.content_type_guess" link="gio-functions.html#function-gio--content-type-guess"/>
- <function name="gio.content_type_is_a" link="gio-functions.html#function-gio--content-type-is-a"/>
- <function name="gio.content_type_is_unknown" link="gio-functions.html#function-gio--content-type-is-unknown"/>
- <function name="gio.content_types_get_registered" link="gio-functions.html#function-gio--content-types-get-registered"/>
- <function name="gio.io_error_from_errno" link="gio-functions.html#function-gio--io-error-from-errno"/>
- <function name="Gio Ask Password Flags Constants" link="gio-constants.html#gio-ask-password-flags-constants"/>
- <function name="Gio AppInfo Create Flags Constants" link="gio-constants.html#gio-app-info-constants"/>
- <function name="Gio Data Stream Byte Order Constants" link="gio-constants.html#gio-data-stream-byte-order-constants"/>
- <function name="Gio Data Stream Newline Type Constants" link="gio-constants.html#gio-data-stream-newline-type-constants"/>
- <function name="Gio Emblem Origin Constants" link="gio-constants.html#gio-emblem-origin-constants"/>
- <function name="Gio Error Constants" link="gio-constants.html#gio-error-constants"/>
- <function name="Gio File Attribute Constants" link="gio-constants.html#gio-file-attribute-constants"/>
- <function name="Gio File Attribute Type Constants" link="gio-constants.html#gio-file-attribute-type-constants"/>
- <function name="Gio File Attribute Flags Constants" link="gio-constants.html#gio-file-attribute-flags-constants"/>
- <function name="Gio File Create Flags Constants" link="gio-constants.html#gio-file-create-flags-constants"/>
- <function name="Gio File Copy Flags Constants" link="gio-constants.html#gio-file-copy-flags-constants"/>
- <function name="Gio File Monitor Flags Constants" link="gio-constants.html#gio-file-monitor-flags-constants"/>
- <function name="Gio File Query Info Flags Constants" link="gio-constants.html#gio-file-query-info-flags-constants"/>
- <function name="Gio File Type Constants" link="gio-constants.html#gio-file-type-constants"/>
- <function name="Gio Mount Mount Flags Constants" link="gio-constants.html#gio-mount-mount-flags-constants"/>
- <function name="Gio Mount Unmount Flags Constants" link="gio-constants.html#gio-mount-unmount-flags-constants"/>
- <function name="Gio Mount Operation Result Constants" link="gio-constants.html#gio-mount-operation-result-constants"/>
- <function name="Gio Password Save Constants" link="gio-constants.html#gio-password-save-constants"/>
- <function name="gio.unix.InputStream.get_close_fd" link="class-giounixinputstream.html#method-giounixinputstream--get-close-fd"/>
- <function name="gio.unix.InputStream.get_fd" link="class-giounixinputstream.html#method-giounixinputstream--get-fd"/>
- <function name="gio.unix.InputStream.set_close_fd" link="class-giounixinputstream.html#method-giounixinputstream--set-close-fd"/>
- <function name="gio.unix.OutputStream.get_close_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd"/>
- <function name="gio.unix.OutputStream.get_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--get-fd"/>
- <function name="gio.unix.OutputStream.set_close_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd"/>
</functions>
</book>
diff --git a/docs/reference/pygio-appinfo.xml b/docs/reference/pygio-appinfo.xml
deleted file mode 100644
index eaeb060..0000000
--- a/docs/reference/pygio-appinfo.xml
+++ /dev/null
@@ -1,894 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioappinfo">
- <refnamediv>
- <refname>gio.AppInfo</refname>
- <refpurpose>Information about an installed application and methods to launch it (with file arguments).</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.AppInfo</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-gioappinfo">gio.AppInfo</link></methodname>
- <methodparam><parameter role="keyword">commandline</parameter></methodparam>
- <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--can-delete">can_delete</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--can-remove-supports-type">can_remove_supports_type</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--delete">delete</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--dup">dup</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--equal">equal</link></methodname>
- <methodparam><parameter role="keyword">appinfo2</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--get-commandline">get_commandline</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--get-description">get_description</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--get-executable">get_executable</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--get-id">get_id</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--get-name">get_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--launch">launch</link></methodname>
- <methodparam><parameter role="keyword">files</parameter></methodparam>
- <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--launch-uris">launch_uris</link></methodname>
- <methodparam><parameter role="keyword">uris</parameter></methodparam>
- <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>
- <methodparam><parameter role="keyword">extension</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--should-show">should_show</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--supports-files">supports_files</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioappinfo--supports-uris">supports_uris</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--app-info-get-all">gio.app_info_get_all</link></methodname>
- <methodparam></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--app-info-get-all-for-type">gio.app_info_get_all_for_type</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--app-info-get-default-for-type">gio.app_info_get_default_for_type</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--app-info-get-default-for-uri-scheme">gio.app_info_get_default_for_uri_scheme</link></methodname>
- <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--app-info-reset-type-association">gio.app_info_reset_type_association</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-gioappinfo">gio.AppInfo</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Known Implementation</title>
- <para>
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> is implemented by
- <link linkend="class-giodesktopappinfo"><classname>gio.DesktopAppInfo</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- and <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
- are used for describing and launching applications installed on the system.
- </para>
- <para>
- As of GLib 2.20, URIs will always be converted to POSIX paths (using
- <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()) when using
- <methodname><link linkend="method-gioappinfo--launch">gio.AppInfo.launch</link></methodname>()
- even if the application requested an URI and not a POSIX path. For example for an desktop-file
- based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
- on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
- compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
- unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
- (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application.
- </para>
- <para>
- Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
- <link linkend="class-giofile"><classname>gio.File</classname></link> constructors
- (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
- it needs to use
- <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
- or similar on
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- In other words, an application cannot assume that the URI passed to e.g.
- <methodname><link linkend="constructor-giofile">gio.File</link></methodname>() constructor
- is equal to the result of
- <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>().
- </para>
- </refsect1>
-
- <refsect1 id="constructor-gioappinfo">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.AppInfo</methodname>
- <methodparam><parameter role="keyword">commandline</parameter></methodparam>
- <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>commandline</parameter>&nbsp;:</term>
- <listitem><simpara>the commandline to use
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>application_name</parameter>&nbsp;:</term>
- <listitem><simpara>the application name, or <literal>None</literal> to use commandline.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>flags that can specify details of the created,
- from <xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- for given command.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- from the given information.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioappinfo--add-supports-type">
- <title>gio.AppInfo.add_supports_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>add_supports_type</methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>content_type</parameter>&nbsp;:</term>
- <listitem><simpara>A string.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>add_supports_type</methodname>() method adds a content type
- to the application information to indicate the application is capable of
- opening files with the given content type.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--can-delete">
- <title>gio.AppInfo.can_delete</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_delete</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if appinfo can be deleted.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_delete</methodname>() method obtains the information
- whether the <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- can be deleted. See
- <methodname><link linkend="method-gioappinfo--delete">gio.AppInfo.delete</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--can-remove-supports-type">
- <title>gio.AppInfo.can_remove_supports_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_remove_supports_type</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if it is possible to remove
- supported content types from a given appinfo, <literal>False</literal>
- if not. </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_remove_supports_type</methodname>() method checks if a
- supported content type can be removed from an application.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--delete">
- <title>gio.AppInfo.delete</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>delete</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if appinfo has been deleted.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>delete</methodname>() method tries to delete an
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
- </para>
- <para>
- On some platforms, there may be a difference between user-defined
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
- which can be deleted, and system-wide ones which cannot. See
- <methodname><link linkend="method-gioappinfo--can-delete">gio.AppInfo.can_delete</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--dup">
- <title>gio.AppInfo.dup</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>dup</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A duplicate of appinfo.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>dup</methodname>() method creates a duplicate of a
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--equal">
- <title>gio.AppInfo.equal</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>equal</methodname>
- <methodparam><parameter role="keyword">icon2</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>appinfo2</parameter>&nbsp;:</term>
- <listitem><simpara>the second
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if appinfo1 is equal to appinfo2.
- <literal>False</literal> otherwise.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>equal</methodname>() method checks if two
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s are equal.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--get-commandline">
- <title>gio.AppInfo.get_commandline</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_commandline</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the appinfo's commandline, or
- <literal>None</literal> if this information is not available.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_commandline</methodname>() method gets the
- commandline with which the application will be started.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--get-description">
- <title>gio.AppInfo.get_description</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_description</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A string containing a description of the application
- appinfo, or <literal>None</literal> if none.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_description</methodname>() method gets a human-readable
- description of an installed application.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--get-executable">
- <title>gio.AppInfo.get_executable</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_executable</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the appinfo's application
- binary's name.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_description</methodname>() method gets the executable's
- name for the installed application.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--get-icon">
- <title>gio.AppInfo.get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_icon</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the default
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link> for appinfo.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_icon</methodname>() method gets the icon for the application.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--get-id">
- <title>gio.AppInfo.get_id</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_id</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the application's ID.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_id</methodname>() method gets the ID of an application.
- An id is a string that identifies the application. The exact format of the
- id is platform dependent. For instance, on Unix this is the desktop file id
- from the xdg menu specification.
- </para>
- <para>
- Note that the returned ID may be <literal>None</literal>, depending on
- how the appinfo has been constructed.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--get-name">
- <title>gio.AppInfo.get_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the name of the application for appinfo.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_name</methodname>() method gets the installed
- name of the application.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--launch">
- <title>gio.AppInfo.launch</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>launch</methodname>
- <methodparam><parameter role="keyword">files</parameter></methodparam>
- <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>files</parameter>&nbsp;:</term>
- <listitem><simpara>a list of <link linkend="class-giofile"><classname>gio.File</classname></link> objects.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>launch_context</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
- or <literal>None</literal>.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on successful launch,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>launch</methodname>() method launches the application.
- Passes files to the launched application as arguments, using the optional
- launch_context to get information about the details of the launcher
- (like what screen it is on). On error, error will be set accordingly.
- </para>
- <para>
- To lauch the application without arguments pass a <literal>None</literal> for files list.
- </para>
- <para>
- Note that even if the launch is successful the application launched can fail
- to start if it runs into problems during startup. There is no way to detect this.
- </para>
- <para>
- Some URIs can be changed when passed through a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- (for instance unsupported uris with strange formats like mailto:), so
- if you have a textual uri you want to pass in as argument, consider using
- <methodname><link linkend="method-gioappinfo--launch-uris">gio.File.launch_uris</link></methodname>()
- instead.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--launch-uris">
- <title>gio.AppInfo.launch_uris</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>launch_uris</methodname>
- <methodparam><parameter role="keyword">uris</parameter></methodparam>
- <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>uris</parameter>&nbsp;:</term>
- <listitem><simpara>a list containing URIs to launch.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>launch_context</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
- or <literal>None</literal>.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on successful launch,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>launch_uris</methodname>() method launches the application.
- Passes uris to the launched application as arguments, using the optional
- launch_context to get information about the details of the launcher
- (like what screen it is on). On error, error will be set accordingly.
- </para>
- <para>
- To lauch the application without arguments pass a <literal>None</literal> for files list.
- </para>
- <para>
- Note that even if the launch is successful the application launched can fail
- to start if it runs into problems during startup. There is no way to detect this.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--remove-supports-type">
- <title>gio.AppInfo.remove_supports_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>remove_supports_type</methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>content_type</parameter>&nbsp;:</term>
- <listitem><simpara>A string.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>remove_supports_type</methodname>() method removes a
- supported type from an application, if possible.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--set-as-default-for-extension">
- <title>gio.AppInfo.set_as_default_for_extension</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_as_default_for_extension</methodname>
- <methodparam><parameter role="keyword">extension</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>extension</parameter>&nbsp;:</term>
- <listitem><simpara>A string containing the file extension (without the dot).
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_as_default_for_extension</methodname>() method sets the
- application as the default handler for the given file extention.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--set-as-default-for-type">
- <title>gio.AppInfo.set_as_default_for_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_as_default_for_type</methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>content_type</parameter>&nbsp;:</term>
- <listitem><simpara>The content type.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_as_default_for_type</methodname>() method sets the
- application as the default handler for a given type.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--should-show">
- <title>gio.AppInfo.should_show</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>should_show</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the appinfo should be shown,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>should_show</methodname>() method checks if the application
- info should be shown in menus that list available applications.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--supports-files">
- <title>gio.AppInfo.supports_files</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>supports_files</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the appinfo supports files.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>supports_files</methodname>() method checks if the application
- accepts files as arguments.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioappinfo--supports-uris">
- <title>gio.AppInfo.supports_uris</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>supports_uris</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the appinfo supports uris.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>supports_uris</methodname>() method checks if the application
- accepts uris as arguments.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--app-info-get-all">
- <title>gio.app_info_get_all</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>app_info_get_all</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>app_info_get_all</methodname>() function gets a list of all of
- the applications currently registered on this system.
- </para>
- <para>
- For desktop files, this includes applications that have NoDisplay=true set or are
- excluded from display by means of OnlyShowIn or NotShowIn. See
- <methodname><link linkend="method-gioappinfo--should-show">gio.AppInfo.should_show</link></methodname>().
- The returned list does not include applications which have the Hidden key set.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--app-info-get-all-for-type">
- <title>gio.app_info_get_all_for_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>app_info_get_all_for_type</methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>content_type</parameter>&nbsp;:</term>
- <listitem><simpara>the content type to find a
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- for.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
- for a given content type or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>app_info_get_all_for_type</methodname>() function gets a list of all
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
- for a given content type.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--app-info-get-default-for-type">
- <title>gio.app_info_get_default_for_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>app_info_get_default_for_type</methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>content_type</parameter>&nbsp;:</term>
- <listitem><simpara>the content type to find a
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- for.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>must_support_uris</parameter>&nbsp;:</term>
- <listitem><simpara>if <literal>True</literal>, the
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- is expected to support URIs </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- for given content_type or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>app_info_get_default_for_type</methodname>() function gets the
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- that correspond to a given content type.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--app-info-get-default-for-uri-scheme">
- <title>gio.app_info_get_default_for_uri_scheme</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>app_info_get_default_for_uri_scheme</methodname>
- <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>uri_scheme</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing a URI scheme.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- for given uri_scheme or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>app_info_get_default_for_uri_scheme</methodname>() function gets
- the default application for launching applications using this URI scheme. A URI
- scheme is the initial part of the URI, up to but not including the
- ':', e.g. "http", "ftp" or "sip".
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--app-info-reset-type-association">
- <title>gio.app_info_reset_type_association</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>app_info_reset_type_association</methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>content_type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>app_info_reset_type_association</methodname>() function
- removes all changes to the type associations done by
- <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>(),
- <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>(),
- <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>() or
- <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-applaunchcontext.xml b/docs/reference/pygio-applaunchcontext.xml
deleted file mode 100644
index 66bb229..0000000
--- a/docs/reference/pygio-applaunchcontext.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioapplaunchcontext">
- <refnamediv>
- <refname>gio.AppLaunchContext</refname>
- <refpurpose>Application launch context.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.AppLaunchContext</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-gioapplaunchcontext">gio.AppLaunchContext</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioapplaunchcontext--get-display">get_display</link></methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">files</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">files</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioapplaunchcontext--launch-failed">launch_failed</link></methodname>
- <methodparam><parameter role="keyword">startup_notify_id</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
- is used for integrating the launch with the launching application. This is used to handle for
- instance startup notification and launching the new application on the same screen as the launching window.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-gioapplaunchcontext">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.AppLaunchContext</methodname>
- <methodparam></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new application launch context. This is not normally used, instead
- you instantiate a subclass of this, such as
- <link linkend="class-gdkapplaunchcontext"><classname>gtk.gdk.AppLaunchContext</classname></link>.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioapplaunchcontext--get-display">
- <title>gio.AppLaunchContext.get_display</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_display</methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">files</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>info</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>files</parameter>&nbsp;:</term>
- <listitem><simpara>a list of
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- objects.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a display string for the display.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_display</methodname>() method gets the display
- string for the display. This is used to ensure new applications
- are started on the same display as the launching application.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioapplaunchcontext--get-startup-notify-id">
- <title>gio.AppLaunchContext.get_startup_notify_id</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_startup_notify_id</methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">files</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>info</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>files</parameter>&nbsp;:</term>
- <listitem><simpara>a list of
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- objects.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a startup notification ID for the application,
- or <literal>None</literal> if not supported.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_startup_notify_id</methodname>() method initiates
- startup notification for the application and returns the DESKTOP_STARTUP_ID
- for the launched operation, if supported.
- </para>
- <para>
- Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioapplaunchcontext--launch-failed">
- <title>gio.AppLaunchContext.launch_failed</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>launch_failed</methodname>
- <methodparam><parameter role="keyword">startup_notify_id</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>startup_notify_id</parameter>&nbsp;:</term>
- <listitem><simpara>the startup notification id that was returned by
- <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a startup notification ID for the application,
- or <literal>None</literal> if not supported.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_startup_notify_id</methodname>() method is called
- when an application has failed to launch, so that it can cancel the application
- startup notification started in
- <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-asyncresult.xml b/docs/reference/pygio-asyncresult.xml
deleted file mode 100644
index abe56ce..0000000
--- a/docs/reference/pygio-asyncresult.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioasyncresult">
- <refnamediv>
- <refname>gio.AsyncResult</refname>
- <refpurpose>Asynchronous Function Results.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.AsyncResult</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioasyncresult--get-source-object">get_source_object</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-gioasyncresult">gio.AsyncResult</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Prerequisites</title>
- <para>
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link> is required by
- <link linkend="class-gobject"><classname>gobject.GObject</classname></link>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Known Implementation</title>
- <para>
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link> is implemented by
- <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- provides a base class for implementing asynchronous function results.
- </para>
- <para>
- Asynchronous operations are broken up into two separate operations which are chained
- together by a GAsyncReadyCallback. To begin an asynchronous operation, provide a
- GAsyncReadyCallback to the asynchronous function. This callback will be triggered when
- the operation has completed, and will be passed a GAsyncResult instance filled with the
- details of the operation's success or failure, the object the asynchronous function was
- started for and any error codes returned. The asynchronous callback function is then expected
- to call the corresponding "_finish()" function with the object the function was called for,
- and the <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- instance, and optionally, an error to grab any error conditions that may have occurred.
- </para>
- <para>
- The purpose of the "_finish()" function is to take the generic result of type GAsyncResult and
- return the specific result that the operation in question yields (e.g. a
- <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- for a "enumerate children" operation). If the result or error status of the operation is not needed,
- there is no need to call the "_finish()" function, GIO will take care of cleaning up the result and error
- information after the GAsyncReadyCallback returns. It is also allowed to take a reference to the
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- and call "_finish()" later.
- </para>
- <para>
- The callback for an asynchronous operation is called only once, and is always called, even
- in the case of a cancelled operation. On cancellation the result is a gio.ERROR_CANCELLED error.
- </para>
- <para>
- Some ascynchronous operations are implemented using synchronous calls. These are run in a
- separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event
- Loop and processed in an idle function. So, if you truly need asynchronous operations, make
- sure to initialize GThread.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioasyncresult--get-source-object">
- <title>gio.AsyncResult.get_source_object</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_source_object</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the source object for the res.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_source_object</methodname>() method gets the source object
- from a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-bufferedinputstream.xml b/docs/reference/pygio-bufferedinputstream.xml
deleted file mode 100644
index 677b1da..0000000
--- a/docs/reference/pygio-bufferedinputstream.xml
+++ /dev/null
@@ -1,461 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giobufferedinputstream">
- <refnamediv>
- <refname>gio.BufferedInputStream</refname>
- <refpurpose>Buffered Input Stream</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.BufferedInputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giofilterinputstream">gio.FilterInputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giobufferedinputstream">gio.BufferedInputStream</link></methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--fill">fill</link></methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--fill-async">fill_async</link></methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--fill-finish">fill_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--get-available">get_available</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--get-buffer-size">get_buffer_size</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--read-byte">read_byte</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedinputstream--set-buffer-size">set_buffer_size</link></methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--buffered-input-stream-new-sized">gio.buffered_input_stream_new_sized</link></methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
- +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
- +-- <link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giobufferedinputstream">
- <title>gio.BufferedInputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"buffer-size"</entry>
- <entry>Read - Write - Construct</entry>
- <entry>The size of the backend buffer. Allowed values: >= 1. Default value: 4096.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>
- implements <link linkend="class-giofilterinputstream"><classname>gio.FilterInputStream</classname></link>
- and provides for buffered reads.
- </para>
- <para>
- By default,
- <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>'s
- buffer size is set at 4 kilobytes.
- </para>
- <para>
- To create a buffered input stream, use
- <methodname><link linkend="constructor-giobufferedinputstream">gio.BufferedInputStream</link></methodname>(),
- or <methodname><link linkend="function-gio--buffered-input-stream-new-sized">gio.buffered_input_stream_new_sized</link></methodname>()
- to specify the buffer's size at construction.
- </para>
- <para>
- To get the size of a buffer within a buffered input stream, use
- <methodname><link linkend="method-giobufferedinputstream--get-buffer-size">get_buffer_size</link></methodname>().
- To change the size of a buffered input stream's buffer, use
- <methodname><link linkend="method-giobufferedinputstream--set-buffer-size">set_buffer_size</link></methodname>().
- Note that the buffer's size cannot be reduced below the size of the data within the buffer.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giobufferedinputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.BufferedInputStream</methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>base_stream</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- for the given base_stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- from the given base_stream, with a buffer set to the default size (4 kilobytes).
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giobufferedinputstream--fill">
- <title>gio.BufferedInputStream.fill</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>fill</methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">count</parameter>&nbsp;:</term>
- <listitem><simpara>the number of bytes that will be read from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the number of bytes read into stream's buffer,
- up to count, or -1 on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>fill</methodname>() method tries to read count bytes
- from the stream into the buffer. Will block during this read.
- </para>
- <para>
- If count is zero, returns zero and does nothing. A value of count
- larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </para>
- <para>
- On success, the number of bytes read into the buffer is returned. It
- is not an error if this is not the same as the requested size, as it can
- happen e.g. near the end of a file. Zero is returned on end of file
- (or if count is zero), but never otherwise.
- </para>
- <para>
- If count is -1 then the attempted read size is equal to the number
- of bytes that are required to fill the buffer.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can
- be cancelled by triggering the cancellable object from another thread.
- If the operation was cancelled, the error gio.ERROR_CANCELLED will be
- returned. If an operation was partially finished when the operation was
- cancelled the partial result will be returned, without an error.
- </para>
- <para>
- On error -1 is returned and error is set accordingly.
- </para>
- <para>
- For the asynchronous, non-blocking, version of this function, see
- <methodname><link linkend="method-giobufferedinputstream--fill-async">gio.BufferedInputStream.fill_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedinputstream--fill-async">
- <title>gio.BufferedInputStream.fill_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>fill_async</methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">count</parameter>&nbsp;:</term>
- <listitem><simpara>the number of bytes that will be read from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>fill_async</methodname>() method reads data into stream's
- buffer asynchronously, up to count size. io_priority can be used to
- prioritize reads.
- </para>
- <para>
- For the synchronous version of this function, see
- <methodname><link linkend="method-giobufferedinputstream--fill">gio.BufferedInputStream.fill</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </para>
- <para>
- If count is -1 then the attempted read size is equal to the number of bytes
- that are required to fill the buffer.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedinputstream--fill-finish">
- <title>gio.BufferedInputStream.fill_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>fill_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the size of the read stream, or -1 on an error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>fill_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-giobufferedinputstream--fill-async">gio.BufferedInputStream.fill_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedinputstream--get-available">
- <title>gio.BufferedInputStream.get_available</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_available</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>size of the available stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_available</methodname>() method gets the size of
- the available data within the stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedinputstream--get-buffer-size">
- <title>gio.BufferedInputStream.get_buffer_size</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_buffer_size</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the current buffer size.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_buffer_size</methodname>() method gets the size
- of the input buffer.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedinputstream--read-byte">
- <title>gio.BufferedInputStream.read_byte</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_byte</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the byte read from the stream, or -1 on end of stream or error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_byte</methodname>() method tries to read a single
- byte from the stream or the buffer. Will block during this read.
- </para>
- <para>
- On success, the byte read from the stream is returned. On end of stream -1
- is returned but it's not an exceptional error and error is not set.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can
- be cancelled by triggering the cancellable object from another thread.
- If the operation was cancelled, the error gio.ERROR_CANCELLED will be
- returned. If an operation was partially finished when the operation was
- cancelled the partial result will be returned, without an error.
- </para>
- <para>
- On error -1 is returned and error is set accordingly.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedinputstream--set-buffer-size">
- <title>gio.BufferedInputStream.set_buffer_size</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_buffer_size</methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">size</parameter>&nbsp;:</term>
- <listitem><simpara>the new buffer size.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_buffer_size</methodname>() method sets the size
- of the internal buffer of stream to size, or to the size of the contents
- of the buffer. The buffer can never be resized smaller than its current contents.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--buffered-input-stream-new-sized">
- <title>gio.buffered_input_stream_new_sized</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>buffered_input_stream_new_sized</methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>size</parameter>&nbsp;:</term>
- <listitem><simpara>the requested buffer size.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A new
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>buffered_input_stream_new_sized</methodname>() function creates
- a new <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>
- from the given base_stream, with a buffer set to size.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-bufferedoutputstream.xml b/docs/reference/pygio-bufferedoutputstream.xml
deleted file mode 100644
index 6d7900f..0000000
--- a/docs/reference/pygio-bufferedoutputstream.xml
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giobufferedoutputstream">
- <refnamediv>
- <refname>gio.BufferedOutputStream</refname>
- <refpurpose>Buffered Output Stream</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.BufferedOutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giobufferedoutputstream">gio.BufferedOutputStream</link></methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedoutputstream--get-auto-grow">get_auto_grow</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedoutputstream--get-buffer-size">get_buffer_size</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedoutputstream--set-auto-grow">set_auto_grow</link></methodname>
- <methodparam><parameter role="keyword">auto_grow</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giobufferedoutputstream--set-buffer-size">set_buffer_size</link></methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--buffered-output-stream-new-sized">gio.buffered_output_stream_new_sized</link></methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
- +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
- +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giobufferedoutputstream">
- <title>gio.BufferedOutputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"auto-grow"</entry>
- <entry>Read - Write</entry>
- <entry>Whether the buffer should automatically grow. Default value: <literal>False</literal>.</entry>
- </row>
- <row valign="top">
- <entry>"buffer-size"</entry>
- <entry>Read - Write - Construct</entry>
- <entry>The size of the backend buffer. Allowed values: >= 1. Default value: 4096.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>
- implements <link linkend="class-giofilteroutputstream"><classname>gio.FilterOutputStream</classname></link>
- and provides for buffered writes.
- </para>
- <para>
- By default,
- <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>'s
- buffer size is set at 4 kilobytes.
- </para>
- <para>
- To create a buffered output stream, use
- <methodname><link linkend="constructor-giobufferedoutputstream">gio.BufferedOutputStream</link></methodname>(),
- or <methodname><link linkend="function-gio--buffered-output-stream-new-sized">gio.buffered_output_stream_new_sized</link></methodname>()
- to specify the buffer's size at construction.
- </para>
- <para>
- To get the size of a buffer within a buffered output stream, use
- <methodname><link linkend="method-giobufferedoutputstream--get-buffer-size">gio.BufferedOutputStream.get_buffer_size</link></methodname>().
- To change the size of a buffered output stream's buffer, use
- <methodname><link linkend="method-giobufferedoutputstream--set-buffer-size">gio.BufferedOutputStream.set_buffer_size</link></methodname>().
- Note that the buffer's size cannot be reduced below the size of the data within the buffer.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giobufferedoutputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.BufferedOutputStream</methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>base_stream</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
- for the given base_stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new buffered output stream for a base stream.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giobufferedoutputstream--get-auto-grow">
- <title>gio.BufferedOutputStream.get_auto_grow</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_auto_grow</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the stream's
- buffer automatically grows, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_auto_grow</methodname>() method checks if the
- buffer automatically grows as data is added.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedoutputstream--get-buffer-size">
- <title>gio.BufferedOutputStream.get_buffer_size</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_buffer_size</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the current buffer size.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_buffer_size</methodname>() method gets the size
- of the buffer in the stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedoutputstream--set-auto-grow">
- <title>gio.BufferedOutputStream.set_auto_grow</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_auto_grow</methodname>
- <methodparam><parameter role="keyword">auto_grow</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">auto_grow</parameter>&nbsp;:</term>
- <listitem><simpara>a boolean.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_auto_grow</methodname>() method sets whether or not
- the stream's buffer should automatically grow. If auto_grow is true,
- then each write will just make the buffer larger, and you must manually
- flush the buffer to actually write out the data to the underlying stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giobufferedoutputstream--set-buffer-size">
- <title>gio.BufferedOutputStream.set_buffer_size</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_buffer_size</methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">size</parameter>&nbsp;:</term>
- <listitem><simpara>the new buffer size.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_buffer_size</methodname>() method sets the size of
- the internal buffer to size.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--buffered-output-stream-new-sized">
- <title>gio.buffered_output_stream_new_sized</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>buffered_output_stream_new_sized</methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>size</parameter>&nbsp;:</term>
- <listitem><simpara>the requested buffer size.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A new
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
- with an internal buffer set to size..
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>buffered_output_stream_new_sized</methodname>() function creates
- a new <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>
- from the given base_stream, with a buffer set to size.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-cancellable.xml b/docs/reference/pygio-cancellable.xml
deleted file mode 100644
index c35388d..0000000
--- a/docs/reference/pygio-cancellable.xml
+++ /dev/null
@@ -1,290 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giocancellable">
- <refnamediv>
- <refname>gio.Cancellable</refname>
- <refpurpose>Thread-safe Operation Cancellation Stack.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Cancellable</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giocancellable">gio.Cancellable</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--cancel">cancel</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--get-fd">get_fd</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--is-cancelled">is_cancelled</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--pop-current">pop_current</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--push-current">push_current</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--reset">reset</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giocancellable--set-error-if-cancelled">set_error_if_cancelled</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>
- <methodparam></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giocancellable">gio.Cancellable</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- is a thread-safe operation cancellation stack used throughout GIO to allow for
- cancellation of synchronous and asynchronous operations.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giocancellable">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.Cancellable</methodname>
- <methodparam></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link> object.
- </para>
- <para>
- Applications that want to start one or more operations that should be cancellable should create a
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- and pass it to the operations.
- </para>
- <para>
- One <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- can be used in multiple consecutive operations, but not in multiple concurrent operations.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giocancellable--cancel">
- <title>gio.Cancellable.cancel</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>cancel</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>cancel</methodname>() method will set cancellable to cancelled,
- and will emit the "cancelled" signal. (However, see the warning about race conditions
- in the documentation for that signal if you are planning to connect to it.)
- </para>
- <para>
- This function is thread-safe. In other words, you can safely call it from a thread
- other than the one running the operation that was passed the cancellable.
- </para>
- <para>
- The convention within gio is that cancelling an asynchronous operation causes it
- to complete asynchronously. That is, if you cancel the operation from the same thread
- in which it is running, then the operation's GAsyncReadyCallback will not be invoked
- until the application returns to the main loop.
- </para>
- </refsect2>
-
- <refsect2 id="method-giocancellable--get-fd">
- <title>gio.Cancellable.get_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_fd</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A valid file descriptor. -1 if the file descriptor
- is not supported, or on errors.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_fd</methodname>() method gets the file descriptor
- for a cancellable job. This can be used to implement cancellable operations
- on Unix systems. The returned fd will turn readable when cancellable is cancelled.
- </para>
- </refsect2>
-
- <refsect2 id="method-giocancellable--is-cancelled">
- <title>gio.Cancellable.is_cancelled</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_cancelled</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if cancellable is cancelled,
- <literal>False</literal> if called with <literal>None</literal> or if
- item is not cancelled. </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_fd</methodname>() method gets the file descriptor
- for a cancellable job. This can be used to implement cancellable operations
- on Unix systems. The returned fd will turn readable when cancellable is cancelled.
- </para>
- </refsect2>
-
- <refsect2 id="method-giocancellable--pop-current">
- <title>gio.Cancellable.pop_current</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>pop_current</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>pop_current</methodname>() method pops cancellable off
- the cancellable stack (verifying that cancellable is on the top of the stack).
- </para>
- </refsect2>
-
- <refsect2 id="method-giocancellable--push-current">
- <title>gio.Cancellable.push_current</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>push_current</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>push_current</methodname>() method pushes cancellable onto
- the cancellable stack. The current cancllable can then be recieved using
- <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giocancellable--reset">
- <title>gio.Cancellable.reset</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>reset</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>reset</methodname>() method resets cancellable to its uncancelled state.
- </para>
- </refsect2>
-
- <refsect2 id="method-giocancellable--set-error-if-cancelled">
- <title>gio.Cancellable.set_error_if_cancelled</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_error_if_cancelled</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if cancellable was cancelled,
- <literal>False</literal> if it was not.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_error_if_cancelled</methodname>() method, if the cancellable
- is cancelled, sets the error to notify that the operation was cancelled.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--cancellable-get-current">
- <title>gio.cancellable_get_current</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>cancellable_get_current</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- from the top of the stack, or <literal>None</literal> if the stack is empty.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>cancellable_get_current</methodname>() function gets the top cancellable from the stack.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml
deleted file mode 100644
index 17761f8..0000000
--- a/docs/reference/pygio-classes.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<chapter id="gio-class-reference"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-
-<title>PyGio Class Reference</title>
-
-<!-- GIO CLASSES -->
-<xi:include href="pygio-appinfo.xml"/>
-<xi:include href="pygio-applaunchcontext.xml"/>
-<xi:include href="pygio-asyncresult.xml"/>
-<xi:include href="pygio-bufferedinputstream.xml"/>
-<xi:include href="pygio-bufferedoutputstream.xml"/>
-<xi:include href="pygio-cancellable.xml"/>
-<xi:include href="pygio-datainputstream.xml"/>
-<xi:include href="pygio-dataoutputstream.xml"/>
-<xi:include href="pygio-drive.xml"/>
-<xi:include href="pygio-emblem.xml"/>
-<xi:include href="pygio-emblemedicon.xml"/>
-<xi:include href="pygio-file.xml"/>
-<xi:include href="pygio-fileattributeinfo.xml"/>
-<xi:include href="pygio-fileenumerator.xml"/>
-<xi:include href="pygio-fileicon.xml"/>
-<xi:include href="pygio-fileinfo.xml"/>
-<xi:include href="pygio-fileinputstream.xml"/>
-<xi:include href="pygio-filemonitor.xml"/>
-<xi:include href="pygio-fileoutputstream.xml"/>
-<xi:include href="pygio-filterinputstream.xml"/>
-<xi:include href="pygio-filteroutputstream.xml"/>
-<xi:include href="pygio-icon.xml"/>
-<xi:include href="pygio-inputstream.xml"/>
-<xi:include href="pygio-loadableicon.xml"/>
-<xi:include href="pygio-memoryinputstream.xml"/>
-<xi:include href="pygio-memoryoutputstream.xml"/>
-<xi:include href="pygio-mount.xml"/>
-<xi:include href="pygio-mountoperation.xml"/>
-<xi:include href="pygio-outputstream.xml"/>
-<xi:include href="pygio-seekable.xml"/>
-<xi:include href="pygio-simpleasyncresult.xml"/>
-<xi:include href="pygio-themedicon.xml"/>
-<xi:include href="pygio-volume.xml"/>
-<xi:include href="pygio-volumemonitor.xml"/>
-<xi:include href="pygio-functions.xml"/>
-<xi:include href="pygio-constants.xml"/>
-
-</chapter>
diff --git a/docs/reference/pygio-constants.xml b/docs/reference/pygio-constants.xml
deleted file mode 100644
index 343927e..0000000
--- a/docs/reference/pygio-constants.xml
+++ /dev/null
@@ -1,1540 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="gio-constants">
- <refnamediv>
- <refname>gio Constants</refname>
- <refpurpose>the built-in constants of the gio module</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
-<programlisting>
-<xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
-<xref linkend="gio-ask-password-flags-constants" endterm="gio-ask-password-flags-constants-title"></xref>
-<xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>
-<xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref>
-<xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
-<xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
-<xref linkend="gio-file-attribute-constants" endterm="gio-file-attribute-constants-title"></xref>
-<xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
-<xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>
-<xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
-<xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
-<xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
-<xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
-<xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
-<xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
-<xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
-<xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>
-<xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
-</programlisting>
-
- </refsect1>
-
- <refsect1 id="gio-constants-description">
- <title>Description</title>
-
- <refsect2 id="gio-ask-password-flags-constants">
- <title id="gio-ask-password-flags-constants-title">Gio Ask Password Flags Constants</title>
-
- <para>
- Flags that are used to request specific information from the user, or to
- notify the user of their choices in an authentication situation.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED</literal></term>
- <listitem>
- <simpara>operation supports anonymous users.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ASK_PASSWORD_NEED_DOMAIN</literal></term>
- <listitem>
- <simpara>operation requires a domain.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ASK_PASSWORD_NEED_PASSWORD</literal></term>
- <listitem>
- <simpara>operation requires a password.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ASK_PASSWORD_NEED_USERNAME</literal></term>
- <listitem>
- <simpara>operation requires a username.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ASK_PASSWORD_SAVING_SUPPORTED</literal></term>
- <listitem>
- <simpara>operation supports saving settings.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-app-info-constants">
- <title id="gio-app-info-constants-title">Gio AppInfo Create Flags Constants</title>
-
- <para>
- Flags used when creating a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.APP_INFO_CREATE_NONE</literal></term>
- <listitem>
- <simpara>No flags.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.APP_INFO_CREATE_NEEDS_TERMINAL</literal></term>
- <listitem>
- <simpara>Application opens in a terminal window. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.APP_INFO_CREATE_SUPPORTS_URIS</literal></term>
- <listitem>
- <simpara>Application supports URI arguments. </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-data-stream-byte-order-constants">
- <title id="gio-data-stream-byte-order-constants-title">Gio Data Stream Byte Order Constants</title>
-
- <para>
- Used to ensure proper endianness of streaming data sources across various machine architectures.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</literal></term>
- <listitem>
- <simpara>Selects Big Endian byte order.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_BYTE_ORDER_HOST_ENDIAN</literal></term>
- <listitem>
- <simpara>Selects endianness based on host machine's architecture.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN</literal></term>
- <listitem>
- <simpara>Selects Little Endian byte order.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-data-stream-newline-type-constants">
- <title id="gio-data-stream-newline-type-constants-title">Gio Data Stream Newline Type Constants</title>
-
- <para>
- Used when checking for or setting the line endings for a given file.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_LF</literal></term>
- <listitem>
- <simpara>Selects "LF" line endings, common on most modern UNIX platforms.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_CR</literal></term>
- <listitem>
- <simpara>Selects "CR" line endings.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_CR_LF</literal></term>
- <listitem>
- <simpara>Selects "CR, LF" line ending, common on Microsoft Windows.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_ANY</literal></term>
- <listitem>
- <simpara>Automatically try to handle any line ending type.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-emblem-origin-constants">
- <title id="gio-emblem-origin-constants-title">Gio Emblem Origin Constants</title>
-
- <para>
- GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.EMBLEM_ORIGIN_DEVICE</literal></term>
- <listitem>
- <simpara>Embleme adds device-specific information.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.EMBLEM_ORIGIN_LIVEMETADATA</literal></term>
- <listitem>
- <simpara>Emblem depicts live metadata, such as "readonly".</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.EMBLEM_ORIGIN_TAG</literal></term>
- <listitem>
- <simpara>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future).</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></term>
- <listitem>
- <simpara>Emblem of unknown origin.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-error-constants">
- <title id="gio-error-constants-title">Gio Error Constants</title>
-
- <para>
- GIOError Error codes returned by GIO functions.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.ERROR_ALREADY_MOUNTED</literal></term>
- <listitem>
- <simpara>File is already mounted.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_BUSY</literal></term>
- <listitem>
- <simpara>File is busy.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_CANCELLED</literal></term>
- <listitem>
- <simpara>Operation was cancelled. See
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_CANT_CREATE_BACKUP</literal></term>
- <listitem>
- <simpara>Backup couldn't be created.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_CLOSED</literal></term>
- <listitem>
- <simpara>File was closed.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_EXISTS</literal></term>
- <listitem>
- <simpara>File already exists error.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_FAILED</literal></term>
- <listitem>
- <simpara>Generic error condition for when any operation fails.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_FAILED_HANDLED</literal></term>
- <listitem>
- <simpara>Operation failed and a helper program has already interacted with
- the user. Do not display any error dialog. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_FILENAME_TOO_LONG</literal></term>
- <listitem>
- <simpara>Filename is too many characters.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_HOST_NOT_FOUND</literal></term>
- <listitem>
- <simpara>Host couldn't be found (remote operations).</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_INVALID_ARGUMENT</literal></term>
- <listitem>
- <simpara>Invalid argument.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_INVALID_FILENAME</literal></term>
- <listitem>
- <simpara>Filename is invalid or contains invalid characters.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_IS_DIRECTORY</literal></term>
- <listitem>
- <simpara>File is a directory error.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_DIRECTORY</literal></term>
- <listitem>
- <simpara>File is not a directory.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_EMPTY</literal></term>
- <listitem>
- <simpara>File is a directory that isn't empty.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_FOUND</literal></term>
- <listitem>
- <simpara>File not found error.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_MOUNTABLE_FILE</literal></term>
- <listitem>
- <simpara>File cannot be mounted.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_MOUNTED</literal></term>
- <listitem>
- <simpara>File isn't mounted. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_REGULAR_FILE</literal></term>
- <listitem>
- <simpara>File is not a regular file.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_SUPPORTED</literal></term>
- <listitem>
- <simpara>Operation not supported for the current backend.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NOT_SYMBOLIC_LINK</literal></term>
- <listitem>
- <simpara>File is not a symbolic link.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_NO_SPACE</literal></term>
- <listitem>
- <simpara>No space left on drive. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_PENDING</literal></term>
- <listitem>
- <simpara>Operations are still pending.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_PERMISSION_DENIED</literal></term>
- <listitem>
- <simpara>Permission denied.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_READ_ONLY</literal></term>
- <listitem>
- <simpara>File is read only. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_TIMED_OUT</literal></term>
- <listitem>
- <simpara>Operation timed out. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_TOO_MANY_LINKS</literal></term>
- <listitem>
- <simpara>File contains too many symbolic links. </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_TOO_MANY_OPEN_FILES</literal></term>
- <listitem>
- <simpara>The current process has too many files open and can't open any
- more. Duplicate descriptors do count toward this limit. Since 2.20</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_WOULD_BLOCK</literal></term>
- <listitem>
- <simpara>Operation would block.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_WOULD_MERGE</literal></term>
- <listitem>
- <simpara>Operation would merge files.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_WOULD_RECURSE</literal></term>
- <listitem>
- <simpara>Operation would be recursive.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.ERROR_WRONG_ETAG</literal></term>
- <listitem>
- <simpara>File's Entity Tag was incorrect. </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-attribute-constants">
- <title id="gio-file-attribute-constants-title">Gio File Attribute Constants</title>
-
- <para>
- The file attributes.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_TYPE</literal></term>
- <listitem>
- <simpara>
- "standard::type" A key in the "standard" namespace for storing file types. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a
- <xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</literal></term>
- <listitem>
- <simpara>
- "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP</literal></term>
- <listitem>
- <simpara>
- "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</literal></term>
- <listitem>
- <simpara>
- "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink.
- Typically the actual type is something else, if we followed the symlink to get the type. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</literal></term>
- <listitem>
- <simpara>
- "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_NAME</literal></term>
- <listitem>
- <simpara>
- "standard::name" A key in the "standard" namespace for getting the name of the file.
- The name is the on-disk filename which may not be in any known encoding,
- and can thus not be generally displayed as is. Use
- gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user
- interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</literal></term>
- <listitem>
- <simpara>
- "standard::display-name" A key in the "standard" namespace for getting the display
- name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed
- in the UI. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME</literal></term>
- <listitem>
- <simpara>
- "standard::edit-name" A key in the "standard" namespace for edit name of the file.
- An edit name is similar to the display name, but it is meant to be used when you want
- to rename the file in the UI. The display name might contain information you don't
- want in the new filename (such as "(invalid unicode)" if the filename was in an
- invalid encoding). Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME</literal></term>
- <listitem>
- <simpara>
- "standard::copy-name" A key in the "standard" namespace for getting the copy
- name of the file. The copy name is an optional version of the name. If available
- it's always in UTF8, and corresponds directly to the original filename (only transcoded
- to UTF8). This is useful if you want to copy the file to another filesystem that might
- have a different encoding. If the filename is not a valid string in the encoding selected
- for the filesystem it is in then the copy name will not be set. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_ICON</literal></term>
- <listitem>
- <simpara>
- "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</literal></term>
- <listitem>
- <simpara>
- "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</literal></term>
- <listitem>
- <simpara>
- "standard::fast-content-type" A key in the "standard" namespace for getting the fast
- content type. The fast content type isn't as reliable as the regular one, as it
- only uses the filename to guess it, but it is faster to calculate than the regular
- content type. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SIZE</literal></term>
- <listitem>
- <simpara>
- "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</literal></term>
- <listitem>
- <simpara>
- "standard::symlink-target" A key in the "standard" namespace for getting the target URI
- for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER</literal></term>
- <listitem>
- <simpara>
- "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this
- key to set the order files are displayed. Files with smaller sort order should be sorted first,
- and files without sort order as if sort order was zero.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ETAG_VALUE</literal></term>
- <listitem>
- <simpara>
- "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ID_FILE</literal></term>
- <listitem>
- <simpara>
- "id::file" A key in the "id" namespace for getting a file identifier. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files,
- to avoid recursive directory scanning.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ID_FILESYSTEM</literal></term>
- <listitem>
- <simpara>
- "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and
- drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_READ</literal></term>
- <listitem>
- <simpara>
- "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
- if the user is able to read the file.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE</literal></term>
- <listitem>
- <simpara>
- "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
- if the user is able to write to the file.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</literal></term>
- <listitem>
- <simpara>
- "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
- if the user is able to execute the file.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE</literal></term>
- <listitem>
- <simpara>
- "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
- if the user is able to delete the file.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH</literal></term>
- <listitem>
- <simpara>
- "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
- if the user is able to move the file to the trash.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME</literal></term>
- <listitem>
- <simpara>
- "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
- if the user is able to rename the file.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</literal></term>
- <listitem>
- <simpara>
- "mountable::can-mount" A key in the "mountable" namespace for checking if
- a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</literal></term>
- <listitem>
- <simpara>
- "mountable::can-unmount" A key in the "mountable" namespace for checking if a file
- (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</literal></term>
- <listitem>
- <simpara>
- "mountable::can-eject" A key in the "mountable" namespace for checking if a file
- (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</literal></term>
- <listitem>
- <simpara>
- "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</literal></term>
- <listitem>
- <simpara>
- "mountable::hal-udi" A key in the "mountable" namespace for getting the
- HAL UDI for the mountable file. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_MODIFIED</literal></term>
- <listitem>
- <simpara>
- "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC</literal></term>
- <listitem>
- <simpara>
- "time::modified-usec" A key in the "time" namespace for getting the miliseconds
- of the time the file was last modified. This should be used in conjunction
- with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_ACCESS</literal></term>
- <listitem>
- <simpara>
- "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC</literal></term>
- <listitem>
- <simpara>
- "time::access-usec" A key in the "time" namespace for getting the microseconds of
- the time the file was last accessed. This should be used in conjunction
- with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_CHANGED</literal></term>
- <listitem>
- <simpara>
- "time::changed" A key in the "time" namespace for getting the time the
- file was last changed. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed.
- This corresponds to the traditional UNIX ctime.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC</literal></term>
- <listitem>
- <simpara>
- "time::changed-usec" A key in the "time" namespace for getting the microseconds
- of the time the file was last changed. This should be used in conjunction
- with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_CREATED</literal></term>
- <listitem>
- <simpara>
- "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created.
- This corresponds to the NTFS ctime.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TIME_CREATED_USEC</literal></term>
- <listitem>
- <simpara>
- "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the
- file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_DEVICE</literal></term>
- <listitem>
- <simpara>
- "unix::device" A key in the "unix" namespace for getting the device id of the device the file
- is located on (see stat() documentation). This attribute is only available
- for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_INODE</literal></term>
- <listitem>
- <simpara>
- "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only
- available for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_MODE</literal></term>
- <listitem>
- <simpara>
- "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g.
- whether the file is a regular file, symlink, etc). See lstat() documentation.
- This attribute is only available for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_NLINK</literal></term>
- <listitem>
- <simpara>
- "unix::nlink" A key in the "unix" namespace for getting the number of hard links
- for a file. See lstat() documentation. This attribute is only available for UNIX
- file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_UID</literal></term>
- <listitem>
- <simpara>
- "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute
- is only available for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_GID</literal></term>
- <listitem>
- <simpara>
- "unix::gid" A key in the "unix" namespace for getting the group ID for the file.
- This attribute is only available for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_RDEV</literal></term>
- <listitem>
- <simpara>
- "unix::rdev" A key in the "unix" namespace for getting the device ID for the file
- (if it is a special file). See lstat() documentation. This attribute is only available
- for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</literal></term>
- <listitem>
- <simpara>
- "unix::block-size" A key in the "unix" namespace for getting the block size for
- the file system. This attribute is only available for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is gio.FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_BLOCKS</literal></term>
- <listitem>
- <simpara>
- "unix::blocks" A key in the "unix" namespace for getting the number of blocks allocated
- for the file. This attribute is only available for UNIX file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</literal></term>
- <listitem>
- <simpara>
- "unix::is-mountpoint" A key in the "unix" namespace for checking if the file represents
- a UNIX mount point. This attribute is <literal>True</literal> if the file is a UNIX mount point.
- This attribute is only available for UNIX file systems. Corresponding
- GFileAttributeType
- is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_DOS_IS_ARCHIVE</literal></term>
- <listitem>
- <simpara>
- "dos::is-archive" A key in the "dos" namespace for checking if the file's archive
- flag is set. This attribute is <literal>True</literal> if the archive flag is set.
- This attribute is only available for DOS file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_DOS_IS_SYSTEM</literal></term>
- <listitem>
- <simpara>
- "dos::is-system" A key in the "dos" namespace for checking if the file's backup
- flag is set. This attribute is <literal>True</literal> if the backup flag is set.
- This attribute is only available for DOS file systems. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
- G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_OWNER_USER</literal></term>
- <listitem>
- <simpara>
- "owner::user" A key in the "owner" namespace for getting the user name
- of the file's owner. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_OWNER_USER_REAL</literal></term>
- <listitem>
- <simpara>
- "owner::user-real" A key in the "owner" namespace for getting the real name
- of the user that owns the file. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
- G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_OWNER_GROUP</literal></term>
- <listitem>
- <simpara>
- "owner::group" A key in the "owner" namespace for getting the file owner's
- group. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_THUMBNAIL_PATH</literal></term>
- <listitem>
- <simpara>
- "thumbnail::path" A key in the "thumbnail" namespace for getting the path
- to the thumbnail image. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_THUMBNAILING_FAILED</literal></term>
- <listitem>
- <simpara>
- "thumbnail::failed" A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute
- is <literal>True</literal> if thumbnailing failed. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
- G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_PREVIEW_ICON</literal></term>
- <listitem>
- <simpara>
- "preview::icon" A key in the "preview" namespace for getting a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- that can be used to get preview of the file. For example, it
- may be a low resolution thumbnail without metadata. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
- G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a GIcon.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE</literal></term>
- <listitem>
- <simpara>
- "filesystem::size" A key in the "filesystem" namespace for getting the total
- size (in bytes) of the file system, used in
- <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>().
- Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_FREE</literal></term>
- <listitem>
- <simpara>
- "filesystem::free" A key in the "filesystem" namespace for getting the number of bytes of free space left
- on the file system. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_UINT64.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE</literal></term>
- <listitem>
- <simpara>
- "filesystem::type" A key in the "filesystem" namespace for getting the file system's type. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_READONLY</literal></term>
- <listitem>
- <simpara>
- "filesystem::readonly" A key in the "filesystem" namespace for checking if the
- file system is read only. Is set to <literal>True</literal> if the file system
- is read only. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_GVFS_BACKEND</literal></term>
- <listitem>
- <simpara>
- "gvfs::backend" A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_SELINUX_CONTEXT</literal></term>
- <listitem>
- <simpara>
- "selinux::context" A key in the "selinux" namespace for getting the file's SELinux context. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- Note that this attribute is only available if GLib has been built with SELinux support.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TRASH_ITEM_COUNT</literal></term>
- <listitem>
- <simpara>
- "trash::item-count" A key in the "trash" namespace. When requested against "trash:///" returns the number
- of (toplevel) items in the trash folder. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_UINT32.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</literal></term>
- <listitem>
- <simpara>
- "filesystem::use-preview" A key in the "filesystem" namespace for hinting a file manager
- application whether it should preview (e.g. thumbnail) files on the file system.
- The value for this key contain a GFilesystemPreviewType.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_STANDARD_DESCRIPTION</literal></term>
- <listitem>
- <simpara>
- "standard::description" A key in the "standard" namespace for getting the description
- of the file. The description is a utf8 string that describes the file, generally containing
- the filename, but can also contain furter information. Example descriptions could be
- "filename (on hostname)" for a remote file or "filename (in trash)" for a
- file in the trash. This is useful for instance as the window title when
- displaying a directory or for a bookmarks menu. Corresponding
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- is G_FILE_ATTRIBUTE_TYPE_STRING.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-attribute-type-constants">
- <title id="gio-file-attribute-type-constants-title">Gio File Attribute Type Constants</title>
-
- <para>
- The data types for file attributes.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</literal></term>
- <listitem>
- <simpara>a boolean value.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</literal></term>
- <listitem>
- <simpara>a zero terminated string of non-zero bytes.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT32</literal></term>
- <listitem>
- <simpara>a signed 4-byte/32-bit integer.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT64</literal></term>
- <listitem>
- <simpara>a signed 8-byte/64-bit integer.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_INVALID</literal></term>
- <listitem>
- <simpara>indicates an invalid or uninitalized type.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_OBJECT</literal></term>
- <listitem>
- <simpara>a <link linkend="class-gobject">gobject.GObject</link>.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_STRING</literal></term>
- <listitem>
- <simpara>a null terminated UTF8 string.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT32</literal></term>
- <listitem>
- <simpara>an unsigned 4-byte/32-bit integer.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT64</literal></term>
- <listitem>
- <simpara>an unsigned 8-byte/64-bit integer.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-attribute-flags-constants">
- <title id="gio-file-attribute-flags-constants-title">Gio File Attribute Flags Constants</title>
-
- <para>
- Flags specifying the behaviour of an attribute.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_INFO_NONE</literal></term>
- <listitem>
- <simpara>no flags set.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</literal></term>
- <listitem>
- <simpara>copy the attribute values when the file is copied.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</literal></term>
- <listitem>
- <simpara>copy the attribute values when the file is moved.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-create-flags-constants">
- <title id="gio-file-create-flags-constants-title">Gio File Create Flags Constants</title>
-
- <para>
- Flags used when an operation may create a file.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_CREATE_NONE</literal></term>
- <listitem>
- <simpara>No flags set.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_CREATE_PRIVATE</literal></term>
- <listitem>
- <simpara>Create a file that can only be accessed by the current user.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_CREATE_REPLACE_DESTINATION</literal></term>
- <listitem>
- <simpara>
- Replace the destination as if it didn't exist before. Don't try
- to keep any old permissions, replace instead of following links. This is
- generally useful if you're doing a "copy over" rather than a "save new version of"
- replace operation. You can think of it as "unlink destination" before writing
- to it, although the implementation may not be exactly like that.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-copy-flags-constants">
- <title id="gio-file-copy-flags-constants-title">Gio File Copy Flags Constants</title>
-
- <para>
- Flags used when copying or moving files.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_COPY_NONE</literal></term>
- <listitem>
- <simpara>No flags set.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_COPY_OVERWRITE</literal></term>
- <listitem>
- <simpara>Overwrite any existing files.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_COPY_BACKUP</literal></term>
- <listitem>
- <simpara>Make a backup of any existing files.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_COPY_NOFOLLOW_SYMLINKS</literal></term>
- <listitem>
- <simpara>Don't follow symlinks.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_COPY_ALL_METADATA</literal></term>
- <listitem>
- <simpara>Copy all file metadata instead of just default set used for copy
- (see <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>).</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_COPY_NO_FALLBACK_FOR_MOVE</literal></term>
- <listitem>
- <simpara>Don't use copy and delete fallback if native move not supported.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_COPY_TARGET_DEFAULT_PERMS</literal></term>
- <listitem>
- <simpara>Leaves target file with default perms, instead of setting the source file perms.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-monitor-flags-constants">
- <title id="gio-file-monitor-flags-constants-title">Gio File Monitor Flags Constants</title>
-
- <para>
- Flags used to set what a
- <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
- will watch for.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_MONITOR_NONE</literal></term>
- <listitem>
- <simpara>No flags set.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_MONITOR_WATCH_MOUNTS</literal></term>
- <listitem>
- <simpara>Watch for mount events.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-query-info-flags-constants">
- <title id="gio-file-query-info-flags-constants-title">Gio File Query Info Flags Constants</title>
-
- <para>
- Flags used when querying a
- <link linkend="class-giofile"><classname>gio.FileInfo</classname></link>.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_QUERY_INFO_NONE</literal></term>
- <listitem>
- <simpara>No flags set.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</literal></term>
- <listitem>
- <simpara>Don't follow symlinks.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-file-type-constants">
- <title id="gio-file-type-constants-title">Gio File Type Constants</title>
-
- <para>
- Indicates the file's on-disk type.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_DIRECTORY</literal></term>
- <listitem>
- <simpara>File handle represents a directory.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_MOUNTABLE</literal></term>
- <listitem>
- <simpara>File is a mountable location.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_REGULAR</literal></term>
- <listitem>
- <simpara>File handle represents a regular file.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_SHORTCUT</literal></term>
- <listitem>
- <simpara>File is a shortcut (Windows systems).</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_SPECIAL</literal></term>
- <listitem>
- <simpara>File is a "special" file, such as a socket, fifo, block device, or character device.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_SYMBOLIC_LINK</literal></term>
- <listitem>
- <simpara>File handle represents a symbolic link (Unix systems).</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.FILE_TYPE_UNKNOWN</literal></term>
- <listitem>
- <simpara>File's type is unknown.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-mount-mount-flags-constants">
- <title id="gio-mount-mount-flags-constants-title">Gio Mount Mount Flags Constants</title>
-
- <para>
- Flags used when mounting a mount.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.MOUNT_MOUNT_NONE</literal></term>
- <listitem>
- <simpara>No flags set.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-mount-unmount-flags-constants">
- <title id="gio-mount-unmount-flags-constants-title">Gio Mount Unmount Flags Constants</title>
-
- <para>
- Flags used when unmounting a mount.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.MOUNT_UNMOUNT_NONE</literal></term>
- <listitem>
- <simpara>No flags set.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.MOUNT_UNMOUNT_FORCE</literal></term>
- <listitem>
- <simpara>Unmount even if there are outstanding file operations on the mount.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-mount-operation-result-constants">
- <title id="gio-mount-operation-result-constants-title">Gio Mount Operation Result Constants</title>
-
- <para>
- returned as a result when a request for information is send by the mounting operation.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.MOUNT_OPERATION_HANDLED</literal></term>
- <listitem>
- <simpara>The request was fulfilled and the user specified data is now available.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.MOUNT_OPERATION_ABORTED</literal></term>
- <listitem>
- <simpara>The user requested the mount operation to be aborted.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.MOUNT_OPERATION_UNHANDLED</literal></term>
- <listitem>
- <simpara>The request was unhandled (i.e. not implemented).</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2 id="gio-password-save-constants">
- <title id="gio-password-save-constants-title">Gio Password Save Constants</title>
-
- <para>
- is used to indicate the lifespan of a saved password.
- </para>
- <para>
- Gvfs stores passwords in the Gnome keyring when this flag allows it to,
- and later retrieves it again from there.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><literal>gio.PASSWORD_SAVE_FOR_SESSION</literal></term>
- <listitem>
- <simpara>save a password for the session.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.PASSWORD_SAVE_NEVER</literal></term>
- <listitem>
- <simpara>never save a password.</simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>gio.PASSWORD_SAVE_PERMANENTLY</literal></term>
- <listitem>
- <simpara>save a password permanently.</simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
- </refsect1>
-
-</refentry>
diff --git a/docs/reference/pygio-datainputstream.xml b/docs/reference/pygio-datainputstream.xml
deleted file mode 100644
index 403bb3e..0000000
--- a/docs/reference/pygio-datainputstream.xml
+++ /dev/null
@@ -1,799 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giodatainputstream">
- <refnamediv>
- <refname>gio.DataInputStream</refname>
- <refpurpose>Data Input Stream</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.DataInputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giodatainputstream">gio.DataInputStream</link></methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--get-byte-order">get_byte_order</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--get-newline-type">get_newline_type</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-byte">read_byte</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-int16">read_int16</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-int32">read_int32</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-int64">read_int64</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-line">read_line</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-line-async">read_line_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-line-finish">read_line_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-uint16">read_uint16</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-uint32">read_uint32</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-uint64">read_uint64</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-until">read_until</link></methodname>
- <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-until-async">read_until_async</link></methodname>
- <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--read-until-finish">read_until_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--set-byte-order">set_byte_order</link></methodname>
- <methodparam><parameter role="keyword">order</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodatainputstream--set-newline-type">set_newline_type</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
- +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
- +-- <link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link>
- +-- <link linkend="class-giodatainputstream">gio.DataInputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giodatainputstream">
- <title>gio.DataInputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"byte-order"</entry>
- <entry>Read - Write</entry>
- <entry>The byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
- </row>
- <row valign="top">
- <entry>"newline-type"</entry>
- <entry>Read - Write</entry>
- <entry>The accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
- implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- and includes functions for reading structured data directly from a binary input stream.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giodatainputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.DataInputStream</methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>base_stream</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
- from the given base_stream.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giodatainputstream--get-byte-order">
- <title>gio.DataInputStream.get_byte_order</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_byte_order</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the stream's current
- <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_byte_order</methodname>() method gets the byte
- order for the data input stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--get-newline-type">
- <title>gio.DataInputStream.get_newline_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_newline_type</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref>
- for the given stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_newline_type</methodname>() method gets the current
- newline type for the stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-byte">
- <title>gio.DataInputStream.read_byte</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_byte</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>an unsigned 8-bit/1-byte value read from the
- stream or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_byte</methodname>() method reads an unsigned 8-bit/1-byte value from stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-int16">
- <title>gio.DataInputStream.read_int16</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_int16</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_int16</methodname>() method reads a 16-bit/2-byte value from stream.
- </para>
- <para>
- In order to get the correct byte order for this read operation, see
- <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
- and
- <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-int32">
- <title>gio.DataInputStream.read_int32</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_int32</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a signed 32-bit/4-byte value read from the stream
- or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_int32</methodname>() method reads a signed 32-bit/4-byte value from stream.
- </para>
- <para>
- In order to get the correct byte order for this read operation, see
- <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
- and
- <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-int64">
- <title>gio.DataInputStream.read_int64</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_int64</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a signed 64-bit/8-byte value read from the stream
- or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_int64</methodname>() method reads a signed 64-bit/8-byte value from stream.
- </para>
- <para>
- In order to get the correct byte order for this read operation, see
- <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
- and
- <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-line">
- <title>gio.DataInputStream.read_line</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_line</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string with the line that was read in (without the newlines).
- Set length to a gsize to get the length of the read line. On an error, it will return
- <literal>None</literal> and error will be set. If there's no content to read, it
- will still return <literal>None</literal>, but error won't be set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_line</methodname>() reads a line from the data input stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can
- be cancelled by triggering the cancellable object from another thread.
- If the operation was cancelled, the error gio.ERROR_CANCELLED will be
- returned. If an operation was partially finished when the operation was
- cancelled the partial result will be returned, without an error.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-line-async">
- <title>gio.DataInputStream.read_line_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_line_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_line_async</methodname>() method is the asynchronous version of
- <methodname><link linkend="method-giodatainputstream--read-line">gio.DataInputStream.read_line</link></methodname>().
- It is an error to have two outstanding calls to this function.
- </para>
- <para>
- For the synchronous version of this function, see
- <methodname><link linkend="method-giodatainputstream--read-line">gio.DataInputStream.read_line</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-line-finish">
- <title>gio.DataInputStream.read_line_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_line_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string with the line that was read in (without the newlines).
- On an error, it will return <literal>None</literal> and error will be set.
- If there's no content to read, it will still return <literal>None</literal>,
- but error won't be set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_line_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-giodatainputstream--read-line-async">gio.DataInputStream.read_line_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-uint16">
- <title>gio.DataInputStream.read_uint16</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_uint16</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_uint16</methodname>() method reads a 16-bit/2-byte value from stream.
- </para>
- <para>
- In order to get the correct byte order for this read operation, see
- <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
- and
- <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-uint32">
- <title>gio.DataInputStream.read_uint32</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_uint32</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a signed 32-bit/4-byte value read from the stream
- or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_uint32</methodname>() method reads a signed 32-bit/4-byte value from stream.
- </para>
- <para>
- In order to get the correct byte order for this read operation, see
- <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
- and
- <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-uint64">
- <title>gio.DataInputStream.read_uint64</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_uint64</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a signed 64-bit/8-byte value read from the stream
- or 0 if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_uint64</methodname>() method reads a signed 64-bit/8-byte value from stream.
- </para>
- <para>
- In order to get the correct byte order for this read operation, see
- <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
- and
- <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-until">
- <title>gio.DataInputStream.read_until</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_until</methodname>
- <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">stop_chars</parameter>&nbsp;:</term>
- <listitem><simpara>characters to terminate the read.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string with the data that was read before encountering
- any of the stop characters. This function will return NULL on an error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_until</methodname>() reads a string from the data input
- stream, up to the first occurrence of any of the stop characters.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-until-async">
- <title>gio.DataInputStream.read_until_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_until_async</methodname>
- <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">stop_chars</parameter>&nbsp;:</term>
- <listitem><simpara>characters to terminate the read.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_until_async</methodname>() method it's the asynchronous version of
- <methodname><link linkend="method-giodatainputstream--read-until">gio.DataInputStream.read_until</link></methodname>().
- It is an error to have two outstanding calls to this function.
- </para>
- <para>
- For the synchronous version of this function, see
- <methodname><link linkend="method-giodatainputstream--read-until">gio.DataInputStream.read_until</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giodatainputstream--read-until-finish">gio.DataInputStream.read_until_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--read-until-finish">
- <title>gio.DataInputStream.read_until_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_until_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string with the data that was read before encountering
- any of the stop characters. This function will return <literal>None</literal> on an error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_until_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-giodatainputstream--read-until-async">gio.DataInputStream.read_until_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--set-byte-order">
- <title>gio.DataInputStream.set_byte_order</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_byte_order</methodname>
- <methodparam><parameter role="keyword">order</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">order</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_byte_order</methodname>() method sets the byte order for
- the given stream. All subsequent reads from the stream will be read in the given order.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodatainputstream--set-newline-type">
- <title>gio.DataInputStream.set_newline_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_newline_type</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">type</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref> to set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_newline_type</methodname>() method sets the newline type for the stream.
- </para>
- <note>
- Note that using gio.DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a
- read chunk ends in "CR" we must read an additional byte to know if this is
- "CR" or "CR LF", and this might block if there is no more data availible.
- </note>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-dataoutputstream.xml b/docs/reference/pygio-dataoutputstream.xml
deleted file mode 100644
index 4cbc904..0000000
--- a/docs/reference/pygio-dataoutputstream.xml
+++ /dev/null
@@ -1,504 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giodataoutputstream">
- <refnamediv>
- <refname>gio.DataOutputStream</refname>
- <refpurpose>Data Output Stream</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.DataOutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giodataoutputstream">gio.DataOutputStream</link></methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--get-byte-order">get_byte_order</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-byte">put_byte</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-int16">put_int16</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-int32">put_int32</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-int64">put_int64</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-string">put_string</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-uint16">put_uint16</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-uint32">put_uint32</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--put-uint64">put_uint64</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodataoutputstream--set-byte-order">set_byte_order</link></methodname>
- <methodparam><parameter role="keyword">order</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
- +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
- +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
- +-- <link linkend="class-giodataoutputstream">gio.DataOutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giodataoutputstream">
- <title>gio.DataOutputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"byte-order"</entry>
- <entry>Read - Write</entry>
- <entry>Determines the byte ordering that is used when writing
- multi-byte entities (such as integers) to the stream.
- Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
- implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- and includes functions for writing data directly to an output stream.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giodataoutputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.DataOutputStream</methodname>
- <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>base_stream</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
- from the given base_stream.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giodataoutputstream--get-byte-order">
- <title>gio.DataOutputStream.get_byte_order</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_byte_order</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the stream's current
- <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_byte_order</methodname>() method gets the byte
- order for the stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-byte">
- <title>gio.DataOutputStream.put_byte</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_byte</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a char.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_byte</methodname>() method puts a byte into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-int16">
- <title>gio.DataOutputStream.put_int16</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_int16</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a gint16.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_int16</methodname>() method puts a signed 16-bit integer into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-int32">
- <title>gio.DataOutputStream.put_int32</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_int32</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a gint32.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_int32</methodname>() method puts a signed 32-bit integer into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-int64">
- <title>gio.DataOutputStream.put_int64</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_int64</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a gint64.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_int64</methodname>() method puts a signed 64-bit integer into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-string">
- <title>gio.DataOutputStream.put_string</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_string</methodname>
- <methodparam><parameter role="keyword">str</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">str</parameter>&nbsp;:</term>
- <listitem><simpara>a string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if string was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_string</methodname>() method puts a string into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-uint16">
- <title>gio.DataOutputStream.put_uint16</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_uint16</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a guint16.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_uint16</methodname>() method puts an unsigned 16-bit integer into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-uint32">
- <title>gio.DataOutputStream.put_uint32</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_uint32</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a guint32.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_uint32</methodname>() method puts an unsigned 32-bit integer into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--put-uint64">
- <title>gio.DataOutputStream.put_uint64</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>put_uint64</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>a guint64.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>put_uint64</methodname>() method puts an unsigned 64-bit integer into the output stream.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodataoutputstream--set-byte-order">
- <title>gio.DataOutputStream.set_byte_order</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_byte_order</methodname>
- <methodparam><parameter role="keyword">order</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">order</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_byte_order</methodname>() method sets the byte order for
- the given stream. All subsequent reads from the stream will be read in the given order.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-drive.xml b/docs/reference/pygio-drive.xml
deleted file mode 100644
index 73766cd..0000000
--- a/docs/reference/pygio-drive.xml
+++ /dev/null
@@ -1,546 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giodrive">
- <refnamediv>
- <refname>gio.Drive</refname>
- <refpurpose>Virtual File System drive management.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Drive</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--can-eject">can_eject</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--can-poll-for-media">can_poll_for_media</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--eject">eject</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--eject-finish">eject_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--enumerate-identifiers">enumerate_identifiers</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--get-identifier">get_identifier</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--get-name">get_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--get-volumes">get_volumes</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--has-media">has_media</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--has-volumes">has_volumes</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--is-media-check-automatic">is_media_check_automatic</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--is-media-removable">is_media_removable</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--poll-for-media">poll_for_media</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giodrive--poll-for-media-finish">poll_for_media_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-giodrive">gio.Drive</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Prerequisites</title>
- <para>
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link> requires
- <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- - this represent a piece of hardware connected to the machine. Its generally
- only created for removable hardware or hardware with removable media.
- </para>
- <para>
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- is a container class for GVolume objects that stem from the same piece of media.
- As such, <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- abstracts a drive with (or without) removable media and provides operations for
- querying whether media is available, determing whether media change is automatically
- detected and ejecting the media.
- </para>
- <para>
- If the <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- reports that media isn't automatically detected, one can poll for media; typically
- one should not do this periodically as a poll for media operation is potententially
- expensive and may spin up the drive creating noise.
- </para>
- <para>
- For porting from GnomeVFS note that there is no equivalent of
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- in that API.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giodrive--can-eject">
- <title>gio.Drive.can_eject</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_eject</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the drive can be ejected,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_eject</methodname>() method checks if a drive can be ejected.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--can-poll-for-media">
- <title>gio.Drive.can_poll_for_media</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_poll_for_media</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the drive can be polled
- for media changes, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_poll_for_media</methodname>() method checks if a drive
- can be polled for media changes.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--eject">
- <title>gio.Drive.eject</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject</methodname>
- <methodparam>
- <parameter role="keyword">callback</parameter>
- </methodparam>
- <methodparam>
- <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
- <listitem><simpara>flags affecting the unmount if required for eject.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject</methodname>() method asynchronously ejects a drive.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giodrive--eject-finish">gio.Drive.eject_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--eject-finish">
- <title>gio.Drive.eject_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the drive has been ejected
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject_finish</methodname>() method finishes ejecting a drive.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--enumerate-identifiers">
- <title>gio.Drive.enumerate_identifiers</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>enumerate_identifiers</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of strings containing kinds of identifiers.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>enumerate_identifiers</methodname>() method gets the kinds
- of identifiers that drive has. Use
- <methodname><link linkend="method-giodrive--get-identifier">gio.Drive.get_identifier</link></methodname>()
- to obtain the identifiers themselves.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--get-icon">
- <title>gio.Drive.get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_icon</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- for the drive.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_icon</methodname>() method gets the icon for drive.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--get-identifier">
- <title>gio.Drive.get_identifier</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_identifier</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A string containing the requested identfier, or
- <literal>None</literal> if the
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- doesn't have this kind of identifier.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_identifier</methodname>() method gets the identifier of
- the given kind for drive.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--get-name">
- <title>gio.Drive.get_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A string containing drive's name.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_name</methodname>() method gets the name of drive.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--get-volumes">
- <title>gio.Drive.get_volumes</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_volumes</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list containing any
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- objects on the given drive.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_volumes</methodname>() method get a list of mountable
- volumes for drive.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--has-media">
- <title>gio.Drive.has_media</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>has_media</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if drive has media,
- <literal>False</literal> otherwise.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>has_media</methodname>() method checks if the drive
- has media. Note that the OS may not be polling the drive for media changes; see
- <methodname><link linkend="method-giodrive--is-media-check-automatic">gio.Drive.is_media_check_automatic</link></methodname>()
- for more details.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--has-volumes">
- <title>gio.Drive.has_volumes</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>has_volumes</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if drive contains volumes,
- <literal>False</literal> otherwise.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>has_volumes</methodname>() method check if drive has any mountable volumes.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--is-media-check-automatic">
- <title>gio.Drive.is_media_check_automatic</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_media_check_automatic</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if drive is capabable
- of automatically detecting media changes,
- <literal>False</literal> otherwise.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>is_media_check_automatic</methodname>() method checks if
- drive is capabable of automatically detecting media changes.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--is-media-removable">
- <title>gio.Drive.is_media_removable</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_media_removable</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if drive supports removable media,
- <literal>False</literal> otherwise.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>is_media_removable</methodname>() method checks if the
- drive supports removable media.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--poll-for-media">
- <title>gio.Drive.poll_for_media</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>poll_for_media</methodname>
- <methodparam>
- <parameter role="keyword">callback</parameter>
- </methodparam>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>poll_for_media</methodname>() method asynchronously polls
- drive to see if media has been inserted or removed.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giodrive--poll-for-media-finish">gio.Drive.poll_for_media_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giodrive--poll-for-media-finish">
- <title>gio.Drive.poll_for_media_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>poll_for_media_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the drive has been poll_for_mediaed
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>poll_for_media_finish</methodname>() method finishes
- an operation started with
- <methodname><link linkend="method-giodrive--poll-for-media">gio.Drive.poll_for_media</link></methodname>()
- on a drive.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-emblem.xml b/docs/reference/pygio-emblem.xml
deleted file mode 100644
index 032b0ff..0000000
--- a/docs/reference/pygio-emblem.xml
+++ /dev/null
@@ -1,232 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioemblem">
- <refnamediv>
- <refname>gio.Emblem</refname>
- <refpurpose>An object for emblems.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Emblem</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
- <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-gioemblem">gio.Emblem</link></methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioemblem--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioemblem--get-origin">get_origin</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--emblem-new-with-origin">gio.emblem_new_with_origin</link></methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- <methodparam><parameter role="keyword">origin</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioemblem">gio.Emblem</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interfaces</title>
- <para>
- <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
- implements
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- </para>
- </refsect1>
-
- <refsect1 id="properties-gioemblem">
- <title>gio.Emblem Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"icon"</entry>
- <entry>Read - Write - Construct Only</entry>
- <entry>The actual icon of the emblem.</entry>
- </row>
- <row valign="top">
- <entry>"origin"</entry>
- <entry>Read - Write - Construct Only</entry>
- <entry>Tells which origin the emblem is derived from.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
- class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
- that supports having an emblem, which is an icon with additional properties.
- It can then be added to a
- <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
- </para>
- <para>
- Currently, only metainformation about the emblem's origin is supported.
- More may be added in the future.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-gioemblem">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.Emblem</methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>icon</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link> containing the icon.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>origin</parameter>&nbsp;:</term>
- <listitem><simpara>
- <link linkend="gio-emblem-origin-constants">origin</link> of the emblem.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <note>
- Parameter <parameter>origin</parameter> is available since PyGObject 2.20.
- </note>
-
- <para>
- Creates a new <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link> for icon.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioemblem--get-icon">
- <title>gio.Emblem.get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_icon</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_icon</methodname>() method gives back the icon from emblem.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioemblem--get-origin">
- <title>gio.Emblem.get_origin</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_origin</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the origin of the emblem.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_origin</methodname>() method gets the origin of the emblem.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--emblem-new-with-origin">
- <title>gio.emblem_new_with_origin</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>emblem_new_with_origin</methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- <methodparam><parameter role="keyword">origin</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>origin</parameter>&nbsp;:</term>
- <listitem><simpara>a <xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
- defining the emblem's origin.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <note>
- While this method is not deprecated, with 2.20 and up it is recommended
- to use the constructor instead.
- </note>
-
-
- <para>
- The <methodname>emblem_new_with_origin</methodname>() function creates
- a new emblem for icon.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-emblemedicon.xml b/docs/reference/pygio-emblemedicon.xml
deleted file mode 100644
index 9b5ef8a..0000000
--- a/docs/reference/pygio-emblemedicon.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioemblemedicon">
- <refnamediv>
- <refname>gio.EmblemedIcon</refname>
- <refpurpose>Icon with emblems.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.EmblemedIcon</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
- <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-gioemblemedicon">gio.EmblemedIcon</link></methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- <methodparam><parameter role="keyword">emblem</parameter></methodparam>
- </constructorsynopsis>
-
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioemblemedicon--add-emblem">add_emblem</link></methodname>
- <methodparam><parameter role="keyword">emblem</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioemblemedicon--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioemblemedicon">gio.EmblemedIcon</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interfaces</title>
- <para>
- <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
- implements
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
- class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
- that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via
- <methodname><link linkend="method-gioemblemedicon--add-emblem">gio.EmblemedIcon.add_emblem</link></methodname>().
- </para>
- <para>
- Note that
- <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
- allows no control over the position of the emblems. See also
- <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
- for more information.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-gioemblemedicon">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.EmblemedIcon</methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- <methodparam><parameter role="keyword">emblem</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>icon</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>emblem</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- for icon with the emblem emblem.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioemblemedicon--add-emblem">
- <title>gio.EmblemedIcon.add_emblem</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>add_emblem</methodname>
- <methodparam><parameter role="keyword">emblem</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>emblem</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>add_emblem</methodname>() method adds emblem to the
- list of <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>s.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioemblemedicon--get-icon">
- <title>gio.EmblemedIcon.get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_icon</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- that is owned by emblemed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_icon</methodname>() method gets the main icon for emblemed.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-file.xml b/docs/reference/pygio-file.xml
deleted file mode 100644
index ac85840..0000000
--- a/docs/reference/pygio-file.xml
+++ /dev/null
@@ -1,4534 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofile">
- <refnamediv>
- <refname>gio.File</refname>
- <refpurpose>File and Directory Handling.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.File</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giofile">gio.File</link></methodname>
- <methodparam><parameter role="keyword">commandline</parameter></methodparam>
- <methodparam><parameter role="keyword">path</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">uri</parameter><initializer>None</initializer></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--append-to">append_to</link></methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--append-to-async">append_to_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--append-to-finish">append_to_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--copy">copy</link></methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--copy-async">copy_async</link></methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">progress_callback</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">progress_callback_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--copy-attributes">copy_attributes</link></methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--copy-finish">copy_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--create">create</link></methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--create-async">create_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--create-finish">create_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--delete">delete</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--dup">dup</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--eject-mountable">eject_mountable</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--eject-mountable-finish">eject_mountable_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--enumerate-children">enumerate_children</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--enumerate-children-async">enumerate_children_async</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--enumerate-children-finish">enumerate_children_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--equal">equal</link></methodname>
- <methodparam><parameter role="keyword">file2</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--find-enclosing-mount">find_enclosing_mount</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--find-enclosing-mount-async">find_enclosing_mount_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--find-enclosing-mount-finish">find_enclosing_mount_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-basename">get_basename</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-child">get_child</link></methodname>
- <methodparam><parameter role="keyword">name</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-child-for-display-name">get_child_for_display_name</link></methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-parent">get_parent</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-parse-name">get_parse_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-path">get_path</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-relative-path">get_relative_path</link></methodname>
- <methodparam><parameter role="keyword">descendant</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-uri">get_uri</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--get-uri-scheme">get_uri_scheme</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--has-prefix">has_prefix</link></methodname>
- <methodparam><parameter role="keyword">prefix</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--has-uri-scheme">has_uri_scheme</link></methodname>
- <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--is-native">is_native</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--load-contents">load_contents</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--load-contents-async">load_contents_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--load-contents-finish">load_contents_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--make-directory">make_directory</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--make-directory-with-parents">make_directory_with_parents</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--make-symbolic-link">make_symbolic_link</link></methodname>
- <methodparam><parameter role="keyword">symlink_value</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--monitor">monitor</link></methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--monitor-directory">monitor_directory</link></methodname>
- <methodparam><parameter role="keyword">flags</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--monitor-file">monitor_file</link></methodname>
- <methodparam><parameter role="keyword">flags</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--mount-enclosing-volume">mount_enclosing_volume</link></methodname>
- <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_MOUNT_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--mount-enclosing-volume-finish">mount_enclosing_volume_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--mount-mountable">mount_mountable</link></methodname>
- <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_MOUNT_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--mount-mountable-finish">mount_mountable_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--move">move</link></methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-default-handler">query_default_handler</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-exists">query_exists</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-file-type">query_file_type</link></methodname>
- <methodparam><parameter role="keyword">flags</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-filesystem-info-async">query_filesystem_info_async</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-filesystem-info-finish">query_filesystem_info_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-info">query_info</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-info-async">query_info_async</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-info-finish">query_info_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-settable-attributes">query_settable_attributes</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--query-writable-namespace">query_writable_namespace</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--read">read</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--read-async">read_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--read-finish">read_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--replace">replace</link></methodname>
- <methodparam><parameter role="keyword">etag</parameter></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--replace-async">replace_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--replace-contents">replace_contents</link></methodname>
- <methodparam><parameter role="keyword">contents</parameter></methodparam>
- <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--replace-contents-async">replace_contents_async</link></methodname>
- <methodparam><parameter role="keyword">contents</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--replace-contents-finish">replace_contents_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--replace-finish">replace_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--resolve-relative-path">resolve_relative_path</link></methodname>
- <methodparam><parameter role="keyword">relative_path</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute">set_attribute</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- <methodparam><parameter role="keyword">value_p</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute-byte-string">set_attribute_byte_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute-int32">set_attribute_int32</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute-int64">set_attribute_int64</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute-string">set_attribute_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute-uint32">set_attribute_uint32</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attribute-uint64">set_attribute_uint64</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attributes-async">set_attributes_async</link></methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attributes-finish">set_attributes_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-attributes-from-info">set_attributes_from_info</link></methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-display-name">set_dispay_name</link></methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-display-name-async">set_display_name_async</link></methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--set-display-name-finish">set_display_name_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--trash">trash</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--unmount-mountable">unmount_mountable</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_UNMOUNT_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofile--unmount-mountable-finish">unmount_mountable_finish</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>
- <methodparam><parameter role="keyword">parse_name</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-giofile">gio.File</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Prerequisites</title>
- <para>
- <link linkend="class-giofile"><classname>gio.File</classname></link> is implemented by
- <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giofile"><classname>gio.File</classname></link> is a high
- level abstraction for manipulating files on a virtual file system.
- <link linkend="class-giofile"><classname>gio.File</classname></link>s are lightweight,
- immutable objects that do no I/O upon creation. It is necessary to understand that
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- objects do not represent files, merely an identifier for a file. All file content
- I/O is implemented as streaming operations (see
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link> and
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>).
- </para>
- <para>
- To construct a <link linkend="class-giofile"><classname>gio.File</classname></link>, you can use
- it's constructor either with a path, an uri or a commandline argument.
- <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>()
- from a utf8 string gotten from
- <methodname><link linkend="method-giofile--get-parse-name">gio.File.get_parse_name</link></methodname>().
- </para>
- <para>
- One way to think of a <link linkend="class-giofile"><classname>gio.File</classname></link> is as
- an abstraction of a pathname. For normal files the system pathname is what is stored internally,
- but as <link linkend="class-giofile"><classname>gio.File</classname></link>s are extensible it
- could also be something else that corresponds to a pathname in a userspace implementation of a filesystem.
- </para>
- <para>
- <link linkend="class-giofile"><classname>gio.File</classname></link>s make up hierarchies of
- directories and files that correspond to the files on a filesystem. You can move through the
- file system with GFile using
- <methodname><link linkend="method-giofile--get-parent">gio.File.get_parent</link></methodname>()
- to get an identifier for the parent directory,
- <methodname><link linkend="method-giofile--get-child">gio.File.get_child</link></methodname>()
- to get a child within a directory,
- <methodname><link linkend="method-giofile--resolve-relative-path">gio.File.resolve_relative_path</link></methodname>()
- to resolve a relative path between two <link linkend="class-giofile"><classname>gio.File</classname></link>s.
- There can be multiple hierarchies, so you may not end up at the same root if you repeatedly call
- <methodname><link linkend="method-giofile--get-parent">gio.File.get_parent</link></methodname>()
- on two different files.
- </para>
- <para>
- All <link linkend="class-giofile"><classname>gio.File</classname></link>s have a basename (get with
- <methodname><link linkend="method-giofile--get-basename">gio.File.get_basename</link></methodname>()
- ). These names are byte strings that are used to identify the file on the filesystem
- (relative to its parent directory) and there is no guarantees that they have any particular charset
- encoding or even make any sense at all. If you want to use filenames in a user interface you should
- use the display name that you can get by requesting the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
- <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>().
- This is guaranteed to be in utf8 and can be used in a user interface. But always store the real basename or the
- GFile to use to actually access the file, because there is no way to go from a display name to the actual name.
- </para>
- <para>
- Using <link linkend="class-giofile"><classname>gio.File</classname></link> as an identifier has the same
- weaknesses as using a path in that there may be multiple aliases for the same file. For instance,
- hard or soft links may cause two different <link linkend="class-giofile"><classname>gio.File</classname></link>s
- to refer to the same file. Other possible causes for aliases are: case insensitive filesystems, short and
- long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the same file
- you can query for the gio.FILE_ATTRIBUTE_ID_FILE attribute. Note that
- <link linkend="class-giofile"><classname>gio.File</classname></link> does some trivial canonicalization
- of pathnames passed in, so that trivial differences in the path string used at creation
- (duplicated slashes, slash at end of path, "." or ".." path segments, etc) does not create different
- <link linkend="class-giofile"><classname>gio.File</classname></link>s.
- </para>
- <para>
- Many <link linkend="class-giofile"><classname>gio.File</classname></link> operations have both synchronous
- and asynchronous versions to suit your application. Asynchronous versions of synchronous functions simply
- have _async() appended to their function names. The asynchronous I/O functions call a
- GAsyncReadyCallback which is then used to finalize the operation, producing a GAsyncResult
- which is then passed to the function's matching _finish() operation.
- </para>
- <para>
- Some <link linkend="class-giofile"><classname>gio.File</classname></link> operations do not have
- synchronous analogs, as they may take a very long time to finish, and blocking may leave an application
- unusable. Notable cases include:
- <methodname><link linkend="method-giofile--mount-mountable">gio.File.mount_mountable</link></methodname>()
- to mount a mountable file.
- <methodname><link linkend="method-giofile--unmount-mountable">gio.File.unmount_mountable</link></methodname>()
- to unmount a mountable file.
- <methodname><link linkend="method-giofile--eject-mountable">gio.File.eject_mountable</link></methodname>()
- to eject a mountable file.
- </para>
- <para>
- One notable feature of <link linkend="class-giofile"><classname>gio.File</classname></link>s are
- entity tags, or "etags" for short. Entity tags are somewhat like a more abstract
- version of the traditional mtime, and can be used to quickly determine if the file
- has been modified from the version on the file system. See the HTTP 1.1
- specification for HTTP Etag headers, which are a very similar concept.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giofile">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.File</methodname>
- <methodparam><parameter role="keyword">commandline</parameter></methodparam>
- <methodparam><parameter role="keyword">path</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">uri</parameter><initializer>None</initializer></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>commandline</parameter>&nbsp;:</term>
- <listitem><simpara>a command line string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>path</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing a relative or absolute path.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>uri</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing a URI.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giofile"><classname>gio.File</classname></link> either from a commandline,
- a path or an uri.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofile--append-to">
- <title>gio.File.append_to</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>append_to</methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>append_to</methodname>() method gets an output stream for
- appending data to the file. If the file doesn't already exist it is created.
- </para>
- <para>
- By default files created are generally readable by everyone, but if you pass
- gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
- current user, to the level that is supported on the target filesystem.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If
- the operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- Some file systems don't allow all file names, and may return an
- gio.ERROR_INVALID_FILENAME error. If the file is a directory the
- gio.ERROR_IS_DIRECTORY error will be returned. Other errors are possible too,
- and depend on what kind of filesystem the file is on.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--append-to-async">
- <title>gio.File.append_to_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>append_to_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>append_to_async</methodname>() method asynchronously opens file for appending.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--append-to">gio.File.append_to</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--append-to-finish">gio.File.append_to_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--append-to-finish">
- <title>gio.File.append_to_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>append_to_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a valid
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>append_to_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-giofile--append-to-async">gio.File.append_to_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--copy">
- <title>gio.File.copy</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>copy</methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>destination</parameter>&nbsp;:</term>
- <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>progress_callback</parameter>&nbsp;:</term>
- <listitem><simpara>function to callback with progress information.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to the progress callback function.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on success,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>copy</methodname>() method copies the file source to
- the location specified by destination. Can not handle recursive copies of directories.
- </para>
- <para>
- If the flag gio.FILE_COPY_OVERWRITE is specified an already existing
- destination file is overwritten.
- </para>
- <para>
- If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will
- be copied as symlinks, otherwise the target of the source symlink will be copied.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If progress_callback is not <literal>None</literal>, then the operation can be
- monitored by setting this to a GFileProgressCallback function. user_data
- will be passed to this function. It is guaranteed that this callback will be
- called after all data has been transferred with the total number of bytes
- copied during the operation.
- </para>
- <para>
- If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
- independent on the status of the destination.
- </para>
- <para>
- If gio.FILE_COPY_OVERWRITE is not specified and the target exists,
- then the error gio.ERROR_EXISTS is returned.
- </para>
- <para>
- If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error
- is returned. If trying to overwrite a directory with a directory the
- gio.ERROR_WOULD_MERGE error is returned.
- </para>
- <para>
- If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE
- is specified and the target is a file, then the gio.ERROR_WOULD_RECURSE error is returned.
- </para>
- <para>
- If you are interested in copying the
- <link linkend="class-giofile"><classname>gio.File</classname></link> object
- itself (not the on-disk file), see
- <methodname><link linkend="method-giofile--dup">gio.File.dup</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--copy-async">
- <title>gio.File.copy_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>append_to_async</methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">progress_callback</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">progress_callback_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>destination</parameter>&nbsp;:</term>
- <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>progress_callback</parameter>&nbsp;:</term>
- <listitem><simpara>function to callback with progress information.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>progress_callback_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to the progress callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>copy_async</methodname>() method copies the file source to
- the location specified by destination asynchronously. For details of the behaviour,
- see <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>().
- </para>
- <para>
- If progress_callback is not <literal>None</literal>, then that function that will
- be called just like in
- <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>(),
- however the callback will run in the main loop, not in the thread that is doing the I/O operation.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--copy-finish">gio.File.copy_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--copy-attributes">
- <title>gio.File.copy_attributes</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>copy_attributes</methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>destination</parameter>&nbsp;:</term>
- <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>
- to copy attributes to.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attributes were copied successfully,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>copy_attributes</methodname>() method copies the file attributes
- from source to destination.
- </para>
- <para>
- Normally only a subset of the file attributes are copied, those that are copies
- in a normal file copy operation (which for instance does not include e.g. owner).
- However if gio.FILE_COPY_ALL_METADATA is specified in flags, then all the metadata
- that is possible to copy is copied. This is useful when implementing move by copy + delete source.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--copy-finish">
- <title>gio.File.copy_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>copy_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on success,
- <literal>False</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>copy_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--copy-async">gio.File.copy_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--create">
- <title>gio.File.create</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>create</methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>create</methodname>() method creates a new file and returns
- an output stream for writing to it. The file must not already exist.
- </para>
- <para>
- By default files created are generally readable by everyone, but if you pass
- gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
- current user, to the level that is supported on the target filesystem.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If a file or directory with this name already exists the gio.ERROR_EXISTS
- error will be returned. Some file systems don't allow all file names, and
- may return an gio.ERROR_INVALID_FILENAME error, and if the name is to long
- gio.ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too,
- and depend on what kind of filesystem the file is on.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--create-async">
- <title>gio.File.create_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>create_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>create_async</methodname>() method asynchronously creates a new
- file and returns an output stream for writing to it. The file must not already exist.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--create">gio.File.create</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--create-finish">gio.File.create_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--create-finish">
- <title>gio.File.create_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>create_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>create_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--create-async">gio.File.create_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--delete">
- <title>gio.File.delete</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>delete</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the file was deleted,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>deleted</methodname>() method deletes a file. If the file is a
- directory, it will only be deleted if it is empty.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--dup">
- <title>gio.File.dup</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>dup</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new <link linkend="class-giofile"><classname>gio.File</classname></link>
- that is a duplicate of the given <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>dup</methodname>() method duplicates a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- handle. This operation does not duplicate the actual file or directory represented
- by the <link linkend="class-giofile"><classname>gio.File</classname></link>; see
- <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>()
- if attempting to copy a file.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--eject-mountable">
- <title>gio.File.eject_mountable</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject_mountable</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject_mountable</methodname>() method starts an asynchronous eject on a
- mountable. When this operation has completed, callback will be called with
- user_user data, and the operation can be finalized with
- <methodname><link linkend="method-giofile--eject-mountable-finish">gio.File.eject_mountable_finish</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--eject-mountable-finish">
- <title>gio.File.eject_mountable_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject_mountable_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the file was ejected successfully,
- <literal>False</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>create_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--create-async">gio.File.create_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--enumerate-children">
- <title>gio.File.enumerate_children</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>enumerate_children</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attributes</parameter>&nbsp;:</term>
- <listitem><simpara>an attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>enumerate_children</methodname>() method gets the requested information
- about the files in a directory. The result is a GFileEnumerator object that will give out
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link> objects
- for all the files in the directory.
- </para>
- <para>
- The attribute value is a string that specifies the file attributes that should be gathered.
- It is not an error if it's not possible to read a particular requested attribute from a file -
- it just won't be set. attribute should be a comma-separated list of attribute or attribute
- wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all
- attributes in the standard namespace. An example attribute query be "standard::*,owner::user".
- The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. If the file
- is not a directory, the gio.FILE_ERROR_NOTDIR error will be returned.
- Other errors are possible too.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--enumerate-children-async">
- <title>gio.File.enumerate_children_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>enumerate_children_async</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attributes</parameter>&nbsp;:</term>
- <listitem><simpara>an attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>enumerate_children_async</methodname>() method asynchronously gets the
- requested information about the files in a directory. The result is a
- <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- object that will give out <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- objects for all the files in the directory.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--enumerate-children">enumerate_children</link></methodname>()
- which is the synchronous version of this call.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--enumerate-children-finish">
- <title>gio.File.eject_mountable_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>enumerate_children_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- or <literal>None</literal> if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>enumerate_children_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--enumerate-children-async">gio.File.enumerate_children_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--equal">
- <title>gio.File.equal</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>equal</methodname>
- <methodparam><parameter role="keyword">file2</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">file2</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if file1 and file2 are equal.
- <literal>False</literal> if either is not a
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>equal</methodname>() method checks equality of two given
- <link linkend="class-giofile"><classname>gio.File</classname></link>s.
- Note that two <link linkend="class-giofile"><classname>gio.File</classname></link>s
- that differ can still refer to the same file on the filesystem due to various
- forms of filename aliasing.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--find-enclosing-mount">
- <title>gio.File.find_enclosing_mount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>enumerate_children</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>find_enclosing_mount</methodname>() method gets a
- <link linkend="class-giomount"><classname>gio.Mount</classname></link> for the
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </para>
- <para>
- If the interface for file does not have a mount (e.g. possibly a remote share),
- error will be set to gio.ERROR_NOT_FOUND and <literal>None</literal> will be returned.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--find-enclosing-mount-async">
- <title>gio.File.find_enclosing_mount_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>find_enclosing_mount_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>find_enclosing_mount_async</methodname>() method asynchronously
- gets the mount for the file.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--find-enclosing-mount">gio.File.find_enclosing_mount</link></methodname>()
- which is the synchronous version of this call.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--find-enclosing-mount-finish">
- <title>gio.File.find_enclosing_mount_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>find_enclosing_mount_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- or <literal>None</literal> if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>find_enclosing_mount_finish</methodname>() method finishes an asynchronous
- find mount started with
- <methodname><link linkend="method-giofile--find-enclosing-mount-async">gio.File.find_enclosing_mount_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-basename">
- <title>gio.File.get_basename</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_basename</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>string containing the
- <link linkend="class-giofile"><classname>gio.File</classname></link>'s
- base name, or <literal>None</literal> if given
- <link linkend="class-giofile"><classname>gio.File</classname></link> is invalid.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_basename</methodname>() method gets the base name
- (the last component of the path) for a given
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </para>
- <para>
- If called for the top level of a system (such as the filesystem root or
- a uri like sftp://host/) it will return a single directory separator
- (and on Windows, possibly a drive letter).
- </para>
- <para>
- The base name is a byte string (*not* UTF-8). It has no defined encoding
- or rules other than it may not contain zero bytes. If you want to use filenames
- in a user interface you should use the display name that you can get by requesting
- the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
- <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>().
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-child">
- <title>gio.File.get_child</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_child</methodname>
- <methodparam><parameter role="keyword">name</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">name</parameter>&nbsp;:</term>
- <listitem><simpara>string containing the child's basename.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- to a child specified by name.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_child</methodname>() method gets a child of file
- with basename equal to name.
- </para>
- <para>
- Note that the file with that specific name might not exist, but you can
- still have a <link linkend="class-giofile"><classname>gio.File</classname></link>
- that points to it. You can use this for instance to create that file.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-child-for-display-name">
- <title>gio.File.get_child_for_display_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_child_for_display_name</methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">display_name</parameter>&nbsp;:</term>
- <listitem><simpara>string to a possible child.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- to the specified child or <literal>None</literal>
- if the display name couldn't be converted.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_child_for_display_name</methodname>() method gets the
- child of file for a given display_name (i.e. a UTF8 version of the name).
- If this function fails, it returns NULL and error will be set. This is very
- useful when constructing a GFile for a new file and the user entered the filename
- in the user interface, for instance when you select a directory and type a filename
- in the file selector.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-parent">
- <title>gio.File.get_parent</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_parent</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- structure to the parent of the given
- <link linkend="class-giofile"><classname>gio.File</classname></link> or
- <literal>None</literal> if there is no parent.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_parent</methodname>() method gets the parent directory for the file.
- If the file represents the root directory of the file system, then <literal>None</literal>
- will be returned.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-parse-name">
- <title>gio.File.get_parse_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_parse_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the
- <link linkend="class-giofile"><classname>gio.File</classname></link>'s parse name.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_parse_name</methodname>() method gets the parse name
- of the file. A parse name is a UTF-8 string that describes the file such
- that one can get the <link linkend="class-giofile"><classname>gio.File</classname></link>
- back using
- <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>().
- </para>
- <para>
- This is generally used to show the <link linkend="class-giofile"><classname>gio.File</classname></link>
- as a nice full-pathname kind of string in a user interface, like in a location entry.
- </para>
- <para>
- For local files with names that can safely be converted to UTF8 the pathname is used,
- otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped).
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-path">
- <title>gio.File.get_path</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_path</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the
- <link linkend="class-giofile"><classname>gio.File</classname></link>'s path,
- or <literal>None</literal> if no such path exists.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_path</methodname>() method gets the local pathname for
- <link linkend="class-giofile"><classname>gio.File</classname></link>, if one exists.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-relative-path">
- <title>gio.File.get_relative_path</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_relative_path</methodname>
- <methodparam><parameter role="keyword">descendant</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">descendant</parameter>&nbsp;:</term>
- <listitem><simpara>input <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>string with the relative path from descendant to parent,
- or <literal>None</literal> if descendant doesn't have parent as prefix.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_relative_path</methodname>() method gets the path for
- descendant relative to parent.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-uri">
- <title>gio.File.get_uri</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_uri</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the
- <link linkend="class-giofile"><classname>gio.File</classname></link>'s URI.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_uri</methodname>() method gets the URI for the file.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--get-uri-scheme">
- <title>gio.File.get_uri_scheme</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_uri_scheme</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the URI scheme for the
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_uri_scheme</methodname>() method gets the URI scheme for a
- <link linkend="class-giofile"><classname>gio.File</classname></link>.
- RFC 3986 decodes the scheme as:
- </para>
-<programlisting>
-URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
-</programlisting>
- <para>
- Common schemes include "file", "http", "ftp", etc.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--has-prefix">
- <title>gio.File.has_prefix</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>has_prefix</methodname>
- <methodparam><parameter role="keyword">prefix</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">prefix</parameter>&nbsp;:</term>
- <listitem><simpara>input <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the files's parent, grandparent,
- etc is prefix. <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>has_prefix</methodname>() method checks whether file has the prefix
- specified by prefix. In other word, if the names of inital elements of files pathname
- match prefix. Only full pathname elements are matched, so a path like /foo is not
- considered a prefix of /foobar, only of /foo/bar.
- </para>
- <para>
- This call does no blocking i/o, as it works purely on names. As such it can sometimes
- return <literal>False</literal> even if file is inside a prefix (from a filesystem point
- of view), because the prefix of file is an alias of prefix.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--has-uri-scheme">
- <title>gio.File.has_uri_scheme</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>has_uri_scheme</methodname>
- <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">uri_scheme</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing a URI scheme.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if
- <link linkend="class-giofile"><classname>gio.File</classname></link>'s
- backend supports the given URI scheme, <literal>False</literal> if URI scheme
- is <literal>None</literal>, not supported, or
- <link linkend="class-giofile"><classname>gio.File</classname></link> is invalid.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>has_uri_scheme</methodname>() method checks to see if a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- has a given URI scheme.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--is-native">
- <title>gio.File.is_native</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_native</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if file is native.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>is_native</methodname>() method checks to see if a file
- is native to the platform.
- </para>
- <para>
- A native file s one expressed in the platform-native filename format, e.g.
- "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it
- might be on a locally mounted remote filesystem.
- </para>
- <para>
- On some systems non-native files may be available using the native filesystem
- via a userspace filesystem (FUSE), in these cases this call will return
- <literal>False</literal>, but
- <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()
- will still return a native path.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--load-contents">
- <title>gio.File.load_contents</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>load_contents</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a three tuple containing the contents of the file,
- the length of the contents of the file and the current entity tag for the file.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>load_contents</methodname>() method loads the content of the file into memory.
- The data is always zero-terminated, but this is not included in the resultant length.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--load-contents-async">
- <title>gio.File.load_contents_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>load_contents_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>load_contents_async</methodname>() method starts an asynchronous load of the file's contents.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--load-contents">gio.File.load_contents</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the load operation has completed, callback will be called with user data. To finish
- the operation, call
- <methodname><link linkend="method-giofile--load-contents-finish">gio.File.load_contents_finish</link></methodname>()
- with the GAsyncResult returned by the callback.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--load-contents-finish">
- <title>gio.File.load_contents_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>load_contents_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a three tuple containing the contents of the file,
- the length of the contents of the file and the current entity tag for the file.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>load_contents_finish</methodname>() method finishes an asynchronous
- find mount started with
- <methodname><link linkend="method-giofile--load-contents-async">gio.File.load_contents_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--make-directory">
- <title>gio.File.make_directory</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>make_directory</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on successful creation,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>make_directory</methodname>() method creates a directory.
- Note that this will only create a child directory of the immediate parent directory
- of the path or URI given by the <link linkend="class-giofile"><classname>gio.File</classname></link>.
- To recursively create directories, see
- <methodname><link linkend="method-giofile--make-directory-with-parents">gio.File.make_directory_with_parents</link></methodname>().
- This function will fail if the parent directory does not exist, setting error to
- gio.ERROR_NOT_FOUND. If the file system doesn't support creating directories, this
- function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
- </para>
- <para>
- For a local <link linkend="class-giofile"><classname>gio.File</classname></link> the newly
- created directory will have the default (current) ownership and permissions of the current process.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--make-directory-with-parents">
- <title>gio.File.make_directory_with_parents</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>make_directory_with_parents</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if all directories have been successfully created,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>make_directory_with_parents</methodname>() method creates a directory
- and any parent directories that may not exist similar to 'mkdir -p'. If the file system
- does not support creating directories, this function will fail, setting error to gio.ERROR_NOT_SUPPORTED.
- </para>
- <para>
- For a local <link linkend="class-giofile"><classname>gio.File</classname></link> the newly
- created directories will have the default (current) ownership and permissions of the current process.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--make-symbolic-link">
- <title>gio.File.make_symbolic_link</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>make_symbolic_link</methodname>
- <methodparam><parameter role="keyword">symlink_value</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>symlink_value</parameter>&nbsp;:</term>
- <listitem><simpara>a string with the value of the new symlink.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on the creation of a new symlink,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>make_symbolic_link</methodname>() method creates a symbolic link.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--monitor">
- <title>gio.File.monitor</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>monitor</methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>
- a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
- for the given file, or <literal>None</literal> on error
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>monitor</methodname>() method obtains a file or directory
- monitor for the given file, depending on the type of the file.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--monitor-directory">
- <title>gio.File.monitor_directory</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>monitor_directory</methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>
- a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
- for the given file, or <literal>None</literal> on error
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>monitor_directory</methodname>() method obtains a directory monitor
- for the given file. This may fail if directory monitoring is not supported.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--monitor-file">
- <title>gio.File.monitor_file</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>monitor_file</methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>
- a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
- for the given file, or <literal>None</literal> on error
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>monitor_file</methodname>() method obtains a file monitor for the
- given file. If no file notification mechanism exists, then regular polling
- of the file is used.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--mount-enclosing-volume">
- <title>gio.File.mount_enclosing_volume</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>mount_enclosing_volume</methodname>
- <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mount_operation</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- or <literal>None</literal> to avoid user interaction.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request
- is satisfied, or <literal>None</literal>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to the progress callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>mount_enclosing_volume</methodname>() method starts a mount_operation,
- mounting the volume that contains the file location.
- </para>
- <para>
- When this operation has completed, callback will be called with user_user data,
- and the operation can be finalized with
- <methodname><link linkend="method-giofile--mount-enclosing-volume-finish">gio.File.mount_enclosing_volume_finish</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--mount-enclosing-volume-finish">
- <title>gio.File.mount_enclosing_volume_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>mount_enclosing_volume_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if successful. If an error has occurred,
- this function will return <literal>False</literal> and set error appropriately if present.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>mount_enclosing_volume_finish</methodname>() method finishes an asynchronous
- find mount started with
- <methodname><link linkend="method-giofile--mount-enclosing-volume">gio.File.mount_enclosing_volume</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--mount-mountable">
- <title>gio.File.mount_mountable</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>mount_mountable</methodname>
- <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mount_operation</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- or <literal>None</literal> to avoid user interaction.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request
- is satisfied, or <literal>None</literal>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to the progress callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>mount_mountable</methodname>() method mounts a file of type
- gio.FILE_TYPE_MOUNTABLE. Using mount_operation, you can request callbacks when,
- for instance, passwords are needed during authentication.
- </para>
- <para>
- When this operation has completed, callback will be called with user_user data,
- and the operation can be finalized with
- <methodname><link linkend="method-giofile--mount-mountable-finish">gio.File.mount_mountable_finish</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--mount-mountable-finish">
- <title>gio.File.mount_mountable_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>mount_mountable_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>mount_mountable_finish</methodname>() method finishes an asynchronous
- find mount started with
- <methodname><link linkend="method-giofile--mount-mountable">gio.File.mount_mountable</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--move">
- <title>gio.File.move</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>copy</methodname>
- <methodparam><parameter role="keyword">destination</parameter></methodparam>
- <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>destination</parameter>&nbsp;:</term>
- <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>progress_callback</parameter>&nbsp;:</term>
- <listitem><simpara>function to callback with progress information.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to the progress callback function.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on success,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>move</methodname>() method tries to move the file or directory
- source to the location specified by destination. If native move operations are
- supported then this is used, otherwise a copy + delete fallback is used. The native
- implementation may support moving directories (for instance on moves inside the same
- filesystem), but the fallback code does not.
- </para>
- <para>
- If the flag gio.FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten.
- </para>
- <para>
- If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied
- as symlinks, otherwise the target of the source symlink will be copied.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If progress_callback is not <literal>None</literal>, then the operation can be monitored
- by setting this to a GFileProgressCallback function. progress_callback_data will be passed
- to this function. It is guaranteed that this callback will be called after all data has been
- transferred with the total number of bytes copied during the operation.
- </para>
- <para>
- If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
- independent on the status of the destination.
- </para>
- <para>
- If gio.FILE_COPY_OVERWRITE is not specified and the target exists, then the error
- gio.ERROR_EXISTS is returned.
- </para>
- <para>
- If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error is returned.
- If trying to overwrite a directory with a directory the gio.ERROR_WOULD_MERGE error is returned.
- </para>
- <para>
- If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE is specified
- and the target is a file, then the gio.ERROR_WOULD_RECURSE error may be returned
- (if the native move operation isn't available).
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-default-handler">
- <title>gio.File.query_default_handler</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_default_handler</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
- if the handle was found, <literal>None</literal> if there were errors.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_default_handler</methodname>() method returns the
- <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> that
- is registered as the default application to handle the file specified by file.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be
- cancelled by triggering the cancellable object from another thread. If the
- operation was cancelled, the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-exists">
- <title>gio.File.query_exists</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_exists</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the file exists (and can be detected
- without error), <literal>False</literal> otherwise (or if cancelled).
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_exists</methodname>() method is an tility function to check
- if a particular file exists. This is implemented using
- <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
- and as such does blocking I/O.
- </para>
- <para>
- Note that in many cases it is racy to first check for file existence and then execute
- something based on the outcome of that, because the file might have been created or
- removed in between the operations. The general approach to handling that is to not check,
- but just do the operation and handle the errors as they come.
- </para>
- <para>
- As an example of race-free checking, take the case of reading a file, and if it doesn't
- exist, creating it. There are two racy versions: read it, and on error create it; and:
- check if it exists, if not create it. These can both result in two processes creating the
- file (with perhaps a partially written file as the result). The correct approach is to
- always try to create the file with
- <methodname><link linkend="method-giofile--create">gio.File.create</link></methodname>()
- which will either atomically create the file or fail with a gio.ERROR_EXISTS error.
- </para>
- <para>
- However, in many cases an existence check is useful in a user interface, for instance
- to make a menu item sensitive/insensitive, so that you don't have to fool users that
- something is possible and then just show and error dialog. If you do this, you should
- make sure to also handle the errors that can happen due to races when you execute the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-file-type">
- <title>gio.File.query_file_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_file_type</methodname>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>
- a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>
- <xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_file_type</methodname>() method it's an utility function to inspect
- the <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- of a file. This is implemented using
- <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
- and as such does blocking I/O.
- </para>
- <para>
- The primary use case of this method is to check if a file is a regular file, directory, or symlink.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-filesystem-info">
- <title>gio.File.query_filesystem_info</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_filesystem_info</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attributes</parameter>&nbsp;:</term>
- <listitem><simpara>an attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- or <literal>None</literal> if there was an error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_filesystem_info</methodname>() method it's similar to
- <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>(),
- but obtains information about the filesystem the file is on, rather than the
- file itself. For instance the amount of space available and the type of the filesystem.
- </para>
- <para>
- The attribute value is a string that specifies the file attributes that should be gathered.
- It is not an error if it's not possible to read a particular requested attribute from a file -
- it just won't be set. attribute should be a comma-separated list of attribute or attribute
- wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes
- in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes
- of interest are gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes),
- gio.FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE
- (type of the filesystem).
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. Other errors
- are possible too, and depend on what kind of filesystem the file is on.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-filesystem-info-async">
- <title>gio.File.query_filesystem_info_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_filesystem_info_async</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attributes</parameter>&nbsp;:</term>
- <listitem><simpara>an attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_filesystem_info_async</methodname>() method asynchronously
- gets the requested information about the filesystem that the specified file is on.
- The result is a GFileInfo object that contains key-value attributes
- (such as type or size for the file).
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--query-filesystem-info-finish">gio.File.query_filesystem_info_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-filesystem-info-finish">
- <title>gio.File.query_filesystem_info_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_filesystem_info_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- or <literal>None</literal> if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_filesystem_info_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--query-filesystem-info-async">gio.File.query_filesystem_info_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-info">
- <title>gio.File.query_filesystem_info</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attributes</parameter>&nbsp;:</term>
- <listitem><simpara>an attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>
- a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- for the given file or <literal>None</literal> if there was an error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info</methodname>() method gets the requested
- information about specified file. The result is a
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- object that contains key-value attributes (such as the type or size of the file).
- </para>
- <para>
- The attribute value is a string that specifies the file attributes that should
- be gathered. It is not an error if it's not possible to read a particular
- requested attribute from a file - it just won't be set. attribute should be
- a comma-separated list of attribute or attribute wildcards. The wildcard "*"
- means all attributes, and a wildcard like "standard::*" means all attributes
- in the standard namespace. An example attribute query be "standard::*,owner::user".
- The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- For symlinks, normally the information about the target of the symlink is returned,
- rather than information about the symlink itself. However if you pass
- gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about
- the symlink itself will be returned. Also, for symlinks that point to non-existing
- files the information about the symlink itself will be returned.
- </para>
- <para>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be
- returned. Other errors are possible too, and depend on what kind of
- filesystem the file is on.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-info-async">
- <title>gio.File.query_info_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info_async</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attributes</parameter>&nbsp;:</term>
- <listitem><simpara>an attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>
- a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info_async</methodname>() method asynchronously gets the
- requested information about specified file. The result is a
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- object that contains key-value attributes (such as type or size for the file).
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--query-info">query_info</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--query-info-finish">gio.File.query_info_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-info-finish">
- <title>gio.File.query_info_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- for the given file or <literal>None</literal> if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--query-info-async">gio.File.query_info_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-settable-attributes">
- <title>gio.File.query_settable_attributes</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_settable_attributes</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of
- <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
- describing the settable attributes.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_settable_attributes</methodname>() method obtain the
- list of settable attributes for the file.
- </para>
- <para>
- Returns the type and full attribute name of all the attributes that can be
- set on this file. This doesn't mean setting it will always succeed though,
- you might get an access failure, or some specific file may not support a specific attribute.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--query-writable-namespace">
- <title>gio.File.query_writable_namespace</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_writable_namespace</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of
- <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
- describing the writable namespaces.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_writable_namespace</methodname>() method obtain the
- list of attribute namespaces where new attributes can be created by a user.
- An example of this is extended attributes (in the "xattr" namespace).
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--read">
- <title>gio.File.read</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read</methodname>() method opens a file for reading. The result
- is a <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- that can be used to read the contents of the file.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.
- If the file is a directory, the gio.ERROR_IS_DIRECTORY error will be returned.
- Other errors are possible too, and depend on what kind of filesystem the file is on.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--read-async">
- <title>gio.File.read_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_async</methodname>() method asynchronously opens file for reading.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--read">read</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--read-finish">gio.File.read_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--read-finish">
- <title>gio.File.read_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- file or <literal>None</literal> if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--read-async">gio.File.read_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--replace">
- <title>gio.File.replace</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>replace</methodname>
- <methodparam><parameter role="keyword">etag</parameter></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>etag</parameter>&nbsp;:</term>
- <listitem><simpara>an optional entity tag for the current
- <link linkend="class-giofile"><classname>gio.File</classname></link>,
- or <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>make_backup</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if a backup should be created.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>replace</methodname>() method returns an output stream for
- overwriting the file, possibly creating a backup copy of the file first.
- If the file doesn't exist, it will be created.
- </para>
- <para>
- This will try to replace the file in the safest way possible so that any
- errors during the writing will not affect an already existing copy of the file.
- For instance, for local files it may write to a temporary file and then atomically
- rename over the destination when the stream is closed.
- </para>
- <para>
- By default files created are generally readable by everyone, but if you pass
- gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to
- the current user, to the level that is supported on the target filesystem.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- If you pass in a non-<literal>None</literal> etag value, then this value is compared
- to the current entity tag of the file, and if they differ an gio.ERROR_WRONG_ETAG error
- is returned. This generally means that the file has been changed since you last read it.
- You can get the new etag from
- <methodname><link linkend="method-giofileoutputstream--get-etag">gio.FileOutputStream.get_etag</link></methodname>()
- after you've finished writing and closed the GFileOutputStream. When you load a new file you can use
- <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>()
- to get the etag of the file.
- </para>
- <para>
- If make_backup is <literal>True</literal>, this function will attempt to make a backup
- of the current file before overwriting it. If this fails a gio.ERROR_CANT_CREATE_BACKUP
- error will be returned. If you want to replace anyway, try again
- with make_backup set to <literal>False</literal>.
- </para>
- <para>
- If the file is a directory the gio.ERROR_IS_DIRECTORY error will be returned, and
- if the file is some other form of non-regular file then a gio.ERROR_NOT_REGULAR_FILE
- error will be returned. Some file systems don't allow all file names, and may return an
- gio.ERROR_INVALID_FILENAME error, and if the name is to long gio.ERROR_FILENAME_TOO_LONG
- will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--replace-async">
- <title>gio.File.replace_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>replace_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>etag</parameter>&nbsp;:</term>
- <listitem><simpara>an optional entity tag for the current
- <link linkend="class-giofile"><classname>gio.File</classname></link>,
- or <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>make_backup</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if a backup should be created.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>replace_async</methodname>() method asynchronously overwrites the file,
- replacing the contents, possibly creating a backup copy of the file first.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--replace">replace</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--replace-finish">gio.File.replace_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--replace-contents">
- <title>gio.File.replace_contents</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>replace_contents</methodname>
- <methodparam><parameter role="keyword">contents</parameter></methodparam>
- <methodparam><parameter role="keyword">etag</parameter></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>contents</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the new contents for file.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>etag</parameter>&nbsp;:</term>
- <listitem><simpara>the old entity tag for the document
- or <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>make_backup</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if a backup should be created.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the new entity tag for the document.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>replace_contents</methodname>() method replaces the contents
- of file with contents of length bytes. If etag is specified (not NULL) any existing
- file must have that etag, or the error gio.ERROR_WRONG_ETAG will be returned.
- </para>
- <para>
- If make_backup is <literal>True</literal>, this function will attempt to make a backup of file.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- The returned etag can be used to verify that the file hasn't changed the next time it is saved over.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--replace-contents-async">
- <title>gio.File.replace_contents_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>replace_contents_async</methodname>
- <methodparam><parameter role="keyword">contents</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>contents</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the new contents for file.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>etag</parameter>&nbsp;:</term>
- <listitem><simpara>an optional entity tag for the current
- <link linkend="class-giofile"><classname>gio.File</classname></link>,
- or <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>make_backup</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if a backup should be created.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>replace_contents_async</methodname>() method starts an asynchronous
- replacement of file with the given contents of length bytes. etag will
- replace the document's current entity tag.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--replace-contents">replace_contents</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--replace-contents-finish">gio.File.replace_contents_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--replace-contents-finish">
- <title>gio.File.replace_contents_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>replace_contents_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the new entity tag for the document.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>replace_contents_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--replace-contents-async">gio.File.replace_contents_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--replace-finish">
- <title>gio.File.replace_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>replace_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- or <literal>None</literal> if an error occurred.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>replace_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--replace-async">gio.File.replace_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--resolve-relative-path">
- <title>gio.File.resolve_relative_path</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>resolve_relative_path</methodname>
- <methodparam><parameter role="keyword">relative_path</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">relative_path</parameter>&nbsp;:</term>
- <listitem><simpara>a given relative path string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
- to the resolved path. <literal>None</literal> if relative_path is <literal>None</literal>
- or if file is invalid.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>resolve_relative_path</methodname>() method resolves a
- relative path for file to an absolute path.
- </para>
- <para>
- This call does no blocking i/o.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute">
- <title>gio.File.set_attribute</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- <methodparam><parameter role="keyword">value_p</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>the type of the attribute .
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value_p</parameter>&nbsp;:</term>
- <listitem><simpara>the value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute</methodname>() method sets an attribute in
- the file with attribute name attribute to value.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute-byte-string">
- <title>gio.File.set_attribute_byte_string</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute_byte_string</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's new value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute_byte_string</methodname>() method Sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING to value. If attribute is of a different type,
- this operation will fail, returning <literal>False</literal>.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute-int32">
- <title>gio.File.set_attribute_int32</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute_int32</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter>&nbsp;:</term>
- <listitem><simpara>an int containing the attribute's new value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute_int32</methodname>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_INT32 to value. If attribute is of a different type,
- this operation will fail.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute-int64">
- <title>gio.File.set_attribute_int64</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute_int64</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter>&nbsp;:</term>
- <listitem><simpara>a long containing the attribute's new value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute_int64</methodname>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_INT64 to value. If attribute is of a different type,
- this operation will fail.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute-string">
- <title>gio.File.set_attribute_string</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute_string</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's new value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute_string</methodname>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type,
- this operation will fail.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute-uint32">
- <title>gio.File.set_attribute_uint32</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute_uint32</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter>&nbsp;:</term>
- <listitem><simpara>an int containing the attribute's new value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute_uint32</methodname>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_UINT32 to value. If attribute is of a different type,
- this operation will fail.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attribute-uint64">
- <title>gio.File.set_attribute_uint64</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attribute_uint64</methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">value</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>attribute</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing the attribute's name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter>&nbsp;:</term>
- <listitem><simpara>a long containing the attribute's new value.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attribute was set,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attribute_uint64</methodname>() method sets attribute of type
- gio.FILE_ATTRIBUTE_TYPE_UINT64 to value. If attribute is of a different type,
- this operation will fail.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
- the cancellable object from another thread. If the operation was cancelled, the error
- gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attributes-async">
- <title>gio.File.set_attributes_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attributes_async</methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>info</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attributes_async</methodname>() method asynchronously
- sets the attributes of file with info.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--set-attributes-from-info">set_attributes_from_info</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--set-attributes-finish">gio.File.set_attributes_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attributes-finish">
- <title>gio.File.set_attributes_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attributes_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attributes were set correctly,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attributes_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--set-attributes-async">gio.File.set_attributes_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-attributes-from-info">
- <title>gio.File.set_attributes_from_info</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_attributes_from_info</methodname>
- <methodparam><parameter role="keyword">info</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>info</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the attributes were set correctly,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_attributes_from_info</methodname>() method tries to set
- all attributes in the GFileInfo on the target values, not stopping on the first error.
- </para>
- If there is any error during this operation then error will be set to the
- first error. Error on particular fields are flagged by setting the "status"
- field in the attribute value to gio.FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
- which means you can also detect further errors.
- <para>
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-display-name">
- <title>gio.File.set_display_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_display_name</methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>display_name</parameter>&nbsp;:</term>
- <listitem><simpara>a string conaining the name to display.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
- specifying what file was renamed to, or <literal>None</literal> if there was an error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_display_name</methodname>() method renames file to
- the specified display name.
- </para>
- <para>
- The display name is converted from UTF8 to the correct encoding for the
- target filesystem if possible and the file is renamed to this.
- </para>
- <para>
- If you want to implement a rename operation in the user interface the
- edit name (gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
- initial value in the rename widget, and then the result after editing
- should be passed to
- <methodname><link linkend="method-giofile--set-display-name">gio.File.set_dispay_name</link></methodname>().
- </para>
- <para>
- On success the resulting converted filename is returned.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-display-name-async">
- <title>gio.File.set_display_name_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_display_name_async</methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>display_name</parameter>&nbsp;:</term>
- <listitem><simpara>a string conaining the name to display.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_display_name_async</methodname>() method asynchronously
- sets the display name for a given GFile.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-giofile--set-display-name">set_display_name</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--set-display-name-finish">gio.File.set_display_name_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--set-display-name-finish">
- <title>gio.File.set_display_name_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_display_name_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_display_name_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--set-display-name-async">gio.File.set_display_name_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--trash">
- <title>gio.File.trash</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>trash</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on successful trash, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>trash</methodname>() method sends file to the "Trashcan", if possible.
- This is similar to deleting it, but the user can recover it before emptying the trashcan.
- Not all file systems support trashing, so this call can return the gio.ERROR_NOT_SUPPORTED error.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--unmount-mountable">
- <title>gio.File.unmount_mountable</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>unmount_mountable</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>unmount_mountable</methodname>() method unmounts a file of type gio.FILE_TYPE_MOUNTABLE.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giofile--unmount-mountable-finish">gio.File.unmount_mountable_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofile--unmount-mountable-finish">
- <title>gio.File.unmount_mountable_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>unmount_mountable_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the operation finished successfully,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>unmount_mountable_finish</methodname>() method finishes an asynchronous
- copy operation started with
- <methodname><link linkend="method-giofile--unmount-mountable">gio.File.unmount_mountable</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--file-parse-name">
- <title>gio.file_parse_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>file_parse_name</methodname>
- <methodparam><parameter role="keyword">parse_name</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>parse_name</parameter>&nbsp;:</term>
- <listitem><simpara>a file name or path to be parsed.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>parse_name</methodname>() function constructs a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- with the given parse_name (i.e. something given by g_file_get_parse_name()).
- This operation never fails, but the returned object might not support any I/O
- operation if the parse_name cannot be parsed.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-fileattributeinfo.xml b/docs/reference/pygio-fileattributeinfo.xml
deleted file mode 100644
index 4b72c27..0000000
--- a/docs/reference/pygio-fileattributeinfo.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofileattributeinfo">
- <refnamediv>
- <refname>gio.FileAttributeInfo</refname>
- <refpurpose>Information about a specific attribute.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileAttributeInfo</classname></ooclass>
- <ooclass><classname>__builtin__.object</classname></ooclass>
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- __builtin__.object
- +-- <link linkend="class-giofileattributeinfo">gio.FileAttributeInfo</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
- contains information about a specific attribute.
- </para>
- </refsect1>
-
- <refsect1 id="attributes-giofileattributeinfo">
- <title>gio.FileAttributeInfo Attributes</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"name"</entry>
- <entry>Read</entry>
- <entry>The name of the attribute.</entry>
- </row>
- <row valign="top">
- <entry>"type"</entry>
- <entry>Read</entry>
- <entry>the
- <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
- type of the attribute.</entry>
- </row>
- <row valign="top">
- <entry>"flags"</entry>
- <entry>Read</entry>
- <entry>a set of
- <xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-fileenumerator.xml b/docs/reference/pygio-fileenumerator.xml
deleted file mode 100644
index 4b16bf6..0000000
--- a/docs/reference/pygio-fileenumerator.xml
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofileenumerator">
- <refnamediv>
- <refname>gio.FileEnumerator</refname>
- <refpurpose>Enumerated Files Routines.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileEnumerator</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--close">close</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--close-async">close_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--close-finish">close_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--get-container">get_container</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--has-pending">has_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--is-closed">is_closed</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--next-file">next_file</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--next-files-async">next_files_async</link></methodname>
- <methodparam><parameter role="keyword">num_files</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--next-files-finish">next_files_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileenumerator--set-pending">set_pending</link></methodname>
- <methodparam><parameter role="keyword">pending</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giofileenumerator">gio.FileEnumerator</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giofileenumerator">
- <title>gio.FileEnumerator Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"container"</entry>
- <entry>Write - Construct only</entry>
- <entry>The container that is being enumerated.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- allows you to operate on a set of
- <link linkend="class-giofile"><classname>gio.File</classname></link>s
- returning a
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- structure for each file enumerated (e.g.
- <methodname><link linkend="method-giofile--enumerate-children">gio.File.enumerate_children</link></methodname>()
- will return a The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- for each of the children within a directory).
- </para>
- <para>
- To get the next file's information from a
- The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link> use
- <methodname><link linkend="method-giofileenumerator--next-file">gio.FileEnumerator.next_file</link></methodname>()
- or its asynchronous version,
- <methodname><link linkend="method-giofileenumerator--next-files-async">gio.FileEnumerator.next_files_async</link></methodname>().
- Note that the asynchronous version will return a list of
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>s,
- whereas the synchronous will only return the next file in the enumerator.
- </para>
- <para>
- To close a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- use <methodname><link linkend="method-giofileenumerator--close">close</link></methodname>,
- or its asynchronous version,
- <methodname><link linkend="method-giofileenumerator--close-async">close_async</link></methodname>.
- Once a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
- is closed, no further actions may be performed on it.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofileenumerator--close">
- <title>gio.FileEnumerator.close</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>close</methodname>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on success or
- <literal>False</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>close</methodname>() method releases all resources used by this
- enumerator, making the
- <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
- return gio.ERROR_CLOSED on all calls.
- </para>
- <para>
- This will be automatically called when the last reference is dropped,
- but you might want to call this function to make sure resources are released
- as early as possible.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--close-async">
- <title>gio.FileEnumerator.close_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>close_async</methodname>
- <methodparam>
- <parameter role="keyword">callback</parameter>
- </methodparam>
- <methodparam>
- <parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>The
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref> of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>close_async</methodname>() method asynchronously closes the file enumerator.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned in
- <methodname><link linkend="method-giofileenumerator--close-finish">gio.FileEnumerator.close_finish</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--close-finish">
- <title>gio.FileEnumerator.close_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>close_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncResult.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the close operation
- has finished successfully.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>close_finish</methodname>() method finishes closing a file enumerator, started from
- <methodname><link linkend="method-giofileenumerator--close-async">gio.FileEnumerator.close_async</link></methodname>().
- </para>
- <para>
- If the file enumerator was already closed when
- <methodname><link linkend="method-giofileenumerator--close-async">gio.FileEnumerator.close_async</link></methodname>()
- was called, then this function will report gio.ERROR_CLOSED in error, and return <literal>False</literal>.
- If the file enumerator had pending operation when the close operation was started, then this function will report
- gio.ERROR_PENDING, and return <literal>False</literal>. If cancellable was not <literal>None</literal>, then the operation
- may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be set, and <literal>False</literal> will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--get-container">
- <title>gio.FileEnumerator.get_container</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_container</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the <link linkend="class-giofile"><classname>gio.File</classname></link>
- which is being enumerated. </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_container</methodname>() method gets the
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- container which is being enumerated.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--has-pending">
- <title>gio.FileEnumerator.has_pending</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>has_pending</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the enumerator has pending operations.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>has_pending</methodname>() method checks if the file enumerator has pending operations.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--is-closed">
- <title>gio.FileEnumerator.is_closed</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_closed</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the enumerator is closed.</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>is_closed</methodname>() method checks if the file enumerator has been closed.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--next-file">
- <title>gio.FileEnumerator.next_file</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>next_file</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- or <literal>None</literal> on error or end of enumerator.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>next_file</methodname>() method returns information for the next
- file in the enumerated object. Will block until the information is available.
- The <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- returned from this function will contain attributes that match the attribute string
- that was passed when the GFileEnumerator was created.
- </para>
- <para>
- On error, returns <literal>None</literal> and sets error to the error. If the enumerator
- is at the end, <literal>None</literal> will be returned and error will be unset.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--next-files-async">
- <title>gio.FileEnumerator.next_files_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>next_files_async</methodname>
- <methodparam><parameter role="keyword">num_files</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam>
- <parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">num_files</parameter>&nbsp;:</term>
- <listitem><simpara>The number of file info objects to request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>The
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref> of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>next_files_async</methodname>() method requests information for a number
- of files from the enumerator asynchronously. When all i/o for the operation is finished
- the callback will be called with the requested information.
- </para>
- <para>
- The callback can be called with less than num_files files in case of error or at the
- end of the enumerator. In case of a partial error the callback will be called with any
- succeeding items and no error, and on the next request the error will be reported. If a
- request is cancelled the callback will be called with gio.ERROR_CANCELLED.
- </para>
- <para>
- During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors.
- </para>
- <para>
- Any outstanding i/o request with higher priority (lower numerical value) will be executed
- before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--next-files-finish">
- <title>gio.FileEnumerator.next_files_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>next_files_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncResult.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list of
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>s.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>next_files_finish</methodname>() method finishes the
- asynchronous operation started with
- <methodname><link linkend="method-giofileenumerator--next-files-async">gio.FileEnumerator.next_files_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileenumerator--set-pending">
- <title>gio.FileEnumerator.set_pending</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_pending</methodname>
- <methodparam><parameter role="keyword">pending</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">pending</parameter>&nbsp;:</term>
- <listitem><simpara>A boolean value.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>push_current</methodname>() method sets the file enumerator as having pending operations.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-fileicon.xml b/docs/reference/pygio-fileicon.xml
deleted file mode 100644
index d4a443b..0000000
--- a/docs/reference/pygio-fileicon.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofileicon">
- <refnamediv>
- <refname>gio.FileIcon</refname>
- <refpurpose>Icons pointing to an image file.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileIcon</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
- <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
- <ooclass><classname><link linkend="class-gioloadableicon">gio.LoadableIcon</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giofileicon">gio.FileIcon</link></methodname>
- <methodparam><parameter role="keyword">file</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileicon--get-file">get_file</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giofileicon">gio.FileIcon</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
- specifies an icon by pointing to an image file to be used as icon.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giofileicon">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.FileIcon</methodname>
- <methodparam><parameter role="keyword">file</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>file</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
- for the given file, or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new icon for a file.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofileicon--get-file">
- <title>gio.FileIcon.get_file</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_file</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- or <literal>None</literal>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_file</methodname>() method gets the
- <link linkend="class-giofile"><classname>gio.File</classname></link>
- associated with the given icon.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-fileinfo.xml b/docs/reference/pygio-fileinfo.xml
deleted file mode 100644
index 33eeae7..0000000
--- a/docs/reference/pygio-fileinfo.xml
+++ /dev/null
@@ -1,346 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofileinfo">
- <refnamediv>
- <refname>gio.FileInfo</refname>
- <refpurpose>File Information and Attributes</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileInfo</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giofileinfo">gio.FileInfo</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--clear-status">clear_status</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--copy-into">copy_into</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--dup">dup</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-as-string">get_attribute_as_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-boolean">get_attribute_boolean</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-byte-string">get_attribute_byte_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-data">get_attribute_data</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-int32">get_attribute_int32</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-int64">get_attribute_int64</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-object">get_attribute_object</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-status">get_attribute_status</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-string">get_attribute_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-type">get_attribute_type</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-uint32">get_attribute_uint32</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-attribute-uint64">get_attribute_uint64</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-content-type">get_content_type</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-display-name">get_display_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-edit-name">get_edit_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-etag">get_etag</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-file-type">get_file_type</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-is-backup">get_is_backup</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-is-hidden">get_is_hidden</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-is-symlink">get_is_symlink</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-modification-time">get_modification_time</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-name">get_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-size">get_size</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-sort-order">get_sort_order</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--get-symlink-target">get_symlink_target</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--has-attribute">has_attribute</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--list-attributes">list_attributes</link></methodname>
- <methodparam><parameter role="keyword">name_space</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--remove-attribute">remove_attribute</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute">set_attribute</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- <methodparam><parameter role="keyword">value_p</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-boolean">set_attribute_boolean</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-byte-string">set_attribute_byte_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-data">set_attribute_data</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-int32">set_attribute_int32</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-int64">set_attribute_int64</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-int64">set_attribute_mask</link></methodname>
- <methodparam><parameter role="keyword">mask</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-object">set_attribute_object</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-status">set_attribute_status</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-string">set_attribute_string</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-uint32">set_attribute_uint32</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-attribute-uint64">set_attribute_uint64</link></methodname>
- <methodparam><parameter role="keyword">attribute</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-content-type">set_content_type</link></methodname>
- <methodparam><parameter role="keyword">content_type</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-display-name">set_display_name</link></methodname>
- <methodparam><parameter role="keyword">display_name</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-edit-name">set_edit_name</link></methodname>
- <methodparam><parameter role="keyword">edit_name</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-file-type">set_file_type</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-icon">set_icon</link></methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-is-hidden">set_is_hidden</link></methodname>
- <methodparam><parameter role="keyword">is_hidden</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-is-symlink">set_is_symlink</link></methodname>
- <methodparam><parameter role="keyword">is_symlink</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-modification-time">set_modification_time</link></methodname>
- <methodparam><parameter role="keyword">mtime</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-name">set_name</link></methodname>
- <methodparam><parameter role="keyword">name</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-size">set_size</link></methodname>
- <methodparam><parameter role="keyword">size</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-sort-order">set_sort_order</link></methodname>
- <methodparam><parameter role="keyword">sort_order</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--set-symlink-tarset">set_symlink_tarset</link></methodname>
- <methodparam><parameter role="keyword">symlink_target</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinfo--unset-attribute-mask">unset_attribute_mask</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giofileinfo">gio.FileInfo</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- Functionality for manipulating basic metadata for files.
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- implements methods for getting information that all files should contain,
- and allows for manipulation of extended attributes.
- </para>
- <para>
- See <link linkend="class-giofileattribute"><classname>gio.FileAttribute</classname></link>
- for more information on how GIO handles file attributes.
- </para>
- <para>
- To obtain a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- for a <link linkend="class-giofile"><classname>gio.File</classname></link>, use
- <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
- (or its async variant). To obtain a
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- for a file input or output stream, use
- <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>() or
- <methodname><link linkend="method-giofileoutputstream--query-info">gio.FileOutputStream.query_info</link></methodname>()
- (or their async variants).
- </para>
- <para>
- To change the actual attributes of a file, you should then set the attribute in the
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link> and call
- <methodname><link linkend="method-giofile--set-attributes-from-info">gio.File.set_attributes_from_info</link></methodname>() or
- <methodname><link linkend="method-giofile--set-attributes-async">gio.File.set_attributes_async</link></methodname>()
- on a <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </para>
- <para>
- However, not all attributes can be changed in the file. For instance, the
- actual size of a file cannot be changed via
- <methodname><link linkend="method-giofileinfo--set-size">gio.FileInfo.set_size</link></methodname>(). You may call
- <methodname><link linkend="method-giofile--query-settable-attributes">gio.File.query_settable_attributes</link></methodname>() and
- <methodname><link linkend="method-giofile--query-writable-namespace">gio.File.query_writable_namespace</link></methodname>()
- to discover the settable attributes of a particular file at runtime.
- </para>
- <para>
- <link linkend="class-giofileattributematcher"><classname>gio.FileAttributeMatcher</classname></link>
- allows for searching through a GFileInfo for attributes.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giofileinfo">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.FileInfo</methodname>
- <methodparam></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
- <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-fileinputstream.xml b/docs/reference/pygio-fileinputstream.xml
deleted file mode 100644
index 723dc64..0000000
--- a/docs/reference/pygio-fileinputstream.xml
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofileinputstream">
- <refnamediv>
- <refname>gio.FileInputStream</refname>
- <refpurpose>Base class for implementing streaming input</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileInputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinputstream--query-info">query_info</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinputstream--query-info-async">query_info_async</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileinputstream--query-info-finish">query_info_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
- +-- <link linkend="class-giofileinputstream">gio.FileInputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interfaces</title>
- <para>
- <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- implements
- <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- provides input streams that take their content from a file.
- </para>
- <para>
- <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- implements <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>,
- which allows the input stream to jump to arbitrary positions in the file, provided the filesystem
- of the file allows it. In addition to the generic g_seekable_ API,
- <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
- has its own API for seeking and positioning. To find the position of a file input stream, use
- <methodname><link linkend="method-gioseekable--tell">gio.Seekable.tell</link></methodname>().
- To find out if a file input stream supports seeking, use
- <methodname><link linkend="method-gioseekable--can_seek">gio.Seekable.can_seek</link></methodname>().
- To position a file input stream, use
- <methodname><link linkend="method-gioseekable--seek">gio.Seekable.seek</link></methodname>().
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofileinputstream--query-info">
- <title>gio.FileInputStream.query_info</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
- <listitem><simpara>a file attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info</methodname>() method queries a file input stream
- the given attributes. This function blocks while querying the stream.
- For the asynchronous (non-blocking) version of this function, see
- <methodname><link linkend="method-giofileinputstream--query-info-async">gio.FileInputStream.query_info_async</link></methodname>().
- While the stream is blocked, the stream will set the pending flag internally,
- and any other operations on the stream will fail with gio.ERROR_PENDING.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileinputstream--query-info-async">
- <title>gio.FileInputStream.query_info_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info_async</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
- <listitem><simpara>a file attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info_async</methodname>() method queries the stream
- information asynchronously. When the operation is finished callback will be
- called. You can then call
- <methodname><link linkend="method-giofileinputstream--query-info-finish">gio.FileInputStream.query_info_finish</link></methodname>()
- to get the result of the operation.
- </para>
- <para>
- For the synchronous version of this function, see
- <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileinputstream--query-info-finish">
- <title>gio.FileInputStream.query_info_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-giofileinputstream--query-info-async">gio.FileInputStream.query_info_async</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-filemonitor.xml b/docs/reference/pygio-filemonitor.xml
deleted file mode 100644
index ef9ca33..0000000
--- a/docs/reference/pygio-filemonitor.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofilemonitor">
- <refnamediv>
- <refname>gio.FileMonitor</refname>
- <refpurpose>File Monitor</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileMonitor</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilemonitor--cancel">cancel</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilemonitor--emit-event">emit_event</link></methodname>
- <methodparam><parameter role="keyword">child</parameter></methodparam>
- <methodparam><parameter role="keyword">other_file</parameter></methodparam>
- <methodparam><parameter role="keyword">event_type</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilemonitor--is-cancelled">is_cancelled</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilemonitor--set-rate-limit">set_rate_limit</link></methodname>
- <methodparam><parameter role="keyword">limit_msecs</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giofilemonitor">gio.FileMonitor</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giofilemonitor">
- <title>gio.FileMonitor Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"cancelled"</entry>
- <entry>Read</entry>
- <entry>
- Whether the monitor has been cancelled. Default value: <literal>False</literal>.
- </entry>
- </row>
- <row valign="top">
- <entry>"rate-limit"</entry>
- <entry>Read/Write</entry>
- <entry>
- The limit of the monitor to watch for changes, in milliseconds.
- Allowed values: >= 0. Default value: 800.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1 id="signal-prototypes-giofilemonitor">
- <title>gio.FileMonitor Signal Prototypes</title>
-
- <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
-
- <variablelist>
- <varlistentry>
- <term><link linkend="signal-giofilemonitor--aborted">"changed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>filemonitor</parameter></methodparam>
- <methodparam><parameter>file</parameter></methodparam>
- <methodparam><parameter>other_file</parameter></methodparam>
- <methodparam><parameter>event_type</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
- monitors a file or directory for changes.
- </para>
- <para>
- To obtain a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
- for a file or directory, use
- <methodname><link linkend="method-giofile--monitor">gio.FileMonitor.monitor</link></methodname>(),
- <methodname><link linkend="method-giofile--monitor-file">gio.FileMonitor.monitor_file</link></methodname>(), or
- <methodname><link linkend="method-giofile--monitor-directory">gio.FileMonitor.monitor_directory</link></methodname>().
- </para>
- <para>
- To get informed about changes to the file or directory you are monitoring,
- connect to the "changed" signal.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
- <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-fileoutputstream.xml b/docs/reference/pygio-fileoutputstream.xml
deleted file mode 100644
index f4367d7..0000000
--- a/docs/reference/pygio-fileoutputstream.xml
+++ /dev/null
@@ -1,257 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofileoutputstream">
- <refnamediv>
- <refname>gio.FileOutputStream</refname>
- <refpurpose>Base class for implementing streaming input</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FileOutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileoutputstream--get-etag">get_etag</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileoutputstream--query-info">query_info</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileoutputstream--query-info-async">query_info_async</link></methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofileoutputstream--query-info-finish">query_info_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
- +-- <link linkend="class-giofileoutputstream">gio.FileOutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interfaces</title>
- <para>
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- implements
- <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- provides output streams that write their content to a file.
- </para>
- <para>
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- implements <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>,
- which allows the output stream to jump to arbitrary positions in the file and to truncate
- the file, provided the filesystem of the file supports these operations. In addition to the
- generic gio.Seekable. API,
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
- has its own API for seeking and positioning. To find the position of a file output stream, use
- <methodname><link linkend="method-gioseekable--tell">gio.Seekable.tell</link></methodname>().
- To find out if a file output stream supports seeking, use
- <methodname><link linkend="method-gioseekable--can_seek">gio.Seekable.can_seek</link></methodname>().
- To position a file output stream, use
- <methodname><link linkend="method-gioseekable--seek">gio.Seekable.seek</link></methodname>().
- To find out if a file output stream supports truncating, use
- <methodname><link linkend="method-gioseekable--can_truncate">gio.FileOutputStream.can_truncate</link></methodname>().
- To truncate a file output stream, use
- <methodname><link linkend="method-gioseekable--truncate">gio.Seekable.truncate</link></methodname>().
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofileoutputstream--get-etag">
- <title>gio.FileOutputStream.get_etag</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_etag</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the entity tag for the stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_etag</methodname>() method gets the entity tag
- for the file when it has been written. This must be called after the
- stream has been written and closed, as the etag can change while writing.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileoutputstream--query-info">
- <title>gio.FileOutputStream.query_info</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
- <listitem><simpara>a file attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info</methodname>() method queries a file input stream
- the given attributes. This function blocks while querying the stream.
- For the asynchronous (non-blocking) version of this function, see
- <methodname><link linkend="method-giofileoutputstream--query-info-async">gio.FileOutputStream.query_info_async</link></methodname>().
- While the stream is blocked, the stream will set the pending flag internally,
- and any other operations on the stream will fail with gio.ERROR_PENDING.
- </para>
- <para>
- Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED),
- the stream has pending operations (with error being set to gio.ERROR_PENDING), or
- if querying info is not supported for the stream's interface (with error being set to
- gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be set, and <literal>None</literal> will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileoutputstream--query-info-async">
- <title>gio.FileOutputStream.query_info_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info_async</methodname>
- <methodparam><parameter role="keyword">attributes</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
- <listitem><simpara>a file attribute query string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info_async</methodname>() method queries the stream
- information asynchronously. When the operation is finished callback will be
- called. You can then call
- <methodname><link linkend="method-giofileoutputstream--query-info-finish">gio.FileOutputStream.query_info_finish</link></methodname>()
- to get the result of the operation.
- </para>
- <para>
- For the synchronous version of this function, see
- <methodname><link linkend="method-giofileoutputstream--query-info">gio.FileOutputStream.query_info</link></methodname>().
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was
- cancelled, the error gio.ERROR_CANCELLED will be set
- </para>
- </refsect2>
-
- <refsect2 id="method-giofileoutputstream--query-info-finish">
- <title>gio.FileOutputStream.query_info_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>query_info_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
- or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>query_info_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-giofileoutputstream--query-info-async">gio.FileOutputStream.query_info_async</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-filterinputstream.xml b/docs/reference/pygio-filterinputstream.xml
deleted file mode 100644
index e6fb90b..0000000
--- a/docs/reference/pygio-filterinputstream.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofilterinputstream">
- <refnamediv>
- <refname>gio.FilterInputStream</refname>
- <refpurpose>Filter Input Stream</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FilterInputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilterinputstream--get-base-stream">get_base_stream</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilterinputstream--get-close-base-stream">get_close_base_stream</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilterinputstream--set-close-base-stream">set_close_base_stream</link></methodname>
- <methodparam><parameter role="keyword">close_base</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
- +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giofilterinputstream">
- <title>gio.FilterInputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"base-stream"</entry>
- <entry>Read - Write - Construct only</entry>
- <entry>The underlying base stream on which the io ops will be done.</entry>
- </row>
- <row valign="top">
- <entry>"close-base-stream"</entry>
- <entry>Read - Write - Construct only</entry>
- <entry>If the base stream should be closed when the filter stream is closed.
- Default value: <literal>True</literal>.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- Filter Input Stream.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofilterinputstream--get-base-stream">
- <title>gio.FilterInputStream.get_base_stream</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_base_stream</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_base_stream</methodname>() method gets the base
- stream for the filter stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofilterinputstream--get-close-base-stream">
- <title>gio.FilterInputStream.get_close_base_stream</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_close_base_stream</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the base stream
- will be closed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_close_base_stream</methodname>() method returns
- whether the base stream will be closed when stream is closed.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofilterinputstream--set-close-base-stream">
- <title>gio.FilterInputStream.set_close_base_stream</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_close_base_stream</methodname>
- <methodparam><parameter role="keyword">close_base</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">close_base</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> to close the base stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_close_base_stream</methodname>() method sets whether
- the base stream will be closed when stream is closed.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-filteroutputstream.xml b/docs/reference/pygio-filteroutputstream.xml
deleted file mode 100644
index 78feaa2..0000000
--- a/docs/reference/pygio-filteroutputstream.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giofilteroutputstream">
- <refnamediv>
- <refname>gio.FilterOutputStream</refname>
- <refpurpose>Filter Output Stream</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.FilterOutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilteroutputstream--get-base-stream">get_base_stream</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilteroutputstream--get-close-base-stream">get_close_base_stream</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giofilteroutputstream--set-close-base-stream">set_close_base_stream</link></methodname>
- <methodparam><parameter role="keyword">close_base</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
- +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giofilteroutputstream">
- <title>gio.FilterOutputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"base-stream"</entry>
- <entry>Read - Write - Construct only</entry>
- <entry>The underlying base stream on which the io ops will be done.</entry>
- </row>
- <row valign="top">
- <entry>"close-base-stream"</entry>
- <entry>Read - Write - Construct only</entry>
- <entry>If the base stream should be closed when the filter stream is closed.
- Default value: <literal>True</literal>.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- Filter Output Stream.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giofilteroutputstream--get-base-stream">
- <title>gio.FilterOutputStream.get_base_stream</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_base_stream</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_base_stream</methodname>() method gets the base
- stream for the filter stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofilteroutputstream--get-close-base-stream">
- <title>gio.FilterOutputStream.get_close_base_stream</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_close_base_stream</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the base stream
- will be closed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_close_base_stream</methodname>() method returns
- whether the base stream will be closed when stream is closed.
- </para>
- </refsect2>
-
- <refsect2 id="method-giofilteroutputstream--set-close-base-stream">
- <title>gio.FilterOutputStream.set_close_base_stream</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_close_base_stream</methodname>
- <methodparam><parameter role="keyword">close_base</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">close_base</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> to close the base stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_close_base_stream</methodname>() method sets whether
- the base stream will be closed when stream is closed.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-functions.xml b/docs/reference/pygio-functions.xml
deleted file mode 100644
index c690a2f..0000000
--- a/docs/reference/pygio-functions.xml
+++ /dev/null
@@ -1,395 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="gio-functions">
- <refnamediv>
- <refname>gio Functions</refname>
- <refpurpose></refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
-<programlisting><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-can-be-executable">gio.content_type_can_be_executable</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-equals">gio.content_type_equals</link></methodname>
- <methodparam><parameter role="keyword">type1</parameter></methodparam>
- <methodparam><parameter role="keyword">type2</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-from-mime-type">gio.content_type_from_mime_type</link></methodname>
- <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-get-description">gio.content_type_get_description</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-get-icon">gio.content_type_get_icon</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-get-mime-type">gio.content_type_get_mime_type</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-guess">gio.content_type_guess</link></methodname>
- <methodparam><parameter role="keyword">filename</parameter></methodparam>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">want_uncertain</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-is-a">gio.content_type_is_a</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- <methodparam><parameter role="keyword">supertype</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-type-is-unknown">gio.content_type_is_unknown</link></methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--content-types-get-registered">gio.content_types_get_registered</link></methodname>
- <methodparam></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--io-error-from-errno">gio.io_error_from_errno</link></methodname>
- <methodparam><parameter role="keyword">err_no</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- These functions are part of the <literal>PyGObject</literal> gio module
- but are not directly associated with a specific class
- </para>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--content-type-can-be-executable">
- <title>gio.content_type_can_be_executable</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_can_be_executable</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the file type corresponds
- to a type that can be executable, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_can_be_executable</methodname>() function checks
- if a content type can be executable. Note that for instance things like text files
- can be executables (i.e. scripts and batch files).
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-equals">
- <title>gio.content_type_equals</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_equals</methodname>
- <methodparam><parameter role="keyword">type1</parameter></methodparam>
- <methodparam><parameter role="keyword">type2</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type1</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type2</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the two strings are
- identical or equivalent, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_equals</methodname>() function compares
- two content types for equality.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-from-mime-type">
- <title>gio.content_type_from_mime_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_from_mime_type</methodname>
- <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mime_type</parameter>&nbsp;:</term>
- <listitem><simpara>a mime type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The content type or <literal>None</literal> when does not know.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_from_mime_type</methodname>() function tries
- to find a content type based on the mime type name.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-get-description">
- <title>gio.content_type_get_description</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_get_description</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a short description of the content type type.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_get_description</methodname>() function
- gets the human readable description of the content type.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-get-icon">
- <title>gio.content_type_get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_get_icon</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- corresponding to the content type.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_get_icon</methodname>() function
- gets the icon for a content type.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-get-mime-type">
- <title>gio.content_type_get_mime_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_get_mime_type</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the registered mime-type for the given type,
- or <literal>None</literal> if unknown.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_get_mime_type</methodname>() function
- gets the mime-type for the content type. If one is registered
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-guess">
- <title>gio.content_type_guess</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_guess</methodname>
- <methodparam><parameter role="keyword">filename</parameter></methodparam>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- <methodparam><parameter role="keyword">want_uncertain</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>filename</parameter>&nbsp;:</term>
- <listitem><simpara>a string, or <literal>None</literal>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter>&nbsp;:</term>
- <listitem><simpara>a stream of data, or <literal>None</literal>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>want_uncertain</parameter>&nbsp;:</term>
- <listitem><simpara>a flag indicating the certainty of the result.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string indicating a guessed content type for the given data.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_guess</methodname>() function guesses
- the content type based on example data. If the function is uncertain,
- result_uncertain will be set to <literal>True</literal>. Either filename
- or data may be <literal>None</literal>, in which case the guess will be
- based solely on the other argument.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-is-a">
- <title>gio.content_type_is_a</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_is_a</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- <methodparam><parameter role="keyword">supertype</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>supertype</parameter>&nbsp;:</term>
- <listitem><simpara>a string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if type is a kind of
- supertype, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_is_a</methodname>() function determines
- if type is a subset of supertype.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-type-is-unknown">
- <title>gio.content_type_is_unknown</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_type_is_unknown</methodname>
- <methodparam><parameter role="keyword">type</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>a content type string.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the type is the unknown type.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_type_is_unknown</methodname>() function checks if
- the content type is the generic "unknown" type. On unix this is the
- "application/octet-stream" mimetype, while on win32 it is "*".
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--content-types-get-registered">
- <title>gio.content_types_get_registered</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>content_types_get_registered</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of the registered content types.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>content_types_get_registered</methodname>() function
- gets a list of strings containing all the registered content types
- known to the system.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--io-error-from-errno">
- <title>gio.io_error_from_errno</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>io_error_from_errno</methodname>
- <methodparam><parameter role="keyword">err_no</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>err_no</parameter>&nbsp;:</term>
- <listitem><simpara>Error number.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>io_error_from_errno</methodname>() function converts
- error codes into GIO error codes.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-icon.xml b/docs/reference/pygio-icon.xml
deleted file mode 100644
index 5a32d28..0000000
--- a/docs/reference/pygio-icon.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioicon">
- <refnamediv>
- <refname>gio.Icon</refname>
- <refpurpose>Interface for icons.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Icon</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioicon--equal">equal</link></methodname>
- <methodparam><parameter role="keyword">icon2</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioicon--to-string">to_string</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>
- <methodparam></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-gioicon">gio.Icon</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Known Derived Interfaces</title>
- <para>
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link> is required by
- <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Known Implementation</title>
- <para>
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link> is implemented by
- <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>,
- <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>,
- <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>,
- <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- is a very minimal interface for icons. It provides functions for checking
- the equality of two icons, hashing of icons and serializing an icon to and from strings.
- </para>
- <para>
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- does not provide the actual pixmap for the icon as this is out of GIO's
- scope, however implementations of
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- may contain the name of an icon (see
- <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>),
- or the path to an icon (see
- <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>).
- </para>
- <!--
- <para>
- To obtain a hash of a <link linkend="class-gioicon"><classname>gio.Icon</classname></link>, see
- <methodname><link linkend="method-gioicon- -hash">gio.Icon.hash</link></methodname>().
- </para>
- -->
- <para>
- To check if two GIcons are equal, see
- <methodname><link linkend="method-gioicon--equal">gio.Icon.equal</link></methodname>().
- </para>
- <para>
- For serializing a <link linkend="class-gioicon"><classname>gio.Icon</classname></link>,
- use <methodname><link linkend="method-gioicon- -to-string">gio.Icon.to_string</link></methodname>() and
- <methodname><link linkend="method-gioicon- -new-from-string">gio.Icon.new_from_string</link></methodname>().
- </para>
- <para>
- If your application or library provides one or more
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- implementations you need to ensure that each GType is registered
- with the type system prior to calling
- <methodname><link linkend="function-gioicon--new-from-string">gio.icon_new_from_string</link></methodname>().
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioicon--equal">
- <title>gio.Icon.equal</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>equal</methodname>
- <methodparam><parameter role="keyword">icon2</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>icon2</parameter>&nbsp;:</term>
- <listitem><simpara>the second
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>equal</methodname>() method checks if two icons are equal.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioicon--to-string">
- <title>gio.Icon.to_string</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>to_string</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>An UTF8 string or <literal>None</literal>
- if icon can't be serialized.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>to_string</methodname>() method generates a textual
- representation of icon that can be used for serialization such as when
- passing icon to a different process or saving it to persistent storage. Use
- <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>()
- to get icon back from the returned string.
- </para>
- <para>
- The encoding of the returned string is proprietary to GIcon except in the following two cases
- </para>
- <para>
- If icon is a <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>,
- the returned string is a native path (such as /path/to/my icon.png) without escaping
- if the <link linkend="class-giofile"><classname>gio.File</classname></link>
- for icon is a native file. If the file is not native, the returned string is the result of
- <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
- (such as sftp://path/to/my%20icon.png).
- </para>
- <para>
- If icon is a <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
- with exactly one name, the encoding is simply the name (such as network-server).
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--icon-new-from-string">
- <title>gio.icon_new_from_string</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>icon_new_from_string</methodname>
- <methodparam><parameter role="keyword">str</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>str</parameter>&nbsp;:</term>
- <listitem><simpara>A string obtained via
- <methodname><link linkend="method-gioicon--to-string">gio.Icon.to_string</link></methodname>().
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>An object implementing the
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- interface or <literal>None</literal> if error is set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>icon_new_from_string</methodname>() function generate a
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- instance from str. This function can fail if str is not valid - see
- <methodname><link linkend="method-gioicon--to-string">gio.Icon.to_string</link></methodname>()
- for discussion.
- </para>
- <para>
- If your application or library provides one or more GIcon implementations you need
- to ensure that each GType is registered with the type system prior to calling
- <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-inputstream.xml b/docs/reference/pygio-inputstream.xml
deleted file mode 100644
index 1bef333..0000000
--- a/docs/reference/pygio-inputstream.xml
+++ /dev/null
@@ -1,730 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioinputstream">
- <refnamediv>
- <refname>gio.InputStream</refname>
- <refpurpose>Base class for implementing streaming input</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.InputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--clear-pending">clear_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--close">close</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--close-async">close_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--close-finish">close_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--has-pending">has_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--is-closed">is_closed</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--read">read</link></methodname>
- <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--read-async">read_async</link></methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--read-finish">read_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--read-part">read_part</link></methodname>
- <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--set-pending">set_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--skip">skip</link></methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--skip-async">skip_async</link></methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioinputstream--skip-finish">skip_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- has functions to read from a stream (
- <methodname><link linkend="method-gioinputstream--read">gio.InputStream.read</link></methodname>()
- ), to close a stream (
- <methodname><link linkend="method-gioinputstream--close">gio.InputStream.close</link></methodname>()
- ) and to skip some content (
- <methodname><link linkend="method-gioinputstream--skip">gio.InputStream.skip</link></methodname>()
- ).
- </para>
- <para>
- To copy the content of an input stream to an output stream without manually
- handling the reads and writes, use
- <methodname><link linkend="method-giooutputstream--skip">gio.OutputStream.splice</link></methodname>().
- </para>
- <para>
- All of these functions have async variants too.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioinputstream--clear-pending">
- <title>gio.InputStream.clear_pending</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>clear_pending</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>clear_pending</methodname>() method clears the pending flag on stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--close">
- <title>gio.InputStream.close</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>close</methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on success
- <literal>False</literal> on failure.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>close</methodname>() method closes the stream, releasing
- resources related to it.
- </para>
- <para>
- Once the stream is closed, all other operations will return gio.ERROR_CLOSED.
- Closing a stream multiple times will not return an error.
- </para>
- <para>
- Streams will be automatically closed when the last reference is dropped, but
- you might want to call this function to make sure resources are released as
- early as possible.
- </para>
- <para>
- Some streams might keep the backing store of the stream (e.g. a file descriptor)
- open after the stream is closed. See the documentation for the individual
- stream for details.
- </para>
- <para>
- On failure the first error that happened will be reported, but the close operation
- will finish as much as possible. A stream that failed to close will still return
- gio.ERROR_CLOSED for all operations. Still, it is important to check and report
- the error to the user.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--close-async">
- <title>gio.InputStream.close_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>close_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>close_async</methodname>() method asynchronously requests an
- asynchronous closes of the stream, releasing resources related to it.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-gioinputstream--close">gio.InputStream.close</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-gioinputstream--close-finish">gio.InputStream.close_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--close-finish">
- <title>gio.InputStream.close_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>close_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the stream was closed successfully.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>close_finish</methodname>() method finishes an asynchronous
- file append operation started with
- <methodname><link linkend="method-gioinputstream--close-async">gio.InputStream.close_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--has-pending">
- <title>gio.InputStream.has_pending</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>has_pending</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if stream has pending actions.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>has_pending</methodname>() method checks if an input stream has pending actions.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--is-closed">
- <title>gio.InputStream.is_closed</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_closed</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the stream is closed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>is_closed</methodname>() method checks if an input stream is closed.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--read">
- <title>gio.InputStream.read</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read</methodname>
- <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">count</parameter>&nbsp;:</term>
- <listitem><simpara>optionally the number of bytes that will be read from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The number of bytes read, or -1 on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read</methodname>() method tries to read count bytes from
- the stream into the buffer starting at buffer. Will block during this read.
- </para>
- <para>
- This function is similar to
- <methodname><link linkend="method-gioinputstream--read-part">gio.InputStream.read_part</link></methodname>(),
- except it tries to read as many bytes as requested, only stopping on an error or end of stream.
- </para>
- <para>
- On a successful read of count bytes, or if we reached the end of the stream,
- <literal>True</literal> is returned, and bytes_read is set to the number of bytes read into buffer.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </para>
- <para>
- If there is an error during the operation <literal>False</literal> is returned and error
- is set to indicate the error status, bytes_read is updated to contain the number of
- bytes read into buffer before the error occurred.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--read-async">
- <title>gio.InputStream.read_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_async</methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>count</parameter>&nbsp;:</term>
- <listitem><simpara>the number of bytes that will be read from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_async</methodname>() method requests an asynchronous read
- of count bytes from the stream into the buffer.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-gioinputstream--read">gio.InputStream.read</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-gioinputstream--read-finish">gio.InputStream.read_finish</link></methodname>()
- to get the result of the operation.
- </para>
- <para>
- During an async request no other sync and async calls are allowed, and
- will result in gio.ERROR_PENDING errors.
- </para>
- <para>
- A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </para>
- <para>
- On success, the number of bytes read into the buffer will be passed to the callback.
- It is not an error if this is not the same as the requested size, as it can happen e.g.
- near the end of a file, but generally we try to read as many bytes as requested. Zero
- is returned on end of file (or if count is zero), but never otherwise.
- </para>
- <para>
- Any outstanding i/o request with higher priority (lower numerical value) will be
- executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
- </para>
- <para>
- The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so
- they are optional for inheriting classes. However, if you override one you must override all.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--read-finish">
- <title>gio.InputStream.read_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The number of bytes read in, or -1 on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_finish</methodname>() method finishes an asynchronous
- stream read operation started by
- <methodname><link linkend="method-gioinputstream--read-async">gio.InputStream.read_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--read-part">
- <title>gio.InputStream.read_part</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>read_part</methodname>
- <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">count</parameter>&nbsp;:</term>
- <listitem><simpara>optionally the number of bytes that will be read from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The number of bytes read, or -1 on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>read_part</methodname>() method tries to read count bytes from
- the stream into the buffer starting at buffer. Will block during this read.
- </para>
- <para>
- If count is zero returns zero and does nothing. A value of count larger than
- G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </para>
- <para>
- On success, the number of bytes read into the buffer is returned. It is
- not an error if this is not the same as the requested size, as it can
- happen e.g. near the end of a file. Zero is returned on end of file
- (or if count is zero), but never otherwise.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </para>
- <para>
- On error -1 is returned and error is set accordingly.
- </para>
- <note>
- This method roughly corresponds to C GIO g_input_stream_read.
- </note>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--set-pending">
- <title>gio.InputStream.set_pending</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_pending</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if pending was previously
- unset and is now set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_pending</methodname>() method sets stream to have actions pending.
- If the pending flag is already set or stream is closed,
- it will return <literal>False</literal> and set error.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--skip">
- <title>gio.InputStream.skip</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>skip</methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">count</parameter>&nbsp;:</term>
- <listitem><simpara>the number of bytes that will be skipped from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The number of bytes skipped, or -1 on error
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>skip</methodname>() method tries to skip count bytes
- from the stream. Will block during the operation.
- </para>
- <para>
- This is identical to
- <methodname><link linkend="method-gioinputstream--read">read</link></methodname>(),
- from a behaviour standpoint, but the bytes that are skipped are not
- returned to the user. Some streams have an implementation that is more
- efficient than reading the data.
- </para>
- <para>
- This function is optional for inherited classes, as the default implementation emulates it using read.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled by
- triggering the cancellable object from another thskip. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
- the stream closed, but some streams can use a faster close that doesn't block to e.g.
- check errors.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--skip-async">
- <title>gio.InputStream.skip_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>skip_async</methodname>
- <methodparam><parameter role="keyword">count</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>count</parameter>&nbsp;:</term>
- <listitem><simpara>the number of bytes that will be skipped from the stream.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncskipyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>io_priority</parameter>&nbsp;:</term>
- <listitem><simpara>the
- <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
- of the request.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>skip_async</methodname>() method request an asynchronous
- skip of count bytes from the stream.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-gioinputstream--skip">gio.InputStream.skip</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-gioinputstream--skip-finish">gio.InputStream.skip_finish</link></methodname>()
- to get the result of the operation.
- </para>
- <para>
- During an async request no other sync and async calls are allowed, and
- will result in gio.ERROR_PENDING errors.
- </para>
- <para>
- A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
- </para>
- <para>
- On success, the number of bytes skipped will be passed to the callback. It is
- not an error if this is not the same as the requested size, as it can happen
- e.g. near the end of a file, but generally we try to skip as many bytes as requested.
- Zero is returned on end of file (or if count is zero), but never otherwise.
- </para>
- <para>
- Any outstanding i/o request with higher priority (lower numerical value) will be
- executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
- </para>
- <para>
- The asyncronous methods have a default fallback that uses thskips to implement asynchronicity, so
- they are optional for inheriting classes. However, if you override one you must override all.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioinputstream--skip-finish">
- <title>gio.InputStream.skip_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>skip_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The number of bytes skipped in, or -1 on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>skip_finish</methodname>() method finishes an asynchronous
- stream skip operation started by
- <methodname><link linkend="method-gioinputstream--skip-async">gio.InputStream.skip_async</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-loadableicon.xml b/docs/reference/pygio-loadableicon.xml
deleted file mode 100644
index 93198c4..0000000
--- a/docs/reference/pygio-loadableicon.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioloadableicon">
- <refnamediv>
- <refname>gio.LoadableIcon</refname>
- <refpurpose>Interface for icons.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.LoadableIcon</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioloadableicon--load">load</link></methodname>
- <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioloadableicon--load-async">load_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioloadableicon--load-finish">load_finish</link></methodname>
- <methodparam><parameter role="keyword">res</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-gioloadableicon">gio.LoadableIcon</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Prerequisites</title>
- <para>
- <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> requires
- <link linkend="class-gioicon"><classname>gio.Icon</classname></link>. and
- <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Known Implementation</title>
- <para>
- <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> is implemented by
- <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>
- extends the <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- interface and adds the ability to load icons from streams.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioloadableicon--load">
- <title>gio.LoadableIcon.load</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>load</methodname>
- <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>size</parameter>&nbsp;:</term>
- <listitem><simpara>an integer
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a 2 tuple containing a
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- to read the icon from and a string containing the icon type.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>load</methodname>() method loads a loadable icon.
- For the asynchronous version of this function, see
- <methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-gioloadableicon--load-async">
- <title>gio.LoadableIcon.load_async</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>load_async</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter>&nbsp;:</term>
- <listitem><simpara>an integer
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_data</parameter>&nbsp;:</term>
- <listitem><simpara>the data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>load_async</methodname>() method loads an icon asynchronously.
- </para>
- <para>
- For more details, see
- <methodname><link linkend="method-gioloadableicon--load">gio.LoadableIcon.load</link></methodname>()
- which is the synchronous version of this call.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-gioloadableicon--load-finish">gio.LoadableIcon.load_finish</link></methodname>()
- to get the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioloadableicon--load-finish">
- <title>gio.LoadableIcon.load_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>load_finish</methodname>
- <methodparam><parameter role="keyword">res</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>res</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a 2 tuple containing a
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- to read the icon from and a string containing the icon type.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>load_finish</methodname>() method finishes an asynchronous
- icon load started in
- <methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-memoryinputstream.xml b/docs/reference/pygio-memoryinputstream.xml
deleted file mode 100644
index 7d8cffb..0000000
--- a/docs/reference/pygio-memoryinputstream.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giomemoryinputstream">
- <refnamediv>
- <refname>gio.MemoryInputStream</refname>
- <refpurpose>Base class for implementing streaming input</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.MemoryInputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giomemoryinputstream">gio.MemoryInputStream</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomemoryinputstream--add-data">add_data</link></methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--memory-input-stream-new-from-data">gio.memory_input_stream_new_from_data</link></methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
- +-- <link linkend="class-giomemoryinputstream">gio.MemoryInputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interfaces</title>
- <para>
- <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
- implements
- <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
- is a class for using arbitrary memory chunks as input for GIO streaming input operations.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giomemoryinputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.MemoryInputStream</methodname>
- <methodparam><parameter role="keyword">icon</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates an empty
- <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giomemoryinputstream--add-data">
- <title>gio.MemoryInputStream.add_data</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>add_data</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">data</parameter>&nbsp;:</term>
- <listitem><simpara>input data.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>add_data</methodname>() method appends data to data
- that can be read from the input stream
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--memory-input-stream-new-from-data">
- <title>gio.memory_input_stream_new_from_data</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>memory_input_stream_new_from_data</methodname>
- <methodparam><parameter role="keyword">data</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>data</parameter>&nbsp;:</term>
- <listitem><simpara>input data.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A new
- <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
- read from data
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>memory_input_stream_new_from_data</methodname>() function creates
- a new <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
- with data in memory.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-memoryoutputstream.xml b/docs/reference/pygio-memoryoutputstream.xml
deleted file mode 100644
index f044496..0000000
--- a/docs/reference/pygio-memoryoutputstream.xml
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giomemoryoutputstream">
- <refnamediv>
- <refname>gio.MemoryOutputStream</refname>
- <refpurpose>Streaming output operations on memory chunks</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.MemoryOutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giomemoryoutputstream">gio.MemoryOutputStream</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomemoryoutputstream--get-contents">get_contents</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomemoryoutputstream--get-data-size">get_data_size</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomemoryoutputstream--get-size">get_size</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
- +-- <link linkend="class-giomemoryoutputstream">gio.MemoryOutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interfaces</title>
- <para>
- <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
- implements
- <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
- is a class for using arbitrary memory chunks as output for GIO streaming output operations.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giomemoryoutputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.MemoryOutputStream</methodname>
- <methodparam></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new
- <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giomemoryoutputstream--get-contents">
- <title>gio.MemoryOutputStream.get_contents</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_contents</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the stream's data
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_contents</methodname>() method gets any loaded data
- from the ostream.
- </para>
- <para>
- Note that the returned data may become invalid on the next write or truncate
- operation on the stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomemoryoutputstream--get-data-size">
- <title>gio.MemoryOutputStream.get_data_size</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_data_size</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the number of bytes written to the stream
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_data_size</methodname>() method returns the number
- of bytes from the start up to including the last byte written in the
- stream that has not been truncated away.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomemoryoutputstream--get-size">
- <title>gio.MemoryOutputStream.get_size</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_size</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the number of bytes allocated for the data buffer
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_size</methodname>() method gets the size of the
- currently allocated data area (availible from
- <methodname><link linkend="method-giomemoryoutputstream--get-contents">gio.MemoryOutputStream.get_contents</link></methodname>()
- ).
- </para>
- <para>
- Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
- </para>
- <para>
- If you want the number of bytes currently written to the stream, use
- <methodname><link linkend="method-giomemoryoutputstream--get-data-size">gio.MemoryOutputStream.get_data_size</link></methodname>().
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-mount.xml b/docs/reference/pygio-mount.xml
deleted file mode 100644
index f01b155..0000000
--- a/docs/reference/pygio-mount.xml
+++ /dev/null
@@ -1,962 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giomount">
- <refnamediv>
- <refname>gio.Mount</refname>
- <refpurpose>Mount management</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Mount</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--can-eject">can_eject</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="method-giomount--can-unmount">can_unmount</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--eject">eject</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--eject-finish">eject_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--get-drive">get_drive</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--get-name">get_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--get-root">get_root</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--get-uuid">get_uuid</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--get-volume">get_volume</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--guess-content-type">guess_content_type</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--guess-content-type-finish">guess_content_type_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--guess-content-type-sync">guess_content_type_sync</link></methodname>
- <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--is-shadowed">is_shadowed</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--remount">remount</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">mount_operation</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--remount-finish">remount_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--shadow">shadow</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--unmount">unmount</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--unmount-finish">unmount_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomount--unshadow">unshadow</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-giomount">gio.Mount</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Prerequisites</title>
- <para>
- <link linkend="class-giomount"><classname>gio.Mount</classname></link> requires
- <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
- </para>
- </refsect1>
-
- <refsect1 id="signal-prototypes-giomount">
- <title>gio.Mount Signal Prototypes</title>
-
- <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
-
- <variablelist>
- <varlistentry>
- <term><link linkend="signal-giomount--aborted">"aborted"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giomount--changed">"changed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giomount--unmounted">"unmounted"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- interface represents user-visible mounts. Note, when porting from GnomeVFS,
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- is the moral equivalent of GnomeVFSVolume.
-
- </para>
- <para>
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- is a "mounted" filesystem that you can access. Mounted is in quotes because
- it's not the same as a unix mount, it might be a gvfs mount, but you can still
- access the files on it if you use GIO. Might or might not be related to a volume object.
- </para>
- <para>
- Unmounting a GMount instance is an asynchronous operation. For more information
- about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount
- a <link linkend="class-giomount"><classname>gio.Mount</classname></link> instance,
- first call
- g_mount_unmount()
- with (at least) the GMount instance and a GAsyncReadyCallback. The callback will
- be fired when the operation has resolved (either with success or failure), and a
- GAsyncReady structure will be passed to the callback. That callback should then call
- g_mount_unmount_finish()
- with the GMount and the GAsyncReady data to see if the operation was completed successfully.
- If an error is present when g_mount_unmount_finish() is called, then it will be filled
- with any error information.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giomount--can-eject">
- <title>gio.Mount.can_eject</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_eject</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the mount can be ejected,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_eject</methodname>() method checks if a mount can be ejected.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--can-unmount">
- <title>gio.Mount.can_unmount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_unmount</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the mount can be unmounted,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_eject</methodname>() method checks if a mount can be unmounted.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--eject">
- <title>gio.Mount.eject</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
- <listitem><simpara>flags affecting the unmount if required for eject
- <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject</methodname>() method asynchronously ejects a mount.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giomount--eject-finish">gio.Mount.eject_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--eject-finish">
- <title>gio.Mount.eject_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the mount has been ejected
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject_finish</methodname>() method finishes ejecting a mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--get-drive">
- <title>gio.Mount.get_drive</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_drive</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- or <literal>None</literal> if mount is not associated with a volume or a drive.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_drive</methodname>() method gets the drive for the mount.
- </para>
- <para>
- This is a convenience method for getting the
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- and then using that object to get the
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link>.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--get-icon">
- <title>gio.Mount.get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_icon</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- for the mount.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_icon</methodname>() method gets the icon for mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--get-name">
- <title>gio.Mount.get_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the name for the given mount.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_name</methodname>() method gets the name of mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--get-root">
- <title>gio.Mount.get_root</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_root</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_root</methodname>() method gets the root directory on mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--get-uuid">
- <title>gio.Mount.get_uuid</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_uuid</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the UUID for mount or <literal>None</literal>
- if no UUID can be computed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_uuid</methodname>() method gets the UUID for the mount.
- The reference is typically based on the file system UUID for the mount in
- question and should be considered an opaque string. Returns <literal>None</literal>
- if there is no UUID available
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--get-volume">
- <title>gio.Mount.get_volume</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_volume</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- or <literal>None</literal> if mount is not associated with a volume.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_volume</methodname>() method gets the volume for the mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--guess-content-type">
- <title>gio.Mount.guess_content_type</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>guess_content_type</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">force_rescan</parameter>&nbsp;:</term>
- <listitem><simpara>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>guess_content_type</methodname>() method asynchronously tries to guess the type of
- content stored on mount. Returns one or more textual identifiers of well-known content
- types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory
- cards. See the shared-mime-info specification for more on x-content types.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giomount--guess-content-type-finish">gio.Mount.guess_content_type_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--guess-content-type-finish">
- <title>gio.Mount.guess_content_type_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>guess_content_type_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list of types or <literal>None</literal> on error.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <!-- XXX This description must be incorrect! -->
- <para>
- The <methodname>guess_content_type_finish</methodname>() method finishes guessing content
- types of mount. If any errors occured during the operation, error will be set to
- contain the errors and <literal>False</literal> will be returned. In particular, you may get an
- gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--guess-content-type-sync">
- <title>gio.Mount.guess_content_type_sync</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>guess_content_type_sync</methodname>
- <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">force_rescan</parameter>&nbsp;:</term>
- <listitem><simpara>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>guess_content_type_sync</methodname>() method tries to guess
- the type of content stored on mount. Returns one or more textual identifiers
- of well-known content types (typically prefixed with "x-content/"), e.g.
- x-content/image-dcf for camera memory cards. See the shared-mime-info specification
- for more on x-content types.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- This is an synchronous operation and as such may block doing IO; see
- <methodname><link linkend="method-giomount--guess-content-type">gio.Mount.guess_content_type</link></methodname>()
- for the asynchronous version.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--is-shadowed">
- <title>gio.Mount.is_shadowed</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>is_shadowed</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if mount is shadowed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>is_shadowed</methodname>() method determines if mount
- is shadowed. Applications or libraries should avoid displaying mount
- in the user interface if it is shadowed.
- </para>
- <para>
- A mount is said to be shadowed if there exists one or more user visible
- objects (currently
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- objects) with a root that is inside the root of mount.
- </para>
- <para>
- One application of shadow mounts is when exposing a single file system
- that is used to address several logical volumes. In this situation, a
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- implementation would create two
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- objects (for example, one for the camera functionality of the device
- and one for a SD card reader on the device) with activation URIs
- gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/.
- When the underlying mount (with root gphoto2://[usb:001,002]/) is
- mounted, said
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- implementation would create two
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- objects (each with their root matching the corresponding volume
- activation root) that would shadow the original mount.
- </para>
- <para>
- The proxy monitor in GVfs 2.26 and later, automatically creates and
- manage shadow mounts (and shadows the underlying mount) if the activation
- root on a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- is set.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--remount">
- <title>gio.Mount.remount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>remount</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">mount_operation</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
- <listitem><simpara>flags affecting the unmount if required for eject
- <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">mount_operation</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- or <literal>None</literal> to avoid user interaction.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>remount</methodname>() method asynchronously remounts a mount.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giomount--remount-finish">gio.Mount.remount_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--remount-finish">
- <title>gio.Mount.remount_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>remount_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the mount has been remounted
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>remount_finish</methodname>() method finishes remounting a mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--shadow">
- <title>gio.Mount.shadow</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>shadow</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>shadow</methodname>() method increments the shadow
- count on mount. Usually used by
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- implementations when creating a shadow mount for mount, see
- <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
- for more information. The caller will need to emit the "changed"
- signal on mount manually.
- </para>
-
- </refsect2>
-
- <refsect2 id="method-giomount--unmount">
- <title>gio.Mount.unmount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>unmount</methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
- <listitem><simpara>flags affecting the unmount if required for eject
- <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>unmount</methodname>() method asynchronously unmounts a mount.
- </para>
- <para>
- If cancellable is not <literal>None</literal>, then the operation can be cancelled
- by triggering the cancellable object from another thread. If the operation was cancelled,
- the error gio.ERROR_CANCELLED will be returned.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giomount--unmount-finish">gio.Mount.unmount_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--unmount-finish">
- <title>gio.Mount.unmount_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>unmount_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the mount has been unmounted
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>unmount_finish</methodname>() method finishes unmounting a mount.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomount--unshadow">
- <title>gio.Mount.unshadow</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>unshadow</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>unshadow</methodname>() method decrements the shadow
- count on mount. Usually used by
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- implementations when destroying a shadow mount for mount, see
- <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
- for more information. The caller will need to emit the "changed"
- signal on mount manually.
- </para>
-
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Signals</title>
-
- <refsect2 id="signal-giomount--aborted">
- <title>The "aborted" gio.Mount Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>the mount</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted by the backend when e.g. a device becomes unavailable while a
- mount operation is in progress.
- </para>
- <para>
- Implementations of <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- should handle this signal by dismissing open password dialogs.
- </para>
- </refsect2>
- <refsect2 id="signal-giomount--changed">
- <title>The "changed" gio.Mount Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>the mount</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when the mount has been changed.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giomount--unmounted">
- <title>The "unmounted" gio.Mount Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>the mount</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- This signal is emitted when the
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- have been unmounted.
- </para>
- </refsect2>
-
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-mountoperation.xml b/docs/reference/pygio-mountoperation.xml
deleted file mode 100644
index 34dec13..0000000
--- a/docs/reference/pygio-mountoperation.xml
+++ /dev/null
@@ -1,726 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giomountoperation">
- <refnamediv>
- <refname>gio.MountOperation</refname>
- <refpurpose>Authentication methods for mountable locations.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.MountOperation</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giomountoperation">gio.MountOperation</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--get-anonymous">get_anonymous</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--get-choice">get_choice</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--get-domain">get_domain</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--get-password">get_password</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--get-password-save">get_password_save</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--get-username">get_username</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--reply">replay</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--set-anonymous">set_anonymous</link></methodname>
- <methodparam><parameter role="keyword">anonymous</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--set-choice">set_choice</link></methodname>
- <methodparam><parameter role="keyword">choice</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--set-domain">set_domain</link></methodname>
- <methodparam><parameter role="keyword">domain</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--set-password">set_password</link></methodname>
- <methodparam><parameter role="keyword">password</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--set-password-save">set_password_save</link></methodname>
- <methodparam><parameter role="keyword">save</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giomountoperation--set-username">set_username</link></methodname>
- <methodparam><parameter role="keyword">username</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giomountoperation">gio.MountOperation</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giomountoperation">
- <title>gio.MountOperation Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"anonymous"</entry>
- <entry>Read/Write</entry>
- <entry>
- Whether to use an anonymous user when authenticating.
- Default value: <literal>False</literal>
- </entry>
- </row>
- <row valign="top">
- <entry>"choice"</entry>
- <entry>Read/Write</entry>
- <entry>
- The index of the user's choice when a question is asked during
- the mount operation. See the "ask-question" signal.
- Allowed values: >= 0 Default value: 0
- </entry>
- </row>
- <row valign="top">
- <entry>"domain"</entry>
- <entry>Read/Write</entry>
- <entry>
- The domain to use for the mount operation. Default value: <literal>None</literal>
- </entry>
- </row>
- <row valign="top">
- <entry>"password"</entry>
- <entry>Read/Write</entry>
- <entry>
- The password that is used for authentication when carrying out the
- mount operation. Default value: <literal>None</literal>
- </entry>
- </row>
- <row valign="top">
- <entry>"password-save"</entry>
- <entry>Read/Write</entry>
- <entry>
- Determines if and how the password information should be saved.
- Default value: gio.PASSWORD_SAVE_NEVER
- </entry>
- </row>
- <row valign="top">
- <entry>"username"</entry>
- <entry>Read/Write</entry>
- <entry>
- The user name that is used for authentication when carrying out the
- mount operation. Default value: <literal>None</literal>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1 id="signal-prototypes-giomountoperation">
- <title>gio.MountOperation Signal Prototypes</title>
-
- <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
-
- <variablelist>
- <varlistentry>
- <term><link linkend="signal-giomountoperation--aborted">"aborted"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giomountoperation--ask-password">"ask-password"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>message</parameter></methodparam>
- <methodparam><parameter>default_user</parameter></methodparam>
- <methodparam><parameter>default_domain</parameter></methodparam>
- <methodparam><parameter>flags</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giomountoperation--ask-question">"ask-question"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>message</parameter></methodparam>
- <methodparam><parameter>choices</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giomountoperation--reply">"reply"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>result</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- provides a mechanism for authenticating mountable operations, such as loop mounting files,
- hard drive partitions or server locations.
- </para>
- <para>
- Mounting operations are handed a
- <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- that then can use if they require any privileges or authentication for their volumes to be
- mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing
- a remote server protocol which requires user credentials such as FTP or WebDAV.
- </para>
- <para>
- Users should instantiate a subclass of this that implements all the various callbacks
- to show the required dialogs, such as
- <link linkend="class-gtkmountoperation"><classname>gtk.MountOperation</classname></link>.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giomountoperation">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.MountOperation</methodname>
- <methodparam></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new mount operation.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giomountoperation--get-anonymous">
- <title>gio.MountOperation.get_anonymous</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_anonymous</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if mount operation is anonymous.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_anonymous</methodname>() method check to see whether
- the mount operation is being used for an anonymous user
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--get-choice">
- <title>gio.MountOperation.get_choice</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_choice</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>an integer containing an index of the user's
- choice from the choice's list, or 0.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_anonymous</methodname>() method gets a choice
- from the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--get-domain">
- <title>gio.MountOperation.get_domain</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_domain</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string set to the domain.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_domain</methodname>() method gets the domain
- of the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--get-password">
- <title>gio.MountOperation.get_password</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_password</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the password within
- the mountoperation.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_password</methodname>() method gets a password
- from the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--get-password-save">
- <title>gio.MountOperation.get_password_save</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_password_save</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
- flag.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_password_save</methodname>() method gets the state
- of saving passwords for the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--get-username">
- <title>gio.MountOperation.get_username</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_username</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a string containing the user name.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_username</methodname>() method get the user
- name from the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--reply">
- <title>gio.MountOperation.reply</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>reply</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>result</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>reply</methodname>() method emits the "reply" signal.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--set-anonymous">
- <title>gio.MountOperation.set_anonymous</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_anonymous</methodname>
- <methodparam><parameter role="keyword">anonymous</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>anonymous</parameter>&nbsp;:</term>
- <listitem><simpara>boolean value.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_anonymous</methodname>() method sets the mount operation
- to use an anonymous user if anonymous is <literal>True</literal>.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--set-choice">
- <title>gio.MountOperation.set_choice</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_choice</methodname>
- <methodparam><parameter role="keyword">choice</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>choice</parameter>&nbsp;:</term>
- <listitem><simpara>an integer.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_choice</methodname>() method sets a default choice for the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--set-domain">
- <title>gio.MountOperation.set_domain</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_domain</methodname>
- <methodparam><parameter role="keyword">domain</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>domain</parameter>&nbsp;:</term>
- <listitem><simpara>the domain to set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_domain</methodname>() method sets the mount operation's domain.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--set-password">
- <title>gio.MountOperation.set_password</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_password</methodname>
- <methodparam><parameter role="keyword">password</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>password</parameter>&nbsp;:</term>
- <listitem><simpara>password to set.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_password</methodname>() method sets the mount
- operation's password to password.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--set-password-save">
- <title>gio.MountOperation.set_password_save</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_password_save</methodname>
- <methodparam><parameter role="keyword">save</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>save</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_password_save</methodname>() method sets the state
- of saving passwords for the mount operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giomountoperation--set-username">
- <title>gio.MountOperation.set_username</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_username</methodname>
- <methodparam><parameter role="keyword">username</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>username</parameter>&nbsp;:</term>
- <listitem><simpara>input username.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_anonymous</methodname>() method sets the user
- name within op to username.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Signals</title>
-
- <refsect2 id="signal-giomountoperation--aborted">
- <title>The "aborted" gio.MountOperation Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mountoperation</parameter>&nbsp;:</term>
- <listitem><simpara>the mountoperation</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
- Implementations of <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- should handle this signal by dismissing open password dialogs.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giomountoperation--ask-password">
- <title>The "ask-password" gio.MountOperation Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>message</parameter></methodparam>
- <methodparam><parameter>default_user</parameter></methodparam>
- <methodparam><parameter>default_domain</parameter></methodparam>
- <methodparam><parameter>flags</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mountoperation</parameter>&nbsp;:</term>
- <listitem><simpara>the mountoperation</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>message</parameter>&nbsp;:</term>
- <listitem><simpara>string containing a message to display to the user.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>default_user</parameter>&nbsp;:</term>
- <listitem><simpara>string containing the default user name.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>default_domain</parameter>&nbsp;:</term>
- <listitem><simpara>string containing the default domain.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>flags</parameter>&nbsp;:</term>
- <listitem><simpara>a set of
- <xref linkend="gio-ask-password-flags-constants" endterm="gio-ask-password-flags-constants-title"></xref>
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- This signal is emitted when a mount operation asks the user for a password.
- If the message contains a line break, the first line should be presented as a heading.
- For example, it may be used as the primary text in a
- <link linkend="class-gtkmessagedialog"><classname>gtk.MessageDialog</classname></link>.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giomountoperation--ask-question">
- <title>The "ask-question" gio.MountOperation Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>message</parameter></methodparam>
- <methodparam><parameter>choices</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mountoperation</parameter>&nbsp;:</term>
- <listitem><simpara>the mountoperation</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>message</parameter>&nbsp;:</term>
- <listitem><simpara>string containing a message to display to the user.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>choices</parameter>&nbsp;:</term>
- <listitem><simpara>a list of strings for each possible choice.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- This signal is emitted when asking the user a question and gives a list of choices
- for the user to choose from. If the message contains a line break, the first line should be
- presented as a heading. For example, it may be used as the primary text in a
- <link linkend="class-gtkmessagedialog"><classname>gtk.MessageDialog</classname></link>.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giomountoperation--reply">
- <title>The "reply" gio.MountOperation Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>mountoperation</parameter></methodparam>
- <methodparam><parameter>result</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>mountoperation</parameter>&nbsp;:</term>
- <listitem><simpara>the mountoperation</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>result</parameter>&nbsp;:</term>
- <listitem><simpara>a
- <xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
- indicating how the request was handled</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- This signal is emitted when the user has replied to the mount operation.
- </para>
- </refsect2>
-
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-outputstream.xml b/docs/reference/pygio-outputstream.xml
deleted file mode 100644
index 00ddf2e..0000000
--- a/docs/reference/pygio-outputstream.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giooutputstream">
- <refnamediv>
- <refname>gio.OutputStream</refname>
- <refpurpose>Base class for implementing streaming input</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.OutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--clear-pending">clear_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--close">close</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--close-async">close_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--close-finish">close_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--flush">flush</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--flush-async">flush_async</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--flush-finish">flush_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--has-pending">has_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--is-closed">is_closed</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--set-pending">set_pending</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--splice">splice</link></methodname>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.OUTPUT_STREAM_SPLICE_NONE</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--splice-async">splice_async</link></methodname>
- <methodparam><parameter role="keyword">source</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer>gio.OUTPUT_STREAM_SPLICE_NONE</initializer></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--splice-finish">splice_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--write">write</link></methodname>
- <methodparam><parameter role="keyword">buffer</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--write-async">write_async</link></methodname>
- <methodparam><parameter role="keyword">buffer</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giooutputstream--write-finish">write_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
- has functions to write from a stream (
- <methodname><link linkend="method-giooutputstream--write">gio.OutputStream.write</link></methodname>()
- ), to close a stream (
- <methodname><link linkend="method-giooutputstream--close">gio.OutputStream.close</link></methodname>()
- ) and to flush pending writes (
- <methodname><link linkend="method-giooutputstream--flush">gio.OutputStream.flush</link></methodname>()
- ).
- </para>
- <para>
- To copy the content of an input stream to an output stream without manually
- handling the reads and writes, use
- <methodname><link linkend="method-giooutputstream--splice">gio.OutputStream.splice</link></methodname>().
- </para>
- <para>
- All of these functions have async variants too.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
- <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-seekable.xml b/docs/reference/pygio-seekable.xml
deleted file mode 100644
index 1081143..0000000
--- a/docs/reference/pygio-seekable.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-gioseekable">
- <refnamediv>
- <refname>gio.Seekable</refname>
- <refpurpose>Stream seeking interface.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Seekable</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioseekable--tell">tell</link></methodname>
- </methodsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioseekable--can_seek">can_seek</link></methodname>
- </methodsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioseekable--seek">seek</link></methodname>
- <methodparam><parameter role="keyword">offset</parameter></methodparam>
- <methodparam><parameter role="keyword">type</parameter><initializer>0</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioseekable--can_truncate">can_truncate</link></methodname>
- </methodsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-gioseekable--truncate">truncate</link></methodname>
- <methodparam><parameter role="keyword">offset</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-gioseekable">gio.Seekable</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Known Implementation</title>
- <para>
- <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link> is implemented by
- <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>,
- <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>,
- <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link> and
- <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
- is implemented by streams (implementations of
- <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link> or
- <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>)
- that support seeking.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-gioseekable--tell">
- <title>gio.Seekable.tell</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>tell</methodname>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>
- the offset from the beginning of the buffer
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Tells the current position within the stream.
- </para>
- </refsect2>
-
- <refsect2 id="method-gioseekable--can_seek">
- <title>gio.Seekable.can_seek</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_seek</methodname>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if this
- <classname>gio.Seekable</classname> can be seeked with
- the <methodname>seek</methodname>() method, <literal>False</literal>
- if not. </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_seek</methodname>() method checks if the
- <link linkend="method-gioseekable--seek"><methodname>seek</methodname>()</link>
- can be used on this <classname>gio.Seekable</classname>.
- </para>
- </refsect2>
- <refsect2 id="method-gioseekable--seek">
- <title>gio.Seekable.seek</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>seek</methodname>
- <methodparam><parameter role="keyword">offset</parameter></methodparam>
- <methodparam><parameter role="keyword">type</parameter><initializer>0</initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>offset</parameter>&nbsp;:</term>
- <listitem><simpara>the offset that is added to the position determined by the <literal>type</literal> parameter.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter>&nbsp;:</term>
- <listitem><simpara>0=current position, 1=start of the file, 2=end of the file.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- or <literal>None</literal>.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> on successful seek,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Seeks in the stream by the given <literal>offset</literal>, modified by <literal>type</literal>.
- </para>
- <para>
- If <literal>cancellable</literal> is not <literal>None</literal>, then the
- operation can be cancelled by triggering the cancellable object from another thread.
- </para>
- </refsect2>
- <refsect2 id="method-gioseekable--can_truncate">
- <title>gio.Seekable.can_truncate</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_truncate</methodname>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if this
- <classname>gio.Seekable</classname> can be truncated with
- the <methodname>truncate</methodname>() method, <literal>False</literal>
- if not. </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_truncate</methodname>() method checks if the
- <link linkend="method-gioseekable--truncate"><methodname>truncate</methodname>()</link>
- can be used on this <classname>gio.Seekable</classname>.
- </para>
- </refsect2>
- <refsect2 id="method-gioseekable--truncate">
- <title>gio.Seekable.truncate</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>truncate</methodname>
- <methodparam><parameter role="keyword">offset</parameter></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>offset</parameter>&nbsp;:</term>
- <listitem><simpara>the offset at which the stream should be truncated
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- or <literal>None</literal>.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if successful,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Truncates a stream with a given <literal>offset</literal>.
- </para>
- <para>
- If <literal>cancellable</literal> is not <literal>None</literal>, then the
- operation can be cancelled by triggering the cancellable object from another thread.
- </para>
- <para>
- If an operation was partially finished when the operation was cancelled the
- partial result will be returned, without an error.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-simpleasyncresult.xml b/docs/reference/pygio-simpleasyncresult.xml
deleted file mode 100644
index f6a0787..0000000
--- a/docs/reference/pygio-simpleasyncresult.xml
+++ /dev/null
@@ -1,317 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giosimpleasyncresult">
- <refnamediv>
- <refname>gio.SimpleAsyncResult</refname>
- <refpurpose>Simple asynchronous results implementation.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.SimpleAsyncResult</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--complete">complete</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">complete_in_idle</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gboolean">get_op_res_gboolean</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gssize">get_op_res_gssize</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--propagate-error">propagate_error</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--set-handle-cancellation">set_handle_cancellation</link></methodname>
- <methodparam><parameter role="keyword">handle_cancellation</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gboolean">set_op_res_gboolean</link></methodname>
- <methodparam><parameter role="keyword">op_res</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gssize">set_op_res_gssize</link></methodname>
- <methodparam><parameter role="keyword">op_res</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giosimpleasyncresult">gio.SimpleAsyncResult</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Implemented Interface</title>
- <para>
- <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link> implements
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- Implements <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- for simple cases. Most of the time, this will be all an application needs, and will be used transparently
- Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions.
- </para>
- <para>
- <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>
- handles GAsyncReadyCallbacks, error reporting, operation cancellation and the final state of an
- operation, completely transparent to the application. Results can be returned as a pointer e.g.
- for functions that return data that is collected asynchronously, a boolean value for checking the
- success or failure of an operation, or a gssize for operations which return the number of bytes modified
- by the operation; all of the simple return cases are covered.
- </para>
- <para>
- Most of the time, an application will not need to know of the details of this API; it is handled
- transparently, and any necessary operations are handled by GAsyncResult's interface. However, if
- implementing a new GIO module, for writing language bindings, or for complex applications that need
- better control of how asynchronous operations are completed, it is important to understand this functionality.
- </para>
- <para>
- <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>
- are tagged with the calling function to ensure that asynchronous functions and
- their finishing functions are used together correctly.
- </para>
- <!-- NEEDS LOVE
- <para>
- To create a new <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>,
- call g_simple_async_result_new(). If the result needs to be created for a GError, use g_simple_async_result_new_from_error().
- If a GError is not available (e.g. the asynchronous operation's doesn't take a GError argument), but the result still needs
- to be created for an error condition, use g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
- if your application or binding requires passing a variable argument list directly), and the error can then be propegated
- through the use of g_simple_async_result_propagate_error().
- </para>
- -->
- <para>
- An asynchronous operation can be made to ignore a cancellation event by calling
- <methodname><link linkend="method-giosimpleasyncresult--set-handle-cancellation">gio.SimpleAsyncResult.set_handle_cancellation</link></methodname>()
- with a
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- for the operation and <literal>False</literal>. This is useful for operations that are dangerous to cancel,
- such as close (which would cause a leak if cancelled before being run).
- </para>
- <para>
- <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
- can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available.
- <methodname><link linkend="method-giosimpleasyncresult--complete">gio.SimpleAsyncResult.complete</link></methodname>()
- will finish an I/O task directly within the main event loop.
- <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">gio.SimpleAsyncResult.complete_in_idle</link></methodname>()
- will integrate the I/O task into the main event loop as an idle function.
- <!--
- and g_simple_async_result_run_in_thread()
- will run the job in a separate thread.
- -->
- </para>
- <para>
- To set the results of an asynchronous function,
- <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gboolean">gio.SimpleAsyncResult.set_op_res_gboolean</link></methodname>(), and
- <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gssize">gio.SimpleAsyncResult.set_op_res_gssize</link></methodname>()
- are provided, setting the operation's result to a gboolean, or gssize, respectively.
- </para>
- <para>
- Likewise, to get the result of an asynchronous function,
- <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gboolean">gio.SimpleAsyncResult.get_op_res_gboolean</link></methodname>() and
- <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gssize">gio.SimpleAsyncResult.get_op_res_gssize</link></methodname>()
- are provided, getting the operation's result as a gboolean and gssize, respectively.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giosimpleasyncresult--complete">
- <title>gio.SimpleAsyncResult.complete</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>complete</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>complete</methodname>() method completes an asynchronous I/O job.
- Must be called in the main thread, as it invokes the callback that should be called
- in the main thread. If you are in a different thread use
- <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">gio.SimpleAsyncResult.complete_in_idle</link></methodname>().
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--complete-in-idle">
- <title>gio.SimpleAsyncResult.complete_in_idle</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>complete_in_idle</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- </variablelist>
-
- <para>
- The <methodname>complete_in_idle</methodname>() method completes an asynchronous
- function in the main event loop using an idle function.
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--get-op-res-gboolean">
- <title>gio.SimpleAsyncResult.get_op_res_gboolean</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_op_res_gboolean</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the operation's result was
- <literal>True</literal>, <literal>False</literal> if the operation's result
- was <literal>False</literal>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_op_res_gboolean</methodname>() method gets the operation
- result boolean from within the asynchronous result.
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--get-op-res-gssize">
- <title>gio.SimpleAsyncResult.get_op_res_gssize</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_op_res_gssize</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a gssize returned from the asynchronous function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_op_res_gssize</methodname>() method gets a gssize
- from the asynchronous result.
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--propagate-error">
- <title>gio.SimpleAsyncResult.propagate_error</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>propagate_error</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the error was propegated
- to dest. <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>propagate_error</methodname>() method propagates an error
- from within the simple asynchronous result to a given destination.
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--set-handle-cancellation">
- <title>gio.SimpleAsyncResult.set_handle_cancellation</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_handle_cancellation</methodname>
- <methodparam><parameter role="keyword">handle_cancellation</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">handle_cancellation</parameter>&nbsp;:</term>
- <listitem><simpara>a boolean.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_handle_cancellation</methodname>() method sets whether
- to handle cancellation within the asynchronous operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--set-op-res-gboolean">
- <title>gio.SimpleAsyncResult.set_op_res_gboolean</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_op_res_gboolean</methodname>
- <methodparam><parameter role="keyword">op_res</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">op_res</parameter>&nbsp;:</term>
- <listitem><simpara>a boolean.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_op_res_gboolean</methodname>() method sets the operation
- result to a boolean within the asynchronous result.
- </para>
- </refsect2>
-
- <refsect2 id="method-giosimpleasyncresult--set-op-res-gssize">
- <title>gio.SimpleAsyncResult.set_op_res_gssize</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_op_res_gssize</methodname>
- <methodparam><parameter role="keyword">op_res</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">op_res</parameter>&nbsp;:</term>
- <listitem><simpara>a gssize.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_op_res_gssize</methodname>() method sets the operation
- result within the asynchronous result to the given op_res.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-themedicon.xml b/docs/reference/pygio-themedicon.xml
deleted file mode 100644
index fe0e44c..0000000
--- a/docs/reference/pygio-themedicon.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giothemedicon">
- <refnamediv>
- <refname>gio.ThemedIcon</refname>
- <refpurpose>Icon theming support.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.ThemedIcon</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giothemedicon">gio.ThemedIcon</link></methodname>
- <methodparam></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giothemedicon--append-name">append_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giothemedicon--get-names">get_names</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giothemedicon--prepend-name">prepend_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giothemedicon">gio.ThemedIcon</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giomountoperation">
- <title>gio.ThemedIcon Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"name"</entry>
- <entry>Write/Contruct Only</entry>
- <entry>
- The icon name. Default value: <literal>None</literal>
- </entry>
- </row>
- <row valign="top">
- <entry>"names"</entry>
- <entry>Read/Write/Contruct Only</entry>
- <entry>
- A list of icon names.
- </entry>
- </row>
- <row valign="top">
- <entry>"use-default-fallbacks"</entry>
- <entry>Read/Write/Contruct Only</entry>
- <entry>
- Whether to use the default fallbacks found by shortening the
- icon name at '-' characters. If the "names" array has more
- than one element, ignores any past the first.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
- is an implementation of <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon
- theme, so that icons can be looked up quickly.
- </para>
- <para>
- <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
- does not provide actual pixmaps for icons, just the icon names. Ideally something like
- <methodname><link linkend="method-gtkicontheme--choose-icon">gtk.IconTheme.choose_icon</link></methodname>()
- should be used to resolve the list of names so that fallback icons work nicely
- with themes that inherit other themes
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giothemedicon">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.ThemedIcon</methodname>
- <methodparam><parameter>name</parameter></methodparam>
- <methodparam><parameter>use_default_fallbacks</parameter><initializer><literal>False</literal></initializer></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>name</parameter>&nbsp;:</term>
- <listitem><simpara>a string containing an icon name.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new themed icon from icon name, if instead of an icon name you
- provide a list of icon names, the <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
- will be constructed using the items in the list.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giothemedicon--append-name">
- <title>gio.ThemedIcon.append_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>append_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>name</emphasis>&nbsp;:</term>
- <listitem><simpara>name of icon to append to list of icons from within icon.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>append_name</methodname>() method appends a name to
- the list of icons from within icon.
- </para>
- </refsect2>
-
- <refsect2 id="method-giothemedicon--get-names">
- <title>gio.ThemedIcon.get_names</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_names</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of icon names.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_names</methodname>() method gets the names
- of icons from within icon.
- </para>
- </refsect2>
-
- <refsect2 id="method-giothemedicon--prepend-name">
- <title>gio.ThemedIcon.prepend_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>prepend_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>name</emphasis>&nbsp;:</term>
- <listitem><simpara>name of icon to prepend to list of icons from within icon.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>prepend_name</methodname>() method prepends a name to
- the list of icons from within icon.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-unixinputstream.xml b/docs/reference/pygio-unixinputstream.xml
deleted file mode 100644
index 5ef4cde..0000000
--- a/docs/reference/pygio-unixinputstream.xml
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giounixinputstream">
- <refnamediv>
- <refname>gio.unix.InputStream</refname>
- <refpurpose>Streaming input operations for UNIX file descriptors.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.unix.InputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giounixinputstream">gio.unix.InputStream</link></methodname>
- <methodparam><parameter role="keyword">fd</parameter></methodparam>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giounixinputstream--get-close-fd">get_close_fd</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giounixinputstream--get-fd">get_fd</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giounixinputstream--set-close-fd">set_close_fd</link></methodname>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-gioinputstream">gio.InputStream</link>
- +-- <link linkend="class-giounixinputstream">gio.unix.InputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giounixinputstream">
- <title>gio.unix.InputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"close-fd"</entry>
- <entry>Read - Write</entry>
- <entry>Whether to close the file descriptor when the stream is closed.
- Default value: <literal>True</literal>.</entry>
- </row>
- <row valign="top">
- <entry>"fd"</entry>
- <entry>Read - Write - Construct only</entry>
- <entry>The file descriptor that the stream reads from. Default value: -1.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
- implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
- for reading from a UNIX file descriptor, including asynchronous operations.
- The file descriptor must be selectable, so it doesn't work with opened files.
- </para>
- <para>
- Note that <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
- belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
- when using it.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giounixinputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.unix.InputStream</methodname>
- <methodparam><parameter role="keyword">fd</parameter></methodparam>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>fd</parameter>&nbsp;:</term>
- <listitem><simpara>a UNIX file descriptor.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>close_fd</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal>
- to close the file descriptor when done
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
- from the given fd.
- </para>
- <para>
- If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giounixinputstream--get-close-fd">
- <title>gio.unix.InputStream.get_close_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_close_fd</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_close_fd</methodname>() method returns whether the file
- descriptor of stream will be closed when the stream is closed.
- </para>
- </refsect2>
-
- <refsect2 id="method-giounixinputstream--get-fd">
- <title>gio.unix.InputStream.get_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_fd</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The file descriptor of stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_fd</methodname>() method return the UNIX file descriptor
- that the stream reads from.
- </para>
- </refsect2>
-
- <refsect2 id="method-giounixinputstream--set-close-fd">
- <title>gio.unix.InputStream.set_close_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_close_fd</methodname>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">close_fd</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> to close the file descriptor when done .
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
- of stream shall be closed when the stream is closed.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-unixoutputstream.xml b/docs/reference/pygio-unixoutputstream.xml
deleted file mode 100644
index 02e4be8..0000000
--- a/docs/reference/pygio-unixoutputstream.xml
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giounixoutputstream">
- <refnamediv>
- <refname>gio.unix.OutputStream</refname>
- <refpurpose>Streaming output operations for UNIX file descriptors.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.unix.OutputStream</classname></ooclass>
- <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
-
- <constructorsynopsis language="python">
- <methodname><link linkend="constructor-giounixoutputstream">gio.unix.OutputStream</link></methodname>
- <methodparam><parameter role="keyword">fd</parameter></methodparam>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </constructorsynopsis>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giounixoutputstream--get-close-fd">get_close_fd</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giounixoutputstream--get-fd">get_fd</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giounixoutputstream--set-close-fd">set_close_fd</link></methodname>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
- +-- <link linkend="class-giounixoutputstream">gio.unix.OutputStream</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="properties-giounixoutputstream">
- <title>gio.unix.OutputStream Properties</title>
-
- <blockquote role="properties">
- <informaltable pgwide="1" frame="none">
- <tgroup cols="3">
- <colspec column="1" colwidth="1in"/>
- <colspec column="2" colwidth="1in"/>
- <colspec column="3" colwidth="4in"/>
- <tbody>
- <row valign="top">
- <entry>"close-fd"</entry>
- <entry>Read - Write</entry>
- <entry>Whether to close the file descriptor when the stream is closed.
- Default value: <literal>True</literal>.</entry>
- </row>
- <row valign="top">
- <entry>"fd"</entry>
- <entry>Read - Write - Construct only</entry>
- <entry>The file descriptor that the stream writes to. Default value: -1.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </blockquote>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
- implements <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
- for writing to a UNIX file descriptor, including asynchronous operations.
- The file descriptor must be selectable, so it doesn't work with opened files.
- </para>
- <para>
- Note that <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
- belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
- when using it.
- </para>
- </refsect1>
-
- <refsect1 id="constructor-giounixoutputstream">
- <title>Constructor</title>
-
- <programlisting><constructorsynopsis language="python">
- <methodname>gio.unix.OutputStream</methodname>
- <methodparam><parameter role="keyword">fd</parameter></methodparam>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </constructorsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>fd</parameter>&nbsp;:</term>
- <listitem><simpara>a UNIX file descriptor.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>close_fd</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal>
- to close the file descriptor when done
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a new
- <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Creates a new <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
- from the given fd.
- </para>
- <para>
- If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giounixoutputstream--get-close-fd">
- <title>gio.unix.OutputStream.get_close_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_close_fd</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_close_fd</methodname>() method returns whether the file
- descriptor of stream will be closed when the stream is closed.
- </para>
- </refsect2>
-
- <refsect2 id="method-giounixoutputstream--get-fd">
- <title>gio.unix.OutputStream.get_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_fd</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The file descriptor of stream.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_fd</methodname>() method return the UNIX file descriptor
- that the stream reads from.
- </para>
- </refsect2>
-
- <refsect2 id="method-giounixoutputstream--set-close-fd">
- <title>gio.unix.OutputStream.set_close_fd</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>set_close_fd</methodname>
- <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">close_fd</parameter>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> to close the file descriptor when done .
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
- of stream shall be closed when the stream is closed.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-volume.xml b/docs/reference/pygio-volume.xml
deleted file mode 100644
index cf0fa50..0000000
--- a/docs/reference/pygio-volume.xml
+++ /dev/null
@@ -1,718 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giovolume">
- <refnamediv>
- <refname>gio.Volume</refname>
- <refpurpose>Volume management.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.Volume</classname></ooclass>
- <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--can-eject">can_eject</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--can-mount">can_mount</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--eject">eject</link></methodname>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--eject-finish">eject_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--enumerate-identifiers">enumerate_identifiers</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-activation-root">get_activation_root</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-drive">get_drive</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-icon">get_icon</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-identifier">get_identifier</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-mount">get_mount</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-name">get_name</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--get-uuid">get_uuid</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--mount">mount</link></methodname>
- <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
- <methodparam><parameter role="keyword">callback</parameter></methodparam>
- <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_MOUNT_NONE</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
- <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--mount-finish">mount_finish</link></methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolume--should-automount">should_automount</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
- +-- <link linkend="class-giovolume">gio.Volume</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1>
- <title>Prerequisites</title>
- <para>
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link> requires
- <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
- </para>
- </refsect1>
-
- <refsect1 id="signal-prototypes-giovolume">
- <title>gio.Volume Signal Prototypes</title>
-
- <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
-
- <variablelist>
- <varlistentry>
- <term><link linkend="signal-giovolume--changed">"changed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolume--removed">"removed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- interface represents user-visible objects that can be mounted. Note, when porting
- from GnomeVFS, <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- is the moral equivalent of GnomeVFSDrive.
- </para>
- <para>
- Mounting a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- instance is an asynchronous operation. For more information about asynchronous operations.
- To mount a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>, first call
- <methodname><link linkend="method-giovolume--mount">gio.Volume.mount</link></methodname>()
- with (at least) the <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- instance, optionally a
- <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- object and a GAsyncReadyCallback.
- </para>
- <para>
- Typically, one will only want to pass <literal>None</literal> for the GMountOperation
- if automounting all volumes when a desktop session starts since it's not desirable
- to put up a lot of dialogs asking for credentials.
- </para>
- <para>
- The callback will be fired when the operation has resolved (either with success or failure),
- and a GAsyncReady structure will be passed to the callback. That callback should then call
- <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
- with the GVolume instance and the GAsyncReady data to see if the operation was completed
- successfully. If an error is present when
- <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
- is called, then it will be filled with any error information.
- </para>
- <para>
- It is sometimes necessary to directly access the underlying operating system object behind a volume
- (e.g. for passing a volume to an application via the commandline). For this purpose, GIO allows to obtain
- an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs,
- filesystem labels, traditional Unix devices (e.g. /dev/sda2), uuids. GIO uses predefind strings
- as names for the different kinds of identifiers:
- "hal-udi", "label", etc. Use
- <methodname><link linkend="method-giovolume--get-identifier">gio.Volume.get_identifier</link></methodname>()
- to obtain an identifier for a volume.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giovolume--can-eject">
- <title>gio.Volume.can_eject</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_eject</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the volume can be ejected,
- <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_eject</methodname>() method checks if a volume can be ejected.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--can-mount">
- <title>gio.Volume.can_mount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>can_mount</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the volume can be mounted
- for media changes, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>can_mount</methodname>() method checks if a volume
- can be mounted.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--eject">
- <title>gio.Volume.eject</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject</methodname>
- <methodparam>
- <parameter role="keyword">callback</parameter>
- </methodparam>
- <methodparam>
- <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
- <listitem><simpara>flags affecting the unmount if required for eject.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject</methodname>() method asynchronously ejects a volume.
- </para>
- <para>
- When the operation is finished, callback will be called. You can then call
- <methodname><link linkend="method-giovolume--eject-finish">gio.Volume.eject_finish</link></methodname>()
- to obtain the result of the operation.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--eject-finish">
- <title>gio.Volume.eject_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>eject_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the volume has been ejected
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>eject_finish</methodname>() method finishes ejecting a volume.
- If any errors occured during the operation, error will be set to contain the
- errors and <literal>False</literal> will be returned.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--enumerate-identifiers">
- <title>gio.Volume.enumerate_identifiers</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>enumerate_identifiers</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of strings containing kinds of identifiers.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>enumerate_identifiers</methodname>() method gets the kinds
- of identifiers that volume has. Use
- <methodname><link linkend="method-giovolume--get-identifier">gio.Volume.get_identifier</link></methodname>()
- to obtain the identifiers themselves.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-activation-root">
- <title>gio.Volume.get_activation_root</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_activation_root</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the activation root of volume or <literal>None</literal>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_activation_root</methodname>() method gets the activation
- root for a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- if it is known ahead of mount time. Returns <literal>None</literal> otherwise.
- If not <literal>None</literal> and if volume is mounted, then the result of
- <methodname><link linkend="method-giomount--get-root">gio.Mount.get_root</link></methodname>()
- on the GMount object obtained from
- <methodname><link linkend="method-giovolume--get-mount">gio.Volume.get_mount</link></methodname>()
- will always either be equal or a prefix of what this function returns.
- In other words, in code:
- </para>
-<programlisting>
-mount = volume.get_mount() # mounted, so never None
-mount_root = mount.get_root()
-volume_activation_root = volume.get_activation_root() # assume not None
-</programlisting>
- <para>
- then the expression
- </para>
-<programlisting>
-volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mount_root)
-</programlisting>
- <para>
- will always be <literal>True</literal>.
- </para>
- <para>
- Activation roots are typically used in
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- implementations to find the underlying mount to shadow, see
- <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
- for more details.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-drive">
- <title>gio.Volume.get_drive</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_drive</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
- or <literal>None</literal> if volume is not associated with a drive.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_drive</methodname>() method gets the drive for the volume.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-icon">
- <title>gio.Volume.get_icon</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_icon</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
- for the volume.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_icon</methodname>() method gets the icon for volume.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-identifier">
- <title>gio.Volume.get_identifier</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_identifier</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A string containing the requested identfier, or
- <literal>None</literal> if the
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- doesn't have this kind of identifier.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_identifier</methodname>() method gets the identifier of
- the given kind for volume.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-mount">
- <title>gio.Volume.get_mount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_mount</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- or <literal>None</literal> if volume isn't mounted.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_mount</methodname>() method gets the mount for the volume.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-name">
- <title>gio.Volume.get_name</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_name</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A string containing volume's name.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_name</methodname>() method gets the name of volume.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--get-uuid">
- <title>gio.Volume.get_uuid</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_uuid</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>the UUID for volume or <literal>None</literal>
- if no UUID can be computed.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_uuid</methodname>() method gets the UUID for the volume.
- The reference is typically based on the file system UUID for the volume in
- question and should be considered an opaque string.
- Returns <literal>None</literal> if there is no UUID available.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--mount">
- <title>gio.Volume.mount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>mount</methodname>
- <methodparam>
- <parameter role="keyword">mount_operation</parameter>
- </methodparam>
- <methodparam>
- <parameter role="keyword">callback</parameter>
- </methodparam>
- <methodparam>
- <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_MOUNT_NONE</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- <methodparam>
- <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
- </methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">mount_operation</parameter>&nbsp;:</term>
- <listitem><simpara>A
- <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
- or <literal>None</literal> to avoid user interaction.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
- <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
- <listitem><simpara>Flags affecting the operation
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
- <listitem><simpara>Optional
- <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
- object, <literal>None</literal> to ignore.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
- <listitem><simpara>The data to pass to callback function.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>mount</methodname>() method mounts a volume. This is an
- asynchronous operation, and is finished by calling
- <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
- with the volume and GAsyncResult returned in the callback.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--mount-finish">
- <title>gio.Volume.mount_finish</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>mount_finish</methodname>
- <methodparam><parameter role="keyword">result</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">result</parameter>&nbsp;:</term>
- <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the volume has been mounted
- successfully, <literal>False</literal> otherwise.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>mounted</methodname>() method finishes mounting a volume.
- If any errors occured during the operation, error will be set to contain
- the errors and <literal>False</literal> will be returned.
- </para>
- <para>
- If the mount operation succeeded,
- <methodname><link linkend="method-giovolume--get-mount">get_mount</link></methodname>()
- on volume is guaranteed to return the mount right after calling this function;
- there's no need to listen for the 'mount-added' signal on
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolume--should-automount">
- <title>gio.Volume.should_automount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>should_automount</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara><literal>True</literal> if the volume should
- be automatically mounted.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>should_automount</methodname>() method returns whether
- the volume should be automatically mounted.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Signals</title>
-
- <refsect2 id="signal-giovolume--changed">
- <title>The "changed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume</parameter>&nbsp;:</term>
- <listitem><simpara>the volume</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when the volume has been changed.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolume--removed">
- <title>The "removed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume</parameter>&nbsp;:</term>
- <listitem><simpara>the volume</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- This signal is emitted when the
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- have been removed. If the recipient is holding references to the object
- they should release them so the object can be finalized.
- </para>
- </refsect2>
-
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygio-volumemonitor.xml b/docs/reference/pygio-volumemonitor.xml
deleted file mode 100644
index 399d07e..0000000
--- a/docs/reference/pygio-volumemonitor.xml
+++ /dev/null
@@ -1,844 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<refentry id="class-giovolumemonitor">
- <refnamediv>
- <refname>gio.VolumeMonitor</refname>
- <refpurpose>Volume Monitor.</refpurpose>
- </refnamediv>
-
- <refsect1>
- <title>Synopsis</title>
-
- <classsynopsis language="python">
- <ooclass><classname>gio.VolumeMonitor</classname></ooclass>
- <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
-
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolumemonitor--get-connected-drives">get_connected_drives</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolumemonitor--get-mount-for-uuid">get_mount_for_uuid</link></methodname>
- <methodparam><parameter role="keyword">uuid</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolumemonitor--get-mounts">get_mounts</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolumemonitor--get-volume-for-uuid">get_volume_for_uuid</link></methodname>
- <methodparam><parameter role="keyword">uuid</parameter></methodparam>
- </methodsynopsis>
- <methodsynopsis language="python">
- <methodname><link linkend="method-giovolumemonitor--get-volumes">get_volumes</link></methodname>
- <methodparam></methodparam>
- </methodsynopsis>
-
- </classsynopsis>
-
-<programlisting>
-<emphasis role="bold">Functions</emphasis>
-<methodsynopsis language="python">
- <methodname><link linkend="function-gio--volume-monitor-adopt-orphan-mount">gio.volume_monitor_adopt_orphan_mount</link></methodname>
- <methodparam></methodparam>
-</methodsynopsis><methodsynopsis language="python">
- <methodname><link linkend="function-gio--volume-monitor-get">gio.volume_monitor_get</link></methodname>
- <methodparam></methodparam>
-</methodsynopsis></programlisting>
-
- </refsect1>
-
- <refsect1>
- <title>Ancestry</title>
-
-<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
- +-- <link linkend="class-giovolumemonitor">gio.VolumeMonitor</link>
-</synopsis>
-
- </refsect1>
-
- <refsect1 id="signal-prototypes-giovolumemonitor">
- <title>gio.VolumeMonitor Signal Prototypes</title>
-
- <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
-
- <variablelist>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--drive-changed">"drive-changed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--drive-connected">"drive-connected"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--drive-disconnected">"drive-disconnected"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--drive-eject-button">"drive-eject-button"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--mount-added">"mount-added"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--mount-changed">"mount-changed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--mount-pre-unmount">"mount-pre-unmount"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--mount-removed">"mount-removed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--volume-added">"volume-added"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--volume-changed">"volume-changed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><link linkend="signal-giovolumemonitor--volume-removed">"volume-removed"</link></term>
- <listitem>
- <methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1>
- <title>Description</title>
-
- <para>
- The <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- is for listing the user interesting devices and volumes on the computer. In other words,
- what a file selector or file manager would show in a sidebar.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Methods</title>
-
- <refsect2 id="method-giovolumemonitor--get-connected-drives">
- <title>gio.VolumeMonitor.get_connected_drives</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_connected_drives</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>a list of connected
- <link linkend="class-giodrive"><classname>gio.Drive</classname></link> objects.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_connected_drives</methodname>() method gets a list
- of drives connected to the system.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolumemonitor--get-mount-for-uuid">
- <title>gio.VolumeMonitor.get_mount_for_uuid</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_mount_for_uuid</methodname>
- <methodparam><parameter role="keyword">uuid</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">uuid</parameter>&nbsp;:</term>
- <listitem><simpara>The UUID to look for.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- or <literal>None</literal> if no such mount is available.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_mount_for_uuid</methodname>() method finds a
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- object by it's UUID (see
- <methodname><link linkend="method-giomount--get-uuid">gio.Mount.get_uuid</link></methodname>())
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolumemonitor--get-mounts">
- <title>gio.VolumeMonitor.get_mounts</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_mounts</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list of
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- objects.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_mounts</methodname>() method gets a list of the mounts on the system.
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolumemonitor--get-volume-for-uuid">
- <title>gio.VolumeMonitor.get_volume_for_uuid</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_volume_for_uuid</methodname>
- <methodparam><parameter role="keyword">uuid</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter role="keyword">uuid</parameter>&nbsp;:</term>
- <listitem><simpara>The UUID to look for.
- </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- or <literal>None</literal> if no such volume is available.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_mount_for_uuid</methodname>() method finds a
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- object by it's UUID (see
- <methodname><link linkend="method-giomount--get-uuid">gio.Mount.get_uuid</link></methodname>())
- </para>
- </refsect2>
-
- <refsect2 id="method-giovolumemonitor--get-volumes">
- <title>gio.VolumeMonitor.get_volumes</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>get_volumes</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A list of
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- objects.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>get_volumes</methodname>() method gets a list of the volumes on the system.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Functions</title>
-
- <refsect2 id="function-gio--volume-monitor-adopt-orphan-mount">
- <title>gio.volume_monitor_adopt_orphan_mount</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>volume_monitor_adopt_orphan_mount</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>The <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- object that is the parent for mount or <literal>None</literal> if no wants to adopt the
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <warning>
- <para>This method will be deprecated starting from GIO 2.20</para>
- </warning>
-
- <para>
- The <methodname>volume_monitor_adopt_orphan_mount</methodname>() function should
- be called by any <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- implementation when a new <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- object is created that is not associated with a
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link> object.
- It must be called just before emitting the mount_added signal.
- </para>
- <para>
- If the return value is not <literal>None</literal>, the caller must associate the returned
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- object with the
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>.
- This involves returning it in it's
- <methodname><link linkend="method-giomount--get-volumes">gio.Mount.get_volumes</link></methodname>()
- implementation. The caller must also listen for the "removed" signal on the
- returned object and give up it's reference when handling that signal
- </para>
- <para>
- Similary, if implementing
- <methodname><link linkend="function-gio--volume-monitor-adopt-orphan-mount">gio.volume_monitor_adopt_orphan_mount</link></methodname>(),
- the implementor must take a reference to mount and return it in it's
- <methodname><link linkend="method-giovolume--get-mount">gio.Volume.get_mount</link></methodname>()
- implemented. Also, the implementor must listen for the "unmounted" signal
- on mount and give up it's reference upon handling that signal.
- </para>
- <para>
- There are two main use cases for this function.
- </para>
- <para>
- One is when implementing a user space file system driver that reads blocks of
- a block device that is already represented by the native volume monitor
- (for example a CD Audio file system driver). Such a driver will generate it's own
- <link linkend="class-giomount"><classname>gio.Mount</classname></link>
- object that needs to be assoicated with the
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- object that represents the volume.
- </para>
- <para>
- The other is for implementing a
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- whose sole purpose is to return
- <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
- objects representing entries in the users "favorite servers" list or similar.
- </para>
- </refsect2>
-
- <refsect2 id="function-gio--volume-monitor-get">
- <title>gio.volume_monitor_get</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>volume_monitor_get</methodname>
- <methodparam></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>A reference to the
- <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
- used by gio.
- </simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The <methodname>volume_monitor_get</methodname>() function gets the
- volume monitor used by gio.
- </para>
- </refsect2>
- </refsect1>
-
- <refsect1>
- <title>Signals</title>
-
- <refsect2 id="signal-giovolumemonitor--drive-changed">
- <title>The "drive-changed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>drive</parameter>&nbsp;:</term>
- <listitem><simpara>the drive that changed</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a drive changes.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--drive-connected">
- <title>The "drive-connected" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>drive</parameter>&nbsp;:</term>
- <listitem><simpara>the drive that was connected</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a drive is connected to the system.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--drive-disconnected">
- <title>The "drive-disconnected" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>drive</parameter>&nbsp;:</term>
- <listitem><simpara>the drive that was disconnected</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a drive is disconnected from the system.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--drive-eject-button">
- <title>The "drive-eject-button" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>drive</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>drive</parameter>&nbsp;:</term>
- <listitem><simpara>the drive where the eject button was pressed</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when the eject button is pressed on drive.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--mount-added">
- <title>The "mount-added" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>a Mount that was added.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a mount is added.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--mount-changed">
- <title>The "mount-changed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>the Mount that changed.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a mount changes.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--mount-pre-unmount">
- <title>The "mount-pre-unmount" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>the Mount that is being unmounted.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a mount is about to be removed.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--mount-removed">
- <title>The "mount-removed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>mount</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mount</parameter>&nbsp;:</term>
- <listitem><simpara>the Mount that was removed.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a mount is removed.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--volume-added">
- <title>The "volume-added" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>volume</parameter>&nbsp;:</term>
- <listitem><simpara>a Volume that was added.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a mountable volume is added to the system.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--volume-changed">
- <title>The "volume-changed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>volume</parameter>&nbsp;:</term>
- <listitem><simpara>a Volume that changed.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when mountable volume is changed.
- </para>
- </refsect2>
-
- <refsect2 id="signal-giovolumemonitor--volume-removed">
- <title>The "volume-removed" gio.Volume Signal</title>
-
- <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
- <methodparam><parameter>volume_monitor</parameter></methodparam>
- <methodparam><parameter>volume</parameter></methodparam>
- <methodparam><parameter>user_param1</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
-
- <variablelist>
- <varlistentry>
- <term><parameter>volume_monitor</parameter>&nbsp;:</term>
- <listitem><simpara>the volume monitor</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>volume</parameter>&nbsp;:</term>
- <listitem><simpara>a Volume that was removed.</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>user_param1</parameter>&nbsp;:</term>
- <listitem><simpara>the first user parameter (if any) specified
- with the <link
- linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
- method</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>additional user parameters (if any)</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- Emitted when a mountable volume is removed from the system.
- </para>
- </refsect2>
- </refsect1>
-</refentry>
diff --git a/docs/reference/pygiounix-classes.xml b/docs/reference/pygiounix-classes.xml
deleted file mode 100644
index 72b0081..0000000
--- a/docs/reference/pygiounix-classes.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<chapter id="giounix-class-reference"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-
-<title>PyGio Unix Class Reference</title>
-
-<!-- GIOUNIX CLASSES -->
-<xi:include href="pygio-unixinputstream.xml"/>
-<xi:include href="pygio-unixoutputstream.xml"/>
-
-</chapter>
diff --git a/docs/reference/pygobject-ref.xml b/docs/reference/pygobject-ref.xml
index 5fdd80b..ee90a55 100644
--- a/docs/reference/pygobject-ref.xml
+++ b/docs/reference/pygobject-ref.xml
@@ -24,8 +24,6 @@ module.</para>
<xi:include href="pyglib-classes.xml"/>
<xi:include href="pygobject-classes.xml"/>
- <xi:include href="pygio-classes.xml"/>
- <xi:include href="pygiounix-classes.xml"/>
<!--
<index>
diff --git a/examples/Makefile.in b/examples/Makefile.in
index b0ab293..c91307a 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -86,8 +86,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -204,7 +202,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
diff --git a/examples/cairo-demo.py b/examples/cairo-demo.py
index 72a0533..9b8e8f9 100755
--- a/examples/cairo-demo.py
+++ b/examples/cairo-demo.py
@@ -79,9 +79,7 @@ def fill_shapes(ctx, x, y):
def stroke_shapes(ctx, x, y):
draw_shapes(ctx, x, y, False)
-def expose (da, event):
- ctx = Gdk.cairo_create(da.window)
-
+def draw(da, ctx):
ctx.set_source_rgb(0, 0, 0)
ctx.set_line_width(SIZE / 4)
@@ -114,7 +112,7 @@ def main():
drawingarea = Gtk.DrawingArea()
win.add(drawingarea)
- drawingarea.connect('expose_event', expose)
+ drawingarea.connect('draw', draw)
win.show_all()
Gtk.main()
diff --git a/gi/Makefile.am b/gi/Makefile.am
index 31f6c79..ee5eb00 100644
--- a/gi/Makefile.am
+++ b/gi/Makefile.am
@@ -5,9 +5,11 @@ pkgpyexecdir = $(pyexecdir)
SUBDIRS = \
repository \
- overrides
+ overrides \
+ _glib \
+ _gobject
-INCLUDES = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib
+INCLUDES = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib
pygidir = $(pkgpyexecdir)/gi
pygi_PYTHON = \
@@ -25,14 +27,12 @@ _gi_la_LDFLAGS = \
-export-symbols-regex "init_gi|PyInit__gi"
_gi_la_LIBADD = \
$(GI_LIBS) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
_gi_la_SOURCES = \
pygi-repository.c \
pygi-repository.h \
pygi-info.c \
pygi-info.h \
- pygi-invoke.c \
- pygi-invoke.h \
pygi-foreign.c \
pygi-foreign.h \
pygi-foreign-gvariant.c \
@@ -56,7 +56,18 @@ _gi_la_SOURCES = \
pygi-signal-closure.c \
pygi-signal-closure.h \
pygobject-external.h \
- gimodule.c
+ gimodule.c \
+ pygi-invoke.c \
+ pygi-invoke.h \
+ pygi-invoke-state-struct.h \
+ pygi-cache.h \
+ pygi-cache.c \
+ pygi-marshal-in.c \
+ pygi-marshal-in.h \
+ pygi-marshal-out.c \
+ pygi-marshal-out.h \
+ pygi-marshal-cleanup.c \
+ pygi-marshal-cleanup.h
_gi_cairo_la_CFLAGS = \
$(PYTHON_INCLUDES) \
diff --git a/gi/Makefile.in b/gi/Makefile.in
index 3015b22..afadd49 100644
--- a/gi/Makefile.in
+++ b/gi/Makefile.in
@@ -74,14 +74,16 @@ am__installdirs = "$(DESTDIR)$(pygidir)" "$(DESTDIR)$(pygidir)"
LTLIBRARIES = $(pygi_LTLIBRARIES)
am__DEPENDENCIES_1 =
_gi_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
am__gi_la_OBJECTS = _gi_la-pygi-repository.lo _gi_la-pygi-info.lo \
- _gi_la-pygi-invoke.lo _gi_la-pygi-foreign.lo \
- _gi_la-pygi-foreign-gvariant.lo _gi_la-pygi-struct.lo \
- _gi_la-pygi-argument.lo _gi_la-pygi-type.lo \
- _gi_la-pygi-boxed.lo _gi_la-pygi-closure.lo \
- _gi_la-pygi-callbacks.lo _gi_la-pygi-property.lo \
- _gi_la-pygi-signal-closure.lo _gi_la-gimodule.lo
+ _gi_la-pygi-foreign.lo _gi_la-pygi-foreign-gvariant.lo \
+ _gi_la-pygi-struct.lo _gi_la-pygi-argument.lo \
+ _gi_la-pygi-type.lo _gi_la-pygi-boxed.lo \
+ _gi_la-pygi-closure.lo _gi_la-pygi-callbacks.lo \
+ _gi_la-pygi-property.lo _gi_la-pygi-signal-closure.lo \
+ _gi_la-gimodule.lo _gi_la-pygi-invoke.lo _gi_la-pygi-cache.lo \
+ _gi_la-pygi-marshal-in.lo _gi_la-pygi-marshal-out.lo \
+ _gi_la-pygi-marshal-cleanup.lo
_gi_la_OBJECTS = $(am__gi_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
@@ -198,8 +200,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -316,7 +316,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
@@ -329,9 +328,11 @@ top_srcdir = @top_srcdir@
PLATFORM_VERSION = 2.0
SUBDIRS = \
repository \
- overrides
+ overrides \
+ _glib \
+ _gobject
-INCLUDES = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib
+INCLUDES = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib
pygidir = $(pkgpyexecdir)/gi
pygi_PYTHON = \
types.py \
@@ -350,15 +351,13 @@ _gi_la_LDFLAGS = \
_gi_la_LIBADD = \
$(GI_LIBS) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
_gi_la_SOURCES = \
pygi-repository.c \
pygi-repository.h \
pygi-info.c \
pygi-info.h \
- pygi-invoke.c \
- pygi-invoke.h \
pygi-foreign.c \
pygi-foreign.h \
pygi-foreign-gvariant.c \
@@ -382,7 +381,18 @@ _gi_la_SOURCES = \
pygi-signal-closure.c \
pygi-signal-closure.h \
pygobject-external.h \
- gimodule.c
+ gimodule.c \
+ pygi-invoke.c \
+ pygi-invoke.h \
+ pygi-invoke-state-struct.h \
+ pygi-cache.h \
+ pygi-cache.c \
+ pygi-marshal-in.c \
+ pygi-marshal-in.h \
+ pygi-marshal-out.c \
+ pygi-marshal-out.h \
+ pygi-marshal-cleanup.c \
+ pygi-marshal-cleanup.h
_gi_cairo_la_CFLAGS = \
$(PYTHON_INCLUDES) \
@@ -480,12 +490,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-gimodule.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-argument.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-boxed.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-cache.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-marshal-cleanup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-marshal-in.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-marshal-out.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-property.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-repository.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-signal-closure.Plo@am__quote@
@@ -532,14 +546,6 @@ _gi_la-pygi-info.lo: pygi-info.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-info.lo `test -f 'pygi-info.c' || echo '$(srcdir)/'`pygi-info.c
-_gi_la-pygi-invoke.lo: pygi-invoke.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-invoke.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-invoke.Tpo -c -o _gi_la-pygi-invoke.lo `test -f 'pygi-invoke.c' || echo '$(srcdir)/'`pygi-invoke.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-invoke.Tpo $(DEPDIR)/_gi_la-pygi-invoke.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygi-invoke.c' object='_gi_la-pygi-invoke.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-invoke.lo `test -f 'pygi-invoke.c' || echo '$(srcdir)/'`pygi-invoke.c
-
_gi_la-pygi-foreign.lo: pygi-foreign.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-foreign.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-foreign.Tpo -c -o _gi_la-pygi-foreign.lo `test -f 'pygi-foreign.c' || echo '$(srcdir)/'`pygi-foreign.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-foreign.Tpo $(DEPDIR)/_gi_la-pygi-foreign.Plo
@@ -628,6 +634,46 @@ _gi_la-gimodule.lo: gimodule.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-gimodule.lo `test -f 'gimodule.c' || echo '$(srcdir)/'`gimodule.c
+_gi_la-pygi-invoke.lo: pygi-invoke.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-invoke.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-invoke.Tpo -c -o _gi_la-pygi-invoke.lo `test -f 'pygi-invoke.c' || echo '$(srcdir)/'`pygi-invoke.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-invoke.Tpo $(DEPDIR)/_gi_la-pygi-invoke.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygi-invoke.c' object='_gi_la-pygi-invoke.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-invoke.lo `test -f 'pygi-invoke.c' || echo '$(srcdir)/'`pygi-invoke.c
+
+_gi_la-pygi-cache.lo: pygi-cache.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-cache.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-cache.Tpo -c -o _gi_la-pygi-cache.lo `test -f 'pygi-cache.c' || echo '$(srcdir)/'`pygi-cache.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-cache.Tpo $(DEPDIR)/_gi_la-pygi-cache.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygi-cache.c' object='_gi_la-pygi-cache.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-cache.lo `test -f 'pygi-cache.c' || echo '$(srcdir)/'`pygi-cache.c
+
+_gi_la-pygi-marshal-in.lo: pygi-marshal-in.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-marshal-in.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-marshal-in.Tpo -c -o _gi_la-pygi-marshal-in.lo `test -f 'pygi-marshal-in.c' || echo '$(srcdir)/'`pygi-marshal-in.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-marshal-in.Tpo $(DEPDIR)/_gi_la-pygi-marshal-in.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygi-marshal-in.c' object='_gi_la-pygi-marshal-in.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-marshal-in.lo `test -f 'pygi-marshal-in.c' || echo '$(srcdir)/'`pygi-marshal-in.c
+
+_gi_la-pygi-marshal-out.lo: pygi-marshal-out.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-marshal-out.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-marshal-out.Tpo -c -o _gi_la-pygi-marshal-out.lo `test -f 'pygi-marshal-out.c' || echo '$(srcdir)/'`pygi-marshal-out.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-marshal-out.Tpo $(DEPDIR)/_gi_la-pygi-marshal-out.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygi-marshal-out.c' object='_gi_la-pygi-marshal-out.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-marshal-out.lo `test -f 'pygi-marshal-out.c' || echo '$(srcdir)/'`pygi-marshal-out.c
+
+_gi_la-pygi-marshal-cleanup.lo: pygi-marshal-cleanup.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-marshal-cleanup.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-marshal-cleanup.Tpo -c -o _gi_la-pygi-marshal-cleanup.lo `test -f 'pygi-marshal-cleanup.c' || echo '$(srcdir)/'`pygi-marshal-cleanup.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-marshal-cleanup.Tpo $(DEPDIR)/_gi_la-pygi-marshal-cleanup.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygi-marshal-cleanup.c' object='_gi_la-pygi-marshal-cleanup.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-marshal-cleanup.lo `test -f 'pygi-marshal-cleanup.c' || echo '$(srcdir)/'`pygi-marshal-cleanup.c
+
_gi_cairo_la-pygi-foreign-cairo.lo: pygi-foreign-cairo.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_cairo_la_CFLAGS) $(CFLAGS) -MT _gi_cairo_la-pygi-foreign-cairo.lo -MD -MP -MF $(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Tpo -c -o _gi_cairo_la-pygi-foreign-cairo.lo `test -f 'pygi-foreign-cairo.c' || echo '$(srcdir)/'`pygi-foreign-cairo.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Tpo $(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Plo
diff --git a/gi/__init__.py b/gi/__init__.py
index 314d579..d4da310 100644
--- a/gi/__init__.py
+++ b/gi/__init__.py
@@ -24,7 +24,7 @@ from ._gi import _API, Repository
# Force loading the GObject typelib so we have available the wrappers for
# base classes such as GInitiallyUnowned
-from gi.repository import GObject
+import gi._gobject
_versions = {}
diff --git a/glib/Makefile.am b/gi/_glib/Makefile.am
index e210318..fcea61d 100644
--- a/glib/Makefile.am
+++ b/gi/_glib/Makefile.am
@@ -1,14 +1,11 @@
AUTOMAKE_OPTIONS = 1.7
INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
-pkgincludedir = $(includedir)/pygtk-2.0
-pkginclude_HEADERS = pyglib.h
-
-lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
+lib_LTLIBRARIES = libpyglib-gi-2.0-@PYTHON_BASENAME@.la
pkgpyexecdir = $(pyexecdir)
-pyglibdir = $(pkgpyexecdir)/glib
+pyglibdir = $(pkgpyexecdir)/gi/_glib
pyglib_PYTHON = \
__init__.py \
option.py
@@ -19,9 +16,9 @@ if PLATFORM_WIN32
common_ldflags += -no-undefined
endif
-libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
-libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
-libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES = \
pyglib.c \
pyglib.h \
pyglib-private.h \
@@ -29,7 +26,7 @@ libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
_glib_la_CFLAGS = $(GLIB_CFLAGS)
_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
-_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
+_glib_la_LIBADD = $(GLIB_LIBS) $(PYTHON_LIBS) libpyglib-gi-2.0-@PYTHON_BASENAME@.la
_glib_la_SOURCES = \
glibmodule.c \
pygiochannel.c \
diff --git a/glib/Makefile.in b/gi/_glib/Makefile.in
index e23bffc..107ad28 100644
--- a/glib/Makefile.in
+++ b/gi/_glib/Makefile.in
@@ -15,9 +15,9 @@
@SET_MAKE@
-
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
@@ -36,9 +36,9 @@ build_triplet = @build@
host_triplet = @host@
@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
@PLATFORM_WIN32_TRUE@am__append_2 = -DPLATFORM_WIN32
-subdir = glib
-DIST_COMMON = $(pkginclude_HEADERS) $(pyglib_PYTHON) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+subdir = gi/_glib
+DIST_COMMON = $(pyglib_PYTHON) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -73,11 +73,11 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" \
- "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pkgincludedir)"
+ "$(DESTDIR)$(pyglibdir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(pyglib_LTLIBRARIES)
am__DEPENDENCIES_1 =
_glib_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- libpyglib-2.0-@PYTHON_BASENAME@.la
+ libpyglib-gi-2.0-@PYTHON_BASENAME@.la
am__glib_la_OBJECTS = _glib_la-glibmodule.lo _glib_la-pygiochannel.lo \
_glib_la-pygoptioncontext.lo _glib_la-pygoptiongroup.lo \
_glib_la-pygmaincontext.lo _glib_la-pygmainloop.lo \
@@ -89,16 +89,16 @@ am__v_lt_0 = --silent
_glib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(_glib_la_CFLAGS) \
$(CFLAGS) $(_glib_la_LDFLAGS) $(LDFLAGS) -o $@
-libpyglib_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES = \
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES = \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS = \
- libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo
-libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS = \
- $(am_libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS)
-libpyglib_2_0_@PYTHON_BASENAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+am_libpyglib_gi_2_0_@PYTHON_BASENAME@_la_OBJECTS = \
+ libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.lo
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_OBJECTS = \
+ $(am_libpyglib_gi_2_0_@PYTHON_BASENAME@_la_OBJECTS)
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
- $(CCLD) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ $(CCLD) $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -126,15 +126,13 @@ AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(_glib_la_SOURCES) \
- $(libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES)
+ $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES)
DIST_SOURCES = $(_glib_la_SOURCES) \
- $(libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES)
+ $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES)
py_compile = $(top_srcdir)/py-compile
-HEADERS = $(pkginclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkgincludedir = $(includedir)/pygtk-2.0
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
@@ -165,8 +163,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -283,7 +279,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
@@ -295,18 +290,17 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
-pkginclude_HEADERS = pyglib.h
-lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
-pyglibdir = $(pkgpyexecdir)/glib
+lib_LTLIBRARIES = libpyglib-gi-2.0-@PYTHON_BASENAME@.la
+pyglibdir = $(pkgpyexecdir)/gi/_glib
pyglib_PYTHON = \
__init__.py \
option.py
pyglib_LTLIBRARIES = _glib.la
common_ldflags = -module -avoid-version $(am__append_1)
-libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
-libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
-libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES = \
pyglib.c \
pyglib.h \
pyglib-private.h \
@@ -314,7 +308,7 @@ libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
_glib_la_CFLAGS = $(GLIB_CFLAGS) $(am__append_2)
_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
-_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
+_glib_la_LIBADD = $(GLIB_LIBS) $(PYTHON_LIBS) libpyglib-gi-2.0-@PYTHON_BASENAME@.la
_glib_la_SOURCES = \
glibmodule.c \
pygiochannel.c \
@@ -345,9 +339,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glib/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gi/_glib/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign glib/Makefile
+ $(AUTOMAKE) --foreign gi/_glib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -430,8 +424,8 @@ clean-pyglibLTLIBRARIES:
done
_glib.la: $(_glib_la_OBJECTS) $(_glib_la_DEPENDENCIES)
$(AM_V_CCLD)$(_glib_la_LINK) -rpath $(pyglibdir) $(_glib_la_OBJECTS) $(_glib_la_LIBADD) $(LIBS)
-libpyglib-2.0-@PYTHON_BASENAME@.la: $(libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libpyglib_2_0_@PYTHON_BASENAME@_la_LINK) -rpath $(libdir) $(libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD) $(LIBS)
+libpyglib-gi-2.0-@PYTHON_BASENAME@.la: $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LINK) -rpath $(libdir) $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -447,7 +441,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygoptiongroup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygsource.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygspawn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -537,13 +531,13 @@ _glib_la-pygspawn.lo: pygspawn.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) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo '$(srcdir)/'`pygspawn.c
-libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo: pyglib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -MT libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo -MD -MP -MF $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo -c -o libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Plo
+libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.lo: pyglib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -MT libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.lo -MD -MP -MF $(DEPDIR)/libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo -c -o libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo $(DEPDIR)/libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pyglib.c' object='libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pyglib.c' object='libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -c -o libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -c -o libpyglib_gi_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
mostlyclean-libtool:
-rm -f *.lo
@@ -588,26 +582,6 @@ uninstall-pyglibPYTHON:
cd "$(DESTDIR)$(pyglibdir)" && rm -f $$filesc || exit $$?; \
echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$fileso ")"; \
cd "$(DESTDIR)$(pyglibdir)" && rm -f $$fileso
-install-pkgincludeHEADERS: $(pkginclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
- done
-
-uninstall-pkgincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -694,9 +668,9 @@ distdir: $(DISTFILES)
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES)
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pkgincludedir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pyglibdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -747,8 +721,7 @@ info: info-am
info-am:
-install-data-am: install-pkgincludeHEADERS install-pyglibLTLIBRARIES \
- install-pyglibPYTHON
+install-data-am: install-pyglibLTLIBRARIES install-pyglibPYTHON
install-dvi: install-dvi-am
@@ -794,8 +767,8 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \
- uninstall-pyglibLTLIBRARIES uninstall-pyglibPYTHON
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pyglibLTLIBRARIES \
+ uninstall-pyglibPYTHON
.MAKE: check-am install-am install-strip
@@ -807,14 +780,13 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \
- install-man install-pdf install-pdf-am \
- install-pkgincludeHEADERS install-ps install-ps-am \
- install-pyglibLTLIBRARIES install-pyglibPYTHON install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-libLTLIBRARIES \
- uninstall-pkgincludeHEADERS uninstall-pyglibLTLIBRARIES \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-pyglibLTLIBRARIES install-pyglibPYTHON \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-libLTLIBRARIES uninstall-pyglibLTLIBRARIES \
uninstall-pyglibPYTHON
diff --git a/glib/__init__.py b/gi/_glib/__init__.py
index b114cb9..f56e6d5 100644
--- a/glib/__init__.py
+++ b/gi/_glib/__init__.py
@@ -19,7 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
-from glib._glib import *
+from ._glib import *
+
_PyGLib_API = _glib._PyGLib_API
del _glib
diff --git a/glib/glibmodule.c b/gi/_glib/glibmodule.c
index 963e5ea..f01ee77 100644
--- a/glib/glibmodule.c
+++ b/gi/_glib/glibmodule.c
@@ -246,7 +246,7 @@ iowatch_marshal(GIOChannel *source,
} else {
if (ret == Py_None) {
if (PyErr_Warn(PyExc_Warning,
- "glib.io_add_watch callback returned None; "
+ "_glib.io_add_watch callback returned None; "
"should return True/False")) {
PyErr_Print();
}
@@ -373,7 +373,7 @@ pyglib_child_watch_add(PyObject *unused, PyObject *args, PyObject *kwargs)
return NULL;
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError,
- "glib.child_watch_add: second argument must be callable");
+ "_glib.child_watch_add: second argument must be callable");
return NULL;
}
@@ -800,7 +800,7 @@ pyglib_register_api(PyObject *d)
/* for addon libraries ... */
PyDict_SetItemString(d, "_PyGLib_API",
- o=PYGLIB_CPointer_WrapPointer(&pyglib_api,"glib._PyGLib_API"));
+ o=PYGLIB_CPointer_WrapPointer(&pyglib_api,"gi._glib._PyGLib_API"));
Py_DECREF(o);
pyglib_init_internal(o);
@@ -817,7 +817,7 @@ pyglib_register_error(PyObject *d)
* GError has also an "message" attribute.
*/
PyDict_SetItemString(dict, "message", Py_None);
- gerror_class = PyErr_NewException("glib.GError", PyExc_RuntimeError, dict);
+ gerror_class = PyErr_NewException("gi._glib.GError", PyExc_RuntimeError, dict);
Py_DECREF(dict);
PyDict_SetItemString(d, "GError", gerror_class);
@@ -950,7 +950,7 @@ pyglib_register_constants(PyObject *m)
(char*) g_quark_to_string(G_OPTION_ERROR));
}
-PYGLIB_MODULE_START(_glib, "glib._glib")
+PYGLIB_MODULE_START(_glib, "_glib")
{
PyObject *d = PyModule_GetDict(module);
diff --git a/glib/option.py b/gi/_glib/option.py
index bdfbe1d..c84d303 100644
--- a/glib/option.py
+++ b/gi/_glib/option.py
@@ -41,8 +41,8 @@ else:
_basestring = basestring
_bytes = str
-import glib
-_glib = sys.modules['glib._glib']
+import gi._glib
+_glib = sys.modules['gi._glib._glib']
__all__ = [
"OptParseError",
diff --git a/glib/pygiochannel.c b/gi/_glib/pygiochannel.c
index f7e2bc4..4f77e28 100644
--- a/glib/pygiochannel.c
+++ b/gi/_glib/pygiochannel.c
@@ -18,7 +18,7 @@ typedef struct {
int softspace; /* to make print >> chan, "foo" ... work */
} PyGIOChannel;
-PYGLIB_DEFINE_TYPE("glib.IOChannel", PyGIOChannel_Type, PyGIOChannel)
+PYGLIB_DEFINE_TYPE("gi._glib.IOChannel", PyGIOChannel_Type, PyGIOChannel)
static PyObject*
py_io_channel_next(PyGIOChannel *self)
@@ -87,7 +87,7 @@ py_io_channel_shutdown(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
PyObject* flush = Py_True;
GError* error = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:glib.IOChannel.shutdown", kwlist, &flush))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:gi._glib.IOChannel.shutdown", kwlist, &flush))
return NULL;
ret = g_io_channel_shutdown(self->channel, PyObject_IsTrue(flush), &error);
@@ -106,7 +106,7 @@ py_io_channel_set_buffer_size(PyGIOChannel* self, PyObject *args, PyObject *kwar
static char *kwlist[] = { "size", NULL };
int size;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_buffer_size", kwlist, &size))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:gi._glib.IOChannel.set_buffer_size", kwlist, &size))
return NULL;
g_io_channel_set_buffer_size(self->channel, size);
@@ -127,7 +127,7 @@ py_io_channel_set_buffered(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
static char *kwlist[] = { "buffered", NULL };
int buffered;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_buffered", kwlist, &buffered))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:gi._glib.IOChannel.set_buffered", kwlist, &buffered))
return NULL;
g_io_channel_set_buffered(self->channel, buffered);
@@ -149,7 +149,7 @@ py_io_channel_set_encoding(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
const char* encoding;
GError* error = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "z:glib.IOChannel.set_encoding", kwlist, &encoding))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "z:gi._glib.IOChannel.set_encoding", kwlist, &encoding))
return NULL;
g_io_channel_set_encoding(self->channel, encoding, &error);
@@ -185,7 +185,7 @@ py_io_channel_read_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
GError* error = NULL;
GIOStatus status = G_IO_STATUS_NORMAL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.read", kwlist, &max_count))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:gi._glib.IOChannel.read", kwlist, &max_count))
return NULL;
if (max_count == 0)
@@ -266,7 +266,7 @@ py_io_channel_write_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
GError* error = NULL;
GIOStatus status;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:glib.IOChannel.write",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:gi._glib.IOChannel.write",
kwlist, &buf, &buf_len))
return NULL;
@@ -290,7 +290,7 @@ py_io_channel_write_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
GIOStatus status;
PyObject *iter, *value, *pylines;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:glib.IOChannel.writelines",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gi._glib.IOChannel.writelines",
kwlist, &pylines))
return NULL;
@@ -303,7 +303,7 @@ py_io_channel_write_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
goto normal_exit;
}
if (!PYGLIB_PyUnicode_Check(value)) {
- PyErr_SetString(PyExc_TypeError, "glib.IOChannel.writelines must"
+ PyErr_SetString(PyExc_TypeError, "gi._glib.IOChannel.writelines must"
" be sequence/iterator of strings");
Py_DECREF(iter);
return NULL;
@@ -347,7 +347,7 @@ py_io_channel_set_flags(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
GIOStatus status;
GError* error = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_flags",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:gi._glib.IOChannel.set_flags",
kwlist, &flags))
return NULL;
@@ -376,7 +376,7 @@ py_io_channel_set_close_on_unref(PyGIOChannel* self, PyObject *args, PyObject *k
static char *kwlist[] = { "do_close", NULL };
PyObject *do_close;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:glib.IOChannel.set_close_on_unref",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gi._glib.IOChannel.set_close_on_unref",
kwlist, &do_close))
return NULL;
@@ -460,7 +460,7 @@ py_io_channel_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
PyGIOWatchData *data;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "iO|Oi:glib.IOChannel.add_watch",
+ "iO|Oi:gi._glib.IOChannel.add_watch",
kwlist, &condition, &callback,
&user_data, &priority))
return NULL;
@@ -498,7 +498,7 @@ py_io_channel_win32_poll(PyObject *self, PyObject *args, PyObject *kwargs)
gint result;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!|i:glib.IOChannel.win32_poll",
+ "O!|i:gi._glib.IOChannel.win32_poll",
kwlist, &PyList_Type, &pyfds, &timeout))
return NULL;
@@ -507,7 +507,7 @@ py_io_channel_win32_poll(PyObject *self, PyObject *args, PyObject *kwargs)
for (i = 0; i < len; ++i) {
pyfd = PyList_GET_ITEM(pyfds, i);
if (!PyObject_TypeCheck(pyfd, &PyGPollFD_Type)) {
- PyErr_SetString(PyExc_TypeError, "'fds' must be a list of glib.PollFD objects");
+ PyErr_SetString(PyExc_TypeError, "'fds' must be a list of gi._glib.PollFD objects");
return NULL;
}
pollfd[i] = ((PyGPollFD *) pyfd)->pollfd;
@@ -530,7 +530,7 @@ py_io_channel_win32_make_pollfd(PyObject *self, PyObject *args, PyObject *kwargs
PyGPollFD *pypollfd;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "i:glib.IOChannel.win32_make_pollfd",
+ "i:gi._glib.IOChannel.win32_make_pollfd",
kwlist, &condition))
return NULL;
@@ -554,7 +554,7 @@ py_io_channel_read_line(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
gint size_hint = -1;
GIOStatus status;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.readline", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:gi._glib.IOChannel.readline", kwlist,
&size_hint))
return NULL;
@@ -579,7 +579,7 @@ py_io_channel_read_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
GIOStatus status = G_IO_STATUS_NORMAL;
PyObject *list;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.readlines", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:gi._glib.IOChannel.readlines", kwlist,
&size_hint))
return NULL;
@@ -613,7 +613,7 @@ py_io_channel_seek(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
GSeekType seek_type;
GError* error = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "L|i:glib.IOChannel.seek",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "L|i:gi._glib.IOChannel.seek",
kwlist, &offset, &whence))
return NULL;
@@ -714,7 +714,7 @@ py_io_channel_init(PyGIOChannel *self, PyObject *args, PyObject *kwargs)
#ifdef G_OS_WIN32
"I"
#endif
- ":glib.IOChannel.__init__",
+ ":gi._glib.IOChannel.__init__",
kwlist, &fd, &filename, &mode
#ifdef G_OS_WIN32
, &hwnd
diff --git a/glib/pygiochannel.h b/gi/_glib/pygiochannel.h
index 9b03edd..9b03edd 100644
--- a/glib/pygiochannel.h
+++ b/gi/_glib/pygiochannel.h
diff --git a/glib/pyglib-private.h b/gi/_glib/pyglib-private.h
index 183184f..183184f 100644
--- a/glib/pyglib-private.h
+++ b/gi/_glib/pyglib-private.h
diff --git a/glib/pyglib-python-compat.h b/gi/_glib/pyglib-python-compat.h
index 8c1dd51..8c1dd51 100644
--- a/glib/pyglib-python-compat.h
+++ b/gi/_glib/pyglib-python-compat.h
diff --git a/glib/pyglib.c b/gi/_glib/pyglib.c
index 1e024c2..f127fb4 100644
--- a/glib/pyglib.c
+++ b/gi/_glib/pyglib.c
@@ -40,7 +40,7 @@ pyglib_init(void)
{
PyObject *glib, *cobject;
- glib = PyImport_ImportModule("glib");
+ glib = PyImport_ImportModule("gi._glib");
if (!glib) {
if (PyErr_Occurred()) {
PyObject *type, *value, *traceback;
@@ -51,22 +51,22 @@ pyglib_init(void)
Py_XDECREF(value);
Py_XDECREF(traceback);
PyErr_Format(PyExc_ImportError,
- "could not import glib (error was: %s)",
+ "could not import gi._glib (error was: %s)",
PYGLIB_PyUnicode_AsString(py_orig_exc));
Py_DECREF(py_orig_exc);
} else {
PyErr_SetString(PyExc_ImportError,
- "could not import glib (no error given)");
+ "could not import gi._glib (no error given)");
}
return;
}
cobject = PyObject_GetAttrString(glib, "_PyGLib_API");
if (cobject && PYGLIB_CPointer_Check(cobject))
- _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_CPointer_GetPointer(cobject, "glib._PyGLib_API");
+ _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_CPointer_GetPointer(cobject, "gi._glib._PyGLib_API");
else {
PyErr_SetString(PyExc_ImportError,
- "could not import glib (could not find _PyGLib_API object)");
+ "could not import gi._glib (could not find _PyGLib_API object)");
Py_DECREF(glib);
return;
}
@@ -75,7 +75,7 @@ pyglib_init(void)
void
pyglib_init_internal(PyObject *api)
{
- _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_CPointer_GetPointer(api, "glib._PyGLib_API");
+ _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_CPointer_GetPointer(api, "gi._glib._PyGLib_API");
}
gboolean
@@ -338,20 +338,20 @@ pyglib_gerror_exception_check(GError **error)
py_message = PyObject_GetAttrString(value, "message");
if (!py_message || !PYGLIB_PyUnicode_Check(py_message)) {
- bad_gerror_message = "glib.GError instances must have a 'message' string attribute";
+ bad_gerror_message = "gi._glib.GError instances must have a 'message' string attribute";
goto bad_gerror;
}
py_domain = PyObject_GetAttrString(value, "domain");
if (!py_domain || !PYGLIB_PyUnicode_Check(py_domain)) {
- bad_gerror_message = "glib.GError instances must have a 'domain' string attribute";
+ bad_gerror_message = "gi._glib.GError instances must have a 'domain' string attribute";
Py_DECREF(py_message);
goto bad_gerror;
}
py_code = PyObject_GetAttrString(value, "code");
if (!py_code || !PYGLIB_PyLong_Check(py_code)) {
- bad_gerror_message = "glib.GError instances must have a 'code' int attribute";
+ bad_gerror_message = "gi._glib.GError instances must have a 'code' int attribute";
Py_DECREF(py_message);
Py_DECREF(py_domain);
goto bad_gerror;
diff --git a/glib/pyglib.h b/gi/_glib/pyglib.h
index 44ead47..44ead47 100644
--- a/glib/pyglib.h
+++ b/gi/_glib/pyglib.h
diff --git a/glib/pygmaincontext.c b/gi/_glib/pygmaincontext.c
index cfb7ddd..a4282ee 100644
--- a/glib/pygmaincontext.c
+++ b/gi/_glib/pygmaincontext.c
@@ -31,7 +31,7 @@
#include "pyglib.h"
#include "pyglib-private.h"
-PYGLIB_DEFINE_TYPE("glib.MainContext", PyGMainContext_Type, PyGMainContext)
+PYGLIB_DEFINE_TYPE("gi._glib.MainContext", PyGMainContext_Type, PyGMainContext)
/**
* pyg_main_context_new:
diff --git a/glib/pygmaincontext.h b/gi/_glib/pygmaincontext.h
index 4ffa3c9..4ffa3c9 100644
--- a/glib/pygmaincontext.h
+++ b/gi/_glib/pygmaincontext.h
diff --git a/glib/pygmainloop.c b/gi/_glib/pygmainloop.c
index 219b6a3..614a662 100644
--- a/glib/pygmainloop.c
+++ b/gi/_glib/pygmainloop.c
@@ -233,7 +233,7 @@ pyg_signal_watch_new(void)
return source;
}
-PYGLIB_DEFINE_TYPE("glib.MainLoop", PyGMainLoop_Type, PyGMainLoop)
+PYGLIB_DEFINE_TYPE("gi._glib.MainLoop", PyGMainLoop_Type, PyGMainLoop)
static int
pyg_main_loop_init(PyGMainLoop *self, PyObject *args, PyObject *kwargs)
@@ -251,7 +251,7 @@ pyg_main_loop_init(PyGMainLoop *self, PyObject *args, PyObject *kwargs)
if (!PyObject_TypeCheck(py_context, &PyGMainContext_Type) &&
py_context != Py_None) {
PyErr_SetString(PyExc_TypeError,
- "context must be a glib.MainContext or None");
+ "context must be a gi._glib.MainContext or None");
return -1;
}
diff --git a/glib/pygmainloop.h b/gi/_glib/pygmainloop.h
index dec82d8..dec82d8 100644
--- a/glib/pygmainloop.h
+++ b/gi/_glib/pygmainloop.h
diff --git a/glib/pygoptioncontext.c b/gi/_glib/pygoptioncontext.c
index 444625c..b985dbe 100644
--- a/glib/pygoptioncontext.c
+++ b/gi/_glib/pygoptioncontext.c
@@ -28,7 +28,7 @@
#include "pyglib-private.h"
#include "pygoptioncontext.h"
-PYGLIB_DEFINE_TYPE("glib.OptionContext", PyGOptionContext_Type, PyGOptionContext)
+PYGLIB_DEFINE_TYPE("gi._glib.OptionContext", PyGOptionContext_Type, PyGOptionContext)
/**
* pyg_option_context_new:
@@ -58,7 +58,7 @@ pyg_option_context_init(PyGOptionContext *self,
{
char *parameter_string;
- if (!PyArg_ParseTuple(args, "s:glib.GOptionContext.__init__",
+ if (!PyArg_ParseTuple(args, "s:gi._glib.GOptionContext.__init__",
&parameter_string))
return -1;
diff --git a/glib/pygoptioncontext.h b/gi/_glib/pygoptioncontext.h
index efe5ffa..efe5ffa 100644
--- a/glib/pygoptioncontext.h
+++ b/gi/_glib/pygoptioncontext.h
diff --git a/glib/pygoptiongroup.c b/gi/_glib/pygoptiongroup.c
index 2a69354..2990342 100644
--- a/glib/pygoptiongroup.c
+++ b/gi/_glib/pygoptiongroup.c
@@ -28,7 +28,7 @@
#include "pyglib-private.h"
#include "pygoptiongroup.h"
-PYGLIB_DEFINE_TYPE("glib.OptionGroup", PyGOptionGroup_Type, PyGOptionGroup)
+PYGLIB_DEFINE_TYPE("gi._glib.OptionGroup", PyGOptionGroup_Type, PyGOptionGroup)
/**
* pyg_option_group_new:
@@ -62,7 +62,7 @@ check_if_owned(PyGOptionGroup *self)
if (self->other_owner)
{
PyErr_SetString(PyExc_ValueError, "The GOptionGroup was not created by "
- "glib.OptionGroup(), so operation is not possible.");
+ "gi._glib.OptionGroup(), so operation is not possible.");
return TRUE;
}
return FALSE;
diff --git a/glib/pygoptiongroup.h b/gi/_glib/pygoptiongroup.h
index 872b9c6..872b9c6 100644
--- a/glib/pygoptiongroup.h
+++ b/gi/_glib/pygoptiongroup.h
diff --git a/glib/pygsource.c b/gi/_glib/pygsource.c
index d0176ab..60fb6d6 100644
--- a/glib/pygsource.c
+++ b/gi/_glib/pygsource.c
@@ -59,7 +59,7 @@ typedef struct
/* glib.Source */
-PYGLIB_DEFINE_TYPE("glib.Source", PyGSource_Type, PyGSource)
+PYGLIB_DEFINE_TYPE("gi._glib.Source", PyGSource_Type, PyGSource)
static PyObject *
source_repr(PyGSource *self, const char *type)
@@ -566,7 +566,7 @@ pyg_source_free(PyObject *op)
/* glib.Idle */
-PYGLIB_DEFINE_TYPE("glib.Idle", PyGIdle_Type, PyGSource)
+PYGLIB_DEFINE_TYPE("gi._glib.Idle", PyGIdle_Type, PyGSource)
static PyObject *
pyg_idle_repr(PyGSource *self)
@@ -581,7 +581,7 @@ pyg_idle_init(PyGSource *self, PyObject *args, PyObject *kwargs)
gint priority = G_PRIORITY_DEFAULT_IDLE;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|i:glib.Idle.__init__", kwlist,
+ "|i:gi._glib.Idle.__init__", kwlist,
&priority))
return -1;
@@ -600,7 +600,7 @@ pyg_idle_init(PyGSource *self, PyObject *args, PyObject *kwargs)
/* glib.Timeout */
-PYGLIB_DEFINE_TYPE("glib.Timeout", PyGTimeout_Type, PyGSource)
+PYGLIB_DEFINE_TYPE("gi._glib.Timeout", PyGTimeout_Type, PyGSource)
static PyObject *
pyg_timeout_repr(PyGSource *self)
@@ -616,7 +616,7 @@ pyg_timeout_init(PyGSource *self, PyObject *args, PyObject *kwargs)
guint interval;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "I|i:glib.Timeout.__init__", kwlist,
+ "I|i:gi._glib.Timeout.__init__", kwlist,
&interval, &priority))
return -1;
@@ -635,7 +635,7 @@ pyg_timeout_init(PyGSource *self, PyObject *args, PyObject *kwargs)
/* glib.PollFD */
-PYGLIB_DEFINE_TYPE("glib.PollFD", PyGPollFD_Type, PyGPollFD)
+PYGLIB_DEFINE_TYPE("gi._glib.PollFD", PyGPollFD_Type, PyGPollFD)
static PyMemberDef pyg_poll_fd_members[] = {
{ "fd", T_INT, offsetof(PyGPollFD, pollfd.fd), READONLY },
@@ -668,7 +668,7 @@ pyg_poll_fd_init(PyGPollFD *self, PyObject *args, PyObject *kwargs)
gushort events;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OH:glib.PollFD.__init__", kwlist,
+ "OH:gi._glib.PollFD.__init__", kwlist,
&o, &events))
return -1;
diff --git a/glib/pygsource.h b/gi/_glib/pygsource.h
index bf2c673..bf2c673 100644
--- a/glib/pygsource.h
+++ b/gi/_glib/pygsource.h
diff --git a/glib/pygspawn.c b/gi/_glib/pygspawn.c
index 75e2232..309b83d 100644
--- a/glib/pygspawn.c
+++ b/gi/_glib/pygspawn.c
@@ -32,7 +32,7 @@ struct _PyGChildSetupData {
PyObject *data;
};
-PYGLIB_DEFINE_TYPE("glib.Pid", PyGPid_Type, PYGLIB_PyLongObject)
+PYGLIB_DEFINE_TYPE("gi._glib.Pid", PyGPid_Type, PYGLIB_PyLongObject)
static PyObject *
pyg_pid_close(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -57,7 +57,7 @@ pyg_pid_free(PyObject *gpid)
static int
pyg_pid_tp_init(PyObject *self, PyObject *args, PyObject *kwargs)
{
- PyErr_SetString(PyExc_TypeError, "glib.Pid cannot be manually instantiated");
+ PyErr_SetString(PyExc_TypeError, "gi._glib.Pid cannot be manually instantiated");
return -1;
}
@@ -117,7 +117,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
GPid child_pid = -1;
Py_ssize_t len, i;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OsiOOOOO:glib.spawn_async",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OsiOOOOO:gi._glib.spawn_async",
kwlist,
&pyargv, &pyenvp, &working_directory, &flags,
&func, &user_data,
@@ -142,7 +142,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
/* parse argv */
if (!PySequence_Check(pyargv)) {
PyErr_SetString(PyExc_TypeError,
- "glib.spawn_async: "
+ "gi._glib.spawn_async: "
"first argument must be a sequence of strings");
return NULL;
}
@@ -152,7 +152,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
PyObject *tmp = PySequence_ITEM(pyargv, i);
if (!PYGLIB_PyUnicode_Check(tmp)) {
PyErr_SetString(PyExc_TypeError,
- "glib.spawn_async: "
+ "gi._glib.spawn_async: "
"first argument must be a sequence of strings");
g_free(argv);
Py_XDECREF(tmp);
@@ -166,7 +166,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
if (pyenvp) {
if (!PySequence_Check(pyenvp)) {
PyErr_SetString(PyExc_TypeError,
- "glib.spawn_async: "
+ "gi._glib.spawn_async: "
"second argument must be a sequence of strings");
g_free(argv);
return NULL;
@@ -177,7 +177,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
PyObject *tmp = PySequence_ITEM(pyenvp, i);
if (!PYGLIB_PyUnicode_Check(tmp)) {
PyErr_SetString(PyExc_TypeError,
- "glib.spawn_async: "
+ "gi._glib.spawn_async: "
"second argument must be a sequence of strings");
g_free(envp);
Py_XDECREF(tmp);
diff --git a/glib/pygspawn.h b/gi/_glib/pygspawn.h
index 2e8dd3c..2e8dd3c 100644
--- a/glib/pygspawn.h
+++ b/gi/_glib/pygspawn.h
diff --git a/gobject/Makefile.am b/gi/_gobject/Makefile.am
index 7208329..7e15d4c 100644
--- a/gobject/Makefile.am
+++ b/gi/_gobject/Makefile.am
@@ -1,13 +1,10 @@
AUTOMAKE_OPTIONS = 1.7
PLATFORM_VERSION = 2.0
-pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
-pkginclude_HEADERS = pygobject.h
-
pkgpyexecdir = $(pyexecdir)
# gobject python scripts
-pygobjectdir = $(pkgpyexecdir)/gobject
+pygobjectdir = $(pkgpyexecdir)/gi/_gobject
pygobject_PYTHON = \
__init__.py \
constants.py \
@@ -20,22 +17,21 @@ common_ldflags += -no-undefined
endif
_gobject_la_CFLAGS = \
- -I$(top_srcdir)/glib \
+ -I$(top_srcdir)/gi/_glib \
-I$(top_srcdir)/gi \
$(PYTHON_INCLUDES) \
$(FFI_CFLAGS) \
$(GLIB_CFLAGS) \
+ $(GI_CFLAGS) \
-DPY_SSIZE_T_CLEAN
-if ENABLE_INTROSPECTION
-_gobject_la_CFLAGS += $(GI_CFLAGS)
-endif
-
_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
_gobject_la_LIBADD = \
$(GLIB_LIBS) \
$(FFI_LIBS) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+ $(PYTHON_LIBS) \
+ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
+
_gobject_la_SOURCES = \
gobjectmodule.c \
pygboxed.c \
diff --git a/gobject/Makefile.in b/gi/_gobject/Makefile.in
index be4bac8..5412d0c 100644
--- a/gobject/Makefile.in
+++ b/gi/_gobject/Makefile.in
@@ -15,9 +15,9 @@
@SET_MAKE@
-
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
@@ -35,12 +35,11 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
-@ENABLE_INTROSPECTION_TRUE@am__append_2 = $(GI_CFLAGS)
-@HAVE_LIBFFI_TRUE@am__append_3 = ffi-marshaller.c ffi-marshaller.h
-@PLATFORM_WIN32_TRUE@am__append_4 = -DPLATFORM_WIN32
-subdir = gobject
-DIST_COMMON = $(pkginclude_HEADERS) $(pygobject_PYTHON) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+@HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h
+@PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32
+subdir = gi/_gobject
+DIST_COMMON = $(pygobject_PYTHON) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -75,11 +74,11 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pygobjectdir)" \
- "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"
+ "$(DESTDIR)$(pygobjectdir)"
LTLIBRARIES = $(pygobject_LTLIBRARIES)
am__DEPENDENCIES_1 =
_gobject_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \
pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \
pyginterface.h pygobject.c pygobject.h pygobject-private.h \
@@ -128,11 +127,9 @@ am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(_gobject_la_SOURCES)
DIST_SOURCES = $(am___gobject_la_SOURCES_DIST)
py_compile = $(top_srcdir)/py-compile
-HEADERS = $(pkginclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
@@ -163,8 +160,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -281,7 +276,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
@@ -293,10 +287,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.7
PLATFORM_VERSION = 2.0
-pkginclude_HEADERS = pygobject.h
# gobject python scripts
-pygobjectdir = $(pkgpyexecdir)/gobject
+pygobjectdir = $(pkgpyexecdir)/gi/_gobject
pygobject_PYTHON = \
__init__.py \
constants.py \
@@ -304,20 +297,21 @@ pygobject_PYTHON = \
pygobject_LTLIBRARIES = _gobject.la
common_ldflags = -module -avoid-version $(am__append_1)
-_gobject_la_CFLAGS = -I$(top_srcdir)/glib -I$(top_srcdir)/gi \
- $(PYTHON_INCLUDES) $(FFI_CFLAGS) $(GLIB_CFLAGS) \
- -DPY_SSIZE_T_CLEAN $(am__append_2) $(am__append_4)
+_gobject_la_CFLAGS = -I$(top_srcdir)/gi/_glib -I$(top_srcdir)/gi \
+ $(PYTHON_INCLUDES) $(FFI_CFLAGS) $(GLIB_CFLAGS) $(GI_CFLAGS) \
+ -DPY_SSIZE_T_CLEAN $(am__append_3)
_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
_gobject_la_LIBADD = \
$(GLIB_LIBS) \
$(FFI_LIBS) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+ $(PYTHON_LIBS) \
+ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
_gobject_la_SOURCES = gobjectmodule.c pygboxed.c pygboxed.h pygenum.c \
pygenum.h pygflags.c pygflags.h pyginterface.c pyginterface.h \
pygobject.c pygobject.h pygobject-private.h pygparamspec.c \
pygparamspec.h pygpointer.c pygpointer.h pygtype.c pygtype.h \
- $(am__append_3)
+ $(am__append_2)
all: all-am
.SUFFIXES:
@@ -331,9 +325,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gobject/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gi/_gobject/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign gobject/Makefile
+ $(AUTOMAKE) --foreign gi/_gobject/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -550,26 +544,6 @@ uninstall-pygobjectPYTHON:
cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$filesc || exit $$?; \
echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$fileso ")"; \
cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$fileso
-install-pkgincludeHEADERS: $(pkginclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
- done
-
-uninstall-pkgincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -656,9 +630,9 @@ distdir: $(DISTFILES)
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES)
installdirs:
- for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \
+ for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -709,8 +683,7 @@ info: info-am
info-am:
-install-data-am: install-pkgincludeHEADERS \
- install-pygobjectLTLIBRARIES install-pygobjectPYTHON
+install-data-am: install-pygobjectLTLIBRARIES install-pygobjectPYTHON
install-dvi: install-dvi-am
@@ -756,8 +729,7 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-pkgincludeHEADERS \
- uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
+uninstall-am: uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
.MAKE: check-am install-am install-strip
@@ -769,13 +741,12 @@ uninstall-am: uninstall-pkgincludeHEADERS \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
- install-pdf-am install-pkgincludeHEADERS install-ps \
- install-ps-am install-pygobjectLTLIBRARIES \
- install-pygobjectPYTHON install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-pkgincludeHEADERS \
+ install-pdf-am install-ps install-ps-am \
+ install-pygobjectLTLIBRARIES install-pygobjectPYTHON \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
diff --git a/gobject/__init__.py b/gi/_gobject/__init__.py
index a9522a6..e94e7b8 100644
--- a/gobject/__init__.py
+++ b/gi/_gobject/__init__.py
@@ -23,14 +23,18 @@
import sys
-from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
+# we can't have pygobject 2 loaded at the same time we load the internal _gobject
+if 'gobject' in sys.modules:
+ raise ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".')
+
+from .._glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
io_add_watch, source_remove, child_watch_add, markup_escape_text, \
get_current_time, filename_display_name, filename_display_basename, \
filename_from_utf8, get_application_name, set_application_name, \
get_prgname, set_prgname, main_depth, Pid, GError, glib_version, \
MainLoop, MainContext, main_context_default, IOChannel, Source, Idle, \
Timeout, PollFD, OptionGroup, OptionContext, option, uri_list_extract_uris
-from glib import SPAWN_LEAVE_DESCRIPTORS_OPEN, SPAWN_DO_NOT_REAP_CHILD, \
+from .._glib import SPAWN_LEAVE_DESCRIPTORS_OPEN, SPAWN_DO_NOT_REAP_CHILD, \
SPAWN_SEARCH_PATH, SPAWN_STDOUT_TO_DEV_NULL, SPAWN_STDERR_TO_DEV_NULL, \
SPAWN_CHILD_INHERITS_STDIN, SPAWN_FILE_AND_ARGV_ZERO, PRIORITY_HIGH, \
PRIORITY_DEFAULT, PRIORITY_HIGH_IDLE, PRIORITY_DEFAULT_IDLE, \
@@ -44,13 +48,14 @@ from glib import SPAWN_LEAVE_DESCRIPTORS_OPEN, SPAWN_DO_NOT_REAP_CHILD, \
OPTION_ERROR_UNKNOWN_OPTION, OPTION_ERROR_BAD_VALUE, \
OPTION_ERROR_FAILED, OPTION_REMAINING, OPTION_ERROR
-from gobject.constants import *
-from gobject._gobject import *
+from .constants import *
+from ._gobject import *
+
_PyGObject_API = _gobject._PyGObject_API
-from gobject.propertyhelper import property
+from .propertyhelper import property
-sys.modules['gobject.option'] = option
+sys.modules['gi._gobject.option'] = option
class GObjectMeta(type):
"Metaclass for automatically registering GObject classes"
@@ -101,19 +106,18 @@ class GObjectMeta(type):
prop.setter(self, value)
cls.do_set_property = obj_set_property
- def _must_register_type(cls, namespace):
+ def _type_register(cls, namespace):
## don't register the class if already registered
if '__gtype__' in namespace:
- return False
+ return
- return ('__gproperties__' in namespace or
- '__gsignals__' in namespace or
- '__gtype_name__' in namespace)
+ # Do not register a new GType for the overrides, as this would sort of
+ # defeat the purpose of overrides...
+ if cls.__module__.startswith('gi.overrides.'):
+ return
- def _type_register(cls, namespace):
- if cls._must_register_type(namespace):
- type_register(cls, namespace.get('__gtype_name__'))
+ type_register(cls, namespace.get('__gtype_name__'))
_gobject._install_metaclass(GObjectMeta)
-del _gobject
+#del _gobject
diff --git a/gobject/constants.py b/gi/_gobject/constants.py
index a6d3ce9..ff970ae 100644
--- a/gobject/constants.py
+++ b/gi/_gobject/constants.py
@@ -21,8 +21,7 @@
import sys
-import gobject._gobject
-_gobject = sys.modules['gobject._gobject']
+from . import _gobject
# TYPE_INVALID defined in gobjectmodule.c
TYPE_NONE = _gobject.type_from_name('void')
diff --git a/gobject/ffi-marshaller.c b/gi/_gobject/ffi-marshaller.c
index 60cfc34..60cfc34 100644
--- a/gobject/ffi-marshaller.c
+++ b/gi/_gobject/ffi-marshaller.c
diff --git a/gobject/ffi-marshaller.h b/gi/_gobject/ffi-marshaller.h
index aac18bd..aac18bd 100644
--- a/gobject/ffi-marshaller.h
+++ b/gi/_gobject/ffi-marshaller.h
diff --git a/gobject/gobjectmodule.c b/gi/_gobject/gobjectmodule.c
index 2a84606..ac0a6f4 100644
--- a/gobject/gobjectmodule.c
+++ b/gi/_gobject/gobjectmodule.c
@@ -1733,6 +1733,7 @@ pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs)
g_type_class_unref(class);
if (obj) {
+ pygobject_sink (obj);
self = (PyGObject *) pygobject_new_full((GObject *)obj, FALSE, NULL);
g_object_unref(obj);
} else
@@ -2232,6 +2233,7 @@ pygobject_constructv(PyGObject *self,
pygobject_init_wrapper_set((PyObject *) self);
obj = g_object_newv(pyg_type_from_object((PyObject *) self),
n_parameters, parameters);
+ pygobject_sink (obj);
pygobject_init_wrapper_set(NULL);
if (self->obj == NULL) {
self->obj = obj;
@@ -2604,7 +2606,7 @@ pygobject_register_warnings(PyObject *d)
}
-PYGLIB_MODULE_START(_gobject, "gobject._gobject")
+PYGLIB_MODULE_START(_gobject, "_gobject")
{
PyObject *d;
diff --git a/gobject/propertyhelper.py b/gi/_gobject/propertyhelper.py
index 9643c82..4fb6ee9 100644
--- a/gobject/propertyhelper.py
+++ b/gi/_gobject/propertyhelper.py
@@ -21,17 +21,16 @@
import sys
-import gobject._gobject
-_gobject = sys.modules['gobject._gobject']
+from . import _gobject
-from gobject.constants import \
+from .constants import \
TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR, \
TYPE_BOOLEAN, TYPE_INT, TYPE_UINT, TYPE_LONG, \
TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM, \
TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_STRING, \
TYPE_POINTER, TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, \
TYPE_PYOBJECT
-from gobject.constants import \
+from .constants import \
G_MINFLOAT, G_MAXFLOAT, G_MINDOUBLE, G_MAXDOUBLE, \
G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
G_MAXULONG
@@ -188,14 +187,16 @@ class property(object):
return TYPE_STRING
elif type_ == object:
return TYPE_PYOBJECT
- elif isinstance(type_, type) and issubclass(type_, _gobject.GObject):
+ elif (isinstance(type_, type) and
+ issubclass(type_, (_gobject.GObject,
+ _gobject.GEnum))):
return type_.__gtype__
elif type_ in [TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR,
- TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG,
- TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM,
- TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER,
- TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING,
- TYPE_PYOBJECT]:
+ TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG,
+ TYPE_ULONG, TYPE_INT64, TYPE_UINT64,
+ TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER,
+ TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING,
+ TYPE_PYOBJECT]:
return type_
else:
raise TypeError("Unsupported type: %r" % (type_,))
@@ -224,6 +225,12 @@ class property(object):
elif ptype == TYPE_PYOBJECT:
if default is not None:
raise TypeError("object types does not have default values")
+ elif _gobject.type_is_a(ptype, TYPE_ENUM):
+ if default is None:
+ raise TypeError("enum properties needs a default value")
+ elif not _gobject.type_is_a(default, ptype):
+ raise TypeError("enum value %s must be an instance of %r" %
+ (default, ptype))
def _get_minimum(self):
ptype = self.type
@@ -291,7 +298,8 @@ class property(object):
if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
TYPE_INT64, TYPE_UINT64, TYPE_FLOAT, TYPE_DOUBLE]:
args = self._get_minimum(), self._get_maximum(), self.default
- elif ptype == TYPE_STRING or ptype == TYPE_BOOLEAN:
+ elif (ptype == TYPE_STRING or ptype == TYPE_BOOLEAN or
+ ptype.is_a(TYPE_ENUM)):
args = (self.default,)
elif ptype == TYPE_PYOBJECT:
args = ()
diff --git a/gobject/pygboxed.c b/gi/_gobject/pygboxed.c
index a00386b..a00386b 100644
--- a/gobject/pygboxed.c
+++ b/gi/_gobject/pygboxed.c
diff --git a/gobject/pygboxed.h b/gi/_gobject/pygboxed.h
index 8433b9d..8433b9d 100644
--- a/gobject/pygboxed.h
+++ b/gi/_gobject/pygboxed.h
diff --git a/gobject/pygenum.c b/gi/_gobject/pygenum.c
index c0a51a9..c0a51a9 100644
--- a/gobject/pygenum.c
+++ b/gi/_gobject/pygenum.c
diff --git a/gobject/pygenum.h b/gi/_gobject/pygenum.h
index 0558831..0558831 100644
--- a/gobject/pygenum.h
+++ b/gi/_gobject/pygenum.h
diff --git a/gobject/pygflags.c b/gi/_gobject/pygflags.c
index 8c00f15..8c00f15 100644
--- a/gobject/pygflags.c
+++ b/gi/_gobject/pygflags.c
diff --git a/gobject/pygflags.h b/gi/_gobject/pygflags.h
index e93265c..e93265c 100644
--- a/gobject/pygflags.h
+++ b/gi/_gobject/pygflags.h
diff --git a/gobject/pyginterface.c b/gi/_gobject/pyginterface.c
index 29af546..29af546 100644
--- a/gobject/pyginterface.c
+++ b/gi/_gobject/pyginterface.c
diff --git a/gobject/pyginterface.h b/gi/_gobject/pyginterface.h
index 0f390c2..0f390c2 100644
--- a/gobject/pyginterface.h
+++ b/gi/_gobject/pyginterface.h
diff --git a/gobject/pygobject-private.h b/gi/_gobject/pygobject-private.h
index 6f3a25e..99c1894 100644
--- a/gobject/pygobject-private.h
+++ b/gi/_gobject/pygobject-private.h
@@ -156,7 +156,6 @@ void pygobject_register_class (PyObject *dict,
void pygobject_register_wrapper (PyObject *self);
PyObject * pygobject_new (GObject *obj);
PyObject * pygobject_new_full (GObject *obj, gboolean sink, gpointer g_class);
-PyObject * pygobject_new_sunk (GObject *obj);
void pygobject_sink (GObject *obj);
PyTypeObject *pygobject_lookup_class (GType gtype);
void pygobject_watch_closure (PyObject *self, GClosure *closure);
diff --git a/gobject/pygobject.c b/gi/_gobject/pygobject.c
index 6c2f06c..56b9aef 100644
--- a/gobject/pygobject.c
+++ b/gi/_gobject/pygobject.c
@@ -50,7 +50,6 @@ GQuark pygobject_class_init_key;
GQuark pygobject_wrapper_key;
GQuark pygobject_has_updated_constructor_key;
GQuark pygobject_instance_data_key;
-GQuark pygobject_ref_sunk_key;
/* -------------- class <-> wrapper manipulation --------------- */
@@ -136,12 +135,6 @@ PyTypeObject *PyGObject_MetaType = NULL;
void
pygobject_sink(GObject *obj)
{
- gboolean sunk = FALSE;
-
- /* We use a gobject data key to avoid running the sink funcs more than once. */
- if (g_object_get_qdata (obj, pygobject_ref_sunk_key))
- return;
-
if (sink_funcs) {
gint i;
@@ -149,17 +142,19 @@ pygobject_sink(GObject *obj)
if (g_type_is_a(G_OBJECT_TYPE(obj),
g_array_index(sink_funcs, SinkFunc, i).type)) {
g_array_index(sink_funcs, SinkFunc, i).sinkfunc(obj);
-
- sunk = TRUE;
- break;
+ return;
}
}
}
-
- if (!sunk && G_IS_INITIALLY_UNOWNED (obj))
+ /* The default behaviour for GInitiallyUnowned subclasses is to call ref_sink().
+ * - if the object is new and owned by someone else, its ref has been sunk and
+ * we need to keep the one from that someone and add our own "fresh ref"
+ * - if the object is not and owned by nobody, its ref is floating and we need
+ * to transform it into a regular ref.
+ */
+ if (G_IS_INITIALLY_UNOWNED(obj)) {
g_object_ref_sink(obj);
-
- g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
+ }
}
/**
@@ -205,7 +200,7 @@ typedef struct {
guint index;
} PyGPropsIter;
-PYGLIB_DEFINE_TYPE("gobject.GPropsIter", PyGPropsIter_Type, PyGPropsIter);
+PYGLIB_DEFINE_TYPE("gi._gobject.GPropsIter", PyGPropsIter_Type, PyGPropsIter);
static void
pyg_props_iter_dealloc(PyGPropsIter *self)
@@ -365,7 +360,7 @@ set_property_from_pspec(GObject *obj,
return TRUE;
}
-PYGLIB_DEFINE_TYPE("gobject.GProps", PyGProps_Type, PyGProps);
+PYGLIB_DEFINE_TYPE("gi._gobject.GProps", PyGProps_Type, PyGProps);
static int
PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
@@ -459,7 +454,7 @@ static PySequenceMethods _PyGProps_as_sequence = {
0
};
-PYGLIB_DEFINE_TYPE("gobject.GPropsDescr", PyGPropsDescr_Type, PyObject);
+PYGLIB_DEFINE_TYPE("gi._gobject.GPropsDescr", PyGPropsDescr_Type, PyObject);
static PyObject *
pyg_props_descr_descr_get(PyObject *self, PyObject *obj, PyObject *type)
@@ -637,7 +632,6 @@ pygobject_register_wrapper(PyObject *self)
gself = (PyGObject *)self;
- pygobject_sink(gself->obj);
g_assert(gself->obj->ref_count >= 1);
/* save wrapper pointer so we can access it later */
g_object_set_qdata_full(gself->obj, pygobject_wrapper_key, gself, NULL);
@@ -973,7 +967,9 @@ pygobject_new_full(GObject *obj, gboolean sink, gpointer g_class)
self->weakreflist = NULL;
self->private_flags.flags = 0;
self->obj = obj;
- g_object_ref(obj);
+ /* if we are creating a wrapper around a newly created object, it can have
+ a floating ref (e.g. for methods like Gtk.Button.new()). Bug 640868 */
+ g_object_ref_sink(obj);
pygobject_register_wrapper((PyObject *)self);
PyObject_GC_Track((PyObject *)self);
}
@@ -988,13 +984,6 @@ pygobject_new(GObject *obj)
return pygobject_new_full(obj, TRUE, NULL);
}
-PyObject *
-pygobject_new_sunk(GObject *obj)
-{
- g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
- return pygobject_new_full(obj, TRUE, NULL);
-}
-
static void
pygobject_unwatch_closure(gpointer data, GClosure *closure)
{
@@ -1034,7 +1023,7 @@ pygobject_watch_closure(PyObject *self, GClosure *closure)
/* -------------- PyGObject behaviour ----------------- */
-PYGLIB_DEFINE_TYPE("gobject.GObject", PyGObject_Type, PyGObject);
+PYGLIB_DEFINE_TYPE("gi._gobject.GObject", PyGObject_Type, PyGObject);
static void
pygobject_dealloc(PyGObject *self)
@@ -1987,7 +1976,7 @@ static PyObject *
pygobject_copy(PyGObject *self)
{
PyErr_SetString(PyExc_TypeError,
- "gobject.GObject descendants' instances are non-copyable");
+ "GObject descendants' instances are non-copyable");
return NULL;
}
@@ -1995,7 +1984,7 @@ static PyObject *
pygobject_deepcopy(PyGObject *self, PyObject *args)
{
PyErr_SetString(PyExc_TypeError,
- "gobject.GObject descendants' instances are non-copyable");
+ "GObject descendants' instances are non-copyable");
return NULL;
}
@@ -2184,7 +2173,7 @@ typedef struct {
gboolean have_floating_ref;
} PyGObjectWeakRef;
-PYGLIB_DEFINE_TYPE("gobject.GObjectWeakRef", PyGObjectWeakRef_Type, PyGObjectWeakRef);
+PYGLIB_DEFINE_TYPE("gi._gobject.GObjectWeakRef", PyGObjectWeakRef_Type, PyGObjectWeakRef);
static int
pygobject_weak_ref_traverse(PyGObjectWeakRef *self, visitproc visit, void *arg)
@@ -2334,7 +2323,6 @@ pygobject_object_register_types(PyObject *d)
pygobject_has_updated_constructor_key =
g_quark_from_static_string("PyGObject::has-updated-constructor");
pygobject_instance_data_key = g_quark_from_static_string("PyGObject::instance-data");
- pygobject_ref_sunk_key = g_quark_from_static_string("PyGObject::ref-sunk");
/* GObject */
if (!PY_TYPE_OBJECT)
@@ -2385,7 +2373,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=PYGLIB_PyUnicode_FromString("gobject._gobject"));
+ o=PYGLIB_PyUnicode_FromString("gi._gobject._gobject"));
Py_DECREF(o);
/* GPropsIter */
diff --git a/gobject/pygobject.h b/gi/_gobject/pygobject.h
index 21743ba..7952e5e 100644
--- a/gobject/pygobject.h
+++ b/gi/_gobject/pygobject.h
@@ -308,7 +308,7 @@ pygobject_init(int req_major, int req_minor, int req_micro)
{
PyObject *gobject, *cobject;
- gobject = PyImport_ImportModule("gobject");
+ gobject = PyImport_ImportModule("gi._gobject");
if (!gobject) {
if (PyErr_Occurred())
{
diff --git a/gobject/pygparamspec.c b/gi/_gobject/pygparamspec.c
index 7743629..7743629 100644
--- a/gobject/pygparamspec.c
+++ b/gi/_gobject/pygparamspec.c
diff --git a/gobject/pygparamspec.h b/gi/_gobject/pygparamspec.h
index 64aab0c..64aab0c 100644
--- a/gobject/pygparamspec.h
+++ b/gi/_gobject/pygparamspec.h
diff --git a/gobject/pygpointer.c b/gi/_gobject/pygpointer.c
index 575c751..575c751 100644
--- a/gobject/pygpointer.c
+++ b/gi/_gobject/pygpointer.c
diff --git a/gobject/pygpointer.h b/gi/_gobject/pygpointer.h
index f2923da..f2923da 100644
--- a/gobject/pygpointer.h
+++ b/gi/_gobject/pygpointer.h
diff --git a/gobject/pygtype.c b/gi/_gobject/pygtype.c
index 5ee54aa..ffd99a5 100644
--- a/gobject/pygtype.c
+++ b/gi/_gobject/pygtype.c
@@ -743,11 +743,12 @@ int
pyg_value_from_pyobject(GValue *value, PyObject *obj)
{
PyObject *tmp;
+ GType value_type = G_VALUE_TYPE(value);
- switch (G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value))) {
+ switch (G_TYPE_FUNDAMENTAL(value_type)) {
case G_TYPE_INTERFACE:
/* we only handle interface types that have a GObject prereq */
- if (g_type_is_a(G_VALUE_TYPE(value), G_TYPE_OBJECT)) {
+ if (g_type_is_a(value_type, G_TYPE_OBJECT)) {
if (obj == Py_None)
g_value_set_object(value, NULL);
else {
@@ -755,7 +756,7 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
return -1;
}
if (!G_TYPE_CHECK_INSTANCE_TYPE(pygobject_get(obj),
- G_VALUE_TYPE(value))) {
+ value_type)) {
return -1;
}
g_value_set_object(value, pygobject_get(obj));
@@ -1022,7 +1023,7 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
switch (G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value))) {
case G_TYPE_INTERFACE:
if (g_type_is_a(G_VALUE_TYPE(value), G_TYPE_OBJECT))
- return pygobject_new_sunk(g_value_get_object(value));
+ return pygobject_new(g_value_get_object(value));
else
break;
case G_TYPE_CHAR: {
@@ -1140,7 +1141,7 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
case G_TYPE_PARAM:
return pyg_param_spec_new(g_value_get_param(value));
case G_TYPE_OBJECT:
- return pygobject_new_sunk(g_value_get_object(value));
+ return pygobject_new(g_value_get_object(value));
default:
{
PyGTypeMarshal *bm;
@@ -1336,7 +1337,7 @@ pyg_signal_class_closure_marshal(GClosure *closure,
g_return_if_fail(object != NULL && G_IS_OBJECT(object));
/* get the wrapper for this object */
- object_wrapper = pygobject_new_sunk(object);
+ object_wrapper = pygobject_new(object);
g_return_if_fail(object_wrapper != NULL);
/* construct method name for this class closure */
diff --git a/gobject/pygtype.h b/gi/_gobject/pygtype.h
index 2f9e7ad..2f9e7ad 100644
--- a/gobject/pygtype.h
+++ b/gi/_gobject/pygtype.h
diff --git a/gi/gimodule.c b/gi/gimodule.c
index 5ef166f..f715d0f 100644
--- a/gi/gimodule.c
+++ b/gi/gimodule.c
@@ -475,10 +475,8 @@ _wrap_pyg_variant_type_from_string (PyObject *self, PyObject *args)
py_type = _pygi_type_import_by_name ("GLib", "VariantType");
- if (PyType_IsSubtype (py_type, &PyGIBoxed_Type))
- py_variant = _pygi_boxed_new ( (PyTypeObject *) py_type, type_string, FALSE);
- else
- py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE);
+ py_variant = _pygi_boxed_new ( (PyTypeObject *) py_type, type_string, FALSE);
+
return py_variant;
}
diff --git a/gi/importer.py b/gi/importer.py
index df08274..62555b1 100644
--- a/gi/importer.py
+++ b/gi/importer.py
@@ -24,10 +24,8 @@ from __future__ import absolute_import
import logging
import sys
-import gobject
-
from ._gi import Repository, RepositoryError
-from .module import DynamicModule, DynamicGObjectModule
+from .module import DynamicModule, DynamicGObjectModule, DynamicGLibModule
repository = Repository.get_default()
@@ -61,12 +59,14 @@ class DynamicImporter(object):
path, namespace = fullname.rsplit('.', 1)
- # Workaround for GObject
+ # Special case GObject and GLib
if namespace == 'GObject':
- sys.modules[fullname] = DynamicGObjectModule()
- return sys.modules[fullname]
+ dynamic_module = DynamicGObjectModule()
+ elif namespace == "GLib":
+ dynamic_module = DynamicGLibModule()
+ else:
+ dynamic_module = DynamicModule(namespace)
- dynamic_module = DynamicModule(namespace)
modules[namespace] = dynamic_module
dynamic_module.__file__ = '<%s>' % fullname
diff --git a/gi/module.py b/gi/module.py
index 70df76c..b749491 100644
--- a/gi/module.py
+++ b/gi/module.py
@@ -23,8 +23,12 @@
from __future__ import absolute_import
import os
-import gobject
-import string
+from . import _glib, _gobject
+try:
+ maketrans = ''.maketrans
+except AttributeError:
+ # fallback for Python 2
+ from string import maketrans
import gi
from .overrides import registry
@@ -63,7 +67,7 @@ def get_parent_for_object(object_info):
# Workaround for GObject.Object and GObject.InitiallyUnowned.
if namespace == 'GObject' and name == 'Object' or name == 'InitiallyUnowned':
- return gobject.GObject
+ return _gobject.GObject
module = __import__('gi.repository.%s' % namespace, fromlist=[name])
return getattr(module, name)
@@ -106,16 +110,16 @@ class IntrospectionModule(object):
if wrapper is None:
if info.is_flags():
- if g_type.is_a(gobject.TYPE_FLAGS):
+ if g_type.is_a(_gobject.TYPE_FLAGS):
wrapper = flags_add(g_type)
else:
- assert g_type == gobject.TYPE_NONE
+ assert g_type == _gobject.TYPE_NONE
wrapper = flags_register_new_gtype_and_add(info)
else:
- if g_type.is_a(gobject.TYPE_ENUM):
+ if g_type.is_a(_gobject.TYPE_ENUM):
wrapper = enum_add(g_type)
else:
- assert g_type == gobject.TYPE_NONE
+ assert g_type == _gobject.TYPE_NONE
wrapper = enum_register_new_gtype_and_add(info)
wrapper.__info__ = info
@@ -124,21 +128,21 @@ class IntrospectionModule(object):
# Don't use upper() here to avoid locale specific
# identifier conversion (e. g. in Turkish 'i'.upper() == 'i')
# see https://bugzilla.gnome.org/show_bug.cgi?id=649165
- ascii_upper_trans = string.maketrans(
+ ascii_upper_trans = maketrans(
'abcdefgjhijklmnopqrstuvwxyz',
'ABCDEFGJHIJKLMNOPQRSTUVWXYZ')
for value_info in info.get_values():
value_name = value_info.get_name().translate(ascii_upper_trans)
setattr(wrapper, value_name, wrapper(value_info.get_value()))
- if g_type != gobject.TYPE_NONE:
+ if g_type != _gobject.TYPE_NONE:
g_type.pytype = wrapper
elif isinstance(info, RegisteredTypeInfo):
g_type = info.get_g_type()
# Check if there is already a Python wrapper.
- if g_type != gobject.TYPE_NONE:
+ if g_type != _gobject.TYPE_NONE:
type_ = g_type.pytype
if type_ is not None:
self.__dict__[name] = type_
@@ -152,13 +156,13 @@ class IntrospectionModule(object):
bases = (parent,) + interfaces
metaclass = GObjectMeta
elif isinstance(info, InterfaceInfo):
- bases = (gobject.GInterface,)
+ bases = (_gobject.GInterface,)
metaclass = GObjectMeta
elif isinstance(info, (StructInfo, UnionInfo)):
- if g_type.is_a(gobject.TYPE_BOXED):
+ if g_type.is_a(_gobject.TYPE_BOXED):
bases = (Boxed,)
- elif g_type.is_a(gobject.TYPE_POINTER) or \
- g_type == gobject.TYPE_NONE or \
+ elif g_type.is_a(_gobject.TYPE_POINTER) or \
+ g_type == _gobject.TYPE_NONE or \
g_type.fundamental == g_type:
bases = (Struct,)
else:
@@ -176,7 +180,7 @@ class IntrospectionModule(object):
wrapper = metaclass(name, bases, dict_)
# Register the new Python wrapper.
- if g_type != gobject.TYPE_NONE:
+ if g_type != _gobject.TYPE_NONE:
g_type.pytype = wrapper
elif isinstance(info, FunctionInfo):
@@ -205,37 +209,6 @@ class IntrospectionModule(object):
return list(result)
-
-class DynamicGObjectModule(IntrospectionModule):
- """Wrapper for the GObject module
-
- This class allows us to access both the static PyGObject module and the GI GObject module
- through the same interface. It is returned when by importing GObject from the gi repository:
-
- from gi.repository import GObject
-
- We use this because some PyGI interfaces generated from the GIR require GObject types not wrapped
- by the static bindings. This also allows access to module attributes in a way that is more
- familiar to GI application developers. Take signal flags as an example. The G_SIGNAL_RUN_FIRST
- flag would be accessed as GObject.SIGNAL_RUN_FIRST in the static bindings but in the dynamic bindings
- can be accessed as GObject.SignalFlags.RUN_FIRST. The latter follows a GI naming convention which
- would be familiar to GI application developers in a number of languages.
- """
-
- def __init__(self):
- IntrospectionModule.__init__(self, namespace='GObject')
-
- def __getattr__(self, name):
- # first see if this attr is in the gobject module
- attr = getattr(gobject, name, None)
-
- # if not in module assume request for an attr exported through GI
- if attr is None:
- attr = super(DynamicGObjectModule, self).__getattr__(name)
-
- return attr
-
-
class DynamicModule(object):
def __init__(self, namespace):
self._namespace = namespace
@@ -285,3 +258,61 @@ class DynamicModule(object):
self.__class__.__name__,
self._namespace,
path)
+
+class DynamicGObjectModule(DynamicModule):
+ """Wrapper for the internal GObject module
+
+ This class allows us to access both the static internal PyGObject module and the GI GObject module
+ through the same interface. It is returned when by importing GObject from the gi repository:
+
+ from gi.repository import GObject
+
+ We use this because some PyGI interfaces generated from the GIR require GObject types not wrapped
+ by the static bindings. This also allows access to module attributes in a way that is more
+ familiar to GI application developers. Take signal flags as an example. The G_SIGNAL_RUN_FIRST
+ flag would be accessed as GObject.SIGNAL_RUN_FIRST in the static bindings but in the dynamic bindings
+ can be accessed as GObject.SignalFlags.RUN_FIRST. The latter follows a GI naming convention which
+ would be familiar to GI application developers in a number of languages.
+ """
+
+ def __init__(self):
+ DynamicModule.__init__(self, namespace='GObject')
+
+ def __getattr__(self, name):
+ from . import _gobject
+
+ # first see if this attr is in the internal _gobject module
+ attr = getattr(_gobject, name, None)
+
+ # if not in module assume request for an attr exported through GI
+ if attr is None:
+ attr = super(DynamicGObjectModule, self).__getattr__(name)
+
+ return attr
+
+
+class DynamicGLibModule(DynamicModule):
+ """Wrapper for the internal GLib module
+
+ This class allows us to access both the static internal PyGLib module and the GI GLib module
+ through the same interface. It is returned when by importing GLib from the gi repository:
+
+ from gi.repository import GLib
+
+ We use this because some PyGI interfaces generated from the GIR require GLib types not wrapped
+ by the static bindings. This also allows access to module attributes in a way that is more
+ familiar to GI application developers.
+ """
+
+ def __init__(self):
+ DynamicModule.__init__(self, namespace='GLib')
+
+ def __getattr__(self, name):
+ # first see if this attr is in the internal _gobject module
+ attr = getattr(_glib, name, None)
+
+ # if not in module assume request for an attr exported through GI
+ if attr is None:
+ attr = super(DynamicGLibModule, self).__getattr__(name)
+
+ return attr
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
index 2caf205..e42f854 100644
--- a/gi/overrides/GLib.py
+++ b/gi/overrides/GLib.py
@@ -25,17 +25,6 @@ GLib = modules['GLib']._introspection_module
__all__ = []
-def _create_variant(value):
- '''Create a variant containing the variant "value".
-
- This is usually done with the GLib.Variant.new_variant() leaf
- constructor, but this is currently broken, see GNOME#639952.
- '''
- builder = GLib.VariantBuilder()
- builder.init(variant_type_from_string('v'))
- builder.add_value(value)
- return builder.end()
-
class _VariantCreator(object):
_LEAF_CONSTRUCTORS = {
@@ -52,8 +41,7 @@ class _VariantCreator(object):
's': GLib.Variant.new_string,
'o': GLib.Variant.new_object_path,
'g': GLib.Variant.new_signature,
- #'v': GLib.Variant.new_variant,
- 'v': _create_variant,
+ 'v': GLib.Variant.new_variant,
}
def _create(self, format, args):
@@ -96,8 +84,7 @@ class _VariantCreator(object):
'''Handle the case where the outermost type of format is a tuple.'''
format = format[1:] # eat the '('
- builder = GLib.VariantBuilder()
- builder.init(variant_type_from_string('r'))
+ builder = GLib.VariantBuilder.new(variant_type_from_string('r'))
if args is not None:
if not args or type(args[0]) != type(()):
raise (TypeError, 'expected tuple argument')
@@ -114,7 +101,7 @@ class _VariantCreator(object):
def _create_dict(self, format, args):
'''Handle the case where the outermost type of format is a dict.'''
- builder = GLib.VariantBuilder()
+ builder = None
if args is None or not args[0]:
# empty value: we need to call _create() to parse the subtype,
# and specify the element type precisely
@@ -124,9 +111,9 @@ class _VariantCreator(object):
raise ValueError('dictionary type string not closed with }')
rest_format = rest_format[1:] # eat the }
element_type = format[:len(format) - len(rest_format)]
- builder.init(variant_type_from_string(element_type))
+ builder = GLib.VariantBuilder.new(variant_type_from_string(element_type))
else:
- builder.init(variant_type_from_string('a{?*}'))
+ builder = GLib.VariantBuilder.new(variant_type_from_string('a{?*}'))
for k, v in args[0].items():
(key_v, rest_format, _) = self._create(format[2:], [k])
(val_v, rest_format, _) = self._create(rest_format, [v])
@@ -135,8 +122,7 @@ class _VariantCreator(object):
raise ValueError('dictionary type string not closed with }')
rest_format = rest_format[1:] # eat the }
- entry = GLib.VariantBuilder()
- entry.init(variant_type_from_string('{?*}'))
+ entry = GLib.VariantBuilder.new(variant_type_from_string('{?*}'))
entry.add_value(key_v)
entry.add_value(val_v)
builder.add_value(entry.end())
@@ -148,15 +134,15 @@ class _VariantCreator(object):
def _create_array(self, format, args):
'''Handle the case where the outermost type of format is an array.'''
- builder = GLib.VariantBuilder()
+ builder = None
if args is None or not args[0]:
# empty value: we need to call _create() to parse the subtype,
# and specify the element type precisely
rest_format = self._create(format[1:], None)[1]
element_type = format[:len(format) - len(rest_format)]
- builder.init(variant_type_from_string(element_type))
+ builder = GLib.VariantBuilder.new(variant_type_from_string(element_type))
else:
- builder.init(variant_type_from_string('a*'))
+ builder = GLib.VariantBuilder.new(variant_type_from_string('a*'))
for i in range(len(args[0])):
(v, rest_format, _) = self._create(format[1:], args[0][i:])
builder.add_value(v)
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index 7b86e1f..3485689 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -284,6 +284,14 @@ class Cursor(Gdk.Cursor):
Cursor = override(Cursor)
__all__.append('Cursor')
+_Gdk_color_parse = Gdk.color_parse
+@override(Gdk.color_parse)
+def color_parse(color):
+ success, color = _Gdk_color_parse(color)
+ if not success:
+ return None
+ return color
+
import sys
initialized, argv = Gdk.init_check(sys.argv)
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 30e883c..2aea6ad 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -20,7 +20,7 @@
# USA
import sys
-import gobject
+from gi import _gobject
from gi.repository import GObject
from ..overrides import override
from ..importer import modules
@@ -35,6 +35,18 @@ else:
Gtk = modules['Gtk']._introspection_module
__all__ = []
+if Gtk._version == '2.0':
+ import warnings
+ warn_msg = "You have imported the Gtk 2.0 module. Because Gtk 2.0 \
+was not designed for use with introspection some of the \
+interfaces and API will fail. As such this is not supported \
+by the pygobject development team and we encourage you to \
+port your app to Gtk 3 or greater. PyGTK is the recomended \
+python module to use with Gtk 2.0"
+
+ warnings.warn(warn_msg, RuntimeWarning)
+
+
class Widget(Gtk.Widget):
def translate_coordinates(self, dest_widget, src_x, src_y):
@@ -43,6 +55,9 @@ class Widget(Gtk.Widget):
if success:
return (dest_x, dest_y,)
+ def render_icon(self, stock_id, size, detail=None):
+ return super(Widget, self).render_icon(stock_id, size, detail)
+
Widget = override(Widget)
__all__.append('Widget')
@@ -140,7 +155,10 @@ class ActionGroup(Gtk.ActionGroup):
def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None):
action = Action(name, label, tooltip, stock_id)
if callback is not None:
- action.connect('activate', callback, user_data)
+ if user_data is None:
+ action.connect('activate', callback)
+ else:
+ action.connect('activate', callback, user_data)
self.add_action_with_accel(action, accelerator)
@@ -186,7 +204,10 @@ class ActionGroup(Gtk.ActionGroup):
action = Gtk.ToggleAction(name, label, tooltip, stock_id)
action.set_active(is_active)
if callback is not None:
- action.connect('activate', callback, user_data)
+ if user_data is None:
+ action.connect('activate', callback)
+ else:
+ action.connect('activate', callback, user_data)
self.add_action_with_accel(action, accelerator)
@@ -254,7 +275,10 @@ class ActionGroup(Gtk.ActionGroup):
first_action = action
if first_action is not None and on_change is not None:
- first_action.connect('changed', on_change, user_data)
+ if user_data is None:
+ action.connect('changed', on_change)
+ else:
+ action.connect('changed', on_change, user_data)
ActionGroup = override(ActionGroup)
__all__.append('ActionGroup')
@@ -284,6 +308,32 @@ class ComboBox(Gtk.ComboBox, Container):
ComboBox = override(ComboBox)
__all__.append('ComboBox')
+
+class Box(Gtk.Box):
+ def __init__(self, homogeneous=False, spacing=0, **kwds):
+ super(Box, self).__init__(**kwds)
+ self.set_homogeneous(homogeneous)
+ self.set_spacing(spacing)
+
+Box = override(Box)
+__all__.append('Box')
+
+class SizeGroup(Gtk.SizeGroup):
+ def __init__(self, mode=Gtk.SizeGroupMode.VERTICAL):
+ super(SizeGroup, self).__init__(mode=mode)
+
+SizeGroup = override(SizeGroup)
+__all__.append('SizeGroup')
+
+
+class MenuItem(Gtk.MenuItem):
+ def __init__(self, label=None):
+ super(MenuItem, self).__init__(label=label)
+
+MenuItem = override(MenuItem)
+__all__.append('MenuItem')
+
+
class Builder(Gtk.Builder):
def connect_signals(self, obj_or_map):
@@ -365,11 +415,15 @@ class Dialog(Gtk.Dialog, Container):
if flags & Gtk.DialogFlags.NO_SEPARATOR:
self.set_has_separator(False)
except AttributeError:
- pass
+ import warnings
+ warnings.warn("Gtk.DialogFlags.NO_SEPARATOR has been depricated since Gtk+-3.0", DeprecationWarning)
if buttons is not None:
self.add_buttons(*buttons)
+ action_area = property(lambda dialog: dialog.get_action_area())
+ vbox = property(lambda dialog: dialog.get_content_area())
+
def add_buttons(self, *args):
"""
The add_buttons() method adds several buttons to the Gtk.Dialog using
@@ -401,16 +455,23 @@ class MessageDialog(Gtk.MessageDialog, Dialog):
def __init__(self,
parent=None,
flags=0,
- type=Gtk.MessageType.INFO,
+ message_type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.NONE,
message_format=None,
**kwds):
if message_format != None:
kwds['text'] = message_format
+
+ # type keyword is used for backwards compat with PyGTK
+ if 'type' in kwds:
+ import warnings
+ warnings.warn("The use of the keyword type as a parameter of the Gtk.MessageDialog constructor has been depricated. Please use message_type instead.", DeprecationWarning)
+ message_type = kwds.pop('type')
+
Gtk.MessageDialog.__init__(self,
_buttons_property=buttons,
- message_type=type,
+ message_type=message_type,
**kwds)
Dialog.__init__(self, parent=parent, flags=flags)
@@ -619,12 +680,18 @@ class TextIter(Gtk.TextIter):
def forward_search(self, string, flags, limit):
success, match_start, match_end = super(TextIter, self).forward_search(string,
flags, limit)
- return (match_start, match_end,)
+ if success:
+ return (match_start, match_end)
+ else:
+ return None
def backward_search(self, string, flags, limit):
success, match_start, match_end = super(TextIter, self).backward_search(string,
flags, limit)
- return (match_start, match_end,)
+ if success:
+ return (match_start, match_end)
+ else:
+ return None
def begins_tag(self, tag=None):
return super(TextIter, self).begins_tag(tag)
@@ -772,10 +839,7 @@ class TreeModel(Gtk.TreeModel):
# so we don't have to do it here
value_container = GObject.Value()
value_container.init(type_)
- if type_ == GObject.TYPE_PYOBJECT:
- value_container.set_boxed(value)
- value = value_container
- elif type_ == GObject.TYPE_CHAR:
+ if type_ == GObject.TYPE_CHAR:
value_container.set_char(value)
value = value_container
elif type_ == GObject.TYPE_UCHAR:
@@ -803,6 +867,9 @@ class TreeModel(Gtk.TreeModel):
elif type_ == GObject.TYPE_UINT64:
value_container.set_uint64(value)
value = value_container
+ elif type_ == GObject.TYPE_PYOBJECT:
+ value_container.set_boxed(value)
+ value = value_container
return value
@@ -821,6 +888,9 @@ class TreeModel(Gtk.TreeModel):
return tuple(values)
+ def filter_new(self, root=None):
+ return super(TreeModel, self).filter_new(root)
+
TreeModel = override(TreeModel)
__all__.append('TreeModel')
@@ -879,10 +949,43 @@ class ListStore(Gtk.ListStore, TreeModel, TreeSortable):
return treeiter
+ def prepend(self, row=None):
+ treeiter = Gtk.ListStore.prepend(self)
+
+ if row is not None:
+ self.set_row(treeiter, row)
+
+ return treeiter
+
def set_value(self, treeiter, column, value):
value = self._convert_value(treeiter, column, value)
Gtk.ListStore.set_value(self, treeiter, column, value)
+ def set(self, treeiter, *args):
+
+ def _set_lists(columns, values):
+ if len(columns) != len(values):
+ raise TypeError('The number of columns do not match the number of values')
+ for col_num, val in zip(columns, values):
+ if not isinstance(col_num, int):
+ raise TypeError('TypeError: Expected integer argument for column.')
+ self.set_value(treeiter, col_num, val)
+
+ if args:
+ if isinstance(args[0], int):
+ columns = args[::2]
+ values = args[1::2]
+ _set_lists(columns, values)
+ elif isinstance(args[0], (tuple, list)):
+ if len(args) != 2:
+ raise TypeError('Too many arguments');
+ _set_lists(args[0], args[1])
+ elif isinstance(args[0], dict):
+ columns = args[0].keys()
+ values = args[0].values()
+ _set_lists(columns, values)
+ else:
+ raise TypeError('Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}. No -1 termination is needed.')
ListStore = override(ListStore)
__all__.append('ListStore')
@@ -1057,12 +1160,42 @@ class TreeStore(Gtk.TreeStore, TreeModel, TreeSortable):
value = self._convert_value(treeiter, column, value)
Gtk.TreeStore.set_value(self, treeiter, column, value)
+ def set(self, treeiter, *args):
+
+ def _set_lists(columns, values):
+ if len(columns) != len(values):
+ raise TypeError('The number of columns do not match the number of values')
+ for col_num, val in zip(columns, values):
+ if not isinstance(col_num, int):
+ raise TypeError('TypeError: Expected integer argument for column.')
+ self.set_value(treeiter, col_num, val)
+
+ if args:
+ if isinstance(args[0], int):
+ columns = args[::2]
+ values = args[1::2]
+ _set_lists(columns, values)
+ elif isinstance(args[0], (tuple, list)):
+ if len(args) != 2:
+ raise TypeError('Too many arguments');
+ _set_lists(args[0], args[1])
+ elif isinstance(args[0], dict):
+ columns = args[0].keys()
+ values = args[0].values()
+ _set_lists(columns, values)
+ else:
+ raise TypeError('Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}. No -1 termination is needed.')
TreeStore = override(TreeStore)
__all__.append('TreeStore')
class TreeView(Gtk.TreeView, Container):
+ def __init__(self, model=None):
+ Gtk.TreeView.__init__(self)
+ if model:
+ self.set_model(model)
+
def get_path_at_pos(self, x, y):
success, path, column, cell_x, cell_y = super(TreeView, self).get_path_at_pos(x, y)
if success:
diff --git a/gi/overrides/Makefile.in b/gi/overrides/Makefile.in
index 96ce126..ffe5df4 100644
--- a/gi/overrides/Makefile.in
+++ b/gi/overrides/Makefile.in
@@ -110,8 +110,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -228,7 +226,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py
index a98974f..ce98538 100644
--- a/gi/overrides/__init__.py
+++ b/gi/overrides/__init__.py
@@ -1,7 +1,7 @@
import sys
import types
-import gobject
+from gi import _gobject
registry = None
class _Registry(dict):
@@ -25,8 +25,8 @@ class _Registry(dict):
raise KeyError('You have tried to modify the registry outside of the overrides module. This is not allowed')
g_type = info.get_g_type()
- assert g_type != gobject.TYPE_NONE
- if g_type != gobject.TYPE_INVALID:
+ assert g_type != _gobject.TYPE_NONE
+ if g_type != _gobject.TYPE_INVALID:
g_type.pytype = value
# strip gi.overrides from module name
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index a9b5b60..76ba6d9 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -29,6 +29,7 @@
#include <datetime.h>
#include <pygobject.h>
#include <pyglib-python-compat.h>
+#include <pyglib.h>
static void
_pygi_g_type_tag_py_bounds (GITypeTag type_tag,
@@ -1093,8 +1094,10 @@ array_success:
if (transfer == GI_TRANSFER_EVERYTHING) {
arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
}
- } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
- g_warn_if_fail (!g_type_info_is_pointer (type_info) || transfer == GI_TRANSFER_NOTHING);
+ } else if (g_type_is_a (type, G_TYPE_POINTER) ||
+ g_type_is_a (type, G_TYPE_VARIANT) ||
+ type == G_TYPE_NONE) {
+ g_warn_if_fail (g_type_is_a (type, G_TYPE_VARIANT) || !g_type_info_is_pointer (type_info) || transfer == GI_TRANSFER_NOTHING);
arg.v_pointer = pyg_pointer_get (object, void);
} else {
PyErr_Format (PyExc_NotImplementedError, "structure type '%s' is not supported yet", g_type_name (type));
@@ -1316,23 +1319,6 @@ hash_table_release:
return arg;
}
-static glong
-_pygi_glong_from_argument (GIArgument *arg,
- GITypeInfo *type_info)
-{
- gsize item_size = _pygi_g_type_info_size (type_info);
-
- if (item_size == sizeof (glong))
- return arg->v_long;
- else if (item_size == sizeof (gint))
- return arg->v_int;
- else
- {
- g_warning ("pygi: unsupported item size %ld", item_size);
- return arg->v_long;
- }
-}
-
PyObject *
_pygi_argument_to_object (GIArgument *arg,
GITypeInfo *type_info,
@@ -1605,6 +1591,13 @@ _pygi_argument_to_object (GIArgument *arg,
}
Py_XDECREF (py_type);
+ } else if (type == G_TYPE_VARIANT) {
+ PyObject *py_type;
+
+ g_variant_ref_sink (arg->v_pointer);
+ py_type = _pygi_type_import_by_gi_info (info);
+ object = _pygi_struct_new ( (PyTypeObject *) py_type, arg->v_pointer,
+ transfer == GI_TRANSFER_EVERYTHING);
} else if (type == G_TYPE_NONE) {
PyObject *py_type;
@@ -1638,26 +1631,24 @@ _pygi_argument_to_object (GIArgument *arg,
/* An enum with a GType of None is an enum without GType */
PyObject *py_type = _pygi_type_import_by_gi_info (info);
PyObject *py_args = NULL;
- glong val = _pygi_glong_from_argument (arg, type_info);
if (!py_type)
return NULL;
py_args = PyTuple_New (1);
- if (PyTuple_SetItem (py_args, 0, PyLong_FromLong (val)) != 0) {
+ if (PyTuple_SetItem (py_args, 0, PyLong_FromLong (arg->v_long)) != 0) {
Py_DECREF (py_args);
Py_DECREF (py_type);
return NULL;
}
- object = PyObject_CallFunction (py_type, "l", val);
+ object = PyObject_CallFunction (py_type, "l", arg->v_long);
Py_DECREF (py_args);
Py_DECREF (py_type);
} else if (info_type == GI_INFO_TYPE_ENUM) {
- glong val = _pygi_glong_from_argument (arg, type_info);
- object = pyg_enum_from_gtype (type, val);
+ object = pyg_enum_from_gtype (type, arg->v_long);
} else {
object = pyg_flags_from_gtype (type, arg->v_long);
}
@@ -1784,8 +1775,19 @@ _pygi_argument_to_object (GIArgument *arg,
break;
}
case GI_TYPE_TAG_ERROR:
- /* Errors should be handled in the invoke wrapper. */
- g_assert_not_reached();
+ if (pyglib_error_check (&arg->v_pointer)) {
+ PyObject *err_type;
+ PyObject *err_value;
+ PyObject *err_trace;
+ PyErr_Fetch (&err_type, &err_value, &err_trace);
+ Py_XDECREF (err_type);
+ Py_XDECREF (err_trace);
+ object = err_value;
+ } else {
+ object = Py_None;
+ Py_INCREF (object);
+ break;
+ }
}
return object;
@@ -1851,6 +1853,8 @@ _pygi_argument_from_g_value(const GValue *value,
switch (info_type) {
case GI_INFO_TYPE_FLAGS:
+ arg.v_long = g_value_get_flags (value);
+ break;
case GI_INFO_TYPE_ENUM:
arg.v_long = g_value_get_enum (value);
break;
@@ -1876,6 +1880,8 @@ _pygi_argument_from_g_value(const GValue *value,
break;
}
case GI_TYPE_TAG_ERROR:
+ arg.v_pointer = g_value_get_boxed (value);
+ break;
case GI_TYPE_TAG_VOID:
g_critical("Converting of type '%s' is not implemented", g_type_tag_to_string(type_tag));
g_assert_not_reached();
@@ -1997,6 +2003,10 @@ _pygi_argument_release (GIArgument *arg,
|| (direction == GI_DIRECTION_OUT && transfer != GI_TRANSFER_NOTHING)) {
g_slice_free (GValue, value);
}
+ } else if (g_type_is_a (type, G_TYPE_CLOSURE)) {
+ if (direction == GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING) {
+ g_closure_unref (arg->v_pointer);
+ }
} else if (g_struct_info_is_foreign ( (GIStructInfo*) info)) {
if (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING) {
pygi_struct_foreign_release (info, arg->v_pointer);
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
new file mode 100644
index 0000000..31dc9e2
--- /dev/null
+++ b/gi/pygi-cache.c
@@ -0,0 +1,1443 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-info.h"
+#include "pygi-cache.h"
+#include "pygi-marshal-in.h"
+#include "pygi-marshal-out.h"
+#include "pygi-marshal-cleanup.h"
+#include "pygi-type.h"
+#include <girepository.h>
+
+PyGIArgCache * _arg_cache_new (GITypeInfo *type_info,
+ PyGICallableCache *callable_cache,
+ GIArgInfo *arg_info,
+ GITransfer transfer,
+ GIDirection direction,
+ gssize c_arg_index,
+ gssize py_arg_index);
+
+PyGIArgCache * _arg_cache_new_for_interface (GIInterfaceInfo *iface_info,
+ PyGICallableCache *callable_cache,
+ GIArgInfo *arg_info,
+ GITransfer transfer,
+ GIDirection direction,
+ gssize c_arg_index,
+ gssize py_arg_index);
+/* cleanup */
+void
+_pygi_arg_cache_free (PyGIArgCache *cache)
+{
+ if (cache == NULL)
+ return;
+
+ if (cache->type_info != NULL)
+ g_base_info_unref ( (GIBaseInfo *)cache->type_info);
+ if (cache->destroy_notify)
+ cache->destroy_notify (cache);
+ else
+ g_slice_free (PyGIArgCache, cache);
+}
+
+static void
+_interface_cache_free_func (PyGIInterfaceCache *cache)
+{
+ if (cache != NULL) {
+ Py_XDECREF (cache->py_type);
+ if (cache->type_name != NULL)
+ g_free (cache->type_name);
+ if (cache->interface_info != NULL)
+ g_base_info_unref ( (GIBaseInfo *)cache->interface_info);
+ g_slice_free (PyGIInterfaceCache, cache);
+ }
+}
+
+static void
+_hash_cache_free_func (PyGIHashCache *cache)
+{
+ if (cache != NULL) {
+ _pygi_arg_cache_free (cache->key_cache);
+ _pygi_arg_cache_free (cache->value_cache);
+ g_slice_free (PyGIHashCache, cache);
+ }
+}
+
+static void
+_sequence_cache_free_func (PyGISequenceCache *cache)
+{
+ if (cache != NULL) {
+ _pygi_arg_cache_free (cache->item_cache);
+ g_slice_free (PyGISequenceCache, cache);
+ }
+}
+
+static void
+_callback_cache_free_func (PyGICallbackCache *cache)
+{
+ if (cache != NULL) {
+ if (cache->interface_info != NULL)
+ g_base_info_unref ( (GIBaseInfo *)cache->interface_info);
+
+ g_slice_free (PyGICallbackCache, cache);
+ }
+}
+
+void
+_pygi_callable_cache_free (PyGICallableCache *cache)
+{
+ gssize i;
+
+ if (cache == NULL)
+ return;
+
+ g_slist_free (cache->out_args);
+ g_slist_free (cache->arg_name_list);
+ g_hash_table_destroy (cache->arg_name_hash);
+
+ for (i = 0; i < cache->n_args; i++) {
+ PyGIArgCache *tmp = cache->args_cache[i];
+ _pygi_arg_cache_free (tmp);
+ }
+ if (cache->return_cache != NULL)
+ _pygi_arg_cache_free (cache->return_cache);
+
+ g_slice_free1 (cache->n_args * sizeof (PyGIArgCache *), cache->args_cache);
+ g_slice_free (PyGICallableCache, cache);
+}
+
+/* cache generation */
+
+static PyGIInterfaceCache *
+_interface_cache_new (GIInterfaceInfo *iface_info)
+{
+ PyGIInterfaceCache *ic;
+
+ ic = g_slice_new0 (PyGIInterfaceCache);
+ ( (PyGIArgCache *)ic)->destroy_notify = (GDestroyNotify)_interface_cache_free_func;
+ ic->g_type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *)iface_info);
+ ic->py_type = _pygi_type_import_by_gi_info ( (GIBaseInfo *) iface_info);
+
+ if (ic->py_type == NULL)
+ return NULL;
+
+ ic->type_name = _pygi_g_base_info_get_fullname (iface_info);
+ return ic;
+}
+
+static PyGISequenceCache *
+_sequence_cache_new (GITypeInfo *type_info,
+ GIDirection direction,
+ GITransfer transfer,
+ gssize child_offset)
+{
+ PyGISequenceCache *sc;
+ GITypeInfo *item_type_info;
+ GITypeTag item_type_tag;
+ GITransfer item_transfer;
+
+ sc = g_slice_new0 (PyGISequenceCache);
+ ( (PyGIArgCache *)sc)->destroy_notify = (GDestroyNotify)_sequence_cache_free_func;
+
+ sc->fixed_size = -1;
+ sc->len_arg_index = -1;
+ sc->is_zero_terminated = g_type_info_is_zero_terminated (type_info);
+ if (!sc->is_zero_terminated) {
+ sc->fixed_size = g_type_info_get_array_fixed_size (type_info);
+ if (sc->fixed_size < 0)
+ sc->len_arg_index = g_type_info_get_array_length (type_info) + child_offset;
+ }
+
+ item_type_info = g_type_info_get_param_type (type_info, 0);
+
+ item_transfer =
+ transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+ sc->item_cache = _arg_cache_new (item_type_info,
+ NULL,
+ NULL,
+ item_transfer,
+ direction,
+ 0, 0);
+
+ if (sc->item_cache == NULL) {
+ _pygi_arg_cache_free ( (PyGIArgCache *)sc);
+ return NULL;
+ }
+
+ sc->item_size = _pygi_g_type_info_size (item_type_info);
+ g_base_info_unref ( (GIBaseInfo *)item_type_info);
+
+ return sc;
+}
+static PyGIHashCache *
+_hash_cache_new (GITypeInfo *type_info,
+ GIDirection direction,
+ GITransfer transfer)
+{
+ PyGIHashCache *hc;
+ GITypeInfo *key_type_info;
+ GITypeInfo *value_type_info;
+ GITransfer item_transfer;
+
+ hc = g_slice_new0 (PyGIHashCache);
+ ( (PyGIArgCache *)hc)->destroy_notify = (GDestroyNotify)_hash_cache_free_func;
+ key_type_info = g_type_info_get_param_type (type_info, 0);
+ value_type_info = g_type_info_get_param_type (type_info, 1);
+
+ item_transfer =
+ transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+ hc->key_cache = _arg_cache_new (key_type_info,
+ NULL,
+ NULL,
+ item_transfer,
+ direction,
+ 0, 0);
+
+ if (hc->key_cache == NULL) {
+ _pygi_arg_cache_free ( (PyGIArgCache *)hc);
+ return NULL;
+ }
+
+ hc->value_cache = _arg_cache_new (value_type_info,
+ NULL,
+ NULL,
+ item_transfer,
+ direction,
+ 0, 0);
+
+ if (hc->value_cache == NULL) {
+ _pygi_arg_cache_free ( (PyGIArgCache *)hc);
+ return NULL;
+ }
+
+ g_base_info_unref( (GIBaseInfo *)key_type_info);
+ g_base_info_unref( (GIBaseInfo *)value_type_info);
+
+ return hc;
+}
+
+static PyGICallbackCache *
+_callback_cache_new (GIArgInfo *arg_info,
+ GIInterfaceInfo *iface_info,
+ gssize child_offset)
+{
+ PyGICallbackCache *cc;
+
+ cc = g_slice_new0 (PyGICallbackCache);
+ cc->user_data_index = g_arg_info_get_closure (arg_info);
+ if (cc->user_data_index != -1)
+ cc->user_data_index += child_offset;
+ cc->destroy_notify_index = g_arg_info_get_destroy (arg_info);
+ if (cc->destroy_notify_index != -1)
+ cc->destroy_notify_index += child_offset;
+ cc->scope = g_arg_info_get_scope (arg_info);
+ g_base_info_ref( (GIBaseInfo *)iface_info);
+ cc->interface_info = iface_info;
+ return cc;
+}
+
+static PyGIArgCache *
+_arg_cache_alloc (void)
+{
+ return g_slice_new0 (PyGIArgCache);
+}
+
+static void
+_arg_cache_in_void_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_void;
+}
+
+static void
+_arg_cache_out_void_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_void;
+}
+
+static void
+_arg_cache_in_boolean_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_boolean;
+}
+
+static void
+_arg_cache_out_boolean_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_boolean;
+}
+
+static void
+_arg_cache_in_int8_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_int8;
+}
+
+static void
+_arg_cache_out_int8_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_int8;
+}
+
+static void
+_arg_cache_in_uint8_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_uint8;
+}
+
+static void
+_arg_cache_out_uint8_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_uint8;
+}
+
+static void
+_arg_cache_in_int16_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_int16;
+}
+
+static void
+_arg_cache_out_int16_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_int16;
+}
+
+static void
+_arg_cache_in_uint16_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_uint16;
+}
+
+static void
+_arg_cache_out_uint16_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_uint16;
+}
+
+static void
+_arg_cache_in_int32_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_int32;
+}
+
+static void
+_arg_cache_out_int32_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_int32;
+}
+
+static void
+_arg_cache_in_uint32_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_uint32;
+}
+
+static void
+_arg_cache_out_uint32_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_uint32;
+}
+
+static void
+_arg_cache_in_int64_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_int64;
+}
+
+static void
+_arg_cache_out_int64_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_int64;
+}
+
+static void
+_arg_cache_in_uint64_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_uint64;
+}
+
+static void
+_arg_cache_out_uint64_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_uint64;
+}
+
+static void
+_arg_cache_in_float_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_float;
+}
+
+static void
+_arg_cache_out_float_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_float;
+}
+
+static void
+_arg_cache_in_double_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_double;
+}
+
+static void
+_arg_cache_out_double_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_double;
+}
+
+static void
+_arg_cache_in_unichar_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_unichar;
+}
+
+static void
+_arg_cache_out_unichar_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_unichar;
+}
+
+static void
+_arg_cache_in_gtype_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_gtype;
+}
+
+static void
+_arg_cache_out_gtype_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_gtype;
+}
+
+static void
+_arg_cache_in_utf8_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_utf8;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_utf8;
+}
+
+static void
+_arg_cache_out_utf8_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_utf8;
+ arg_cache->out_cleanup = _pygi_marshal_cleanup_out_utf8;
+}
+
+static void
+_arg_cache_in_filename_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_filename;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_utf8;
+}
+
+static void
+_arg_cache_out_filename_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_filename;
+ arg_cache->out_cleanup = _pygi_marshal_cleanup_out_utf8;
+}
+
+static gboolean
+_arg_cache_in_array_setup (PyGIArgCache *arg_cache,
+ PyGICallableCache *callable_cache,
+ GITypeInfo *type_info,
+ GITransfer transfer,
+ GIDirection direction)
+{
+ PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache;
+ seq_cache->array_type = g_type_info_get_array_type (type_info);
+
+ arg_cache->in_marshaller = _pygi_marshal_in_array;
+
+ if (seq_cache->len_arg_index >= 0 &&
+ direction == GI_DIRECTION_IN) {
+ PyGIArgCache *child_cache =
+ callable_cache->args_cache[seq_cache->len_arg_index];
+
+ if (child_cache == NULL) {
+ child_cache = _arg_cache_alloc ();
+ } else if (child_cache->meta_type == PYGI_META_ARG_TYPE_CHILD) {
+ return TRUE;
+ }
+
+ child_cache->meta_type = PYGI_META_ARG_TYPE_CHILD;
+ child_cache->direction = direction;
+ child_cache->in_marshaller = NULL;
+ child_cache->out_marshaller = NULL;
+
+ callable_cache->args_cache[seq_cache->len_arg_index] = child_cache;
+ }
+
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_array;
+
+ return TRUE;
+}
+
+static gboolean
+_arg_cache_out_array_setup (PyGIArgCache *arg_cache,
+ PyGICallableCache *callable_cache,
+ GITypeInfo *type_info,
+ GITransfer transfer,
+ GIDirection direction,
+ gssize arg_index)
+{
+ PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache;
+ arg_cache->out_marshaller = _pygi_marshal_out_array;
+ arg_cache->out_cleanup = _pygi_marshal_cleanup_out_array;
+
+ seq_cache->array_type = g_type_info_get_array_type (type_info);
+
+ if (seq_cache->len_arg_index >= 0) {
+ PyGIArgCache *child_cache = callable_cache->args_cache[seq_cache->len_arg_index];
+ if (seq_cache->len_arg_index < arg_index)
+ callable_cache->n_out_child_args++;
+
+ if (child_cache != NULL) {
+ if (child_cache->meta_type == PYGI_META_ARG_TYPE_CHILD)
+ return TRUE;
+
+ callable_cache->out_args =
+ g_slist_remove (callable_cache->out_args, child_cache);
+ } else {
+ child_cache = _arg_cache_alloc ();
+ }
+
+ child_cache->meta_type = PYGI_META_ARG_TYPE_CHILD;
+ child_cache->direction = direction;
+ child_cache->in_marshaller = NULL;
+ child_cache->out_marshaller = NULL;
+
+ callable_cache->args_cache[seq_cache->len_arg_index] = child_cache;
+ }
+
+ return TRUE;
+}
+
+static void
+_arg_cache_in_glist_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_glist;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_glist;
+}
+
+static void
+_arg_cache_out_glist_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_glist;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_out_glist;
+}
+
+static void
+_arg_cache_in_gslist_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_gslist;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_glist;
+}
+
+static void
+_arg_cache_out_gslist_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_gslist;
+ arg_cache->out_cleanup = _pygi_marshal_cleanup_out_glist;
+}
+
+static void
+_arg_cache_in_ghash_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_ghash;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_ghash;
+}
+
+static void
+_arg_cache_out_ghash_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_ghash;
+ arg_cache->out_cleanup = _pygi_marshal_cleanup_out_ghash;
+}
+
+static void
+_arg_cache_in_gerror_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_gerror;
+ arg_cache->meta_type = PYGI_META_ARG_TYPE_CHILD;
+}
+
+static void
+_arg_cache_out_gerror_setup (PyGIArgCache *arg_cache)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_gerror;
+ arg_cache->meta_type = PYGI_META_ARG_TYPE_CHILD;
+}
+
+static void
+_arg_cache_in_interface_union_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_interface_struct;
+}
+
+static void
+_arg_cache_out_interface_union_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_interface_struct;
+}
+
+static void
+_arg_cache_in_interface_struct_setup (PyGIArgCache *arg_cache,
+ GIInterfaceInfo *iface_info,
+ GITransfer transfer)
+{
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+ iface_cache->is_foreign = g_struct_info_is_foreign ( (GIStructInfo*)iface_info);
+ arg_cache->in_marshaller = _pygi_marshal_in_interface_struct;
+
+ if (iface_cache->g_type == G_TYPE_VALUE)
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_interface_struct_gvalue;
+ else if (iface_cache->is_foreign)
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_interface_struct_foreign;
+}
+
+static void
+_arg_cache_out_interface_struct_setup (PyGIArgCache *arg_cache,
+ GIInterfaceInfo *iface_info,
+ GITransfer transfer)
+{
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+ iface_cache->is_foreign = g_struct_info_is_foreign ( (GIStructInfo*)iface_info);
+ arg_cache->out_marshaller = _pygi_marshal_out_interface_struct;
+
+ if (iface_cache->is_foreign)
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_out_interface_struct_foreign;
+}
+
+static void
+_arg_cache_in_interface_object_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_interface_object;
+ arg_cache->in_cleanup = _pygi_marshal_cleanup_in_interface_object;
+}
+
+static void
+_arg_cache_out_interface_object_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_interface_object;
+ arg_cache->out_cleanup = _pygi_marshal_cleanup_out_interface_object;
+}
+
+static void
+_arg_cache_in_interface_callback_setup (PyGIArgCache *arg_cache,
+ PyGICallableCache *callable_cache)
+{
+ PyGICallbackCache *callback_cache = (PyGICallbackCache *)arg_cache;
+ if (callback_cache->user_data_index >= 0) {
+ PyGIArgCache *user_data_arg_cache = _arg_cache_alloc ();
+ user_data_arg_cache->meta_type = PYGI_META_ARG_TYPE_CHILD_WITH_PYARG;
+ callable_cache->args_cache[callback_cache->user_data_index] = user_data_arg_cache;
+ }
+
+ if (callback_cache->destroy_notify_index >= 0) {
+ PyGIArgCache *destroy_arg_cache = _arg_cache_alloc ();
+ destroy_arg_cache->meta_type = PYGI_META_ARG_TYPE_CHILD;
+ callable_cache->args_cache[callback_cache->destroy_notify_index] = destroy_arg_cache;
+ }
+ arg_cache->in_marshaller = _pygi_marshal_in_interface_callback;
+}
+
+static void
+_arg_cache_out_interface_callback_setup (void)
+{
+ PyErr_Format(PyExc_NotImplementedError,
+ "Callback returns are not supported");
+}
+
+static void
+_arg_cache_in_interface_enum_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_interface_enum;
+}
+
+static void
+_arg_cache_out_interface_enum_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_interface_enum;
+}
+
+static void
+_arg_cache_in_interface_flags_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->in_marshaller = _pygi_marshal_in_interface_flags;
+}
+
+static void
+_arg_cache_out_interface_flags_setup (PyGIArgCache *arg_cache,
+ GITransfer transfer)
+{
+ arg_cache->out_marshaller = _pygi_marshal_out_interface_flags;
+}
+
+PyGIArgCache *
+_arg_cache_new_for_interface (GIInterfaceInfo *iface_info,
+ PyGICallableCache *callable_cache,
+ GIArgInfo *arg_info,
+ GITransfer transfer,
+ GIDirection direction,
+ gssize c_arg_index,
+ gssize py_arg_index)
+{
+ PyGIInterfaceCache *iface_cache = NULL;
+ PyGIArgCache *arg_cache = NULL;
+ gssize child_offset = 0;
+ GIInfoType info_type;
+
+ if (callable_cache != NULL)
+ child_offset =
+ (callable_cache->function_type == PYGI_FUNCTION_TYPE_METHOD ||
+ callable_cache->function_type == PYGI_FUNCTION_TYPE_VFUNC) ? 1: 0;
+
+ GI_IS_INTERFACE_INFO (iface_info);
+
+ info_type = g_base_info_get_type ( (GIBaseInfo *)iface_info);
+
+ /* Callbacks are special cased */
+ if (info_type != GI_INFO_TYPE_CALLBACK) {
+ iface_cache = _interface_cache_new (iface_info);
+
+ arg_cache = (PyGIArgCache *)iface_cache;
+ if (arg_cache == NULL)
+ return NULL;
+ }
+
+ switch (info_type) {
+ case GI_INFO_TYPE_UNION:
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_union_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_interface_union_setup (arg_cache, transfer);
+
+ break;
+ case GI_INFO_TYPE_STRUCT:
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_struct_setup (arg_cache,
+ iface_info,
+ transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_interface_struct_setup (arg_cache,
+ iface_info,
+ transfer);
+
+ break;
+ case GI_INFO_TYPE_OBJECT:
+ case GI_INFO_TYPE_INTERFACE:
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_object_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_interface_object_setup (arg_cache, transfer);
+
+ break;
+ case GI_INFO_TYPE_BOXED:
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_struct_setup (arg_cache,
+ iface_info,
+ transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_interface_struct_setup (arg_cache,
+ iface_info,
+ transfer);
+
+ break;
+ case GI_INFO_TYPE_CALLBACK:
+ {
+ PyGICallbackCache *callback_cache;
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+ _arg_cache_out_interface_callback_setup ();
+ return NULL;
+ }
+
+ callback_cache =
+ _callback_cache_new (arg_info,
+ iface_info,
+ child_offset);
+
+ arg_cache = (PyGIArgCache *)callback_cache;
+ if (arg_cache == NULL)
+ return NULL;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_callback_setup (arg_cache, callable_cache);
+
+ break;
+ }
+ case GI_INFO_TYPE_ENUM:
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_enum_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_interface_enum_setup (arg_cache, transfer);
+
+ break;
+ case GI_INFO_TYPE_FLAGS:
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_interface_flags_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_interface_flags_setup (arg_cache, transfer);
+
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ if (arg_cache != NULL) {
+ arg_cache->direction = direction;
+ arg_cache->transfer = transfer;
+ arg_cache->type_tag = GI_TYPE_TAG_INTERFACE;
+ arg_cache->py_arg_index = py_arg_index;
+ arg_cache->c_arg_index = c_arg_index;
+
+ if (iface_cache != NULL) {
+ g_base_info_ref ( (GIBaseInfo *)iface_info);
+ iface_cache->interface_info = iface_info;
+ }
+ }
+
+ return arg_cache;
+}
+
+PyGIArgCache *
+_arg_cache_new (GITypeInfo *type_info,
+ PyGICallableCache *callable_cache,
+ GIArgInfo *arg_info,
+ GITransfer transfer,
+ GIDirection direction,
+ gssize c_arg_index,
+ gssize py_arg_index)
+{
+ PyGIArgCache *arg_cache = NULL;
+ gssize child_offset = 0;
+ GITypeTag type_tag;
+
+ GI_IS_TYPE_INFO (type_info);
+
+ type_tag = g_type_info_get_tag (type_info);
+
+ if (callable_cache != NULL)
+ child_offset =
+ (callable_cache->function_type == PYGI_FUNCTION_TYPE_METHOD ||
+ callable_cache->function_type == PYGI_FUNCTION_TYPE_VFUNC) ? 1: 0;
+
+ switch (type_tag) {
+ case GI_TYPE_TAG_VOID:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_void_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_void_setup (arg_cache);
+ break;
+ case GI_TYPE_TAG_BOOLEAN:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_boolean_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_boolean_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_INT8:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_int8_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_int8_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_UINT8:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_uint8_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_uint8_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_INT16:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_int16_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_int16_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_UINT16:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_uint16_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_uint16_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_INT32:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_int32_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_int32_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_UINT32:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_uint32_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_uint32_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_INT64:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_int64_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_int64_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_UINT64:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_uint64_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_uint64_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_FLOAT:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_float_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_float_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_DOUBLE:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_double_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_double_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_UNICHAR:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_unichar_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_unichar_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_GTYPE:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_gtype_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_gtype_setup (arg_cache);
+
+ break;
+ case GI_TYPE_TAG_UTF8:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_utf8_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_utf8_setup (arg_cache, transfer);
+
+ break;
+ case GI_TYPE_TAG_FILENAME:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_filename_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_filename_setup (arg_cache, transfer);
+
+ break;
+ case GI_TYPE_TAG_ARRAY:
+ {
+ PyGISequenceCache *seq_cache =
+ _sequence_cache_new (type_info,
+ direction,
+ transfer,
+ child_offset);
+
+ arg_cache = (PyGIArgCache *)seq_cache;
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_array_setup (arg_cache,
+ callable_cache,
+ type_info,
+ transfer,
+ direction);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_array_setup (arg_cache,
+ callable_cache,
+ type_info,
+ transfer,
+ direction,
+ c_arg_index);
+
+ /* ugly edge case code:
+ *
+ * length can come before the array parameter which means we
+ * need to update indexes if this happens
+ */
+ if (seq_cache->len_arg_index > -1 &&
+ seq_cache->len_arg_index < c_arg_index) {
+ gssize i;
+
+ py_arg_index -= 1;
+ callable_cache->n_py_args -= 1;
+
+ for (i = seq_cache->len_arg_index + 1;
+ i < callable_cache->n_args;
+ i++) {
+ PyGIArgCache *update_cache = callable_cache->args_cache[i];
+ if (update_cache == NULL)
+ break;
+
+ update_cache->py_arg_index -= 1;
+ }
+ }
+
+ break;
+ }
+ case GI_TYPE_TAG_GLIST:
+ {
+ PyGISequenceCache *seq_cache =
+ _sequence_cache_new (type_info,
+ direction,
+ transfer,
+ child_offset);
+
+ arg_cache = (PyGIArgCache *)seq_cache;
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_glist_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_glist_setup (arg_cache, transfer);
+
+
+ break;
+ }
+ case GI_TYPE_TAG_GSLIST:
+ {
+ PyGISequenceCache *seq_cache =
+ _sequence_cache_new (type_info,
+ direction,
+ transfer,
+ child_offset);
+
+ arg_cache = (PyGIArgCache *)seq_cache;
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_gslist_setup (arg_cache, transfer);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_gslist_setup (arg_cache, transfer);
+
+ break;
+ }
+ case GI_TYPE_TAG_GHASH:
+ arg_cache =
+ (PyGIArgCache *)_hash_cache_new (type_info,
+ direction,
+ transfer);
+
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_ghash_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+ _arg_cache_out_ghash_setup (arg_cache);
+ }
+
+ break;
+ case GI_TYPE_TAG_INTERFACE:
+ {
+ GIInterfaceInfo *interface_info = g_type_info_get_interface (type_info);
+ arg_cache = _arg_cache_new_for_interface (interface_info,
+ callable_cache,
+ arg_info,
+ transfer,
+ direction,
+ c_arg_index,
+ py_arg_index);
+
+ g_base_info_unref ( (GIBaseInfo *)interface_info);
+ break;
+ }
+ case GI_TYPE_TAG_ERROR:
+ arg_cache = _arg_cache_alloc ();
+ if (arg_cache == NULL)
+ break;
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT)
+ _arg_cache_in_gerror_setup (arg_cache);
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT)
+ _arg_cache_out_gerror_setup (arg_cache);
+
+ break;
+ }
+
+ if (arg_cache != NULL) {
+ arg_cache->direction = direction;
+ arg_cache->transfer = transfer;
+ arg_cache->type_tag = type_tag;
+ arg_cache->py_arg_index = py_arg_index;
+ arg_cache->c_arg_index = c_arg_index;
+ arg_cache->is_pointer = g_type_info_is_pointer (type_info);
+ g_base_info_ref ( (GIBaseInfo *) type_info);
+ arg_cache->type_info = type_info;
+ }
+
+ return arg_cache;
+}
+
+static void
+_arg_name_list_generate (PyGICallableCache *callable_cache)
+{
+ GSList * arg_name_list = NULL;
+
+ if (callable_cache->arg_name_hash == NULL) {
+ callable_cache->arg_name_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ } else {
+ g_hash_table_remove_all (callable_cache->arg_name_hash);
+ }
+
+ for (int i=0; i < callable_cache->n_args; i++) {
+ PyGIArgCache *arg_cache = NULL;
+
+ arg_cache = callable_cache->args_cache[i];
+
+ if (arg_cache->meta_type != PYGI_META_ARG_TYPE_CHILD &&
+ (arg_cache->direction == GI_DIRECTION_IN ||
+ arg_cache->direction == GI_DIRECTION_INOUT)) {
+
+ gpointer arg_name = (gpointer)arg_cache->arg_name;
+
+ arg_name_list = g_slist_prepend (arg_name_list, arg_name);
+ if (arg_name != NULL) {
+ g_hash_table_insert (callable_cache->arg_name_hash, arg_name, arg_name);
+ }
+ }
+ }
+
+ callable_cache->arg_name_list = g_slist_reverse (arg_name_list);
+}
+
+/* Generate the cache for the callable's arguments */
+static gboolean
+_args_cache_generate (GICallableInfo *callable_info,
+ PyGICallableCache *callable_cache)
+{
+ gssize arg_index = 0;
+ gssize i;
+ GITypeInfo *return_info;
+ GITransfer return_transfer;
+ PyGIArgCache *return_cache;
+
+ /* cache the return arg */
+ return_info =
+ g_callable_info_get_return_type (callable_info);
+ return_transfer =
+ g_callable_info_get_caller_owns (callable_info);
+ return_cache =
+ _arg_cache_new (return_info,
+ callable_cache,
+ NULL,
+ return_transfer,
+ GI_DIRECTION_OUT,
+ -1,
+ -1);
+
+ callable_cache->return_cache = return_cache;
+ g_base_info_unref (return_info);
+
+ /* first arg is the instance */
+ if (callable_cache->function_type == PYGI_FUNCTION_TYPE_METHOD ||
+ callable_cache->function_type == PYGI_FUNCTION_TYPE_VFUNC) {
+ GIInterfaceInfo *interface_info;
+ PyGIArgCache *instance_cache;
+
+ interface_info = g_base_info_get_container ( (GIBaseInfo *)callable_info);
+
+ instance_cache =
+ _arg_cache_new_for_interface (interface_info,
+ callable_cache,
+ NULL,
+ GI_TRANSFER_NOTHING,
+ GI_DIRECTION_IN,
+ arg_index,
+ 0);
+
+ instance_cache->in_marshaller = _pygi_marshal_in_interface_instance;
+ g_base_info_unref ( (GIBaseInfo *)interface_info);
+
+ if (instance_cache == NULL)
+ return FALSE;
+
+ callable_cache->args_cache[arg_index] = instance_cache;
+
+ arg_index++;
+ callable_cache->n_in_args++;
+ callable_cache->n_py_args++;
+ }
+
+
+ for (i=0; arg_index < callable_cache->n_args; arg_index++, i++) {
+ PyGIArgCache *arg_cache = NULL;
+ GIArgInfo *arg_info;
+ GITypeInfo *type_info;
+ GIDirection direction;
+ GITransfer transfer;
+ GITypeTag type_tag;
+ gboolean is_caller_allocates = FALSE;
+ gssize py_arg_index = -1;
+
+ arg_info =
+ g_callable_info_get_arg (callable_info, i);
+
+ direction = g_arg_info_get_direction (arg_info);
+ transfer = g_arg_info_get_ownership_transfer (arg_info);
+ type_info = g_arg_info_get_type (arg_info);
+ type_tag = g_type_info_get_tag (type_info);
+
+ if (type_tag == GI_TYPE_TAG_INTERFACE)
+ is_caller_allocates = g_arg_info_is_caller_allocates (arg_info);
+
+ /* must be an child arg filled in by its owner
+ * fill in it's c_arg_index, add to the in count
+ * and continue
+ */
+ if (callable_cache->args_cache[arg_index] != NULL) {
+ arg_cache = callable_cache->args_cache[arg_index];
+ if (arg_cache->meta_type == PYGI_META_ARG_TYPE_CHILD_WITH_PYARG) {
+ arg_cache->py_arg_index = callable_cache->n_py_args;
+ callable_cache->n_py_args++;
+ }
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
+ arg_cache->c_arg_index = callable_cache->n_in_args;
+ callable_cache->n_in_args++;
+ }
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+ callable_cache->n_out_args++;
+ callable_cache->n_out_child_args++;
+ }
+
+ g_base_info_unref ( (GIBaseInfo *)arg_info);
+ continue;
+ }
+
+ if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
+ py_arg_index = callable_cache->n_py_args;
+ callable_cache->n_in_args++;
+ callable_cache->n_py_args++;
+ }
+
+ arg_cache =
+ _arg_cache_new (type_info,
+ callable_cache,
+ arg_info,
+ transfer,
+ direction,
+ arg_index,
+ py_arg_index);
+
+ if (arg_cache == NULL)
+ goto arg_err;
+
+ arg_cache->arg_name = g_base_info_get_name ((GIBaseInfo *) arg_info);
+ arg_cache->allow_none = g_arg_info_may_be_null(arg_info);
+ arg_cache->is_caller_allocates = is_caller_allocates;
+
+ if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+ callable_cache->n_out_args++;
+
+ if (arg_cache == NULL)
+ goto arg_err;
+
+ callable_cache->out_args =
+ g_slist_append (callable_cache->out_args, arg_cache);
+ }
+
+ callable_cache->args_cache[arg_index] = arg_cache;
+ g_base_info_unref( (GIBaseInfo *)type_info);
+ g_base_info_unref( (GIBaseInfo *)arg_info);
+
+ continue;
+arg_err:
+ g_base_info_unref( (GIBaseInfo *)type_info);
+ g_base_info_unref( (GIBaseInfo *)arg_info);
+ return FALSE;
+ }
+
+ _arg_name_list_generate (callable_cache);
+
+ return TRUE;
+}
+
+PyGICallableCache *
+_pygi_callable_cache_new (GICallableInfo *callable_info)
+{
+ PyGICallableCache *cache;
+ GIInfoType type = g_base_info_get_type ( (GIBaseInfo *)callable_info);
+
+ cache = g_slice_new0 (PyGICallableCache);
+
+ if (cache == NULL)
+ return NULL;
+
+ cache->name = g_base_info_get_name ((GIBaseInfo *)callable_info);
+
+ if (type == GI_INFO_TYPE_FUNCTION) {
+ GIFunctionInfoFlags flags;
+
+ flags = g_function_info_get_flags ( (GIFunctionInfo *)callable_info);
+
+ if (flags & GI_FUNCTION_IS_CONSTRUCTOR)
+ cache->function_type = PYGI_FUNCTION_TYPE_CONSTRUCTOR;
+ else if (flags & GI_FUNCTION_IS_METHOD)
+ cache->function_type = PYGI_FUNCTION_TYPE_METHOD;
+ } else if (type == GI_INFO_TYPE_VFUNC) {
+ cache->function_type = PYGI_FUNCTION_TYPE_VFUNC;
+ } else if (type == GI_INFO_TYPE_CALLBACK) {
+ cache->function_type = PYGI_FUNCTION_TYPE_CALLBACK;
+ } else {
+ cache->function_type = PYGI_FUNCTION_TYPE_METHOD;
+ }
+
+ cache->n_args = g_callable_info_get_n_args (callable_info);
+
+ /* if we are a method or vfunc make sure the instance parameter is counted */
+ if (cache->function_type == PYGI_FUNCTION_TYPE_METHOD ||
+ cache->function_type == PYGI_FUNCTION_TYPE_VFUNC)
+ cache->n_args++;
+
+ if (cache->n_args > 0)
+ cache->args_cache = g_slice_alloc0 (cache->n_args * sizeof (PyGIArgCache *));
+
+ if (!_args_cache_generate (callable_info, cache))
+ goto err;
+
+ return cache;
+err:
+ _pygi_callable_cache_free (cache);
+ return NULL;
+}
diff --git a/gi/pygi-cache.h b/gi/pygi-cache.h
new file mode 100644
index 0000000..e00e54d
--- /dev/null
+++ b/gi/pygi-cache.h
@@ -0,0 +1,174 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_CACHE_H__
+#define __PYGI_CACHE_H__
+
+#include <Python.h>
+#include <girepository.h>
+
+#include "pygi-invoke-state-struct.h"
+
+G_BEGIN_DECLS
+
+typedef struct _PyGICallableCache PyGICallableCache;
+typedef struct _PyGIArgCache PyGIArgCache;
+
+typedef gboolean (*PyGIMarshalInFunc) (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+
+typedef PyObject *(*PyGIMarshalOutFunc) (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+
+typedef void (*PyGIMarshalCleanupFunc) (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+
+/* Argument meta types denote how we process the argument:
+ * - Parents (PYGI_META_ARG_TYPE_PARENT) may or may not have children
+ * but are always processed via the normal marshaller for their
+ * actual GI type. If they have children the marshaller will
+ * also handle marshalling the children.
+ * - Children without python argument (PYGI_META_ARG_TYPE_CHILD) are
+ * ignored by the marshallers and handled directly by their parents
+ * marshaller.
+ * - Children with pyargs (PYGI_META_ARG_TYPE_CHILD_WITH_PYARG) are processed
+ * the same as other child args but also have an index into the
+ * python parameters passed to the invoker
+ */
+typedef enum {
+ PYGI_META_ARG_TYPE_PARENT,
+ PYGI_META_ARG_TYPE_CHILD,
+ PYGI_META_ARG_TYPE_CHILD_WITH_PYARG
+} PyGIMetaArgType;
+
+/*
+ * GI determines function types via a combination of flags and info classes.
+ * Since for branching purposes they are mutually exclusive, the
+ * PyGIFunctionType enum consolidates them into one enumeration for ease of
+ * branching and debugging.
+ */
+ typedef enum {
+ PYGI_FUNCTION_TYPE_FUNCTION,
+ PYGI_FUNCTION_TYPE_METHOD,
+ PYGI_FUNCTION_TYPE_CONSTRUCTOR,
+ PYGI_FUNCTION_TYPE_VFUNC,
+ PYGI_FUNCTION_TYPE_CALLBACK
+ } PyGIFunctionType;
+
+struct _PyGIArgCache
+{
+ const gchar *arg_name;
+
+ PyGIMetaArgType meta_type;
+ gboolean is_pointer;
+ gboolean is_caller_allocates;
+ gboolean allow_none;
+
+ GIDirection direction;
+ GITransfer transfer;
+ GITypeTag type_tag;
+ GITypeInfo *type_info;
+
+ PyGIMarshalInFunc in_marshaller;
+ PyGIMarshalOutFunc out_marshaller;
+
+ PyGIMarshalCleanupFunc in_cleanup;
+ PyGIMarshalCleanupFunc out_cleanup;
+
+ GDestroyNotify destroy_notify;
+
+ gssize c_arg_index;
+ gssize py_arg_index;
+};
+
+typedef struct _PyGISequenceCache
+{
+ PyGIArgCache arg_cache;
+ gssize fixed_size;
+ gssize len_arg_index;
+ gboolean is_zero_terminated;
+ gsize item_size;
+ GIArrayType array_type;
+ PyGIArgCache *item_cache;
+} PyGISequenceCache;
+
+typedef struct _PyGIInterfaceCache
+{
+ PyGIArgCache arg_cache;
+ gboolean is_foreign;
+ GType g_type;
+ PyObject *py_type;
+ GIInterfaceInfo *interface_info;
+ gchar *type_name;
+} PyGIInterfaceCache;
+
+typedef struct _PyGIHashCache
+{
+ PyGIArgCache arg_cache;
+ PyGIArgCache *key_cache;
+ PyGIArgCache *value_cache;
+} PyGIHashCache;
+
+typedef struct _PyGICallbackCache
+{
+ PyGIArgCache arg_cache;
+ gssize user_data_index;
+ gssize destroy_notify_index;
+ GIScopeType scope;
+ GIInterfaceInfo *interface_info;
+} PyGICallbackCache;
+
+struct _PyGICallableCache
+{
+ const gchar *name;
+
+ PyGIFunctionType function_type;
+
+ PyGIArgCache *return_cache;
+ PyGIArgCache **args_cache;
+ GSList *out_args;
+ GSList *arg_name_list; /* for keyword arg matching */
+ GHashTable *arg_name_hash;
+
+ /* counts */
+ gssize n_in_args;
+ gssize n_out_args;
+ gssize n_out_child_args;
+
+ gssize n_args;
+ gssize n_py_args;
+};
+
+void _pygi_arg_cache_clear (PyGIArgCache *cache);
+void _pygi_callable_cache_free (PyGICallableCache *cache);
+
+PyGICallableCache *_pygi_callable_cache_new (GICallableInfo *callable_info);
+
+G_END_DECLS
+
+#endif /* __PYGI_CACHE_H__ */
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 35281a2..f770b20 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -392,8 +392,10 @@ end:
void _pygi_invoke_closure_free (gpointer data)
{
+ PyGILState_STATE state;
PyGICClosure* invoke_closure = (PyGICClosure *) data;
+ state = PyGILState_Ensure();
Py_DECREF (invoke_closure->function);
g_callable_info_free_closure (invoke_closure->info,
@@ -403,6 +405,7 @@ void _pygi_invoke_closure_free (gpointer data)
g_base_info_unref ( (GIBaseInfo*) invoke_closure->info);
Py_XDECREF (invoke_closure->user_data);
+ PyGILState_Release (state);
g_slice_free (PyGICClosure, invoke_closure);
}
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index e332a22..c6303f8 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -30,7 +30,7 @@
#include <pycairo/py3cairo.h>
#endif
-Pycairo_CAPI_t *Pycairo_CAPI;
+static Pycairo_CAPI_t *Pycairo_CAPI;
#include "pygi-foreign.h"
@@ -38,7 +38,7 @@ Pycairo_CAPI_t *Pycairo_CAPI;
PyObject *
cairo_context_to_arg (PyObject *value,
- GIInterfaceInfo *iface_info,
+ GIInterfaceInfo *interface_info,
GITransfer transfer,
GIArgument *arg)
{
@@ -56,8 +56,7 @@ cairo_context_to_arg (PyObject *value,
}
PyObject *
-cairo_context_from_arg (GIInterfaceInfo *iface_info,
- gpointer data)
+cairo_context_from_arg (GIInterfaceInfo *interface_info, gpointer data)
{
cairo_t *context = (cairo_t*) data;
@@ -77,7 +76,7 @@ cairo_context_release (GIBaseInfo *base_info,
PyObject *
cairo_surface_to_arg (PyObject *value,
- GIInterfaceInfo *iface_info,
+ GIInterfaceInfo *interface_info,
GITransfer transfer,
GIArgument *arg)
{
@@ -96,8 +95,7 @@ cairo_surface_to_arg (PyObject *value,
}
PyObject *
-cairo_surface_from_arg (GIInterfaceInfo *iface_info,
- gpointer data)
+cairo_surface_from_arg (GIInterfaceInfo *interface_info, gpointer data)
{
cairo_surface_t *surface = (cairo_surface_t*) data;
@@ -114,10 +112,15 @@ cairo_surface_release (GIBaseInfo *base_info,
Py_RETURN_NONE;
}
-static PyMethodDef _gi_cairo_functions[] = {};
+static PyMethodDef _gi_cairo_functions[] = {0,};
PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
{
+#if PY_VERSION_HEX < 0x03000000
Pycairo_IMPORT;
+#else
+ Pycairo_CAPI = (Pycairo_CAPI_t*) PyCapsule_Import("cairo.CAPI", 0);
+#endif
+
if (Pycairo_CAPI == NULL)
return PYGLIB_MODULE_ERROR_RETURN;
diff --git a/gi/pygi-foreign-gvariant.c b/gi/pygi-foreign-gvariant.c
index 9249d44..e799d98 100644
--- a/gi/pygi-foreign-gvariant.c
+++ b/gi/pygi-foreign-gvariant.c
@@ -28,7 +28,7 @@
PyObject *
g_variant_to_arg (PyObject *value,
- GIInterfaceInfo *type_info,
+ GIInterfaceInfo *interface_info,
GITransfer transfer,
GIArgument *arg)
{
@@ -41,11 +41,12 @@ g_variant_to_arg (PyObject *value,
}
PyObject *
-g_variant_from_arg (GIInterfaceInfo *iface_info,
+g_variant_from_arg (GIInterfaceInfo *interface_info,
gpointer data)
{
GVariant *variant = (GVariant *) data;
- PyObject *type = _pygi_type_import_by_gi_info (iface_info);
+
+ PyObject *type = _pygi_type_import_by_gi_info (interface_info);
g_variant_ref_sink (variant);
@@ -54,7 +55,7 @@ g_variant_from_arg (GIInterfaceInfo *iface_info,
PyObject *
g_variant_release_foreign (GIBaseInfo *base_info,
- gpointer struct_)
+ gpointer struct_)
{
g_variant_unref ( (GVariant *) struct_);
Py_RETURN_NONE;
diff --git a/gi/pygi-foreign-gvariant.h b/gi/pygi-foreign-gvariant.h
index 8ebc4cd..43ea9c7 100644
--- a/gi/pygi-foreign-gvariant.h
+++ b/gi/pygi-foreign-gvariant.h
@@ -26,12 +26,14 @@
#include "pygi-foreign.h"
-PyObject *g_variant_to_arg (PyObject *value,
- GIInterfaceInfo *iface_info,
- GITransfer transfer,
- GIArgument *arg);
-PyObject *g_variant_from_arg (GIInterfaceInfo *iface_info,
- gpointer data);
+PyObject *g_variant_to_arg(PyObject *value,
+ GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ GIArgument *arg);
+
+PyObject *g_variant_from_arg(GITypeInfo *type_info,
+ gpointer data);
+
PyObject *g_variant_release_foreign (GIBaseInfo *base_info,
gpointer struct_);
diff --git a/gi/pygi-foreign.c b/gi/pygi-foreign.c
index eafaca3..0398450 100644
--- a/gi/pygi-foreign.c
+++ b/gi/pygi-foreign.c
@@ -108,33 +108,36 @@ pygi_struct_foreign_lookup (GIBaseInfo *base_info)
PyObject *
pygi_struct_foreign_convert_to_g_argument (PyObject *value,
- GIInterfaceInfo *iface_info,
+ GIInterfaceInfo *interface_info,
GITransfer transfer,
GIArgument *arg)
{
- GIBaseInfo *base_info = (GIBaseInfo *) iface_info;
- PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
+ PyObject *result;
- if (foreign_struct == NULL)
- return NULL;
+ GIBaseInfo *base_info = (GIBaseInfo *) interface_info;
+ PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
- if (!foreign_struct->to_func (value, iface_info, transfer, arg))
- return NULL;
+ if (foreign_struct == NULL) {
+ PyErr_Format(PyExc_KeyError, "could not find foreign type %s",
+ g_base_info_get_name (base_info));
+ return FALSE;
+ }
- Py_RETURN_NONE;
+ result = foreign_struct->to_func (value, interface_info, transfer, arg);
+ return result;
}
PyObject *
-pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *iface_info,
+pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *interface_info,
GIArgument *arg)
{
- GIBaseInfo *base_info = (GIBaseInfo *) iface_info;
+ GIBaseInfo *base_info = (GIBaseInfo *) interface_info;
PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
if (foreign_struct == NULL)
return NULL;
- return foreign_struct->from_func (iface_info, arg);
+ return foreign_struct->from_func (interface_info, arg);
}
PyObject *
@@ -149,10 +152,7 @@ pygi_struct_foreign_release (GIBaseInfo *base_info,
if (!foreign_struct->release_func)
Py_RETURN_NONE;
- if (!foreign_struct->release_func (base_info, struct_))
- return NULL;
-
- Py_RETURN_NONE;
+ return foreign_struct->release_func (base_info, struct_);
}
void
diff --git a/gi/pygi-foreign.h b/gi/pygi-foreign.h
index b07f682..dd5f896 100644
--- a/gi/pygi-foreign.h
+++ b/gi/pygi-foreign.h
@@ -30,14 +30,14 @@
#include "pygi.h"
-PyObject *pygi_struct_foreign_convert_to_g_argument (PyObject *value,
- GIInterfaceInfo *iface_info,
- GITransfer transfer,
+PyObject *pygi_struct_foreign_convert_to_g_argument (PyObject *value,
+ GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ GIArgument *arg);
+PyObject *pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *interface_info,
GIArgument *arg);
-PyObject *pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *iface_info,
- GIArgument *arg);
-PyObject *pygi_struct_foreign_release (GIBaseInfo *base_info,
- gpointer struct_);
+PyObject *pygi_struct_foreign_release (GITypeInfo *type_info,
+ gpointer struct_);
void pygi_register_foreign_struct_real (const char* namespace_,
const char* name,
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 1bfd7d8..007b609 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -22,6 +22,7 @@
*/
#include "pygi-private.h"
+#include "pygi-cache.h"
#include <pygobject.h>
#include <pyglib-python-compat.h>
@@ -37,6 +38,8 @@ _base_info_dealloc (PyGIBaseInfo *self)
g_base_info_unref (self->info);
+ _pygi_callable_cache_free(self->cache);
+
Py_TYPE( (PyObject *) self)->tp_free ( (PyObject *) self);
}
@@ -162,9 +165,6 @@ _pygi_info_new (GIBaseInfo *info)
case GI_INFO_TYPE_CONSTANT:
type = &PyGIConstantInfo_Type;
break;
- case GI_INFO_TYPE_ERROR_DOMAIN:
- type = &PyGIErrorDomainInfo_Type;
- break;
case GI_INFO_TYPE_UNION:
type = &PyGIUnionInfo_Type;
break;
@@ -481,7 +481,6 @@ _pygi_g_type_info_size (GITypeInfo *type_info)
case GI_INFO_TYPE_INVALID:
case GI_INFO_TYPE_FUNCTION:
case GI_INFO_TYPE_CONSTANT:
- case GI_INFO_TYPE_ERROR_DOMAIN:
case GI_INFO_TYPE_VALUE:
case GI_INFO_TYPE_SIGNAL:
case GI_INFO_TYPE_PROPERTY:
@@ -860,7 +859,6 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info)
case GI_INFO_TYPE_INVALID:
case GI_INFO_TYPE_FUNCTION:
case GI_INFO_TYPE_CONSTANT:
- case GI_INFO_TYPE_ERROR_DOMAIN:
case GI_INFO_TYPE_VALUE:
case GI_INFO_TYPE_SIGNAL:
case GI_INFO_TYPE_PROPERTY:
diff --git a/gi/pygi-invoke-state-struct.h b/gi/pygi-invoke-state-struct.h
new file mode 100644
index 0000000..a4072b7
--- /dev/null
+++ b/gi/pygi-invoke-state-struct.h
@@ -0,0 +1,44 @@
+#ifndef __PYGI_INVOKE_STATE_STRUCT_H__
+#define __PYGI_INVOKE_STATE_STRUCT_H__
+
+#include <Python.h>
+
+#include <girepository.h>
+
+G_BEGIN_DECLS
+
+typedef struct _PyGIInvokeState
+{
+ PyObject *py_in_args;
+ gssize n_py_in_args;
+ gssize current_arg;
+
+ GType implementor_gtype;
+
+ GIArgument **args;
+ GIArgument *in_args;
+
+ /* Out args and out values
+ * In order to pass a parameter and get something back out in C
+ * we need to pass a pointer to the value, e.g.
+ * int *out_integer;
+ *
+ * so while out_args == out_integer, out_value == *out_integer
+ * or in other words out_args = &out_values
+ *
+ * We do all of our processing on out_values but we pass out_args to
+ * the actual function.
+ */
+ GIArgument *out_args;
+ GIArgument *out_values;
+
+ GIArgument return_arg;
+
+ GError *error;
+
+ gboolean failed;
+} PyGIInvokeState;
+
+G_END_DECLS
+
+#endif
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index f9e09bb..55e56ee 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -2,6 +2,7 @@
* vim: tabstop=4 shiftwidth=4 expandtab
*
* Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ * Copyright (C) 2011 John (J5) Palimier <johnp@redhat.com>
*
* pygi-invoke.c: main invocation function
*
@@ -24,1011 +25,598 @@
#include <pyglib.h>
#include "pygi-invoke.h"
-struct invocation_state
-{
- gboolean is_method;
- gboolean is_constructor;
-
- gsize n_args;
- gsize n_in_args;
- gsize n_out_args;
- gsize n_backup_args;
- Py_ssize_t n_py_args;
- gsize n_aux_in_args;
- gsize n_aux_out_args;
- gsize n_return_values;
-
- guint8 callback_index;
- guint8 user_data_index;
- guint8 destroy_notify_index;
- PyGICClosure *closure;
-
- glong error_arg_pos;
-
- GIArgInfo **arg_infos;
- GITypeInfo **arg_type_infos;
- GITypeInfo *return_type_info;
- GITypeTag return_type_tag;
-
- GIArgument **args;
- gboolean *args_is_auxiliary;
-
- GIArgument *in_args;
- GIArgument *out_args;
- GIArgument *out_values;
- GIArgument *backup_args;
- GIArgument return_arg;
-
- PyObject *return_value;
-
- GType implementor_gtype;
-
- /* hack to avoid treating C arrays as GArrays during free
- * due to overly complicated array handling
- * this will be removed when the new invoke branch is merged
- */
- gboolean c_arrays_are_wrapped;
-};
-static gboolean
-_initialize_invocation_state (struct invocation_state *state,
- GIFunctionInfo *info,
- PyObject *py_args,
- PyObject *kwargs)
+static inline gboolean
+_invoke_callable (PyGIInvokeState *state,
+ PyGICallableCache *cache,
+ GICallableInfo *callable_info)
{
- if (g_base_info_get_type (info) == GI_INFO_TYPE_FUNCTION) {
- GIFunctionInfoFlags flags = g_function_info_get_flags (info);
+ GError *error;
+ gint retval;
- state->is_method = (flags & GI_FUNCTION_IS_METHOD) != 0;
- state->is_constructor = (flags & GI_FUNCTION_IS_CONSTRUCTOR) != 0;
- state->implementor_gtype = 0;
- } else {
- PyObject *obj;
+ error = NULL;
- state->is_method = TRUE;
- state->is_constructor = FALSE;
+ pyg_begin_allow_threads;
- obj = PyDict_GetItemString (kwargs, "gtype");
- if (obj == NULL) {
- PyErr_SetString (PyExc_TypeError,
- "need the GType of the implementor class");
- return FALSE;
- }
+ /* FIXME: use this for now but we can streamline the calls */
+ if (cache->function_type == PYGI_FUNCTION_TYPE_VFUNC)
+ retval = g_vfunc_info_invoke ( callable_info,
+ state->implementor_gtype,
+ state->in_args,
+ cache->n_in_args,
+ state->out_args,
+ cache->n_out_args,
+ &state->return_arg,
+ &error);
+ else
+ retval = g_function_info_invoke ( callable_info,
+ state->in_args,
+ cache->n_in_args,
+ state->out_args,
+ cache->n_out_args,
+ &state->return_arg,
+ &error);
+ pyg_end_allow_threads;
- state->implementor_gtype = pyg_type_from_object (obj);
- if (state->implementor_gtype == 0)
- return FALSE;
+ if (!retval) {
+ g_assert (error != NULL);
+ pyglib_error_check (&error);
+
+ /* It is unclear if the error occured before or after the C
+ * function was invoked so for now assume success
+ * We eventually should marshal directly to FFI so we no longer
+ * have to use the reference implementation
+ */
+ pygi_marshal_cleanup_args_in_marshal_success (state, cache);
+
+ return FALSE;
}
- /* Count arguments. */
- state->n_args = g_callable_info_get_n_args ( (GICallableInfo *) info);
- state->n_in_args = 0;
- state->n_out_args = 0;
- state->n_backup_args = 0;
- state->n_aux_in_args = 0;
- state->n_aux_out_args = 0;
-
- /* Check the argument count. */
- state->n_py_args = PyTuple_Size (py_args);
- g_assert (state->n_py_args >= 0);
-
- state->error_arg_pos = -1;
-
- state->arg_infos = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
- state->arg_type_infos = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
- state->args_is_auxiliary = g_slice_alloc0 (sizeof (gboolean) * state->n_args);
-
- state->return_value = NULL;
- state->closure = NULL;
- state->return_type_info = NULL;
- state->args = NULL;
- state->in_args = NULL;
- state->out_args = NULL;
- state->out_values = NULL;
- state->backup_args = NULL;
-
- /* HACK: this gets marked FALSE whenever a C array in the args is
- * not wrapped by a GArray
- */
- state->c_arrays_are_wrapped = TRUE;
+ if (state->error != NULL) {
+ if (pyglib_error_check (&(state->error))) {
+ /* even though we errored out, the call itself was successful,
+ so we assume the call processed all of the parameters */
+ pygi_marshal_cleanup_args_in_marshal_success (state, cache);
+ return FALSE;
+ }
+ }
return TRUE;
}
static gboolean
-_prepare_invocation_state (struct invocation_state *state,
- GIFunctionInfo *function_info, PyObject *py_args)
+_check_for_unexpected_kwargs (const gchar *function_name,
+ GHashTable *arg_name_hash,
+ PyObject *py_kwargs)
{
- gsize i;
-
- if (!_pygi_scan_for_callbacks (function_info,
- state->is_method,
- &state->callback_index, &state->user_data_index,
- &state->destroy_notify_index))
- return FALSE;
-
- if (state->callback_index != G_MAXUINT8) {
+ PyObject *dict_key, *dict_value;
+ Py_ssize_t dict_iter_pos = 0;
+
+ while (PyDict_Next (py_kwargs, &dict_iter_pos, &dict_key, &dict_value)) {
+ PyObject *key;
+
+#if PY_VERSION_HEX < 0x03000000
+ if (PyString_Check (dict_key)) {
+ Py_INCREF (dict_key);
+ key = dict_key;
+ } else
+#endif
+ {
+ key = PyUnicode_AsUTF8String (dict_key);
+ if (key == NULL) {
+ return FALSE;
+ }
+ }
- if (!_pygi_create_callback (function_info,
- state->is_method,
- state->is_constructor,
- state->n_args, state->n_py_args,
- py_args, state->callback_index,
- state->user_data_index,
- state->destroy_notify_index, &state->closure))
+ if (g_hash_table_lookup (arg_name_hash, PyBytes_AsString(key)) == NULL) {
+ PyErr_Format (PyExc_TypeError,
+ "%.200s() got an unexpected keyword argument '%.400s'",
+ function_name,
+ PyBytes_AsString (key));
+ Py_DECREF (key);
return FALSE;
-
- state->args_is_auxiliary[state->callback_index] = FALSE;
- if (state->destroy_notify_index != G_MAXUINT8) {
- state->args_is_auxiliary[state->destroy_notify_index] = TRUE;
- state->n_aux_in_args += 1;
}
- }
- if (state->is_method) {
- /* The first argument is the instance. */
- state->n_in_args += 1;
+ Py_DECREF (key);
}
+ return TRUE;
+}
- /* We do a first (well, second) pass here over the function to scan for special cases.
- * This is currently array+length combinations, GError and GValue.
- */
- for (i = 0; i < state->n_args; i++) {
- GIDirection direction;
- GITransfer transfer;
- GITypeTag arg_type_tag;
-
- state->arg_infos[i] = g_callable_info_get_arg ( (GICallableInfo *) function_info,
- i);
-
- state->arg_type_infos[i] = g_arg_info_get_type (state->arg_infos[i]);
-
- direction = g_arg_info_get_direction (state->arg_infos[i]);
- transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
- arg_type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
-
- if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
- state->n_in_args += 1;
- }
- if (direction == GI_DIRECTION_INOUT) {
- state->n_backup_args += 1;
- }
- if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
- state->n_out_args += 1;
- }
-
- switch (arg_type_tag) {
- case GI_TYPE_TAG_ARRAY:
- {
- gint length_arg_pos;
-
- length_arg_pos = g_type_info_get_array_length (state->arg_type_infos[i]);
-
- if (length_arg_pos < 0) {
- break;
- }
-
- /* For array lengths, we're going to delete the length argument;
- * so remove the extra backup we just added above */
- if (direction == GI_DIRECTION_INOUT) {
- state->n_backup_args -= 1;
- }
+/**
+ * _py_args_combine_and_check_length:
+ * @function_name: the name of the function being called. Used for error messages.
+ * @arg_name_list: a list of the string names for each argument. The length
+ * of this list is the number of required arguments for the
+ * function. If an argument has no name, NULL is put in its
+ * position in the list.
+ * @py_args: the tuple of positional arguments. A referece is stolen, and this
+ tuple will be either decreffed or returned as is.
+ * @py_kwargs: the dict of keyword arguments to be merged with py_args.
+ * A reference is borrowed.
+ *
+ * Returns: The py_args and py_kwargs combined into one tuple.
+ */
+static PyObject *
+_py_args_combine_and_check_length (const gchar *function_name,
+ GSList *arg_name_list,
+ GHashTable *arg_name_hash,
+ PyObject *py_args,
+ PyObject *py_kwargs)
+{
+ PyObject *combined_py_args = NULL;
+ Py_ssize_t n_py_args, n_py_kwargs, i;
+ guint n_expected_args;
+ GSList *l;
- g_assert (length_arg_pos < state->n_args);
- state->args_is_auxiliary[length_arg_pos] = TRUE;
+ n_py_args = PyTuple_GET_SIZE (py_args);
+ n_py_kwargs = PyDict_Size (py_kwargs);
- if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
- state->n_aux_in_args += 1;
- }
- if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
- state->n_aux_out_args += 1;
- }
+ n_expected_args = g_slist_length (arg_name_list);
- break;
- }
- case GI_TYPE_TAG_ERROR:
- g_warn_if_fail (state->error_arg_pos < 0);
- state->error_arg_pos = i;
- break;
- default:
- break;
- }
+ if (n_py_kwargs == 0 && n_py_args == n_expected_args) {
+ return py_args;
}
- state->return_type_info = g_callable_info_get_return_type ( (GICallableInfo *) function_info);
- state->return_type_tag = g_type_info_get_tag (state->return_type_info);
-
- if (state->return_type_tag == GI_TYPE_TAG_ARRAY) {
- gint length_arg_pos;
- length_arg_pos = g_type_info_get_array_length (state->return_type_info);
+ if (n_expected_args < n_py_args) {
+ PyErr_Format (PyExc_TypeError,
+ "%.200s() takes exactly %d %sargument%s (%zd given)",
+ function_name,
+ n_expected_args,
+ n_py_kwargs > 0 ? "non-keyword " : "",
+ n_expected_args == 1 ? "" : "s",
+ n_py_args);
- if (length_arg_pos >= 0) {
- g_assert (length_arg_pos < state->n_args);
- state->args_is_auxiliary[length_arg_pos] = TRUE;
- state->n_aux_out_args += 1;
- }
+ Py_DECREF (py_args);
+ return NULL;
}
- state->n_return_values = state->n_out_args - state->n_aux_out_args;
- if (state->return_type_tag != GI_TYPE_TAG_VOID) {
- state->n_return_values += 1;
+ if (!_check_for_unexpected_kwargs (function_name, arg_name_hash, py_kwargs)) {
+ Py_DECREF (py_args);
+ return NULL;
}
- {
- gsize n_py_args_expected;
- Py_ssize_t py_args_pos;
-
- n_py_args_expected = state->n_in_args
- + (state->is_constructor ? 1 : 0)
- - state->n_aux_in_args
- - (state->error_arg_pos >= 0 ? 1 : 0);
+ /* will hold arguments from both py_args and py_kwargs
+ * when they are combined into a single tuple */
+ combined_py_args = PyTuple_New (n_expected_args);
- if (state->n_py_args != n_py_args_expected) {
- PyErr_Format (PyExc_TypeError,
- "%s() takes exactly %zd argument(s) (%zd given)",
- g_base_info_get_name ( (GIBaseInfo *) function_info),
- n_py_args_expected, state->n_py_args);
- return FALSE;
- }
-
- /* Check argument typestate-> */
- py_args_pos = 0;
- if (state->is_constructor || state->is_method) {
- py_args_pos += 1;
- }
+ for (i = 0; i < n_py_args; i++) {
+ PyObject *item = PyTuple_GET_ITEM (py_args, i);
+ Py_INCREF (item);
+ PyTuple_SET_ITEM (combined_py_args, i, item);
+ }
- for (i = 0; i < state->n_args; i++) {
- GIDirection direction;
- GITypeTag type_tag;
- PyObject *py_arg;
- gint retval;
- gboolean allow_none;
+ Py_CLEAR(py_args);
- direction = g_arg_info_get_direction (state->arg_infos[i]);
- type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+ for (i = 0, l = arg_name_list; i < n_expected_args && l; i++, l = l->next) {
+ PyObject *py_arg_item, *kw_arg_item = NULL;
+ const gchar *arg_name = l->data;
- if (direction == GI_DIRECTION_OUT
- || state->args_is_auxiliary[i]
- || type_tag == GI_TYPE_TAG_ERROR) {
- continue;
- }
+ if (arg_name != NULL) {
+ /* NULL means this argument has no keyword name */
+ /* ex. the first argument to a method or constructor */
+ kw_arg_item = PyDict_GetItemString (py_kwargs, arg_name);
+ }
+ py_arg_item = PyTuple_GET_ITEM (combined_py_args, i);
- g_assert (py_args_pos < state->n_py_args);
- py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
+ if (kw_arg_item != NULL && py_arg_item == NULL) {
+ Py_INCREF (kw_arg_item);
+ PyTuple_SET_ITEM (combined_py_args, i, kw_arg_item);
- allow_none = g_arg_info_may_be_null (state->arg_infos[i]);
+ } else if (kw_arg_item == NULL && py_arg_item == NULL) {
+ PyErr_Format (PyExc_TypeError,
+ "%.200s() takes exactly %d %sargument%s (%zd given)",
+ function_name,
+ n_expected_args,
+ n_py_kwargs > 0 ? "non-keyword " : "",
+ n_expected_args == 1 ? "" : "s",
+ n_py_args);
- retval = _pygi_g_type_info_check_object (state->arg_type_infos[i],
- py_arg,
- allow_none);
+ Py_DECREF (combined_py_args);
+ return NULL;
- if (retval < 0) {
- return FALSE;
- } else if (!retval) {
- _PyGI_ERROR_PREFIX ("argument %zd: ", py_args_pos);
- return FALSE;
- }
+ } else if (kw_arg_item != NULL && py_arg_item != NULL) {
+ PyErr_Format (PyExc_TypeError,
+ "%.200s() got multiple values for keyword argument '%.200s'",
+ function_name,
+ arg_name);
- py_args_pos += 1;
+ Py_DECREF (combined_py_args);
+ return NULL;
}
-
- g_assert (py_args_pos == state->n_py_args);
}
- state->args = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
- state->in_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_in_args);
- state->out_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_out_args);
- state->out_values = g_slice_alloc0 (sizeof (GIArgument) * state->n_out_args);
- state->backup_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_backup_args);
-
- /* Bind args so we can use an unique index. */
- {
- gsize in_args_pos;
- gsize out_args_pos;
-
- in_args_pos = state->is_method ? 1 : 0;
- out_args_pos = 0;
-
- for (i = 0; i < state->n_args; i++) {
- GIDirection direction;
- GIBaseInfo *info;
- gboolean is_caller_allocates;
-
- direction = g_arg_info_get_direction (state->arg_infos[i]);
- is_caller_allocates = g_arg_info_is_caller_allocates (state->arg_infos[i]);
-
- switch (direction) {
- case GI_DIRECTION_IN:
- g_assert (in_args_pos < state->n_in_args);
- state->args[i] = &state->in_args[in_args_pos];
- in_args_pos += 1;
- break;
- case GI_DIRECTION_INOUT:
- g_assert (in_args_pos < state->n_in_args);
- g_assert (out_args_pos < state->n_out_args);
-
- state->in_args[in_args_pos].v_pointer = &state->out_values[out_args_pos];
- in_args_pos += 1;
- case GI_DIRECTION_OUT:
- g_assert (out_args_pos < state->n_out_args);
-
- /* caller allocates only applies to structures but GI has
- * no way to denote that yet, so we only use caller allocates
- * if we see a structure
- */
- if (is_caller_allocates) {
- GITypeTag type_tag;
-
- is_caller_allocates = FALSE;
- type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
-
- if (type_tag == GI_TYPE_TAG_INTERFACE) {
- GIInfoType info_type;
+ return combined_py_args;
+}
- info = g_type_info_get_interface (state->arg_type_infos[i]);
- g_assert (info != NULL);
- info_type = g_base_info_get_type (info);
+static inline gboolean
+_invoke_state_init_from_callable_cache (PyGIInvokeState *state,
+ PyGICallableCache *cache,
+ PyObject *py_args,
+ PyObject *kwargs)
+{
+ state->implementor_gtype = 0;
- if (info_type == GI_INFO_TYPE_STRUCT)
- is_caller_allocates = TRUE;
- }
- }
+ /* TODO: We don't use the class parameter sent in by the structure
+ * so we remove it from the py_args tuple but we can keep it
+ * around if we want to call actual gobject constructors
+ * in the future instead of calling g_object_new
+ */
+ if (cache->function_type == PYGI_FUNCTION_TYPE_CONSTRUCTOR) {
+ PyObject *constructor_class;
+ constructor_class = PyTuple_GetItem (py_args, 0);
- if (is_caller_allocates) {
- /* if caller allocates only use one level of indirection */
- state->out_args[out_args_pos].v_pointer = NULL;
- state->args[i] = &state->out_args[out_args_pos];
- if (g_struct_info_is_foreign((GIStructInfo *) info) ) {
- PyObject *foreign_struct =
- pygi_struct_foreign_convert_from_g_argument(info, NULL);
-
- pygi_struct_foreign_convert_to_g_argument(
- foreign_struct,
- info,
- GI_TRANSFER_EVERYTHING,
- state->args[i]);
-
- Py_DECREF(foreign_struct);
- } else if (g_type_is_a (g_registered_type_info_get_g_type (info), G_TYPE_BOXED)) {
- state->args[i]->v_pointer = _pygi_boxed_alloc (info, NULL);
- } else {
- gssize size = g_struct_info_get_size ( (GIStructInfo *) info);
- state->args[i]->v_pointer = g_malloc0 (size);
- }
- } else {
- state->out_args[out_args_pos].v_pointer = &state->out_values[out_args_pos];
- state->out_values[out_args_pos].v_pointer = NULL;
- state->args[i] = &state->out_values[out_args_pos];
- }
+ if (constructor_class == NULL) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_TypeError,
+ "Constructors require the class to be passed in as an argument, "
+ "No arguments passed to the %s constructor.",
+ cache->name);
- out_args_pos += 1;
- }
+ return FALSE;
}
-
- g_assert (in_args_pos == state->n_in_args);
- g_assert (out_args_pos == state->n_out_args);
- }
-
- /* Convert the input arguments. */
- {
- Py_ssize_t py_args_pos;
- gsize backup_args_pos;
-
- py_args_pos = 0;
- backup_args_pos = 0;
-
- if (state->is_constructor) {
- /* Skip the first argument. */
- py_args_pos += 1;
- } else if (state->is_method) {
- /* Get the instance. */
- GIBaseInfo *container_info;
- GIInfoType container_info_type;
- PyObject *py_arg;
- gint check_val;
-
- container_info = g_base_info_get_container (function_info);
- container_info_type = g_base_info_get_type (container_info);
-
- g_assert (py_args_pos < state->n_py_args);
- py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
-
- /* In python 2 python takes care of checking the type
- * of the self instance. In python 3 it does not
- * so we have to check it here
- */
- check_val = _pygi_g_type_interface_check_object(container_info,
- py_arg);
- if (check_val < 0) {
- return FALSE;
- } else if (!check_val) {
- _PyGI_ERROR_PREFIX ("instance: ");
- return FALSE;
- }
-
- switch (container_info_type) {
- case GI_INFO_TYPE_UNION:
- case GI_INFO_TYPE_STRUCT:
- {
- GType type;
-
- type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) container_info);
-
- if (g_type_is_a (type, G_TYPE_BOXED)) {
- g_assert (state->n_in_args > 0);
- state->in_args[0].v_pointer = pyg_boxed_get (py_arg, void);
- } else if (g_struct_info_is_foreign (container_info)) {
- PyObject *result;
- result = pygi_struct_foreign_convert_to_g_argument (
- py_arg, container_info,
- GI_TRANSFER_NOTHING,
- &state->in_args[0]);
- } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
- g_assert (state->n_in_args > 0);
- state->in_args[0].v_pointer = pyg_pointer_get (py_arg, void);
- } else {
- PyErr_Format (PyExc_TypeError, "unable to convert an instance of '%s'", g_type_name (type));
- return FALSE;
- }
-
- break;
- }
- case GI_INFO_TYPE_OBJECT:
- case GI_INFO_TYPE_INTERFACE:
- g_assert (state->n_in_args > 0);
- state->in_args[0].v_pointer = pygobject_get (py_arg);
- break;
- default:
- /* Other types don't have methods. */
- g_assert_not_reached();
- }
-
- py_args_pos += 1;
+ } else if (cache->function_type == PYGI_FUNCTION_TYPE_VFUNC) {
+ PyObject *py_gtype;
+ py_gtype = PyTuple_GetItem (py_args, 0);
+ if (py_gtype == NULL) {
+ PyErr_SetString (PyExc_TypeError,
+ "need the GType of the implementor class");
+ return FALSE;
}
- for (i = 0; i < state->n_args; i++) {
- GIDirection direction;
-
- if (i == state->callback_index) {
- if (state->closure)
- state->args[i]->v_pointer = state->closure->closure;
- else
- /* Some callbacks params accept NULL */
- state->args[i]->v_pointer = NULL;
- py_args_pos++;
- continue;
- } else if (i == state->user_data_index) {
- state->args[i]->v_pointer = state->closure;
- py_args_pos++;
- continue;
- } else if (i == state->destroy_notify_index) {
- if (state->closure) {
- /* No need to clean up if the callback is NULL */
- PyGICClosure *destroy_notify = _pygi_destroy_notify_create();
- state->args[i]->v_pointer = destroy_notify->closure;
- }
- continue;
- }
-
- if (state->args_is_auxiliary[i]) {
- continue;
- }
-
- direction = g_arg_info_get_direction (state->arg_infos[i]);
-
- if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
- PyObject *py_arg;
- GITypeTag arg_type_tag;
- GITransfer transfer;
-
- arg_type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
-
- if (arg_type_tag == GI_TYPE_TAG_ERROR) {
- GError **error;
-
- error = g_slice_new (GError *);
- *error = NULL;
-
- state->args[i]->v_pointer = error;
- continue;
- }
-
- transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
-
- g_assert (py_args_pos < state->n_py_args);
- py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
-
- *state->args[i] = _pygi_argument_from_object (py_arg, state->arg_type_infos[i], transfer);
-
- if (PyErr_Occurred()) {
- /* TODO: release previous input arguments. */
- return FALSE;
- }
-
- if (direction == GI_DIRECTION_INOUT) {
- /* We need to keep a copy of the argument to be able to release it later. */
- g_assert (backup_args_pos < state->n_backup_args);
- state->backup_args[backup_args_pos] = *state->args[i];
- backup_args_pos += 1;
- }
-
- if (arg_type_tag == GI_TYPE_TAG_ARRAY) {
- GArray *array;
- gssize length_arg_pos;
-
- array = state->args[i]->v_pointer;
-
- length_arg_pos = g_type_info_get_array_length (state->arg_type_infos[i]);
- if (length_arg_pos >= 0) {
- int len = 0;
- /* Set the auxiliary argument holding the length. */
- if (array)
- len = array->len;
-
- state->args[length_arg_pos]->v_size = len;
- }
-
- /* Get rid of the GArray. */
- if ( (array != NULL) &&
- (g_type_info_get_array_type (state->arg_type_infos[i]) == GI_ARRAY_TYPE_C)) {
- state->args[i]->v_pointer = array->data;
-
- /* HACK: We have unwrapped a C array so
- * set the state to reflect this.
- * If there is an error between now
- * and when we rewrap the array
- * we will leak C arrays due to
- * being in an inconsitant state.
- * e.g. for interfaces with more
- * than one C array argument, an
- * error may occure when not all
- * C arrays have been rewrapped.
- * This will be removed once the invoke
- * rewrite branch is merged.
- */
- state->c_arrays_are_wrapped = FALSE;
- if (direction != GI_DIRECTION_INOUT || transfer != GI_TRANSFER_NOTHING) {
- /* The array hasn't been referenced anywhere, so free it to avoid losing memory. */
- g_array_free (array, FALSE);
- }
- }
- }
+ state->implementor_gtype = pyg_type_from_object (py_gtype);
- py_args_pos += 1;
- }
- }
-
- g_assert (py_args_pos == state->n_py_args);
- g_assert (backup_args_pos == state->n_backup_args);
+ if (state->implementor_gtype == 0)
+ return FALSE;
}
- return TRUE;
-}
-
-static gboolean
-_invoke_function (struct invocation_state *state,
- GICallableInfo *callable_info, PyObject *py_args)
-{
- GError *error;
- gint retval;
-
- error = NULL;
+ if (cache->function_type == PYGI_FUNCTION_TYPE_CONSTRUCTOR ||
+ cache->function_type == PYGI_FUNCTION_TYPE_VFUNC) {
- pyg_begin_allow_threads;
- if (g_base_info_get_type (callable_info) == GI_INFO_TYPE_FUNCTION) {
- retval = g_function_info_invoke ( (GIFunctionInfo *) callable_info,
- state->in_args,
- state->n_in_args,
- state->out_args,
- state->n_out_args,
- &state->return_arg,
- &error);
+ /* we could optimize this by using offsets instead of modifying the tuple but it makes the
+ * code more error prone and confusing so don't do that unless profiling shows
+ * significant gain
+ */
+ state->py_in_args = PyTuple_GetSlice (py_args, 1, PyTuple_Size (py_args));
} else {
- retval = g_vfunc_info_invoke ( (GIVFuncInfo *) callable_info,
- state->implementor_gtype,
- state->in_args,
- state->n_in_args,
- state->out_args,
- state->n_out_args,
- &state->return_arg,
- &error);
+ state->py_in_args = py_args;
+ Py_INCREF (state->py_in_args);
}
- pyg_end_allow_threads;
-
- if (!retval) {
- pyglib_error_check(&error);
- /* TODO: release input arguments. */
+ state->py_in_args = _py_args_combine_and_check_length (cache->name,
+ cache->arg_name_list,
+ cache->arg_name_hash,
+ state->py_in_args,
+ kwargs);
+ if (state->py_in_args == NULL) {
return FALSE;
}
+ state->n_py_in_args = PyTuple_Size (state->py_in_args);
- if (state->error_arg_pos >= 0) {
- GError **error;
+ state->args = g_slice_alloc0 (cache->n_args * sizeof (GIArgument *));
+ if (state->args == NULL && cache->n_args != 0) {
+ PyErr_NoMemory();
+ return FALSE;
+ }
- error = state->args[state->error_arg_pos]->v_pointer;
+ state->in_args = g_slice_alloc0 (cache->n_in_args * sizeof(GIArgument));
+ if (state->in_args == NULL && cache->n_in_args != 0) {
+ PyErr_NoMemory ();
+ return FALSE;
+ }
- if (pyglib_error_check(error)) {
- /* TODO: release input arguments. */
+ state->out_values = g_slice_alloc0 (cache->n_out_args * sizeof(GIArgument));
+ if (state->out_values == NULL && cache->n_out_args != 0) {
+ PyErr_NoMemory ();
+ return FALSE;
+ }
- return FALSE;
- }
+ state->out_args = g_slice_alloc0 (cache->n_out_args * sizeof(GIArgument));
+ if (state->out_args == NULL && cache->n_out_args != 0) {
+ PyErr_NoMemory ();
+ return FALSE;
}
+ state->error = NULL;
+
return TRUE;
}
-static gboolean
-_process_invocation_state (struct invocation_state *state,
- GIFunctionInfo *function_info, PyObject *py_args)
+static inline void
+_invoke_state_clear (PyGIInvokeState *state, PyGICallableCache *cache)
{
- gsize i;
-
- /* Convert the return value. */
- if (state->is_constructor) {
- PyTypeObject *py_type;
- GIBaseInfo *info;
- GIInfoType info_type;
- GITransfer transfer;
-
- if (state->return_arg.v_pointer == NULL) {
- PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
- return FALSE;
- }
-
- g_assert (state->n_py_args > 0);
- py_type = (PyTypeObject *) PyTuple_GET_ITEM (py_args, 0);
-
- info = g_type_info_get_interface (state->return_type_info);
- g_assert (info != NULL);
-
- info_type = g_base_info_get_type (info);
-
- transfer = g_callable_info_get_caller_owns ( (GICallableInfo *) function_info);
-
- switch (info_type) {
- case GI_INFO_TYPE_UNION:
- case GI_INFO_TYPE_STRUCT:
- {
- GType type;
-
- type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
-
- if (g_struct_info_is_foreign (info)) {
- state->return_value =
- pygi_struct_foreign_convert_from_g_argument (
- info, state->return_arg.v_pointer);
- } else if (g_type_is_a (type, G_TYPE_BOXED)) {
- g_warn_if_fail (transfer == GI_TRANSFER_EVERYTHING);
- state->return_value = _pygi_boxed_new (py_type, state->return_arg.v_pointer, transfer == GI_TRANSFER_EVERYTHING);
- } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
- if (transfer != GI_TRANSFER_NOTHING)
- g_warning ("Return argument in %s returns a struct "
- "with a transfer mode of \"full\" "
- "Transfer mode should be set to None for "
- "struct types as there is no way to free "
- "them safely. Ignoring transfer mode "
- "to prevent a potential invalid free. "
- "This may cause a leak in your application.",
- g_base_info_get_name ( (GIBaseInfo *) function_info) );
-
- state->return_value = _pygi_struct_new (py_type, state->return_arg.v_pointer, FALSE);
- } else {
- PyErr_Format (PyExc_TypeError, "cannot create '%s' instances", py_type->tp_name);
- g_base_info_unref (info);
- return FALSE;
- }
-
- break;
- }
- case GI_INFO_TYPE_OBJECT:
- if (state->return_arg.v_pointer == NULL) {
- PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
- break;
- }
- state->return_value = pygobject_new (state->return_arg.v_pointer);
- if (transfer == GI_TRANSFER_EVERYTHING) {
- /* The new wrapper increased the reference count, so decrease it. */
- g_object_unref (state->return_arg.v_pointer);
- }
- if (state->is_constructor && G_IS_INITIALLY_UNOWNED (state->return_arg.v_pointer)) {
- /* GInitiallyUnowned constructors always end up with one extra reference, so decrease it. */
- g_object_unref (state->return_arg.v_pointer);
- }
- break;
- default:
- /* Other types don't have neither methods nor constructors. */
- g_assert_not_reached();
- }
+ g_slice_free1 (cache->n_args * sizeof(GIArgument *), state->args);
+ g_slice_free1 (cache->n_in_args * sizeof(GIArgument), state->in_args);
+ g_slice_free1 (cache->n_out_args * sizeof(GIArgument), state->out_args);
+ g_slice_free1 (cache->n_out_args * sizeof(GIArgument), state->out_values);
- g_base_info_unref (info);
+ Py_XDECREF (state->py_in_args);
+}
- if (state->return_value == NULL) {
- /* TODO: release arguments. */
- return FALSE;
- }
+static gboolean _caller_alloc (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gssize arg_count,
+ gssize out_count)
+{
+ PyGIInterfaceCache *iface_cache;
+
+ g_assert (arg_cache->type_tag == GI_TYPE_TAG_INTERFACE);
+
+ iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ state->out_args[out_count].v_pointer = NULL;
+ state->args[arg_count] = &state->out_args[out_count];
+ if (iface_cache->g_type == G_TYPE_BOXED) {
+ state->args[arg_count]->v_pointer =
+ _pygi_boxed_alloc (iface_cache->interface_info, NULL);
+ } else if (iface_cache->g_type == G_TYPE_VALUE) {
+ state->args[arg_count]->v_pointer = g_slice_new0 (GValue);
+ } else if (iface_cache->is_foreign) {
+ PyObject *foreign_struct =
+ pygi_struct_foreign_convert_from_g_argument (
+ iface_cache->interface_info,
+ NULL);
+
+ pygi_struct_foreign_convert_to_g_argument (foreign_struct,
+ iface_cache->interface_info,
+ GI_TRANSFER_EVERYTHING,
+ state->args[arg_count]);
} else {
- GITransfer transfer;
-
- if ( (state->return_type_tag == GI_TYPE_TAG_ARRAY) &&
- (g_type_info_get_array_type (state->return_type_info) == GI_ARRAY_TYPE_C)) {
- /* Create a #GArray. */
- state->return_arg.v_pointer = _pygi_argument_to_array (&state->return_arg, state->args, state->return_type_info, state->is_method);
- }
-
- transfer = g_callable_info_get_caller_owns ( (GICallableInfo *) function_info);
-
- state->return_value = _pygi_argument_to_object (&state->return_arg, state->return_type_info, transfer);
- if (state->return_value == NULL) {
- /* TODO: release argument. */
- return FALSE;
- }
-
- _pygi_argument_release (&state->return_arg, state->return_type_info, transfer, GI_DIRECTION_OUT);
-
- if (state->return_type_tag == GI_TYPE_TAG_ARRAY
- && transfer == GI_TRANSFER_NOTHING) {
- /* We created a #GArray, so free it. */
- state->return_arg.v_pointer = g_array_free (state->return_arg.v_pointer, FALSE);
- }
+ gssize size = g_struct_info_get_size(
+ (GIStructInfo *)iface_cache->interface_info);
+ state->args[arg_count]->v_pointer = g_malloc0 (size);
}
- /* Convert output arguments and release arguments. */
- {
- gsize return_values_pos;
-
- return_values_pos = 0;
+ if (state->args[arg_count]->v_pointer == NULL)
+ return FALSE;
- if (state->n_return_values > 1) {
- /* Return a tuple. */
- PyObject *return_values;
- return_values = PyTuple_New (state->n_return_values);
- if (return_values == NULL) {
- /* TODO: release arguments. */
- return FALSE;
- }
+ return TRUE;
+}
- if (state->return_type_tag == GI_TYPE_TAG_VOID) {
- /* The current return value is None. */
- Py_DECREF (state->return_value);
- } else {
- /* Put the return value first. */
- g_assert (state->return_value != NULL);
- PyTuple_SET_ITEM (return_values, return_values_pos, state->return_value);
- return_values_pos += 1;
- }
+static inline gboolean
+_invoke_marshal_in_args (PyGIInvokeState *state, PyGICallableCache *cache)
+{
+ gssize i, in_count, out_count;
+ in_count = 0;
+ out_count = 0;
+
+ if (state->n_py_in_args > cache->n_py_args) {
+ PyErr_Format (PyExc_TypeError,
+ "%s() takes exactly %zd argument(s) (%zd given)",
+ cache->name,
+ cache->n_py_args,
+ state->n_py_in_args);
+ return FALSE;
+ }
- state->return_value = return_values;
- }
+ for (i = 0; i < cache->n_args; i++) {
+ GIArgument *c_arg;
+ PyGIArgCache *arg_cache = cache->args_cache[i];
+ PyObject *py_arg = NULL;
- for (i = 0; i < state->n_args; i++) {
- GIDirection direction;
- GITypeTag type_tag;
- GITransfer transfer;
+ switch (arg_cache->direction) {
+ case GI_DIRECTION_IN:
+ state->args[i] = &(state->in_args[in_count]);
+ in_count++;
- if (state->args_is_auxiliary[i]) {
- /* Auxiliary arguments are handled at the same time as their relatives. */
- continue;
- }
+ if (arg_cache->meta_type > 0)
+ continue;
- direction = g_arg_info_get_direction (state->arg_infos[i]);
- transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
+ if (arg_cache->py_arg_index >= state->n_py_in_args) {
+ PyErr_Format (PyExc_TypeError,
+ "%s() takes exactly %zd argument(s) (%zd given)",
+ cache->name,
+ cache->n_py_args,
+ state->n_py_in_args);
- type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+ /* clean up all of the args we have already marshalled,
+ * since invoke will not be called
+ */
+ pygi_marshal_cleanup_args_in_parameter_fail (state,
+ cache,
+ i - 1);
+ return FALSE;
+ }
- if ( (type_tag == GI_TYPE_TAG_ARRAY) &&
- (g_type_info_get_array_type (state->arg_type_infos[i]) == GI_ARRAY_TYPE_C) &&
- (direction != GI_DIRECTION_IN || transfer == GI_TRANSFER_NOTHING)) {
- /* Create a #GArray. */
- state->args[i]->v_pointer = _pygi_argument_to_array (state->args[i], state->args, state->arg_type_infos[i], state->is_method);
- }
+ py_arg =
+ PyTuple_GET_ITEM (state->py_in_args,
+ arg_cache->py_arg_index);
- if (direction == GI_DIRECTION_INOUT || direction == GI_DIRECTION_OUT) {
- /* Convert the argument. */
- PyObject *obj;
-
- /* If we created it, deallocate when it goes out of scope
- * otherwise it is unsafe to deallocate random structures
- * we are given
- */
- if (type_tag == GI_TYPE_TAG_INTERFACE) {
- GIBaseInfo *info;
- GIInfoType info_type;
- GType type;
-
- info = g_type_info_get_interface (state->arg_type_infos[i]);
- g_assert (info != NULL);
- info_type = g_base_info_get_type (info);
- type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
-
- if ( (info_type == GI_INFO_TYPE_STRUCT) &&
- !g_struct_info_is_foreign((GIStructInfo *) info) &&
- !g_type_is_a (type, G_TYPE_BOXED)) {
- if (g_arg_info_is_caller_allocates (state->arg_infos[i])) {
- transfer = GI_TRANSFER_EVERYTHING;
- } else if (transfer == GI_TRANSFER_EVERYTHING) {
- transfer = GI_TRANSFER_NOTHING;
- g_warning ("Out argument %ld in %s returns a struct "
- "with a transfer mode of \"full\". "
- "Transfer mode should be set to \"none\" for "
- "struct type returns as there is no way to free "
- "them safely. Ignoring transfer mode "
- "to prevent a potential invalid free. "
- "This may cause a leak in your application.",
- i, g_base_info_get_name ( (GIBaseInfo *) function_info) );
- }
+ break;
+ case GI_DIRECTION_INOUT:
+ /* this will be filled in if it is an child value */
+ if (state->in_args[in_count].v_pointer != NULL)
+ state->out_values[out_count] = state->in_args[in_count];
+
+ state->in_args[in_count].v_pointer = &state->out_values[out_count];
+ in_count++;
+
+ if (arg_cache->meta_type != PYGI_META_ARG_TYPE_CHILD) {
+ if (arg_cache->py_arg_index >= state->n_py_in_args) {
+ PyErr_Format (PyExc_TypeError,
+ "%s() takes exactly %zd argument(s) (%zd given)",
+ cache->name,
+ cache->n_py_args,
+ state->n_py_in_args);
+ pygi_marshal_cleanup_args_in_parameter_fail (state,
+ cache,
+ i - 1);
+ return FALSE;
}
- }
- obj = _pygi_argument_to_object (state->args[i], state->arg_type_infos[i], transfer);
- if (obj == NULL) {
- /* TODO: release arguments. */
- return FALSE;
+ py_arg =
+ PyTuple_GET_ITEM (state->py_in_args,
+ arg_cache->py_arg_index);
}
-
- g_assert (return_values_pos < state->n_return_values);
-
- if (state->n_return_values > 1) {
- PyTuple_SET_ITEM (state->return_value, return_values_pos, obj);
+ case GI_DIRECTION_OUT:
+ if (arg_cache->is_caller_allocates) {
+ if (!_caller_alloc (state, arg_cache, i, out_count)) {
+ PyErr_Format (PyExc_TypeError,
+ "Could not caller allocate argument %zd of callable %s",
+ i, cache->name);
+ pygi_marshal_cleanup_args_in_parameter_fail (state,
+ cache,
+ i - 1);
+ return FALSE;
+ }
} else {
- /* The current return value is None. */
- Py_DECREF (state->return_value);
- state->return_value = obj;
+ state->out_args[out_count].v_pointer = &state->out_values[out_count];
+ state->args[i] = &state->out_values[out_count];
}
+ out_count++;
+ break;
+ }
- return_values_pos += 1;
+ c_arg = state->args[i];
+ if (arg_cache->in_marshaller != NULL) {
+ if (!arg_cache->allow_none && py_arg == Py_None) {
+ PyErr_Format (PyExc_TypeError,
+ "Argument %i does not allow None as a value",
+ i);
+
+ pygi_marshal_cleanup_args_in_parameter_fail (state,
+ cache,
+ i - 1);
+ return FALSE;
+ }
+ gboolean success = arg_cache->in_marshaller (state,
+ cache,
+ arg_cache,
+ py_arg,
+ c_arg);
+ if (!success) {
+ pygi_marshal_cleanup_args_in_parameter_fail (state,
+ cache,
+ i - 1);
+ return FALSE;
}
}
- /* HACK: We rewrapped any C arrays above in a GArray so they are ok to
- * free as GArrays. We will always leak C arrays if there is
- * an error before we reach this state as there is no easy way
- * to know which arrays were wrapped if there are more than one.
- * This will be removed with better array handling once merge
- * the invoke rewrite branch.
- */
- state->c_arrays_are_wrapped = TRUE;
- g_assert (state->n_return_values <= 1 || return_values_pos == state->n_return_values);
}
return TRUE;
}
-static void
-_free_invocation_state (struct invocation_state *state)
+static inline PyObject *
+_invoke_marshal_out_args (PyGIInvokeState *state, PyGICallableCache *cache)
{
- gsize i;
- gsize backup_args_pos;
-
- if (state->return_type_info != NULL) {
- g_base_info_unref ( (GIBaseInfo *) state->return_type_info);
- }
-
- if (state->closure != NULL) {
- if (state->closure->scope == GI_SCOPE_TYPE_CALL)
- _pygi_invoke_closure_free (state->closure);
- }
-
- /* release all arguments. */
- backup_args_pos = 0;
- for (i = 0; i < state->n_args; i++) {
-
- if (state->args_is_auxiliary[i]) {
- /* Auxiliary arguments are not released. */
- continue;
- }
-
- if (state->arg_infos[i] != NULL
- && state->arg_type_infos[i] != NULL) {
- GIDirection direction;
- GITypeTag type_tag;
- GITransfer transfer;
-
- direction = g_arg_info_get_direction (state->arg_infos[i]);
- transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
-
- /* Release the argument. */
- if (direction == GI_DIRECTION_INOUT) {
- if (state->args != NULL) {
- _pygi_argument_release (&state->backup_args[backup_args_pos],
- state->arg_type_infos[i],
- transfer, GI_DIRECTION_IN);
- }
- backup_args_pos += 1;
- }
- if (state->args != NULL && state->args[i] != NULL) {
- type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
-
- if (type_tag == GI_TYPE_TAG_ARRAY &&
- (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) &&
- (g_type_info_get_array_type (state->arg_type_infos[i]) == GI_ARRAY_TYPE_C) &&
- !state->c_arrays_are_wrapped) {
- /* HACK: Noop - we are in an inconsitant state due to
- * complex array handler so leak any C arrays
- * as we don't know if we can free them safely.
- * This will be removed when we merge the
- * invoke rewrite branch.
- */
- } else {
- _pygi_argument_release (state->args[i], state->arg_type_infos[i],
- transfer, direction);
- }
-
- if (type_tag == GI_TYPE_TAG_ARRAY
- && (direction != GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)) {
- /* We created an *out* #GArray and it has not been released above, so free it. */
- state->args[i]->v_pointer = g_array_free (state->args[i]->v_pointer, FALSE);
- }
+ PyObject *py_out = NULL;
+ PyObject *py_return = NULL;
+ gssize total_out_args = cache->n_out_args;
+ gboolean has_return = FALSE;
+
+ if (cache->return_cache) {
+
+ if (cache->function_type == PYGI_FUNCTION_TYPE_CONSTRUCTOR) {
+ if (state->return_arg.v_pointer == NULL) {
+ PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
+ pygi_marshal_cleanup_args_return_fail (state,
+ cache);
+ return NULL;
}
-
}
- if (state->arg_type_infos[i] != NULL)
- g_base_info_unref ( (GIBaseInfo *) state->arg_type_infos[i]);
- if (state->arg_infos[i] != NULL)
- g_base_info_unref ( (GIBaseInfo *) state->arg_infos[i]);
- }
- g_assert (backup_args_pos == state->n_backup_args);
-
- g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_infos);
- g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_type_infos);
- g_slice_free1 (sizeof (gboolean) * state->n_args, state->args_is_auxiliary);
+ py_return = cache->return_cache->out_marshaller ( state,
+ cache,
+ cache->return_cache,
+ &state->return_arg);
+ if (py_return == NULL) {
+ pygi_marshal_cleanup_args_return_fail (state,
+ cache);
+ return NULL;
+ }
- if (state->args != NULL) {
- g_slice_free1 (sizeof (gpointer) * state->n_args, state->args);
- }
- if (state->in_args != NULL) {
- g_slice_free1 (sizeof (GIArgument) * state->n_in_args, state->in_args);
+ if (cache->return_cache->type_tag != GI_TYPE_TAG_VOID) {
+ total_out_args++;
+ has_return = TRUE;
+ }
}
- if (state->out_args != NULL) {
- g_slice_free1 (sizeof (GIArgument) * state->n_out_args, state->out_args);
- }
+ total_out_args -= cache->n_out_child_args;
+
+ if (cache->n_out_args - cache->n_out_child_args == 0) {
+ py_out = py_return;
+ } else if (total_out_args == 1) {
+ /* if we get here there is one out arg an no return */
+ PyGIArgCache *arg_cache = (PyGIArgCache *)cache->out_args->data;
+ py_out = arg_cache->out_marshaller (state,
+ cache,
+ arg_cache,
+ state->args[arg_cache->c_arg_index]);
+ if (py_out == NULL) {
+ pygi_marshal_cleanup_args_out_parameter_fail (state,
+ cache,
+ 0);
+ return NULL;
+ }
- if (state->out_values != NULL) {
- g_slice_free1 (sizeof (GIArgument) * state->n_out_args, state->out_values);
- }
+ } else {
+ gssize py_arg_index = 0;
+ GSList *cache_item = cache->out_args;
+ /* return a tuple */
+ py_out = PyTuple_New (total_out_args);
+ if (has_return) {
+ PyTuple_SET_ITEM (py_out, py_arg_index, py_return);
+ py_arg_index++;
+ }
- if (state->backup_args != NULL) {
- g_slice_free1 (sizeof (GIArgument) * state->n_backup_args, state->backup_args);
- }
+ for(; py_arg_index < total_out_args; py_arg_index++) {
+ PyGIArgCache *arg_cache = (PyGIArgCache *)cache_item->data;
+ PyObject *py_obj = arg_cache->out_marshaller (state,
+ cache,
+ arg_cache,
+ state->args[arg_cache->c_arg_index]);
+
+ if (py_obj == NULL) {
+ if (has_return)
+ py_arg_index--;
+
+ pygi_marshal_cleanup_args_out_parameter_fail (state,
+ cache,
+ py_arg_index);
+ Py_DECREF (py_out);
+ return NULL;
+ }
- if (PyErr_Occurred()) {
- Py_CLEAR (state->return_value);
+ PyTuple_SET_ITEM (py_out, py_arg_index, py_obj);
+ cache_item = cache_item->next;
+ }
}
+ return py_out;
}
-
PyObject *
-_wrap_g_callable_info_invoke (PyGIBaseInfo *self, PyObject *py_args,
+_wrap_g_callable_info_invoke (PyGIBaseInfo *self,
+ PyObject *py_args,
PyObject *kwargs)
{
- struct invocation_state state = { 0, };
+ PyGIInvokeState state = { 0, };
+ PyObject *ret = NULL;
- if (!_initialize_invocation_state (&state, self->info, py_args, kwargs)) {
- _free_invocation_state (&state);
- return NULL;
+ if (self->cache == NULL) {
+ self->cache = _pygi_callable_cache_new (self->info);
+ if (self->cache == NULL)
+ return NULL;
}
- if (!_prepare_invocation_state (&state, self->info, py_args)) {
- _free_invocation_state (&state);
- return NULL;
- }
+ if (!_invoke_state_init_from_callable_cache (&state, self->cache, py_args, kwargs))
+ goto err;
- if (!_invoke_function (&state, self->info, py_args)) {
- _free_invocation_state (&state);
- return NULL;
- }
+ if (!_invoke_marshal_in_args (&state, self->cache))
+ goto err;
- if (!_process_invocation_state (&state, self->info, py_args)) {
- _free_invocation_state (&state);
- return NULL;
- }
+ if (!_invoke_callable (&state, self->cache, self->info))
+ goto err;
- _free_invocation_state (&state);
- return state.return_value;
-}
+ pygi_marshal_cleanup_args_in_marshal_success (&state, self->cache);
+ ret = _invoke_marshal_out_args (&state, self->cache);
+ if (ret)
+ pygi_marshal_cleanup_args_out_marshal_success (&state, self->cache);
+err:
+ _invoke_state_clear (&state, self->cache);
+ return ret;
+}
diff --git a/gi/pygi-invoke.h b/gi/pygi-invoke.h
index dc1ce18..0aa7580 100644
--- a/gi/pygi-invoke.h
+++ b/gi/pygi-invoke.h
@@ -27,7 +27,7 @@
#include <girepository.h>
#include "pygi-private.h"
-
+#include "pygi-invoke-state-struct.h"
G_BEGIN_DECLS
PyObject *_wrap_g_callable_info_invoke (PyGIBaseInfo *self, PyObject *py_args,
diff --git a/gi/pygi-marshal-cleanup.c b/gi/pygi-marshal-cleanup.c
new file mode 100644
index 0000000..cd072f4
--- /dev/null
+++ b/gi/pygi-marshal-cleanup.c
@@ -0,0 +1,517 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+ #include "pygi-marshal-cleanup.h"
+ #include <glib.h>
+static inline void
+_cleanup_caller_allocates (PyGIInvokeState *state,
+ PyGIArgCache *cache,
+ gpointer data)
+{
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)cache;
+
+ if (iface_cache->g_type == G_TYPE_BOXED) {
+ gsize size;
+ size = g_struct_info_get_size (iface_cache->interface_info);
+ g_slice_free1 (size, data);
+ } else if (iface_cache->g_type == G_TYPE_VALUE) {
+ g_slice_free (GValue, data);
+ } else if (iface_cache->is_foreign) {
+ pygi_struct_foreign_release ((GIBaseInfo *)iface_cache->interface_info,
+ data);
+ } else {
+ g_free (data);
+ }
+}
+
+/**
+ * Cleanup during invoke can happen in multiple
+ * stages, each of which can be the result of a
+ * successful compleation of that stage or an error
+ * occured which requires partial cleanup.
+ *
+ * For the most part, either the C interface being
+ * invoked or the python object which wraps the
+ * parameters, handle their lifecycles but in some
+ * cases, where we have intermediate objects,
+ * or when we fail processing a parameter, we need
+ * to handle the clean up manually.
+ *
+ * There are two argument processing stages.
+ * They are the in stage, where we process python
+ * parameters into their C counterparts, and the out
+ * stage, where we process out C parameters back
+ * into python objects. The in stage also sets up
+ * temporary out structures for caller allocated
+ * parameters which need to be cleaned up either on
+ * in stage failure or at the completion of the out
+ * stage (either success or failure)
+ *
+ * The in stage must call one of these cleanup functions:
+ * - pygi_marshal_cleanup_args_in_marshal_success
+ * (continue to out stage)
+ * - pygi_marshal_cleanup_args_in_parameter_fail
+ * (final, exit from invoke)
+ *
+ * The out stage must call one of these cleanup functions which are all final:
+ * - pygi_marshal_cleanup_args_out_marshal_success
+ * - pygi_marshal_cleanup_args_return_fail
+ * - pygi_marshal_cleanup_args_out_parameter_fail
+ *
+ **/
+void
+pygi_marshal_cleanup_args_in_marshal_success (PyGIInvokeState *state,
+ PyGICallableCache *cache)
+{
+ gssize i;
+
+ /* For in success, call cleanup for all GI_DIRECTION_IN values only. */
+ for (i = 0; i < cache->n_args; i++) {
+ PyGIArgCache *arg_cache = cache->args_cache[i];
+ PyGIMarshalCleanupFunc cleanup_func = arg_cache->in_cleanup;
+
+ if (cleanup_func &&
+ arg_cache->direction == GI_DIRECTION_IN &&
+ state->args[i]->v_pointer != NULL)
+ cleanup_func (state, arg_cache, state->args[i]->v_pointer, TRUE);
+ }
+}
+
+void
+pygi_marshal_cleanup_args_out_marshal_success (PyGIInvokeState *state,
+ PyGICallableCache *cache)
+{
+ /* clean up the return if available */
+ if (cache->return_cache != NULL) {
+ PyGIMarshalCleanupFunc cleanup_func = cache->return_cache->out_cleanup;
+ if (cleanup_func && state->return_arg.v_pointer != NULL)
+ cleanup_func (state,
+ cache->return_cache,
+ state->return_arg.v_pointer,
+ TRUE);
+ }
+
+ /* Now clean up args */
+ GSList *cache_item = cache->out_args;
+ while (cache_item) {
+ PyGIArgCache *arg_cache = (PyGIArgCache *) cache_item->data;
+ PyGIMarshalCleanupFunc cleanup_func = arg_cache->out_cleanup;
+ gpointer data = state->args[arg_cache->c_arg_index]->v_pointer;
+
+ if (cleanup_func != NULL && data != NULL)
+ cleanup_func (state,
+ arg_cache,
+ data,
+ TRUE);
+
+ cache_item = cache_item->next;
+ }
+}
+
+void
+pygi_marshal_cleanup_args_in_parameter_fail (PyGIInvokeState *state,
+ PyGICallableCache *cache,
+ gssize failed_arg_index)
+{
+ gssize i;
+
+ state->failed = TRUE;
+
+ for (i = 0; i < cache->n_args && i <= failed_arg_index; i++) {
+ PyGIArgCache *arg_cache = cache->args_cache[i];
+ PyGIMarshalCleanupFunc cleanup_func = arg_cache->in_cleanup;
+ gpointer data = state->args[i]->v_pointer;
+
+ if (cleanup_func &&
+ arg_cache->direction == GI_DIRECTION_IN &&
+ data != NULL) {
+ cleanup_func (state,
+ arg_cache,
+ data,
+ i < failed_arg_index);
+
+ } else if (arg_cache->is_caller_allocates && data != NULL) {
+ _cleanup_caller_allocates (state,
+ arg_cache,
+ data);
+ }
+ }
+}
+
+void
+pygi_marshal_cleanup_args_return_fail (PyGIInvokeState *state,
+ PyGICallableCache *cache)
+{
+ state->failed = TRUE;
+}
+
+void
+pygi_marshal_cleanup_args_out_parameter_fail (PyGIInvokeState *state,
+ PyGICallableCache *cache,
+ gssize failed_out_arg_index)
+{
+ state->failed = TRUE;
+}
+
+void
+_pygi_marshal_cleanup_closure_unref (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ g_closure_unref ( (GClosure *)data);
+}
+
+void
+_pygi_marshal_cleanup_in_utf8 (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ /* We strdup strings so always free if we have processed this
+ parameter for input */
+ if (was_processed)
+ g_free (data);
+}
+
+void
+_pygi_marshal_cleanup_out_utf8 (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ /* Python copies the string so we need to free it
+ if the interface is transfering ownership,
+ whether or not it has been processed yet */
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_free (data);
+}
+
+void
+_pygi_marshal_cleanup_in_interface_object (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ /* If we processed the parameter but fail before invoking the method,
+ we need to remove the ref we added */
+ if (was_processed && state->failed && data != NULL &&
+ arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_object_unref (G_OBJECT(data));
+}
+
+void
+_pygi_marshal_cleanup_out_interface_object (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ /* If we error out and the object is not marshalled into a PyGObject
+ we must take care of removing the ref */
+ if (!was_processed && arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_object_unref (G_OBJECT(data));
+}
+
+void
+_pygi_marshal_cleanup_in_interface_struct_gvalue (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (was_processed) {
+ PyObject *py_arg = PyTuple_GET_ITEM (state->py_in_args,
+ arg_cache->py_arg_index);
+ GType py_object_type =
+ pyg_type_from_object_strict ( (PyObject *) py_arg->ob_type, FALSE);
+
+ if (py_object_type != G_TYPE_VALUE) {
+ g_value_unset ((GValue *) data);
+ g_slice_free (GValue, data);
+ }
+ }
+}
+
+void
+_pygi_marshal_cleanup_in_interface_struct_foreign (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (state->failed && was_processed)
+ pygi_struct_foreign_release (
+ ( (PyGIInterfaceCache *)arg_cache)->interface_info,
+ data);
+}
+
+void
+_pygi_marshal_cleanup_out_interface_struct_foreign (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (!was_processed && arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ pygi_struct_foreign_release (
+ ( (PyGIInterfaceCache *)arg_cache)->interface_info,
+ data);
+}
+
+void
+_pygi_marshal_cleanup_in_array (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (was_processed) {
+ GArray *array_;
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+ /* If this isn't a garray create one to help process variable sized
+ array elements */
+ if (sequence_cache->array_type == GI_ARRAY_TYPE_C) {
+ gsize len;
+ if (sequence_cache->fixed_size >= 0) {
+ len = sequence_cache->fixed_size;
+ } else if (sequence_cache->is_zero_terminated) {
+ len = g_strv_length ((gchar **)data);
+ } else {
+ GIArgument *len_arg = state->args[sequence_cache->len_arg_index];
+ len = len_arg->v_long;
+ }
+
+ array_ = g_array_new (FALSE,
+ FALSE,
+ sequence_cache->item_size);
+
+ if (array_ == NULL)
+ return;
+
+ array_->data = data;
+ array_->len = len;
+
+ } else {
+ array_ = (GArray *) data;
+ }
+
+ /* clean up items first */
+ if (sequence_cache->item_cache->in_cleanup != NULL) {
+ gsize i;
+ PyGIMarshalCleanupFunc cleanup_func =
+ sequence_cache->item_cache->in_cleanup;
+
+ for(i = 0; i < array_->len; i++) {
+ cleanup_func (state,
+ sequence_cache->item_cache,
+ g_array_index (array_, gpointer, i),
+ TRUE);
+ }
+ }
+
+ if (state->failed ||
+ arg_cache->transfer == GI_TRANSFER_NOTHING ||
+ arg_cache->transfer == GI_TRANSFER_CONTAINER) {
+ g_array_free (array_, TRUE);
+ } else if (sequence_cache->array_type == GI_ARRAY_TYPE_C) {
+ g_array_free (array_, FALSE);
+ }
+ }
+}
+
+void
+_pygi_marshal_cleanup_out_array (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING ||
+ arg_cache->transfer == GI_TRANSFER_CONTAINER) {
+ GArray *array_ = (GArray *) data;
+
+ if (sequence_cache->array_type == GI_ARRAY_TYPE_C) {
+ g_free (data);
+ return;
+ }
+
+ if (sequence_cache->item_cache->out_cleanup != NULL) {
+ gsize i;
+
+ PyGIMarshalCleanupFunc cleanup_func = sequence_cache->item_cache->out_cleanup;
+ for (i = 0; i < array_->len; i++) {
+ cleanup_func (state,
+ sequence_cache->item_cache,
+ g_array_index (array_, gpointer, i),
+ was_processed);
+ }
+ }
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_array_free (array_, TRUE);
+ }
+}
+
+void
+_pygi_marshal_cleanup_in_glist (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (was_processed) {
+ GSList *list_;
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+ list_ = (GSList *)data;
+
+ /* clean up items first */
+ if (sequence_cache->item_cache->in_cleanup != NULL) {
+ PyGIMarshalCleanupFunc cleanup_func =
+ sequence_cache->item_cache->in_cleanup;
+ GSList *node = list_;
+ while (node != NULL) {
+ cleanup_func (state,
+ sequence_cache->item_cache,
+ node->data,
+ TRUE);
+ node = node->next;
+ }
+ }
+
+ if (state->failed ||
+ arg_cache->transfer == GI_TRANSFER_NOTHING ||
+ arg_cache->transfer == GI_TRANSFER_CONTAINER) {
+ switch (arg_cache->type_tag) {
+ case GI_TYPE_TAG_GLIST:
+ g_list_free ( (GList *)list_);
+ break;
+ case GI_TYPE_TAG_GSLIST:
+ g_slist_free (list_);
+ break;
+ default:
+ g_assert_not_reached();
+ }
+ }
+ }
+}
+
+void
+_pygi_marshal_cleanup_out_glist (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING ||
+ arg_cache->transfer == GI_TRANSFER_CONTAINER) {
+ GSList *list_ = (GSList *)data;
+
+ if (sequence_cache->item_cache->out_cleanup != NULL) {
+ PyGIMarshalCleanupFunc cleanup_func =
+ sequence_cache->item_cache->out_cleanup;
+ GSList *node = list_;
+
+ while (node != NULL) {
+ cleanup_func (state,
+ sequence_cache->item_cache,
+ node->data,
+ was_processed);
+ node = node->next;
+ }
+ }
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING) {
+ switch (arg_cache->type_tag) {
+ case GI_TYPE_TAG_GLIST:
+ g_list_free ( (GList *)list_);
+ break;
+ case GI_TYPE_TAG_GSLIST:
+ g_slist_free (list_);
+ break;
+ default:
+ g_assert_not_reached();
+ }
+ }
+ }
+}
+
+void
+_pygi_marshal_cleanup_in_ghash (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (data == NULL)
+ return;
+
+ if (was_processed) {
+ GHashTable *hash_;
+ PyGIHashCache *hash_cache = (PyGIHashCache *)arg_cache;
+
+ hash_ = (GHashTable *)data;
+
+ /* clean up keys and values first */
+ if (hash_cache->key_cache->in_cleanup != NULL ||
+ hash_cache->value_cache->in_cleanup != NULL) {
+ GHashTableIter hiter;
+ gpointer key;
+ gpointer value;
+
+ PyGIMarshalCleanupFunc key_cleanup_func =
+ hash_cache->key_cache->in_cleanup;
+ PyGIMarshalCleanupFunc value_cleanup_func =
+ hash_cache->value_cache->in_cleanup;
+
+ g_hash_table_iter_init (&hiter, hash_);
+ while (g_hash_table_iter_next (&hiter, &key, &value)) {
+ if (key != NULL && key_cleanup_func != NULL)
+ key_cleanup_func (state,
+ hash_cache->key_cache,
+ key,
+ TRUE);
+ if (value != NULL && value_cleanup_func != NULL)
+ value_cleanup_func (state,
+ hash_cache->value_cache,
+ value,
+ TRUE);
+ }
+ }
+
+ if (state->failed ||
+ arg_cache->transfer == GI_TRANSFER_NOTHING ||
+ arg_cache->transfer == GI_TRANSFER_CONTAINER)
+ g_hash_table_destroy (hash_);
+
+ }
+}
+
+void
+_pygi_marshal_cleanup_out_ghash (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed)
+{
+ if (data == NULL)
+ return;
+
+ /* assume hashtable has boxed key and value */
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_hash_table_destroy ( (GHashTable *)data);
+}
diff --git a/gi/pygi-marshal-cleanup.h b/gi/pygi-marshal-cleanup.h
new file mode 100644
index 0000000..3aff8fa
--- /dev/null
+++ b/gi/pygi-marshal-cleanup.h
@@ -0,0 +1,97 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_MARSHAL_CLEANUP_H__
+#define __PYGI_MARSHAL_CLEANUP_H__
+
+#include "pygi-private.h"
+
+G_BEGIN_DECLS
+
+void pygi_marshal_cleanup_args_in_marshal_success (PyGIInvokeState *state,
+ PyGICallableCache *cache);
+void pygi_marshal_cleanup_args_in_parameter_fail (PyGIInvokeState *state,
+ PyGICallableCache *cache,
+ gssize failed_arg_index);
+
+void pygi_marshal_cleanup_args_out_marshal_success (PyGIInvokeState *state,
+ PyGICallableCache *cache);
+void pygi_marshal_cleanup_args_return_fail (PyGIInvokeState *state,
+ PyGICallableCache *cache);
+void pygi_marshal_cleanup_args_out_parameter_fail (PyGIInvokeState *state,
+ PyGICallableCache *cache,
+ gssize failed_out_arg_index);
+
+void _pygi_marshal_cleanup_in_utf8 (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_out_utf8 (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_in_interface_struct_gvalue (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_in_interface_struct_foreign (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_out_interface_struct_foreign (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_in_interface_object (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_out_interface_object (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_in_array (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_out_array (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_in_glist (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_out_glist (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_in_ghash (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+void _pygi_marshal_cleanup_out_ghash (PyGIInvokeState *state,
+ PyGIArgCache *arg_cache,
+ gpointer data,
+ gboolean was_processed);
+G_END_DECLS
+
+#endif /* __PYGI_MARSHAL_CLEANUP_H__ */
diff --git a/gi/pygi-marshal-in.c b/gi/pygi-marshal-in.c
new file mode 100644
index 0000000..9ae7def
--- /dev/null
+++ b/gi/pygi-marshal-in.c
@@ -0,0 +1,1412 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>, Red Hat, Inc.
+ *
+ * pygi-marshal-in.c: PyObject conversion functions for in parameters.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <string.h>
+#include <time.h>
+
+#include <datetime.h>
+#include <pygobject.h>
+#include <pyglib-python-compat.h>
+
+#include "pygi-cache.h"
+#include "pygi-marshal-cleanup.h"
+#include "pygi-marshal-in.h"
+
+gboolean
+_pygi_marshal_in_void (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ g_warn_if_fail (arg_cache->transfer == GI_TRANSFER_NOTHING);
+
+ arg->v_pointer = py_arg;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_boolean (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ arg->v_boolean = PyObject_IsTrue (py_arg);
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_int8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ long long_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+ long_ = PYGLIB_PyLong_AsLong (py_long);
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, -128, 127);
+ return FALSE;
+ }
+
+ if (long_ < -128 || long_ > 127) {
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, -128, 127);
+ return FALSE;
+ }
+
+ arg->v_long = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_uint8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ unsigned long long_;
+
+ if (PYGLIB_PyBytes_Check (py_arg)) {
+
+ if (PYGLIB_PyBytes_Size (py_arg) != 1) {
+ PyErr_Format (PyExc_TypeError, "Must be a single character");
+ return FALSE;
+ }
+
+ long_ = (unsigned char)(PYGLIB_PyBytes_AsString (py_arg)[0]);
+
+ } else if (PyNumber_Check (py_arg)) {
+ PyObject *py_long;
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+ long_ = PYGLIB_PyLong_AsLong (py_long);
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear();
+
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, 0, 255);
+ return FALSE;
+ }
+ } else {
+ PyErr_Format (PyExc_TypeError, "Must be number or single byte string, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ if (long_ < 0 || long_ > 255) {
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, 0, 255);
+ return FALSE;
+ }
+
+ arg->v_long = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_int16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ long long_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+ long_ = PYGLIB_PyLong_AsLong (py_long);
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, -32768, 32767);
+ return FALSE;
+ }
+
+ if (long_ < -32768 || long_ > 32767) {
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, -32768, 32767);
+ return FALSE;
+ }
+
+ arg->v_long = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_uint16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ long long_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+ long_ = PYGLIB_PyLong_AsLong (py_long);
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_ValueError, "%li not in range %d to %d", long_, 0, 65535);
+ return FALSE;
+ }
+
+ if (long_ < 0 || long_ > 65535) {
+ PyErr_Format (PyExc_ValueError, "%li not in range %d to %d", long_, 0, 65535);
+ return FALSE;
+ }
+
+ arg->v_long = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_int32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ long long_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+ long_ = PYGLIB_PyLong_AsLong (py_long);
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear();
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, G_MININT32, G_MAXINT32);
+ return FALSE;
+ }
+
+ if (long_ < G_MININT32 || long_ > G_MAXINT32) {
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %d", long_, G_MININT32, G_MAXINT32);
+ return FALSE;
+ }
+
+ arg->v_long = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_uint32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ long long long_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check (py_long))
+ long_ = PyInt_AsLong (py_long);
+ else
+#endif
+ long_ = PyLong_AsLongLong (py_long);
+
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_ValueError, "%lli not in range %i to %u", long_, 0, G_MAXUINT32);
+ return FALSE;
+ }
+
+ if (long_ < 0 || long_ > G_MAXUINT32) {
+ PyErr_Format (PyExc_ValueError, "%lli not in range %i to %u", long_, 0, G_MAXUINT32);
+ return FALSE;
+ }
+
+ arg->v_uint64 = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_int64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ long long long_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check (py_long))
+ long_ = PyInt_AS_LONG (py_long);
+ else
+#endif
+ long_ = PyLong_AsLongLong (py_long);
+
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ /* OverflowError occured but range errors should be returned as ValueError */
+ char *long_str;
+ PyObject *py_str;
+
+ PyErr_Clear ();
+
+ py_str = PyObject_Str (py_long);
+
+ if (PyUnicode_Check (py_str)) {
+ PyObject *py_bytes = PyUnicode_AsUTF8String (py_str);
+ if (py_bytes == NULL)
+ return FALSE;
+
+ long_str = g_strdup (PYGLIB_PyBytes_AsString (py_bytes));
+ if (long_str == NULL) {
+ PyErr_NoMemory ();
+ return FALSE;
+ }
+
+ Py_DECREF (py_bytes);
+ } else {
+ long_str = g_strdup (PYGLIB_PyBytes_AsString(py_str));
+ }
+
+ Py_DECREF (py_str);
+ PyErr_Format (PyExc_ValueError, "%s not in range %ld to %ld",
+ long_str, G_MININT64, G_MAXINT64);
+
+ g_free (long_str);
+ return FALSE;
+ }
+
+ if (long_ < G_MININT64 || long_ > G_MAXINT64) {
+ PyErr_Format (PyExc_ValueError, "%lld not in range %ld to %ld", long_, G_MININT64, G_MAXINT64);
+ return FALSE;
+ }
+
+ arg->v_int64 = long_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_uint64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_long;
+ guint64 ulong_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_long = PYGLIB_PyNumber_Long (py_arg);
+ if (!py_long)
+ return FALSE;
+
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check (py_long)) {
+ long long_ = PyInt_AsLong (py_long);
+ if (long_ < 0) {
+ PyErr_Format (PyExc_ValueError, "%ld not in range %d to %llu",
+ long_, 0, G_MAXUINT64);
+ return FALSE;
+ }
+ ulong_ = long_;
+ } else
+#endif
+ ulong_ = PyLong_AsUnsignedLongLong (py_long);
+
+ Py_DECREF (py_long);
+
+ if (PyErr_Occurred ()) {
+ /* OverflowError occured but range errors should be returned as ValueError */
+ char *long_str;
+ PyObject *py_str;
+
+ PyErr_Clear ();
+
+ py_str = PyObject_Str (py_long);
+
+ if (PyUnicode_Check (py_str)) {
+ PyObject *py_bytes = PyUnicode_AsUTF8String (py_str);
+ if (py_bytes == NULL)
+ return FALSE;
+
+ long_str = g_strdup (PYGLIB_PyBytes_AsString (py_bytes));
+ if (long_str == NULL) {
+ PyErr_NoMemory ();
+ return FALSE;
+ }
+
+ Py_DECREF (py_bytes);
+ } else {
+ long_str = g_strdup (PYGLIB_PyBytes_AsString (py_str));
+ }
+
+ Py_DECREF (py_str);
+
+ PyErr_Format (PyExc_ValueError, "%s not in range %d to %llu",
+ long_str, 0, G_MAXUINT64);
+
+ g_free (long_str);
+ return FALSE;
+ }
+
+ if (ulong_ > G_MAXUINT64) {
+ PyErr_Format (PyExc_ValueError, "%llu not in range %d to %llu", ulong_, 0, G_MAXUINT64);
+ return FALSE;
+ }
+
+ arg->v_uint64 = ulong_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_float (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_float;
+ double double_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_float = PyNumber_Float (py_arg);
+ if (!py_float)
+ return FALSE;
+
+ double_ = PyFloat_AsDouble (py_float);
+ Py_DECREF (py_float);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_ValueError, "%f not in range %f to %f", double_, -G_MAXFLOAT, G_MAXFLOAT);
+ return FALSE;
+ }
+
+ if (double_ < -G_MAXFLOAT || double_ > G_MAXFLOAT) {
+ PyErr_Format (PyExc_ValueError, "%f not in range %f to %f", double_, -G_MAXFLOAT, G_MAXFLOAT);
+ return FALSE;
+ }
+
+ arg->v_float = double_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_double (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *py_float;
+ double double_;
+
+ if (!PyNumber_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ py_float = PyNumber_Float (py_arg);
+ if (!py_float)
+ return FALSE;
+
+ double_ = PyFloat_AsDouble (py_float);
+ Py_DECREF (py_float);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Clear ();
+ PyErr_Format (PyExc_ValueError, "%f not in range %f to %f", double_, -G_MAXDOUBLE, G_MAXDOUBLE);
+ return FALSE;
+ }
+
+ if (double_ < -G_MAXDOUBLE || double_ > G_MAXDOUBLE) {
+ PyErr_Format (PyExc_ValueError, "%f not in range %f to %f", double_, -G_MAXDOUBLE, G_MAXDOUBLE);
+ return FALSE;
+ }
+
+ arg->v_double = double_;
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_unichar (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ Py_ssize_t size;
+ gchar *string_;
+
+ if (PyUnicode_Check (py_arg)) {
+ PyObject *py_bytes;
+
+ size = PyUnicode_GET_SIZE (py_arg);
+ py_bytes = PyUnicode_AsUTF8String (py_arg);
+ string_ = strdup(PYGLIB_PyBytes_AsString (py_bytes));
+ Py_DECREF (py_bytes);
+
+#if PY_VERSION_HEX < 0x03000000
+ } else if (PyString_Check (py_arg)) {
+ PyObject *pyuni = PyUnicode_FromEncodedObject (py_arg, "UTF-8", "strict");
+ if (!pyuni)
+ return FALSE;
+
+ size = PyUnicode_GET_SIZE (pyuni);
+ string_ = g_strdup (PyString_AsString(py_arg));
+ Py_DECREF (pyuni);
+#endif
+ } else {
+ PyErr_Format (PyExc_TypeError, "Must be string, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ if (size != 1) {
+ PyErr_Format (PyExc_TypeError, "Must be a one character string, not %ld characters",
+ size);
+ g_free (string_);
+ return FALSE;
+ }
+
+ arg->v_uint32 = g_utf8_get_char (string_);
+ g_free (string_);
+
+ return TRUE;
+}
+gboolean
+_pygi_marshal_in_gtype (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ long type_ = pyg_type_from_object (py_arg);
+
+ if (type_ == 0) {
+ PyErr_Format (PyExc_TypeError, "Must be gobject.GType, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ arg->v_long = type_;
+ return TRUE;
+}
+gboolean
+_pygi_marshal_in_utf8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ gchar *string_;
+
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ if (PyUnicode_Check (py_arg)) {
+ PyObject *pystr_obj = PyUnicode_AsUTF8String (py_arg);
+ if (!pystr_obj)
+ return FALSE;
+
+ string_ = g_strdup (PYGLIB_PyBytes_AsString (pystr_obj));
+ Py_DECREF (pystr_obj);
+ }
+#if PY_VERSION_HEX < 0x03000000
+ else if (PyString_Check (py_arg)) {
+ string_ = g_strdup (PyString_AsString (py_arg));
+ }
+#endif
+ else {
+ PyErr_Format (PyExc_TypeError, "Must be string, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ arg->v_string = string_;
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_filename (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ gchar *string_;
+ GError *error = NULL;
+
+ if (PyUnicode_Check (py_arg)) {
+ PyObject *pystr_obj = PyUnicode_AsUTF8String (py_arg);
+ if (!pystr_obj)
+ return FALSE;
+
+ string_ = g_strdup (PYGLIB_PyBytes_AsString (pystr_obj));
+ Py_DECREF (pystr_obj);
+ }
+#if PY_VERSION_HEX < 0x03000000
+ else if (PyString_Check (py_arg)) {
+ string_ = g_strdup (PyString_AsString (py_arg));
+ }
+#endif
+ else {
+ PyErr_Format (PyExc_TypeError, "Must be string, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ 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);
+ g_error_free (error);
+ /* TODO: Convert the error to an exception. */
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_array (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyGIMarshalInFunc in_marshaller;
+ int i;
+ Py_ssize_t length;
+ gboolean is_ptr_array;
+ GArray *array_ = NULL;
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ if (!PySequence_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be sequence, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ length = PySequence_Length (py_arg);
+ if (length < 0)
+ return FALSE;
+
+ if (sequence_cache->fixed_size >= 0 &&
+ sequence_cache->fixed_size != length) {
+ PyErr_Format (PyExc_ValueError, "Must contain %zd items, not %zd",
+ sequence_cache->fixed_size, length);
+
+ return FALSE;
+ }
+
+ is_ptr_array = (sequence_cache->array_type == GI_ARRAY_TYPE_PTR_ARRAY);
+ if (is_ptr_array) {
+ array_ = (GArray *)g_ptr_array_new ();
+ } else {
+ array_ = g_array_sized_new (sequence_cache->is_zero_terminated,
+ FALSE,
+ sequence_cache->item_size,
+ length);
+ }
+
+ if (array_ == NULL) {
+ PyErr_NoMemory ();
+ return FALSE;
+ }
+
+ if (sequence_cache->item_cache->type_tag == GI_TYPE_TAG_UINT8 &&
+ PYGLIB_PyBytes_Check (py_arg)) {
+ memcpy(array_->data, PYGLIB_PyBytes_AsString (py_arg), length);
+
+ goto array_success;
+ }
+
+ in_marshaller = sequence_cache->item_cache->in_marshaller;
+ for (i = 0; i < length; i++) {
+ GIArgument item;
+ PyObject *py_item = PySequence_GetItem (py_arg, i);
+ if (py_item == NULL)
+ goto err;
+
+ if (!in_marshaller ( state,
+ callable_cache,
+ sequence_cache->item_cache,
+ py_item,
+ &item))
+ goto err;
+
+ /* FIXME: it is much more efficent to have seperate marshaller
+ * for ptr arrays than doing the evaluation
+ * and casting each loop iteration
+ */
+ if (is_ptr_array)
+ g_ptr_array_add((GPtrArray *)array_, item.v_pointer);
+ else
+ g_array_insert_val (array_, i, item);
+ continue;
+err:
+ if (sequence_cache->item_cache->in_cleanup != NULL) {
+ gsize j;
+ PyGIMarshalCleanupFunc cleanup_func =
+ sequence_cache->item_cache->in_cleanup;
+
+ for(j = 0; j < i; j++) {
+ cleanup_func (state,
+ sequence_cache->item_cache,
+ g_array_index (array_, gpointer, j),
+ TRUE);
+ }
+ }
+
+ if (is_ptr_array)
+ g_ptr_array_free (array_, TRUE);
+ else
+ g_array_free (array_, TRUE);
+ _PyGI_ERROR_PREFIX ("Item %i: ", i);
+ return FALSE;
+ }
+
+array_success:
+ if (sequence_cache->len_arg_index >= 0) {
+ /* we have an child arg to handle */
+ PyGIArgCache *child_cache =
+ callable_cache->args_cache[sequence_cache->len_arg_index];
+
+ if (child_cache->direction == GI_DIRECTION_INOUT) {
+ gint *len_arg = (gint *)state->in_args[child_cache->c_arg_index].v_pointer;
+ /* if we are not setup yet just set the in arg */
+ if (len_arg == NULL)
+ state->in_args[child_cache->c_arg_index].v_long = length;
+ else
+ *len_arg = length;
+ } else {
+ state->in_args[child_cache->c_arg_index].v_long = length;
+ }
+ }
+
+ if (sequence_cache->array_type == GI_ARRAY_TYPE_C) {
+ arg->v_pointer = array_->data;
+ g_array_free (array_, FALSE);
+ } else {
+ arg->v_pointer = array_;
+ }
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_glist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyGIMarshalInFunc in_marshaller;
+ int i;
+ Py_ssize_t length;
+ GList *list_ = NULL;
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ if (!PySequence_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be sequence, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ length = PySequence_Length (py_arg);
+ if (length < 0)
+ return FALSE;
+
+ if (sequence_cache->fixed_size >= 0 &&
+ sequence_cache->fixed_size != length) {
+ PyErr_Format (PyExc_ValueError, "Must contain %zd items, not %zd",
+ sequence_cache->fixed_size, length);
+
+ return FALSE;
+ }
+
+ in_marshaller = sequence_cache->item_cache->in_marshaller;
+ for (i = 0; i < length; i++) {
+ GIArgument item;
+ PyObject *py_item = PySequence_GetItem (py_arg, i);
+ if (py_item == NULL)
+ goto err;
+
+ if (!in_marshaller ( state,
+ callable_cache,
+ sequence_cache->item_cache,
+ py_item,
+ &item))
+ goto err;
+
+ list_ = g_list_append (list_, item.v_pointer);
+ continue;
+err:
+ if (sequence_cache->item_cache->in_cleanup != NULL) {
+ GDestroyNotify cleanup = sequence_cache->item_cache->in_cleanup;
+ }
+
+ g_list_free (list_);
+ _PyGI_ERROR_PREFIX ("Item %i: ", i);
+ return FALSE;
+ }
+
+ arg->v_pointer = list_;
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_gslist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyGIMarshalInFunc in_marshaller;
+ int i;
+ Py_ssize_t length;
+ GSList *list_ = NULL;
+ PyGISequenceCache *sequence_cache = (PyGISequenceCache *)arg_cache;
+
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ if (!PySequence_Check (py_arg)) {
+ PyErr_Format (PyExc_TypeError, "Must be sequence, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ length = PySequence_Length (py_arg);
+ if (length < 0)
+ return FALSE;
+
+ if (sequence_cache->fixed_size >= 0 &&
+ sequence_cache->fixed_size != length) {
+ PyErr_Format (PyExc_ValueError, "Must contain %zd items, not %zd",
+ sequence_cache->fixed_size, length);
+
+ return FALSE;
+ }
+
+ in_marshaller = sequence_cache->item_cache->in_marshaller;
+ for (i = 0; i < length; i++) {
+ GIArgument item;
+ PyObject *py_item = PySequence_GetItem (py_arg, i);
+ if (py_item == NULL)
+ goto err;
+
+ if (!in_marshaller ( state,
+ callable_cache,
+ sequence_cache->item_cache,
+ py_item,
+ &item))
+ goto err;
+
+ list_ = g_slist_append (list_, item.v_pointer);
+ continue;
+err:
+ if (sequence_cache->item_cache->in_cleanup != NULL) {
+ GDestroyNotify cleanup = sequence_cache->item_cache->in_cleanup;
+ }
+
+ g_slist_free (list_);
+ _PyGI_ERROR_PREFIX ("Item %i: ", i);
+ return FALSE;
+ }
+
+ arg->v_pointer = list_;
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_ghash (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyGIMarshalInFunc key_in_marshaller;
+ PyGIMarshalInFunc value_in_marshaller;
+
+ int i;
+ Py_ssize_t length;
+ PyObject *py_keys, *py_values;
+
+ GHashFunc hash_func;
+ GEqualFunc equal_func;
+
+ GHashTable *hash_ = NULL;
+ PyGIHashCache *hash_cache = (PyGIHashCache *)arg_cache;
+
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ py_keys = PyMapping_Keys (py_arg);
+ if (py_keys == NULL) {
+ PyErr_Format (PyExc_TypeError, "Must be mapping, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ length = PyMapping_Length (py_arg);
+ if (length < 0) {
+ Py_DECREF (py_keys);
+ return FALSE;
+ }
+
+ py_values = PyMapping_Values (py_arg);
+ if (py_values == NULL) {
+ Py_DECREF (py_keys);
+ return FALSE;
+ }
+
+ key_in_marshaller = hash_cache->key_cache->in_marshaller;
+ value_in_marshaller = hash_cache->value_cache->in_marshaller;
+
+ switch (hash_cache->key_cache->type_tag) {
+ case GI_TYPE_TAG_UTF8:
+ case GI_TYPE_TAG_FILENAME:
+ hash_func = g_str_hash;
+ equal_func = g_str_equal;
+ break;
+ default:
+ hash_func = NULL;
+ equal_func = NULL;
+ }
+
+ hash_ = g_hash_table_new (hash_func, equal_func);
+ if (hash_ == NULL) {
+ PyErr_NoMemory ();
+ Py_DECREF (py_keys);
+ Py_DECREF (py_values);
+ return FALSE;
+ }
+
+ for (i = 0; i < length; i++) {
+ GIArgument key, value;
+ PyObject *py_key = PyList_GET_ITEM (py_keys, i);
+ PyObject *py_value = PyList_GET_ITEM (py_values, i);
+ if (py_key == NULL || py_value == NULL)
+ goto err;
+
+ if (!key_in_marshaller ( state,
+ callable_cache,
+ hash_cache->key_cache,
+ py_key,
+ &key))
+ goto err;
+
+ if (!value_in_marshaller ( state,
+ callable_cache,
+ hash_cache->value_cache,
+ py_value,
+ &value))
+ goto err;
+
+ g_hash_table_insert (hash_, key.v_pointer, value.v_pointer);
+ continue;
+err:
+ /* FIXME: cleanup hash keys and values */
+ Py_XDECREF (py_key);
+ Py_XDECREF (py_value);
+ Py_DECREF (py_keys);
+ Py_DECREF (py_values);
+ g_hash_table_unref (hash_);
+ _PyGI_ERROR_PREFIX ("Item %i: ", i);
+ return FALSE;
+ }
+
+ arg->v_pointer = hash_;
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_gerror (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyErr_Format (PyExc_NotImplementedError,
+ "Marshalling for GErrors is not implemented");
+ return FALSE;
+}
+
+gboolean
+_pygi_marshal_in_interface_callback (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ GICallableInfo *callable_info;
+ PyGICClosure *closure;
+ PyGIArgCache *user_data_cache = NULL;
+ PyGIArgCache *destroy_cache = NULL;
+ PyGICallbackCache *callback_cache;
+ PyObject *py_user_data = NULL;
+
+ callback_cache = (PyGICallbackCache *)arg_cache;
+
+ if (callback_cache->user_data_index > 0) {
+ user_data_cache = callable_cache->args_cache[callback_cache->user_data_index];
+ if (user_data_cache->py_arg_index < state->n_py_in_args) {
+ py_user_data = PyTuple_GetItem (state->py_in_args, user_data_cache->py_arg_index);
+ if (!py_user_data)
+ return FALSE;
+ } else {
+ py_user_data = Py_None;
+ Py_INCREF (Py_None);
+ }
+ }
+
+ if (py_arg == Py_None && !(py_user_data == Py_None || py_user_data == NULL)) {
+ Py_DECREF (py_user_data);
+ PyErr_Format (PyExc_TypeError,
+ "When passing None for a callback userdata must also be None");
+
+ return FALSE;
+ }
+
+ if (py_arg == Py_None) {
+ Py_XDECREF (py_user_data);
+ return TRUE;
+ }
+
+ if (!PyCallable_Check (py_arg)) {
+ Py_XDECREF (py_user_data);
+ PyErr_Format (PyExc_TypeError,
+ "Callback needs to be a function or method not %s",
+ py_arg->ob_type->tp_name);
+
+ return FALSE;
+ }
+
+ if (callback_cache->destroy_notify_index > 0)
+ destroy_cache = callable_cache->args_cache[callback_cache->destroy_notify_index];
+
+ callable_info = (GICallableInfo *)callback_cache->interface_info;
+
+ closure = _pygi_make_native_closure (callable_info, callback_cache->scope, py_arg, py_user_data);
+ arg->v_pointer = closure->closure;
+ if (user_data_cache != NULL) {
+ state->in_args[user_data_cache->c_arg_index].v_pointer = closure;
+ }
+
+ if (destroy_cache) {
+ PyGICClosure *destroy_notify = _pygi_destroy_notify_create ();
+ state->in_args[destroy_cache->c_arg_index].v_pointer = destroy_notify->closure;
+ }
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_interface_enum (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *int_;
+ gint is_instance;
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ is_instance = PyObject_IsInstance (py_arg, iface_cache->py_type);
+
+ int_ = PYGLIB_PyNumber_Long (py_arg);
+ if (int_ == NULL) {
+ PyErr_Clear();
+ goto err;
+ }
+
+ arg->v_long = PYGLIB_PyLong_AsLong (int_);
+ Py_DECREF (int_);
+
+ /* If this is not an instance of the Enum type that we want
+ * we need to check if the value is equivilant to one of the
+ * Enum's memebers */
+ if (!is_instance) {
+ int i;
+ gboolean is_found = FALSE;
+
+ for (i = 0; i < g_enum_info_get_n_values (iface_cache->interface_info); i++) {
+ GIValueInfo *value_info =
+ g_enum_info_get_value (iface_cache->interface_info, i);
+ glong enum_value = g_value_info_get_value (value_info);
+ g_base_info_unref ( (GIBaseInfo *)value_info);
+ if (arg->v_long == enum_value) {
+ is_found = TRUE;
+ break;
+ }
+ }
+
+ if (!is_found)
+ goto err;
+ }
+
+ return TRUE;
+
+err:
+ PyErr_Format (PyExc_TypeError, "Expected a %s, but got %s",
+ iface_cache->type_name, py_arg->ob_type->tp_name);
+ return FALSE;
+}
+
+gboolean
+_pygi_marshal_in_interface_flags (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyObject *int_;
+ gint is_instance;
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ is_instance = PyObject_IsInstance (py_arg, iface_cache->py_type);
+
+ int_ = PYGLIB_PyNumber_Long (py_arg);
+ if (int_ == NULL) {
+ PyErr_Clear ();
+ goto err;
+ }
+
+ arg->v_long = PYGLIB_PyLong_AsLong (int_);
+ Py_DECREF (int_);
+
+ /* only 0 or argument of type Flag is allowed */
+ if (!is_instance && arg->v_long != 0)
+ goto err;
+
+ return TRUE;
+
+err:
+ PyErr_Format (PyExc_TypeError, "Expected a %s, but got %s",
+ iface_cache->type_name, py_arg->ob_type->tp_name);
+ return FALSE;
+
+}
+
+gboolean
+_pygi_marshal_in_interface_struct (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ /* FIXME: handle this large if statement in the cache
+ * and set the correct marshaller
+ */
+
+ if (iface_cache->g_type == G_TYPE_CLOSURE) {
+ GClosure *closure;
+ GType object_gtype = pyg_type_from_object_strict (py_arg, FALSE);
+
+ if ( !(PyCallable_Check(py_arg) ||
+ g_type_is_a (object_gtype, G_TYPE_CLOSURE))) {
+ PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
+ py_arg->ob_type->tp_name);
+ return FALSE;
+ }
+
+ if (g_type_is_a (object_gtype, G_TYPE_CLOSURE))
+ closure = (GClosure *)pyg_boxed_get (py_arg, void);
+ else
+ closure = pyg_closure_new (py_arg, NULL, NULL);
+
+ if (closure == NULL) {
+ PyErr_SetString (PyExc_RuntimeError, "PyObject conversion to GClosure failed");
+ return FALSE;
+ }
+
+ arg->v_pointer = closure;
+ return TRUE;
+ } else if (iface_cache->g_type == G_TYPE_VALUE) {
+ GValue *value;
+ GType object_type;
+
+ object_type = pyg_type_from_object_strict ( (PyObject *) py_arg->ob_type, FALSE);
+ if (object_type == G_TYPE_INVALID) {
+ PyErr_SetString (PyExc_RuntimeError, "unable to retrieve object's GType");
+ return FALSE;
+ }
+
+ /* if already a gvalue, use that, else marshal into gvalue */
+ if (object_type == G_TYPE_VALUE) {
+ value = (GValue *)( (PyGObject *)py_arg)->obj;
+ } else {
+ value = g_slice_new0 (GValue);
+ g_value_init (value, object_type);
+ if (pyg_value_from_pyobject (value, py_arg) < 0) {
+ g_slice_free (GValue, value);
+ PyErr_SetString (PyExc_RuntimeError, "PyObject conversion to GValue failed");
+ return FALSE;
+ }
+ }
+
+ arg->v_pointer = value;
+ return TRUE;
+ } else if (iface_cache->is_foreign) {
+ gboolean success;
+ success = pygi_struct_foreign_convert_to_g_argument (py_arg,
+ iface_cache->interface_info,
+ arg_cache->transfer,
+ arg);
+
+ return success;
+ } else if (!PyObject_IsInstance (py_arg, iface_cache->py_type)) {
+ PyErr_Format (PyExc_TypeError, "Expected %s, but got %s",
+ iface_cache->type_name,
+ iface_cache->py_type->ob_type->tp_name);
+ return FALSE;
+ }
+
+ if (g_type_is_a (iface_cache->g_type, G_TYPE_BOXED)) {
+ arg->v_pointer = pyg_boxed_get (py_arg, void);
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING) {
+ arg->v_pointer = g_boxed_copy (iface_cache->g_type, arg->v_pointer);
+ }
+ } else if (g_type_is_a (iface_cache->g_type, G_TYPE_POINTER) ||
+ g_type_is_a (iface_cache->g_type, G_TYPE_VARIANT) ||
+ iface_cache->g_type == G_TYPE_NONE) {
+ arg->v_pointer = pyg_pointer_get (py_arg, void);
+ } else {
+ PyErr_Format (PyExc_NotImplementedError,
+ "structure type '%s' is not supported yet",
+ g_type_name(iface_cache->g_type));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_interface_boxed (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyErr_Format (PyExc_NotImplementedError,
+ "Marshalling for this type is not implemented yet");
+ return FALSE;
+}
+
+gboolean
+_pygi_marshal_in_interface_object (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ if (py_arg == Py_None) {
+ arg->v_pointer = NULL;
+ return TRUE;
+ }
+
+ if (!PyObject_IsInstance (py_arg, ( (PyGIInterfaceCache *)arg_cache)->py_type)) {
+ PyErr_Format (PyExc_TypeError, "Expected %s, but got %s",
+ ( (PyGIInterfaceCache *)arg_cache)->type_name,
+ ( (PyGIInterfaceCache *)arg_cache)->py_type->ob_type->tp_name);
+ return FALSE;
+ }
+
+ arg->v_pointer = pygobject_get(py_arg);
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_object_ref (arg->v_pointer);
+
+ return TRUE;
+}
+
+gboolean
+_pygi_marshal_in_interface_union (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ PyErr_Format(PyExc_NotImplementedError,
+ "Marshalling for this type is not implemented yet");
+ return FALSE;
+}
+
+gboolean _pygi_marshal_in_interface_instance (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg)
+{
+ GIInfoType info_type;
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ /* FIXME: add instance checks */
+
+ info_type = g_base_info_get_type (iface_cache->interface_info);
+ switch (info_type) {
+ case GI_INFO_TYPE_UNION:
+ case GI_INFO_TYPE_STRUCT:
+ {
+ GType type = iface_cache->g_type;
+ if (g_type_is_a (type, G_TYPE_BOXED)) {
+ arg->v_pointer = pyg_boxed_get (py_arg, void);
+ } else if (g_type_is_a (type, G_TYPE_POINTER) ||
+ g_type_is_a (type, G_TYPE_VARIANT) ||
+ type == G_TYPE_NONE) {
+ arg->v_pointer = pyg_pointer_get (py_arg, void);
+ } else {
+ PyErr_Format (PyExc_TypeError, "unable to convert an instance of '%s'", g_type_name (type));
+ return FALSE;
+ }
+
+ break;
+ }
+ case GI_INFO_TYPE_OBJECT:
+ case GI_INFO_TYPE_INTERFACE:
+ arg->v_pointer = pygobject_get (py_arg);
+ break;
+ default:
+ /* Other types don't have methods. */
+ g_assert_not_reached ();
+ }
+
+ return TRUE;
+}
diff --git a/gi/pygi-marshal-in.h b/gi/pygi-marshal-in.h
new file mode 100644
index 0000000..7d948bc
--- /dev/null
+++ b/gi/pygi-marshal-in.h
@@ -0,0 +1,186 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_MARSHAL_H__
+#define __PYGI_MARSHAL_H__
+
+#include <Python.h>
+
+#include <girepository.h>
+
+#include "pygi-private.h"
+
+G_BEGIN_DECLS
+
+gboolean _pygi_marshal_in_void (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_boolean (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_int8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_uint8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_int16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_uint16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_int32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_uint32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_int64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_uint64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_float (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_double (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_unichar (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_gtype (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_utf8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_filename (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_array (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_glist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_gslist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_ghash (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_gerror (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_callback (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_enum (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_flags (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_struct (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_interface(PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_boxed (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_object (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_union (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+gboolean _pygi_marshal_in_interface_instance (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ PyObject *py_arg,
+ GIArgument *arg);
+
+G_END_DECLS
+
+#endif /* __PYGI_MARSHAL_H__ */
diff --git a/gi/pygi-marshal-out.c b/gi/pygi-marshal-out.c
new file mode 100644
index 0000000..8adf9ae
--- /dev/null
+++ b/gi/pygi-marshal-out.c
@@ -0,0 +1,767 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>, Red Hat, Inc.
+ *
+ * pygi-marshal-out.c: PyObject conversion functions for out parameters.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <string.h>
+#include <time.h>
+
+#include <datetime.h>
+#include <pygobject.h>
+#include <pyglib-python-compat.h>
+
+#include "pygi-cache.h"
+#include "pygi-marshal-cleanup.h"
+#include "pygi-marshal-out.h"
+
+PyObject *
+_pygi_marshal_out_void (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+ if (arg_cache->is_pointer)
+ py_obj = arg->v_pointer;
+ else
+ py_obj = Py_None;
+
+ Py_XINCREF (py_obj);
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_boolean (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PyBool_FromLong (arg->v_boolean);
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_int8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_int8);
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_uint8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_uint8);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_int16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_int16);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_uint16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_uint16);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_int32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PYGLIB_PyLong_FromLong (arg->v_int32);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_uint32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PyLong_FromLongLong (arg->v_uint32);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_int64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PyLong_FromLongLong (arg->v_int64);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_uint64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PyLong_FromUnsignedLongLong (arg->v_uint64);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_float (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PyFloat_FromDouble (arg->v_float);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_double (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = PyFloat_FromDouble (arg->v_double);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_unichar (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ /* Preserve the bidirectional mapping between 0 and "" */
+ if (arg->v_uint32 == 0) {
+ py_obj = PYGLIB_PyUnicode_FromString ("");
+ } else if (g_unichar_validate (arg->v_uint32)) {
+ gchar utf8[6];
+ gint bytes;
+
+ bytes = g_unichar_to_utf8 (arg->v_uint32, utf8);
+ py_obj = PYGLIB_PyUnicode_FromStringAndSize ((char*)utf8, bytes);
+ } else {
+ /* TODO: Convert the error to an exception. */
+ PyErr_Format (PyExc_TypeError,
+ "Invalid unicode codepoint %" G_GUINT32_FORMAT,
+ arg->v_uint32);
+ }
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_gtype (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ py_obj = pyg_type_wrapper_new ( (GType)arg->v_long);
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_utf8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+ if (arg->v_string == NULL) {
+ py_obj = Py_None;
+ Py_INCREF (py_obj);
+ return py_obj;
+ }
+
+ py_obj = PYGLIB_PyUnicode_FromString (arg->v_string);
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_filename (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ gchar *string;
+ PyObject *py_obj = NULL;
+ GError *error = NULL;
+
+ if (arg->v_string == NULL) {
+ py_obj = Py_None;
+ Py_INCREF (py_obj);
+ return py_obj;
+ }
+
+ string = g_filename_to_utf8 (arg->v_string, -1, NULL, NULL, &error);
+ if (string == NULL) {
+ PyErr_SetString (PyExc_Exception, error->message);
+ /* TODO: Convert the error to an exception. */
+ return NULL;
+ }
+
+ py_obj = PYGLIB_PyUnicode_FromString (string);
+ g_free (string);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_array (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ GArray *array_;
+ PyObject *py_obj = NULL;
+ PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache;
+ gsize processed_items = 0;
+
+ array_ = arg->v_pointer;
+
+ /* GArrays make it easier to iterate over arrays
+ * with different element sizes but requires that
+ * we allocate a GArray if the argument was a C array
+ */
+ if (seq_cache->array_type == GI_ARRAY_TYPE_C) {
+ gsize len;
+ if (seq_cache->fixed_size >= 0) {
+ len = seq_cache->fixed_size;
+ } else if (seq_cache->is_zero_terminated) {
+ len = g_strv_length (arg->v_string);
+ } else {
+ GIArgument *len_arg = state->args[seq_cache->len_arg_index];
+ len = len_arg->v_long;
+ }
+
+ array_ = g_array_new (FALSE,
+ FALSE,
+ seq_cache->item_size);
+ if (array_ == NULL) {
+ PyErr_NoMemory ();
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_free (arg->v_pointer);
+
+ return NULL;
+ }
+
+ array_->data = arg->v_pointer;
+ array_->len = len;
+ }
+
+ if (seq_cache->item_cache->type_tag == GI_TYPE_TAG_UINT8) {
+ if (arg->v_pointer == NULL) {
+ py_obj = PYGLIB_PyBytes_FromString ("");
+ } else {
+ py_obj = PYGLIB_PyBytes_FromStringAndSize (array_->data, array_->len);
+ }
+ } else {
+ if (arg->v_pointer == NULL) {
+ py_obj = PyList_New (0);
+ } else {
+ int i;
+
+ gsize item_size;
+ PyGIMarshalOutFunc item_out_marshaller;
+ PyGIArgCache *item_arg_cache;
+
+ py_obj = PyList_New (array_->len);
+ if (py_obj == NULL)
+ goto err;
+
+
+ item_arg_cache = seq_cache->item_cache;
+ item_out_marshaller = item_arg_cache->out_marshaller;
+
+ item_size = g_array_get_element_size (array_);
+
+ for (i = 0; i < array_->len; i++) {
+ GIArgument item_arg;
+ PyObject *py_item;
+
+ if (seq_cache->array_type == GI_ARRAY_TYPE_PTR_ARRAY) {
+ item_arg.v_pointer = g_ptr_array_index ( ( GPtrArray *)array_, i);
+ } else if (item_arg_cache->type_tag == GI_TYPE_TAG_INTERFACE) {
+ item_arg.v_pointer = g_array_index (array_, gpointer, i);
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING) {
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *) item_arg_cache;
+ switch (g_base_info_get_type (iface_cache->interface_info)) {
+ case GI_INFO_TYPE_STRUCT:
+ {
+ gpointer *_struct = g_malloc (item_size);
+ memcpy (_struct, item_arg.v_pointer, item_size);
+ item_arg.v_pointer = _struct;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ } else {
+ memcpy (&item_arg, array_->data + i * item_size, item_size);
+ }
+
+ py_item = item_out_marshaller ( state,
+ callable_cache,
+ item_arg_cache,
+ &item_arg);
+
+ if (py_item == NULL) {
+ Py_CLEAR (py_obj);
+
+ if (seq_cache->array_type == GI_ARRAY_TYPE_C)
+ g_array_unref (array_);
+
+ goto err;
+ }
+ PyList_SET_ITEM (py_obj, i, py_item);
+ processed_items++;
+ }
+ }
+ }
+
+ if (seq_cache->array_type == GI_ARRAY_TYPE_C)
+ g_array_free (array_, FALSE);
+
+ return py_obj;
+
+err:
+ if (seq_cache->array_type == GI_ARRAY_TYPE_C) {
+ g_array_free (array_, arg_cache->transfer == GI_TRANSFER_EVERYTHING);
+ } else {
+ /* clean up unprocessed items */
+ if (seq_cache->item_cache->out_cleanup != NULL) {
+ int j;
+ PyGIMarshalCleanupFunc cleanup_func = seq_cache->item_cache->out_cleanup;
+ for (j = processed_items; j < array_->len; j++) {
+ cleanup_func (state,
+ seq_cache->item_cache,
+ g_array_index (array_, gpointer, j),
+ FALSE);
+ }
+ }
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_array_free (array_, TRUE);
+ }
+
+ return NULL;
+}
+
+PyObject *
+_pygi_marshal_out_glist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ GList *list_;
+ gsize length;
+ gsize i;
+
+ PyGIMarshalOutFunc item_out_marshaller;
+ PyGIArgCache *item_arg_cache;
+ PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache;
+
+ PyObject *py_obj = NULL;
+
+ list_ = arg->v_pointer;
+ length = g_list_length (list_);
+
+ py_obj = PyList_New (length);
+ if (py_obj == NULL)
+ return NULL;
+
+ item_arg_cache = seq_cache->item_cache;
+ item_out_marshaller = item_arg_cache->out_marshaller;
+
+ for (i = 0; list_ != NULL; list_ = g_list_next (list_), i++) {
+ GIArgument item_arg;
+ PyObject *py_item;
+
+ item_arg.v_pointer = list_->data;
+ py_item = item_out_marshaller ( state,
+ callable_cache,
+ item_arg_cache,
+ &item_arg);
+
+ if (py_item == NULL) {
+ Py_CLEAR (py_obj);
+ _PyGI_ERROR_PREFIX ("Item %zu: ", i);
+ return NULL;
+ }
+
+ PyList_SET_ITEM (py_obj, i, py_item);
+ }
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_gslist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ GSList *list_;
+ gsize length;
+ gsize i;
+
+ PyGIMarshalOutFunc item_out_marshaller;
+ PyGIArgCache *item_arg_cache;
+ PyGISequenceCache *seq_cache = (PyGISequenceCache *)arg_cache;
+
+ PyObject *py_obj = NULL;
+
+ list_ = arg->v_pointer;
+ length = g_slist_length (list_);
+
+ py_obj = PyList_New (length);
+ if (py_obj == NULL)
+ return NULL;
+
+ item_arg_cache = seq_cache->item_cache;
+ item_out_marshaller = item_arg_cache->out_marshaller;
+
+ for (i = 0; list_ != NULL; list_ = g_slist_next (list_), i++) {
+ GIArgument item_arg;
+ PyObject *py_item;
+
+ item_arg.v_pointer = list_->data;
+ py_item = item_out_marshaller ( state,
+ callable_cache,
+ item_arg_cache,
+ &item_arg);
+
+ if (py_item == NULL) {
+ Py_CLEAR (py_obj);
+ _PyGI_ERROR_PREFIX ("Item %zu: ", i);
+ return NULL;
+ }
+
+ PyList_SET_ITEM (py_obj, i, py_item);
+ }
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_ghash (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ GHashTable *hash_;
+ GHashTableIter hash_table_iter;
+
+ PyGIMarshalOutFunc key_out_marshaller;
+ PyGIMarshalOutFunc value_out_marshaller;
+
+ PyGIArgCache *key_arg_cache;
+ PyGIArgCache *value_arg_cache;
+ PyGIHashCache *hash_cache = (PyGIHashCache *)arg_cache;
+
+ GIArgument key_arg;
+ GIArgument value_arg;
+
+ PyObject *py_obj = NULL;
+
+ hash_ = arg->v_pointer;
+
+ if (hash_ == NULL) {
+ py_obj = Py_None;
+ Py_INCREF (py_obj);
+ return py_obj;
+ }
+
+ py_obj = PyDict_New ();
+ if (py_obj == NULL)
+ return NULL;
+
+ key_arg_cache = hash_cache->key_cache;
+ key_out_marshaller = key_arg_cache->out_marshaller;
+
+ value_arg_cache = hash_cache->value_cache;
+ value_out_marshaller = value_arg_cache->out_marshaller;
+
+ g_hash_table_iter_init (&hash_table_iter, hash_);
+ while (g_hash_table_iter_next (&hash_table_iter,
+ &key_arg.v_pointer,
+ &value_arg.v_pointer)) {
+ PyObject *py_key;
+ PyObject *py_value;
+ int retval;
+
+ py_key = key_out_marshaller ( state,
+ callable_cache,
+ key_arg_cache,
+ &key_arg);
+
+ if (py_key == NULL) {
+ Py_CLEAR (py_obj);
+ return NULL;
+ }
+
+ py_value = value_out_marshaller ( state,
+ callable_cache,
+ value_arg_cache,
+ &value_arg);
+
+ if (py_value == NULL) {
+ Py_CLEAR (py_obj);
+ Py_DECREF(py_key);
+ return NULL;
+ }
+
+ retval = PyDict_SetItem (py_obj, py_key, py_value);
+
+ Py_DECREF (py_key);
+ Py_DECREF (py_value);
+
+ if (retval < 0) {
+ Py_CLEAR (py_obj);
+ return NULL;
+ }
+ }
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_gerror (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ PyErr_Format (PyExc_NotImplementedError,
+ "Marshalling for gerror out is not implemented");
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_callback (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ PyErr_Format (PyExc_NotImplementedError,
+ "Callback out values are not supported");
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_enum (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ if (iface_cache->g_type == G_TYPE_NONE) {
+ py_obj = PyObject_CallFunction (iface_cache->py_type, "l", arg->v_long);
+ } else {
+ py_obj = pyg_enum_from_gtype (iface_cache->g_type, arg->v_long);
+ }
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_flags (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+
+ if (iface_cache->g_type == G_TYPE_NONE) {
+ /* An enum with a GType of None is an enum without GType */
+
+ PyObject *py_type = _pygi_type_import_by_gi_info (iface_cache->interface_info);
+ PyObject *py_args = NULL;
+
+ if (!py_type)
+ return NULL;
+
+ py_args = PyTuple_New (1);
+ if (PyTuple_SetItem (py_args, 0, PyLong_FromLong (arg->v_long)) != 0) {
+ Py_DECREF (py_args);
+ Py_DECREF (py_type);
+ return NULL;
+ }
+
+ py_obj = PyObject_CallFunction (py_type, "l", arg->v_long);
+
+ Py_DECREF (py_args);
+ Py_DECREF (py_type);
+ } else {
+ py_obj = pyg_flags_from_gtype (iface_cache->g_type, arg->v_long);
+ }
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_struct (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+ PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache;
+ GType type = iface_cache->g_type;
+
+ if (arg->v_pointer == NULL) {
+ py_obj = Py_None;
+ Py_INCREF (py_obj);
+ return py_obj;
+ }
+
+ if (g_type_is_a (type, G_TYPE_VALUE)) {
+ py_obj = pyg_value_as_pyobject (arg->v_pointer, FALSE);
+ } else if (iface_cache->is_foreign) {
+ py_obj = pygi_struct_foreign_convert_from_g_argument (iface_cache->interface_info,
+ arg->v_pointer);
+ } else if (g_type_is_a (type, G_TYPE_BOXED)) {
+ py_obj = _pygi_boxed_new ( (PyTypeObject *)iface_cache->py_type, arg->v_pointer,
+ arg_cache->transfer == GI_TRANSFER_EVERYTHING);
+ } else if (g_type_is_a (type, G_TYPE_POINTER)) {
+ if (iface_cache->py_type == NULL ||
+ !PyType_IsSubtype ( (PyTypeObject *)iface_cache->py_type, &PyGIStruct_Type)) {
+ g_warn_if_fail(arg_cache->transfer == GI_TRANSFER_NOTHING);
+ py_obj = pyg_pointer_new (type, arg->v_pointer);
+ } else {
+ py_obj = _pygi_struct_new ( (PyTypeObject *)iface_cache->py_type, arg->v_pointer,
+ arg_cache->transfer == GI_TRANSFER_EVERYTHING);
+ }
+ } else if (g_type_is_a (type, G_TYPE_VARIANT)) {
+ g_variant_ref_sink (arg->v_pointer);
+ py_obj = _pygi_struct_new ( (PyTypeObject *)iface_cache->py_type, arg->v_pointer,
+ FALSE);
+ } else if (type == G_TYPE_NONE && iface_cache->is_foreign) {
+ py_obj = pygi_struct_foreign_convert_from_g_argument (iface_cache->interface_info, arg->v_pointer);
+ } else if (type == G_TYPE_NONE) {
+ py_obj = _pygi_struct_new ( (PyTypeObject *) iface_cache->py_type, arg->v_pointer,
+ arg_cache->transfer == GI_TRANSFER_EVERYTHING);
+ } else {
+ PyErr_Format (PyExc_NotImplementedError,
+ "structure type '%s' is not supported yet",
+ g_type_name (type));
+ }
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_interface (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ PyErr_Format (PyExc_NotImplementedError,
+ "Marshalling for this type is not implemented yet");
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_boxed (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ PyErr_Format (PyExc_NotImplementedError,
+ "Marshalling for this type is not implemented yet");
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_object (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj;
+
+ if (arg->v_pointer == NULL) {
+ py_obj = Py_None;
+ Py_INCREF (py_obj);
+ return py_obj;
+ }
+
+ py_obj = pygobject_new (arg->v_pointer);
+
+ if (arg_cache->transfer == GI_TRANSFER_EVERYTHING)
+ g_object_unref (arg->v_pointer);
+
+ return py_obj;
+}
+
+PyObject *
+_pygi_marshal_out_interface_union (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg)
+{
+ PyObject *py_obj = NULL;
+
+ PyErr_Format (PyExc_NotImplementedError,
+ "Marshalling for this type is not implemented yet");
+ return py_obj;
+}
diff --git a/gi/pygi-marshal-out.h b/gi/pygi-marshal-out.h
new file mode 100644
index 0000000..db6bcfe
--- /dev/null
+++ b/gi/pygi-marshal-out.h
@@ -0,0 +1,144 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2011 John (J5) Palmieri <johnp@redhat.com>, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_MARSHAL_OUT_H__
+#define __PYGI_MARSHAL_OUT_H__
+
+PyObject *_pygi_marshal_out_void (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_boolean (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_int8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_uint8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_int16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_uint16 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_int32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_uint32 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_int64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_uint64 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_float (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_double (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_unichar (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_gtype (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_utf8 (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_filename (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_array (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_glist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_gslist (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_ghash (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_gerror (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_callback(PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_enum (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_flags (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_struct (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_interface(PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_boxed (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_object (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+PyObject *_pygi_marshal_out_interface_union (PyGIInvokeState *state,
+ PyGICallableCache *callable_cache,
+ PyGIArgCache *arg_cache,
+ GIArgument *arg);
+
+G_END_DECLS
+
+#endif /* __PYGI_MARSHAL_OUT_H__ */
diff --git a/gi/pygi-private.h b/gi/pygi-private.h
index efe62c8..28e7997 100644
--- a/gi/pygi-private.h
+++ b/gi/pygi-private.h
@@ -27,9 +27,10 @@
#include "pygi-foreign.h"
#include "pygi-closure.h"
#include "pygi-callbacks.h"
-#include "pygi-invoke.h"
#include "pygi-property.h"
#include "pygi-signal-closure.h"
+#include "pygi-invoke.h"
+#include "pygi-cache.h"
G_BEGIN_DECLS
#if PY_VERSION_HEX >= 0x03000000
diff --git a/gi/pygi.h b/gi/pygi.h
index 1c3bf5e..ef65241 100644
--- a/gi/pygi.h
+++ b/gi/pygi.h
@@ -29,9 +29,8 @@
#define NO_IMPORT_PYGOBJECT
#include <pygobject.h>
-#if ENABLE_INTROSPECTION
-
#include <girepository.h>
+#include "pygi-cache.h"
typedef struct {
PyObject_HEAD
@@ -42,6 +41,7 @@ typedef struct {
PyObject_HEAD
GIBaseInfo *info;
PyObject *inst_weakreflist;
+ PyGICallableCache *cache;
} PyGIBaseInfo;
typedef struct {
@@ -55,12 +55,12 @@ typedef struct {
gsize size;
} PyGIBoxed;
-typedef PyObject * (*PyGIArgOverrideToGIArgumentFunc) (PyObject *value,
- GITypeInfo *type_info,
- GITransfer transfer,
- GIArgument *arg);
-typedef PyObject * (*PyGIArgOverrideFromGIArgumentFunc) (GITypeInfo *type_info,
- gpointer data);
+typedef PyObject * (*PyGIArgOverrideToGIArgumentFunc) (PyObject *value,
+ GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ GIArgument *arg);
+typedef PyObject * (*PyGIArgOverrideFromGIArgumentFunc) (GIInterfaceInfo *interface_info,
+ gpointer data);
typedef PyObject * (*PyGIArgOverrideReleaseFunc) (GITypeInfo *type_info,
gpointer struct_);
@@ -88,20 +88,14 @@ static struct PyGI_API *PyGI_API = NULL;
static int
_pygi_import (void)
{
- PyObject *modules_dict;
-
if (PyGI_API != NULL) {
return 1;
}
-
- modules_dict = PyImport_GetModuleDict(); /* borrowed reference -- don't unref */
- if (PyMapping_HasKeyString(modules_dict, "gi")) {
#if PY_VERSION_HEX >= 0x03000000
- PyGI_API = (struct PyGI_API*) PyCapsule_Import("gi._API", FALSE);
+ PyGI_API = (struct PyGI_API*) PyCapsule_Import("gi._API", FALSE);
#else
- PyGI_API = (struct PyGI_API*) PyCObject_Import("gi", "_API");
+ PyGI_API = (struct PyGI_API*) PyCObject_Import("gi", "_API");
#endif
- }
if (PyGI_API == NULL) {
return -1;
}
@@ -170,39 +164,4 @@ pygi_register_foreign_struct (const char* namespace_,
Py_RETURN_NONE;
}
-#else /* ENABLE_INTROSPECTION */
-
-static inline PyObject *
-pygi_type_import_by_g_type (GType g_type)
-{
- return NULL;
-}
-
-static inline PyObject *
-pygi_get_property_value (PyGObject *instance,
- const gchar *attr_name)
-{
- return NULL;
-}
-
-static inline gint
-pygi_set_property_value (PyGObject *instance,
- const gchar *attr_name,
- PyObject *value)
-{
- return -1;
-}
-
-static inline GClosure *
-pygi_signal_closure_new (PyGObject *instance,
- const gchar *sig_name,
- PyObject *callback,
- PyObject *extra_args,
- PyObject *swap_data)
-{
- return NULL;
-}
-
-#endif /* ENABLE_INTROSPECTION */
-
#endif /* __PYGI_H__ */
diff --git a/gi/pygobject-external.h b/gi/pygobject-external.h
index 00b8b6f..4d873bc 100644
--- a/gi/pygobject-external.h
+++ b/gi/pygobject-external.h
@@ -50,7 +50,7 @@ _pygobject_import (void)
return -1;
}
- module = PyImport_ImportModuleEx ("gobject", NULL, NULL, from_list);
+ module = PyImport_ImportModuleEx ("gi._gobject", NULL, NULL, from_list);
Py_DECREF (from_list);
diff --git a/gi/repository/Makefile.in b/gi/repository/Makefile.in
index 7da2e99..308b74a 100644
--- a/gi/repository/Makefile.in
+++ b/gi/repository/Makefile.in
@@ -110,8 +110,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -228,7 +226,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
diff --git a/gi/types.py b/gi/types.py
index 210fdc1..1740f96 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -23,7 +23,7 @@
from __future__ import absolute_import
import sys
-import gobject
+from . import _gobject
from ._gi import \
InterfaceInfo, \
@@ -40,8 +40,8 @@ if sys.version_info > (3, 0):
def Function(info):
- def function(*args):
- return info.invoke(*args)
+ def function(*args, **kwargs):
+ return info.invoke(*args, **kwargs)
function.__info__ = info
function.__name__ = info.get_name()
function.__module__ = info.get_namespace()
@@ -51,8 +51,8 @@ def Function(info):
def NativeVFunc(info, cls):
- def native_vfunc(*args):
- return info.invoke(*args, **dict(gtype=cls.__gtype__))
+ def native_vfunc(*args, **kwargs):
+ return info.invoke(cls.__gtype__, *args, **kwargs)
native_vfunc.__info__ = info
native_vfunc.__name__ = info.get_name()
native_vfunc.__module__ = info.get_namespace()
@@ -61,11 +61,11 @@ def NativeVFunc(info, cls):
def Constructor(info):
- def constructor(cls, *args):
+ def constructor(cls, *args, **kwargs):
cls_name = info.get_container().get_name()
if cls.__name__ != cls_name:
raise TypeError('%s constructor cannot be used to create instances of a subclass' % cls_name)
- return info.invoke(cls, *args)
+ return info.invoke(cls, *args, **kwargs)
constructor.__info__ = info
constructor.__name__ = info.get_name()
@@ -172,8 +172,8 @@ def find_vfunc_info_in_interface(bases, vfunc_name):
# This can be seen in IntrospectionModule.__getattr__() in module.py.
# We do not need to search regular classes here, only wrapped interfaces.
# We also skip GInterface, because it is not wrapped and has no __info__ attr.
- if base is gobject.GInterface or\
- not issubclass(base, gobject.GInterface) or\
+ if base is _gobject.GInterface or\
+ not issubclass(base, _gobject.GInterface) or\
not isinstance(base.__info__, InterfaceInfo):
continue
@@ -203,7 +203,7 @@ def find_vfunc_conflict_in_bases(vfunc, bases):
return aklass
return None
-class GObjectMeta(gobject.GObjectMeta, MetaClassHelper):
+class GObjectMeta(_gobject.GObjectMeta, MetaClassHelper):
def __init__(cls, name, bases, dict_):
super(GObjectMeta, cls).__init__(name, bases, dict_)
@@ -232,15 +232,6 @@ class GObjectMeta(gobject.GObjectMeta, MetaClassHelper):
def mro(cls):
return mro(cls)
- def _must_register_type(cls, namespace):
- ## don't register the class if already registered
- if '__gtype__' in namespace:
- return False
-
- # Do not register a new GType for the overrides, as this would sort of
- # defeat the purpose of overrides...
- return not cls.__module__.startswith('gi.overrides.')
-
def mro(C):
"""Compute the class precedence list (mro) according to C3
@@ -259,7 +250,7 @@ def mro(C):
for subclass_bases in bases_of_subclasses:
candidate = subclass_bases[0]
not_head = [s for s in bases_of_subclasses if candidate in s[1:]]
- if not_head and gobject.GInterface not in candidate.__bases__:
+ if not_head and _gobject.GInterface not in candidate.__bases__:
candidate = None # conflict, reject candidate
else:
break
@@ -286,7 +277,7 @@ class StructMeta(type, MetaClassHelper):
# Avoid touching anything else than the base class.
g_type = cls.__info__.get_g_type()
- if g_type != gobject.TYPE_INVALID and g_type.pytype is not None:
+ if g_type != _gobject.TYPE_INVALID and g_type.pytype is not None:
return
cls._setup_fields()
diff --git a/gio/Makefile.am b/gio/Makefile.am
deleted file mode 100644
index 6b3eb57..0000000
--- a/gio/Makefile.am
+++ /dev/null
@@ -1,117 +0,0 @@
-AUTOMAKE_OPTIONS = 1.7
-
-PLATFORM_VERSION = 2.0
-
-INCLUDES = \
- -I$(top_srcdir)/glib \
- -I$(top_srcdir)/gobject \
- $(PYTHON_INCLUDES) \
- $(PYGOBJECT_CFLAGS) \
- $(GIO_CFLAGS)
-
-# defs files
-defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
-defs_DATA =
-
-# python
-pyexec_LTLIBRARIES =
-
-# gio extension modules
-pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
-pkgpyexec_LTLIBRARIES =
-
-# gio python scripts
-pygiodir = $(pkgpyexecdir)
-pygio_PYTHON = __init__.py
-
-# linker flags
-common_ldflags = -module -avoid-version
-if PLATFORM_WIN32
-common_ldflags += -no-undefined
-endif
-
-CLEANFILES =
-EXTRA_DIST =
-
-# gio module
-GIO_OVERRIDES = \
- gio.override \
- gappinfo.override \
- gapplaunchcontext.override \
- gbufferedinputstream.override \
- gcancellable.override \
- gdatainputstream.override \
- gdrive.override \
- gfile.override \
- gfileattribute.override \
- gfileenumerator.override \
- gfileinfo.override \
- gfileinputstream.override \
- gfileiostream.override \
- gfileoutputstream.override \
- gicon.override \
- giostream.override \
- ginputstream.override \
- gmemoryinputstream.override \
- gmemoryoutputstream.override \
- gmount.override \
- goutputstream.override \
- gresolver.override \
- gsocket.override \
- gvolume.override \
- gvolumemonitor.override
-
-GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
-CLEANFILES += gio.c
-EXTRA_DIST += $(GIO_DEFS) $(GIO_OVERRIDES)
-gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
-_gio_la_CFLAGS = $(GIO_CFLAGS)
-_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
-_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
-_gio_la_SOURCES = \
- giomodule.c \
- pygio-utils.c \
- pygio-utils.h
-nodist__gio_la_SOURCES = gio.c
-if BUILD_GIO
-pkgpyexec_LTLIBRARIES += _gio.la
-defs_DATA += $(GIO_DEFS)
-endif
-
-# giounix module
-GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
-CLEANFILES += unix.c
-EXTRA_DIST += $(GIOUNIX_DEFS) unix.override
-unix.c: $(GIOUNIX_DEFS) unix.override
-unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
-unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
-unix_la_LIBADD = $(GIOUNIX_LIBS)
-unix_la_SOURCES = unixmodule.c
-nodist_unix_la_SOURCES = unix.c
-if BUILD_GIOUNIX
-pkgpyexec_LTLIBRARIES += unix.la
-defs_DATA += $(GIOUNIX_DEFS)
-endif
-
-
-# code generator
-.defs.c:
- (cd $(srcdir)\
- && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
- --py_ssize_t-clean \
- --register gio-types.defs \
- --register unix-types.defs \
- --override $*.override \
- --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
- && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
- && rm -f $(*D)/gen-$(*F).c
-
-
-if BUILD_GIO
-all: $(pkgpyexec_LTLIBRARIES:.la=.so)
-check-local: $(pkgpyexec_LTLIBRARIES:.la=.so)
-clean-local:
- rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
-.la.so:
- $(LN_S) .libs/$@ $@ || true
-endif
diff --git a/gio/Makefile.in b/gio/Makefile.in
deleted file mode 100644
index 041c085..0000000
--- a/gio/Makefile.in
+++ /dev/null
@@ -1,848 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
-@BUILD_GIO_TRUE@am__append_2 = _gio.la
-@BUILD_GIO_TRUE@am__append_3 = $(GIO_DEFS)
-@BUILD_GIOUNIX_TRUE@am__append_4 = unix.la
-@BUILD_GIOUNIX_TRUE@am__append_5 = $(GIOUNIX_DEFS)
-subdir = gio
-DIST_COMMON = $(pygio_PYTHON) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
- $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
- "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"
-LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-_gio_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
-am__gio_la_OBJECTS = _gio_la-giomodule.lo _gio_la-pygio-utils.lo
-nodist__gio_la_OBJECTS = _gio_la-gio.lo
-_gio_la_OBJECTS = $(am__gio_la_OBJECTS) $(nodist__gio_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
-_gio_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gio_la_CFLAGS) \
- $(CFLAGS) $(_gio_la_LDFLAGS) $(LDFLAGS) -o $@
-@BUILD_GIO_TRUE@am__gio_la_rpath = -rpath $(pkgpyexecdir)
-unix_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_unix_la_OBJECTS = unix_la-unixmodule.lo
-nodist_unix_la_OBJECTS = unix_la-unix.lo
-unix_la_OBJECTS = $(am_unix_la_OBJECTS) $(nodist_unix_la_OBJECTS)
-unix_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(unix_la_CFLAGS) \
- $(CFLAGS) $(unix_la_LDFLAGS) $(LDFLAGS) -o $@
-@BUILD_GIOUNIX_TRUE@am_unix_la_rpath = -rpath $(pkgpyexecdir)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(_gio_la_SOURCES) $(nodist__gio_la_SOURCES) \
- $(unix_la_SOURCES) $(nodist_unix_la_SOURCES)
-DIST_SOURCES = $(_gio_la_SOURCES) $(unix_la_SOURCES)
-py_compile = $(top_srcdir)/py-compile
-DATA = $(defs_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIR = @DATADIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FFI_CFLAGS = @FFI_CFLAGS@
-FFI_LIBS = @FFI_LIBS@
-FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
-GIO_CFLAGS = @GIO_CFLAGS@
-GIO_LIBS = @GIO_LIBS@
-GI_CFLAGS = @GI_CFLAGS@
-GI_DATADIR = @GI_DATADIR@
-GI_LIBS = @GI_LIBS@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
-GLIB_LIBS = @GLIB_LIBS@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GOBJECT_QUERY = @GOBJECT_QUERY@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
-INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBFFI_PC = @LIBFFI_PC@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PLATFORM = @PLATFORM@
-PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
-PYCAIRO_LIBS = @PYCAIRO_LIBS@
-PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
-PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
-PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
-PYTHON = @PYTHON@
-PYTHON_BASENAME = @PYTHON_BASENAME@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_INCLUDES = @PYTHON_INCLUDES@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-THREADING_CFLAGS = @THREADING_CFLAGS@
-VERSION = @VERSION@
-XSLTPROC = @XSLTPROC@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-
-# gio extension modules
-pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.7
-PLATFORM_VERSION = 2.0
-INCLUDES = \
- -I$(top_srcdir)/glib \
- -I$(top_srcdir)/gobject \
- $(PYTHON_INCLUDES) \
- $(PYGOBJECT_CFLAGS) \
- $(GIO_CFLAGS)
-
-
-# defs files
-defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
-defs_DATA = $(am__append_3) $(am__append_5)
-
-# python
-pyexec_LTLIBRARIES =
-pkgpyexec_LTLIBRARIES = $(am__append_2) $(am__append_4)
-
-# gio python scripts
-pygiodir = $(pkgpyexecdir)
-pygio_PYTHON = __init__.py
-
-# linker flags
-common_ldflags = -module -avoid-version $(am__append_1)
-CLEANFILES = gio.c unix.c
-EXTRA_DIST = $(GIO_DEFS) $(GIO_OVERRIDES) $(GIOUNIX_DEFS) \
- unix.override
-
-# gio module
-GIO_OVERRIDES = \
- gio.override \
- gappinfo.override \
- gapplaunchcontext.override \
- gbufferedinputstream.override \
- gcancellable.override \
- gdatainputstream.override \
- gdrive.override \
- gfile.override \
- gfileattribute.override \
- gfileenumerator.override \
- gfileinfo.override \
- gfileinputstream.override \
- gfileiostream.override \
- gfileoutputstream.override \
- gicon.override \
- giostream.override \
- ginputstream.override \
- gmemoryinputstream.override \
- gmemoryoutputstream.override \
- gmount.override \
- goutputstream.override \
- gresolver.override \
- gsocket.override \
- gvolume.override \
- gvolumemonitor.override
-
-GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
-_gio_la_CFLAGS = $(GIO_CFLAGS)
-_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
-_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
-_gio_la_SOURCES = \
- giomodule.c \
- pygio-utils.c \
- pygio-utils.h
-
-nodist__gio_la_SOURCES = gio.c
-
-# giounix module
-GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
-unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
-unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
-unix_la_LIBADD = $(GIOUNIX_LIBS)
-unix_la_SOURCES = unixmodule.c
-nodist_unix_la_SOURCES = unix.c
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .defs .la .lo .o .obj .so
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gio/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign gio/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
- @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \
- }
-
-uninstall-pkgpyexecLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \
- done
-
-clean-pkgpyexecLTLIBRARIES:
- -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES)
- @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
- @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
- list2=; for p in $$list; do \
- if test -f $$p; then \
- list2="$$list2 $$p"; \
- else :; fi; \
- done; \
- test -z "$$list2" || { \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
- }
-
-uninstall-pyexecLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
- done
-
-clean-pyexecLTLIBRARIES:
- -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
- @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-_gio.la: $(_gio_la_OBJECTS) $(_gio_la_DEPENDENCIES)
- $(AM_V_CCLD)$(_gio_la_LINK) $(am__gio_la_rpath) $(_gio_la_OBJECTS) $(_gio_la_LIBADD) $(LIBS)
-unix.la: $(unix_la_OBJECTS) $(unix_la_DEPENDENCIES)
- $(AM_V_CCLD)$(unix_la_LINK) $(am_unix_la_rpath) $(unix_la_OBJECTS) $(unix_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-gio.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-giomodule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-pygio-utils.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unix.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unixmodule.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-_gio_la-giomodule.lo: giomodule.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-giomodule.lo -MD -MP -MF $(DEPDIR)/_gio_la-giomodule.Tpo -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gio_la-giomodule.Tpo $(DEPDIR)/_gio_la-giomodule.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='giomodule.c' object='_gio_la-giomodule.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
-
-_gio_la-pygio-utils.lo: pygio-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-pygio-utils.lo -MD -MP -MF $(DEPDIR)/_gio_la-pygio-utils.Tpo -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gio_la-pygio-utils.Tpo $(DEPDIR)/_gio_la-pygio-utils.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygio-utils.c' object='_gio_la-pygio-utils.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
-
-_gio_la-gio.lo: gio.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-gio.lo -MD -MP -MF $(DEPDIR)/_gio_la-gio.Tpo -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gio_la-gio.Tpo $(DEPDIR)/_gio_la-gio.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='_gio_la-gio.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
-
-unix_la-unixmodule.lo: unixmodule.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unixmodule.lo -MD -MP -MF $(DEPDIR)/unix_la-unixmodule.Tpo -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unix_la-unixmodule.Tpo $(DEPDIR)/unix_la-unixmodule.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unixmodule.c' object='unix_la-unixmodule.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
-
-unix_la-unix.lo: unix.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unix.lo -MD -MP -MF $(DEPDIR)/unix_la-unix.Tpo -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unix_la-unix.Tpo $(DEPDIR)/unix_la-unix.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unix.c' object='unix_la-unix.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-pygioPYTHON: $(pygio_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(pygiodir)" || $(MKDIR_P) "$(DESTDIR)$(pygiodir)"
- @list='$(pygio_PYTHON)'; dlist=; list2=; test -n "$(pygiodir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- $(am__strip_dir) \
- dlist="$$dlist $$f"; \
- list2="$$list2 $$b$$p"; \
- else :; fi; \
- done; \
- for file in $$list2; do echo $$file; done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygiodir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(pygiodir)" || exit $$?; \
- done || exit $$?; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygiodir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygiodir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-pygioPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(pygio_PYTHON)'; test -n "$(pygiodir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- fileso=`echo "$$files" | sed 's|$$|o|'`; \
- echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(pygiodir)" && rm -f $$files || exit $$?; \
- echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$filesc ")"; \
- cd "$(DESTDIR)$(pygiodir)" && rm -f $$filesc || exit $$?; \
- echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$fileso ")"; \
- cd "$(DESTDIR)$(pygiodir)" && rm -f $$fileso
-install-defsDATA: $(defs_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(defsdir)" || $(MKDIR_P) "$(DESTDIR)$(defsdir)"
- @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(defsdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(defsdir)" || exit $$?; \
- done
-
-uninstall-defsDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(defsdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(defsdir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-@BUILD_GIO_FALSE@check-local:
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) check-local
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-@BUILD_GIO_FALSE@clean-local:
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-local \
- clean-pkgpyexecLTLIBRARIES clean-pyexecLTLIBRARIES \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-defsDATA install-pygioPYTHON
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-pkgpyexecLTLIBRARIES \
- install-pyexecLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
- uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
-
-.MAKE: check-am install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
- clean-generic clean-libtool clean-local \
- clean-pkgpyexecLTLIBRARIES clean-pyexecLTLIBRARIES ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-defsDATA install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-pkgpyexecLTLIBRARIES install-ps \
- install-ps-am install-pyexecLTLIBRARIES install-pygioPYTHON \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
- uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
-
-gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
-unix.c: $(GIOUNIX_DEFS) unix.override
-
-# code generator
-.defs.c:
- (cd $(srcdir)\
- && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
- --py_ssize_t-clean \
- --register gio-types.defs \
- --register unix-types.defs \
- --override $*.override \
- --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
- && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
- && rm -f $(*D)/gen-$(*F).c
-
-@BUILD_GIO_TRUE@all: $(pkgpyexec_LTLIBRARIES:.la=.so)
-@BUILD_GIO_TRUE@check-local: $(pkgpyexec_LTLIBRARIES:.la=.so)
-@BUILD_GIO_TRUE@clean-local:
-@BUILD_GIO_TRUE@ rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
-@BUILD_GIO_TRUE@.la.so:
-@BUILD_GIO_TRUE@ $(LN_S) .libs/$@ $@ || true
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/gio/__init__.py b/gio/__init__.py
deleted file mode 100644
index c4b02bb..0000000
--- a/gio/__init__.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- Mode: Python -*-
-# pygobject - Python bindings for the GObject library
-# Copyright (C) 2008 Johan Dahlin
-#
-# gio/__init__.py: initialisation file for gio module
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
-
-from gobject import GObjectMeta
-from _gio import *
-from _gio import \
- _app_info_init, _install_app_info_meta, \
- _file_init, _install_file_meta
-try:
- import unix
- unix # pyflakes
-except ImportError:
- unix = None
-del _gio
-
-class GFileMeta(GObjectMeta):
- __call__ = _file_init
-_install_file_meta(GFileMeta)
-
-class GAppInfoMeta(GObjectMeta):
- __call__ = _app_info_init
-_install_app_info_meta(GAppInfoMeta)
diff --git a/gio/gappinfo.override b/gio/gappinfo.override
deleted file mode 100644
index 7f09ce8..0000000
--- a/gio/gappinfo.override
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- * Copyright (C) 2008 Gian Mario Tagliaretti
- *
- * gappinfo.override: module overrides for GInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-define _install_app_info_meta
-static PyObject *
-_wrap__install_app_info_meta(PyObject *self, PyObject *args)
-{
- PyObject *metaclass;
-
- if (!PyArg_ParseTuple(args, "O", &metaclass))
- return NULL;
-
- Py_INCREF(metaclass);
- PyGAppInfo_Type.ob_type = (PyTypeObject*)metaclass;
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-define _app_info_init kwargs
-static PyObject *
-_wrap__app_info_init(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "commandline", "application_name",
- "flags", NULL };
- char *commandline, *application_name = NULL;
- PyObject *py_flags = NULL;
- GAppInfo *ret;
- GError *error = NULL;
- GAppInfoCreateFlags flags = G_APP_INFO_CREATE_NONE;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s|zO:gio.AppInfo",
- kwlist,
- &commandline, &application_name,
- &py_flags))
- return NULL;
- if (py_flags && pyg_flags_get_value(G_TYPE_APP_INFO_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- return NULL;
-
- ret = g_app_info_create_from_commandline(commandline,
- application_name, flags, &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- /* pygobject_new handles NULL checking */
- return pygobject_new((GObject *)ret);
-}
-%%
-override g_app_info_launch_uris kwargs
-static PyObject *
-_wrap_g_app_info_launch_uris(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "files", "launch_context", NULL };
-
- GList *file_list = NULL;
- PyGObject *pycontext = NULL;
- GAppLaunchContext *ctx;
- PyObject *pyfile_list = Py_None;
- int ret;
- GError *error = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|OO:gio.AppInfo.launch_uris",
- kwlist,
- &pyfile_list, &pycontext))
- return NULL;
-
- if (!pygio_check_launch_context(pycontext, &ctx))
- return NULL;
-
- if (pyfile_list == Py_None)
- file_list = NULL;
-
- else if (PySequence_Check (pyfile_list))
- file_list = pygio_pylist_to_uri_glist(pyfile_list);
-
- else {
- PyErr_SetString(PyExc_TypeError,
- "file_list should be a list of strings or None");
- return NULL;
- }
-
- ret = g_app_info_launch_uris(G_APP_INFO(self->obj),
- file_list, ctx, &error);
-
- /* in python 3 the C strings are not internal to the Unicode string object
- * so we now strdup when adding element to the list and must free them here
- */
- g_list_foreach (file_list,
- (GFunc) g_free, NULL);
- g_list_free(file_list);
-
- if (pyg_error_check(&error))
- return NULL;
-
- return PyBool_FromLong(ret);
-}
-%%
-override g_app_info_launch kwargs
-static PyObject *
-_wrap_g_app_info_launch(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "files", "launch_context", NULL };
-
- GList *file_list = NULL;
- PyGObject *pycontext = NULL;
- GAppLaunchContext *ctx;
- PyObject *pyfile_list = Py_None;
- int ret;
- GError *error = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|OO:gio.AppInfo.launch",
- kwlist,
- &pyfile_list, &pycontext))
- return NULL;
-
- if (!pygio_check_launch_context(pycontext, &ctx))
- return NULL;
-
- if (pyfile_list == Py_None)
- file_list = NULL;
-
- else if (PySequence_Check (pyfile_list))
- file_list = pygio_pylist_to_gfile_glist(pyfile_list);
-
- else {
- PyErr_SetString(PyExc_TypeError,
- "file_list should be a list of strings or None");
- return NULL;
- }
-
- ret = g_app_info_launch(G_APP_INFO(self->obj),
- file_list, ctx, &error);
-
- g_list_free(file_list);
-
- if (pyg_error_check(&error))
- return NULL;
-
- return PyBool_FromLong(ret);
-}
-%%
-override-slot GAppInfo.tp_richcompare
-static PyObject *
-_wrap_g_app_info_tp_richcompare(PyGObject *self, PyGObject *other, int op)
-{
- PyObject *result;
-
- if (PyObject_TypeCheck(self, &PyGAppInfo_Type)
- && PyObject_TypeCheck(other, &PyGAppInfo_Type)) {
- GAppInfo *info1 = G_APP_INFO(self->obj);
- GAppInfo *info2 = G_APP_INFO(other->obj);
-
- switch (op) {
- case Py_EQ:
- result = (g_app_info_equal(info1, info2)
- ? Py_True : Py_False);
- break;
- case Py_NE:
- result = (!g_app_info_equal(info1, info2)
- ? Py_True : Py_False);
- break;
- default:
- result = Py_NotImplemented;
- }
- }
- else
- result = Py_NotImplemented;
-
- Py_INCREF(result);
- return result;
-}
-%%
-override-slot GAppInfo.tp_repr
-static PyObject *
-_wrap_g_app_info_tp_repr(PyGObject *self)
-{
- const char *name = g_app_info_get_name(G_APP_INFO(self->obj));
- gchar *representation;
- PyObject *result;
-
- representation = g_strdup_printf("<%s at %p: %s>",
- self->ob_type->tp_name, self,
- name ? name : "UNKNOWN NAME");
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
diff --git a/gio/gapplaunchcontext.override b/gio/gapplaunchcontext.override
deleted file mode 100644
index a10f959..0000000
--- a/gio/gapplaunchcontext.override
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Gian Mario Tagliaretti
- *
- * gapplaunchcontext.override: module overrides for GAppLaunchContext
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-override g_app_launch_context_get_display kwargs
-static PyObject *
-_wrap_g_app_launch_context_get_display(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "info", "files", NULL };
-
- GList *file_list = NULL;
- PyGObject *py_info;
- PyObject *pyfile_list;
- gchar *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O:gio.AppLaunchContext.get_display",
- kwlist,
- &PyGAppInfo_Type, &py_info, &pyfile_list))
- return NULL;
-
- if (!PySequence_Check (pyfile_list)) {
- PyErr_Format (PyExc_TypeError,
- "argument must be a list or tuple of GFile objects");
- return NULL;
- }
-
- file_list = pygio_pylist_to_gfile_glist(pyfile_list);
-
- ret = g_app_launch_context_get_display(G_APP_LAUNCH_CONTEXT(self->obj),
- G_APP_INFO(py_info->obj), file_list);
- g_list_free(file_list);
-
- if (ret)
- return PyString_FromString(ret);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-override g_app_launch_context_get_startup_notify_id kwargs
-static PyObject *
-_wrap_g_app_launch_context_get_startup_notify_id(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "info", "files", NULL };
-
- GList *file_list = NULL;
- PyGObject *py_info;
- PyObject *pyfile_list;
- gchar *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O:gio.AppLaunchContext.get_startup_notify_id",
- kwlist,
- &PyGAppInfo_Type, &py_info, &pyfile_list))
- return NULL;
-
- if (!PySequence_Check (pyfile_list)) {
- PyErr_Format (PyExc_TypeError,
- "argument must be a list or tuple of GFile objects");
- return NULL;
- }
-
- file_list = pygio_pylist_to_gfile_glist(pyfile_list);
-
- ret = g_app_launch_context_get_startup_notify_id(
- G_APP_LAUNCH_CONTEXT(self->obj),
- G_APP_INFO(py_info->obj), file_list);
- g_list_free(file_list);
-
- if (ret)
- return PyString_FromString(ret);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
diff --git a/gio/gbufferedinputstream.override b/gio/gbufferedinputstream.override
deleted file mode 100644
index 047a663..0000000
--- a/gio/gbufferedinputstream.override
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gbufferedinputstream.override: module overrides for GBufferedInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_buffered_input_stream_fill_async kwargs
-static PyObject *
-_wrap_g_buffered_input_stream_fill_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "count", "callback", "io_priority",
- "cancellable", "user_data", NULL };
- long count = -1;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "lO|iOO:gio.BufferedInputStream.fill_async",
- kwlist,
- &count,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_buffered_input_stream_fill_async(G_BUFFERED_INPUT_STREAM(self->obj),
- count,
- io_priority,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gcancellable.override b/gio/gcancellable.override
deleted file mode 100644
index 1eefb3b..0000000
--- a/gio/gcancellable.override
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gcancellable.override: module overrides for GCancellable
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-%%
-override g_cancellable_make_pollfd noargs
-static PyObject *
-_wrap_g_cancellable_make_pollfd (PyGObject *self)
-{
- GPollFD pollfd;
- gboolean ret;
- PyGPollFD *pypollfd;
-
- ret = g_cancellable_make_pollfd(G_CANCELLABLE(self->obj), &pollfd);
-
- pypollfd = PyObject_NEW(PyGPollFD, &PyGPollFD_Type);
- pypollfd->fd_obj = NULL;
- pypollfd->pollfd = pollfd;
- return (PyObject *) pypollfd;
-}
diff --git a/gio/gdatainputstream.override b/gio/gdatainputstream.override
deleted file mode 100644
index 92b0f99..0000000
--- a/gio/gdatainputstream.override
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- * Copyright (C) 2009 Paul Pogonyshev
- *
- * gdatainputstream.override: module overrides for GDataInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-override g_data_input_stream_read_line kwargs
-static PyObject *
-_wrap_g_data_input_stream_read_line(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- char *line;
- gsize length;
- PyObject *py_line;
- GError *error = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|O:gio.DataInputStream.read_line",
- kwlist, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- line = g_data_input_stream_read_line(G_DATA_INPUT_STREAM(self->obj),
- &length, cancellable, &error);
- if (pyg_error_check(&error))
- return NULL;
-
- py_line = PyString_FromStringAndSize(line, length);
- g_free(line);
- return py_line;
-}
-
-%%
-override g_data_input_stream_read_line_async kwargs
-static PyObject *
-_wrap_g_data_input_stream_read_line_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority",
- "cancellable", "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:gio.DataInputStream.read_line_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_data_input_stream_read_line_async(G_DATA_INPUT_STREAM(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-
-%%
-override g_data_input_stream_read_line_finish kwargs
-static PyObject *
-_wrap_g_data_input_stream_read_line_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GError *error = NULL;
- gchar *line;
- gsize length;
- PyObject *py_line;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.DataInputStream.read_line_finish",
- kwlist, &PyGAsyncResult_Type, &result))
- return NULL;
-
- line = g_data_input_stream_read_line_finish(G_DATA_INPUT_STREAM(self->obj),
- G_ASYNC_RESULT(result->obj),
- &length,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- py_line = PyString_FromStringAndSize(line, length);
- g_free(line);
- return py_line;
-}
-
-%%
-override g_data_input_stream_read_until kwargs
-static PyObject *
-_wrap_g_data_input_stream_read_until(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "stop_chars", "cancellable", NULL };
- const char *stop_chars;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- char *line;
- gsize length;
- PyObject *py_line;
- GError *error = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s|O:gio.DataInputStream.read_line",
- kwlist, &stop_chars, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- line = g_data_input_stream_read_until(G_DATA_INPUT_STREAM(self->obj),
- stop_chars, &length, cancellable, &error);
- if (pyg_error_check(&error))
- return NULL;
-
- py_line = PyString_FromStringAndSize(line, length);
- g_free(line);
- return py_line;
-}
-
-%%
-override g_data_input_stream_read_until_async kwargs
-static PyObject *
-_wrap_g_data_input_stream_read_until_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "stop_chars", "callback", "io_priority",
- "cancellable", "user_data", NULL };
- const char *stop_chars;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|iOO:gio.DataInputStream.read_until_async",
- kwlist,
- &stop_chars,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_data_input_stream_read_until_async(G_DATA_INPUT_STREAM(self->obj),
- stop_chars,
- io_priority,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-
-%%
-override g_data_input_stream_read_until_finish kwargs
-static PyObject *
-_wrap_g_data_input_stream_read_until_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GError *error = NULL;
- gchar *line;
- gsize length;
- PyObject *py_line;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.DataInputStream.read_until_finish",
- kwlist, &PyGAsyncResult_Type, &result))
- return NULL;
-
- line = g_data_input_stream_read_until_finish(G_DATA_INPUT_STREAM(self->obj),
- G_ASYNC_RESULT(result->obj),
- &length,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- py_line = PyString_FromStringAndSize(line, length);
- g_free(line);
- return py_line;
-}
diff --git a/gio/gdrive.override b/gio/gdrive.override
deleted file mode 100644
index 7961856..0000000
--- a/gio/gdrive.override
+++ /dev/null
@@ -1,347 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gdrive.override: module overrides for GDrive and related types
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-%%
-override g_drive_get_volumes noargs
-static PyObject *
-_wrap_g_drive_get_volumes (PyGObject *self)
-{
- GList *list, *l;
- PyObject *ret;
-
- pyg_begin_allow_threads;
-
- list = g_drive_get_volumes (G_DRIVE (self->obj));
-
- pyg_end_allow_threads;
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- GVolume *volume = l->data;
- PyObject *item = pygobject_new((GObject *)volume);
- PyList_Append(ret, item);
- Py_DECREF(item);
- g_object_unref(volume);
- }
- g_list_free(list);
-
- return ret;
-}
-%%
-override g_drive_eject kwargs
-static PyObject *
-_wrap_g_drive_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:gio.Drive.eject",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (PyErr_Warn(PyExc_DeprecationWarning,
- "gio.Drive.ejectis deprecated, \
- use gtk.Drive.eject_with_operation instead") < 0)
- return NULL;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_drive_eject(G_DRIVE(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_drive_poll_for_media kwargs
-static PyObject *
-_wrap_g_drive_poll_for_media(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OO:gio.Drive.eject",
- kwlist,
- &notify->callback,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_drive_poll_for_media(G_DRIVE(self->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override-slot GDrive.tp_repr
-static PyObject *
-_wrap_g_drive_tp_repr(PyGObject *self)
-{
- char *name = g_drive_get_name(G_DRIVE(self->obj));
- gchar *representation;
- PyObject *result;
-
- if (name) {
- representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
- g_free(name);
- }
- else
- representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
-%%
-override g_drive_enumerate_identifiers noargs
-static PyObject *
-_wrap_g_drive_enumerate_identifiers (PyGObject *self)
-{
- char **ids;
- PyObject *ret;
-
- pyg_begin_allow_threads;
-
- ids = g_drive_enumerate_identifiers(G_DRIVE (self->obj));
-
- pyg_end_allow_threads;
-
- if (ids && ids[0] != NULL) {
- ret = strv_to_pylist(ids);
- g_strfreev (ids);
- } else {
- ret = Py_None;
- Py_INCREF(ret);
- }
- return ret;
-}
-%%
-override g_drive_eject_with_operation kwargs
-static PyObject *
-_wrap_g_drive_eject_with_operation(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Drive.eject_with_operation",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_drive_eject_with_operation(G_DRIVE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_drive_start kwargs
-static PyObject *
-_wrap_g_drive_start(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- GDriveStartFlags flags = G_DRIVE_START_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Drive.start",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_drive_start(G_DRIVE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_drive_stop kwargs
-static PyObject *
-_wrap_g_drive_stop(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Drive.stop",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_drive_stop(G_DRIVE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gfile.override b/gio/gfile.override
deleted file mode 100644
index 1301963..0000000
--- a/gio/gfile.override
+++ /dev/null
@@ -1,2215 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * gfile.override: module overrides for GInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-headers
-
-static void
-file_progress_callback_marshal(goffset current_num_bytes,
- goffset total_num_bytes,
- PyGIONotify *notify)
-{
- PyObject *ret;
- PyGILState_STATE state;
-
- state = pyg_gil_state_ensure();
-
- if (notify->data)
- ret = PyObject_CallFunction(notify->callback, "(KKO)",
- current_num_bytes,
- total_num_bytes,
- notify->data);
- else
- ret = PyObject_CallFunction(notify->callback, "(KK)",
- current_num_bytes,
- total_num_bytes);
-
- if (ret == NULL)
- {
- PyErr_Print();
- PyErr_Clear();
- }
-
- Py_XDECREF(ret);
- pyg_gil_state_release(state);
-}
-%%
-define _install_file_meta
-static PyObject *
-_wrap__install_file_meta(PyObject *self, PyObject *args)
-{
- PyObject *metaclass;
-
- if (!PyArg_ParseTuple(args, "O", &metaclass))
- return NULL;
-
- Py_INCREF(metaclass);
- PyGFile_Type.ob_type = (PyTypeObject*)metaclass;
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-define _file_init kwargs
-static PyObject*
-_wrap__file_init(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- GFile *file;
- Py_ssize_t n_args, n_kwargs;
- char *arg;
- PyObject *py_ret;
-
- n_args = PyTuple_Size(args);
- n_kwargs = kwargs != NULL ? PyDict_Size(kwargs) : 0;
-
- if (n_args == 1 && n_kwargs == 0) {
- if (!PyArg_ParseTuple(args, "s:gio.File.__init__", &arg))
- return NULL;
- file = g_file_new_for_commandline_arg(arg);
- } else if (n_args == 0 && n_kwargs == 1) {
- if (PyDict_GetItemString(kwargs, "path")) {
- char *kwlist[] = { "path", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s:gio.File.__init__", kwlist, &arg))
- return NULL;
- file = g_file_new_for_path(arg);
- } else if (PyDict_GetItemString(kwargs, "uri")) {
- char *kwlist[] = { "uri", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s:gio.File.__init__", kwlist, &arg))
- return NULL;
- file = g_file_new_for_uri(arg);
- } else {
- PyErr_Format(PyExc_TypeError,
- "gio.File() got an unexpected keyword argument '%s'",
- "unknown");
- return NULL;
- }
- } else {
- PyErr_Format(PyExc_TypeError,
- "gio.File() takes exactly 1 argument (%zd given)",
- n_args + n_kwargs);
- return NULL;
- }
-
- if (!file) {
- PyErr_SetString(PyExc_RuntimeError,
- "could not create GFile object");
- return NULL;
- }
-
- py_ret = pygobject_new((GObject *)file);
- g_object_unref(file);
-
- return py_ret;
-}
-%%
-override g_file_read_async kwargs
-static PyObject *
-_wrap_g_file_read_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority",
- "cancellable", "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:File.read_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_read_async(G_FILE(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_load_contents kwargs
-static PyObject *
-_wrap_g_file_load_contents(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "cancellable", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- gchar *contents, *etag_out;
- gsize length;
- GError *error = NULL;
- gboolean ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|O:File.load_contents",
- kwlist,
- &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- pyg_begin_allow_threads;
-
- ret = g_file_load_contents(G_FILE(self->obj), cancellable,
- &contents, &length, &etag_out, &error);
-
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret) {
- PyObject *pyret;
-
- pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
- g_free(contents);
- g_free(etag_out);
- return pyret;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_file_load_contents_async kwargs
-static PyObject *
-_wrap_g_file_load_contents_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OO:File.load_contents_async",
- kwlist,
- &notify->callback,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_load_contents_async(G_FILE(self->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_load_contents_finish kwargs
-static PyObject *
-_wrap_g_file_load_contents_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "res", NULL };
- PyGObject *res;
- gchar *contents, *etag_out;
- gsize length;
- GError *error = NULL;
- gboolean ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:File.load_contents_finish",
- kwlist,
- &PyGAsyncResult_Type,
- &res))
- return NULL;
-
- ret = g_file_load_contents_finish(G_FILE(self->obj),
- G_ASYNC_RESULT(res->obj), &contents,
- &length, &etag_out, &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret) {
- PyObject *pyret;
-
- pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
- g_free(contents);
- g_free(etag_out);
- return pyret;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_file_enumerate_children_async kwargs
-static PyObject *
-_wrap_g_file_enumerate_children_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "attributes", "callback", "flags",
- "io_priority", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- char *attributes;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
- GCancellable *cancellable = NULL;
- PyGObject *py_cancellable = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|OiOO:gio.File.enumerate_children_async",
- kwlist,
- &attributes,
- &notify->callback,
- &py_flags,
- &io_priority,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_enumerate_children_async(G_FILE(self->obj),
- attributes,
- flags,
- io_priority,
- (GCancellable *) cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_mount_mountable kwargs
-static PyObject *
-_wrap_g_file_mount_mountable(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "mount_operation", "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- PyGObject *py_cancellable = NULL;
- GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O|OOO:File.mount_mountable",
- kwlist,
- &PyGMountOperation_Type,
- &mount_operation,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_mount_mountable(G_FILE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_unmount_mountable kwargs
-static PyObject *
-_wrap_g_file_unmount_mountable(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:File.unmount_mountable",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_unmount_mountable(G_FILE(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_unmount_mountable_with_operation kwargs
-static PyObject *
-_wrap_g_file_unmount_mountable_with_operation(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:File.unmount_mountable_with_operation",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_unmount_mountable_with_operation(G_FILE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_mount_enclosing_volume kwargs
-static PyObject *
-_wrap_g_file_mount_enclosing_volume(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "mount_operation", "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- PyGObject *py_cancellable = NULL;
- GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O|OOO:File.mount_enclosing_volume",
- kwlist,
- &PyGMountOperation_Type,
- &mount_operation,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_mount_enclosing_volume(G_FILE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_copy kwargs
-static PyObject *
-_wrap_g_file_copy(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "destination", "progress_callback",
- "flags", "cancellable",
- "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *destination = NULL;
- PyGObject *py_cancellable = NULL;
- GFileCopyFlags flags = G_FILE_COPY_NONE;
- GCancellable *cancellable;
- int ret;
- GError *error = NULL;
- GFileProgressCallback callback = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!|OOOO:File.copy",
- kwlist,
- &PyGFile_Type,
- &destination,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (pygio_notify_using_optional_callback(notify)) {
- callback = (GFileProgressCallback)file_progress_callback_marshal;
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
- }
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- /* No need to reference callback here, because it will be used
- * only while this function is in progress. */
-
- pyg_begin_allow_threads;
-
- ret = g_file_copy(G_FILE(self->obj),
- G_FILE(destination->obj),
- flags,
- cancellable,
- callback,
- notify,
- &error);
-
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error))
- goto error;
-
- pygio_notify_free(notify);
- return PyBool_FromLong(ret);
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_copy_async kwargs
-static PyObject *
-_wrap_g_file_copy_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "destination", "callback", "progress_callback",
- "flags", "io_priority", "cancellable",
- "user_data", "progress_callback_data", NULL };
- PyGIONotify *notify, *progress_notify;
- PyObject *py_flags = NULL;
- PyGObject *destination = NULL;
- PyGObject *py_cancellable = NULL;
- GFileCopyFlags flags = G_FILE_COPY_NONE;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- GFileProgressCallback progress_callback = NULL;
-
- /* After the creation, referencing/freeing will automatically be
- * done on the master and the slave. */
- notify = pygio_notify_new();
- progress_notify = pygio_notify_new_slave(notify);
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O|OOiOOO:File.copy_async",
- kwlist,
- &PyGFile_Type,
- &destination,
- &notify->callback,
- &progress_notify->callback,
- &py_flags,
- &io_priority,
- &pycancellable,
- &notify->data,
- &progress_notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- if (pygio_notify_using_optional_callback(progress_notify)) {
- progress_callback = (GFileProgressCallback) file_progress_callback_marshal;
- if (!pygio_notify_callback_is_valid_full(progress_notify, "progress_callback"))
- goto error;
- }
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_copy_async(G_FILE(self->obj),
- G_FILE(destination->obj),
- flags,
- io_priority,
- cancellable,
- progress_callback,
- progress_notify,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_move kwargs
-static PyObject *
-_wrap_g_file_move(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "destination", "progress_callback",
- "flags", "cancellable",
- "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *destination = NULL;
- PyGObject *py_cancellable = NULL;
- GFileCopyFlags flags = G_FILE_COPY_NONE;
- GCancellable *cancellable;
- int ret;
- GError *error = NULL;
- GFileProgressCallback callback = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!|OOOO:File.move",
- kwlist,
- &PyGFile_Type,
- &destination,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (pygio_notify_using_optional_callback(notify)) {
- callback = (GFileProgressCallback)file_progress_callback_marshal;
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
- }
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- /* No need to reference callback here, because it will be used
- * only while this function is in progress. */
-
- pyg_begin_allow_threads;
-
- ret = g_file_move(G_FILE(self->obj),
- G_FILE(destination->obj),
- flags,
- cancellable,
- callback,
- notify,
- &error);
-
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error))
- goto error;
-
- pygio_notify_free(notify);
- return PyBool_FromLong(ret);
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_set_attribute kwargs
-static char**
-pyg_strv_from_pyobject(PyObject *value, const char *exc_msg)
-{
- gchar** strv;
- Py_ssize_t len, i;
- PyObject* fast_seq;
-
- fast_seq = PySequence_Fast(value, exc_msg);
- if (fast_seq == NULL)
- return NULL;
-
- len = PySequence_Length(fast_seq);
- if (len == -1)
- return NULL;
-
- strv = g_malloc(sizeof(char*) * (len + 1));
- if (strv == NULL) {
- PyErr_NoMemory();
- goto failure;
- }
-
- for (i = 0; i < len + 1; i++)
- strv[i] = NULL;
-
- for (i = 0; i < len; i++) {
- PyObject* item = PySequence_Fast_GET_ITEM(fast_seq, i);
- const char *s;
-
- if (!PyString_Check(item)) {
- PyErr_SetString(PyExc_TypeError, exc_msg);
- goto failure;
- }
-
- s = PyString_AsString(item);
- if (s == NULL)
- goto failure;
-
- strv[i] = g_strdup(s);
- if (strv[i] == NULL) {
- PyErr_NoMemory();
- goto failure;
- }
- }
-
- return strv;
-
- failure:
- g_strfreev(strv);
- Py_XDECREF(fast_seq);
- return NULL;
-}
-
-static PyObject *
-_wrap_g_file_set_attribute(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "attribute", "type", "value_p",
- "flags", "cancellable", NULL };
- GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
- int ret = 0;
- GCancellable *cancellable = NULL;
- GError *error = NULL;
- char *attribute;
- PyObject *py_type = NULL, *py_flags = NULL, *value;
- PyGObject *pycancellable = NULL;
- GFileAttributeType type;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"sOO|OO:gio.File.set_attribute",
- kwlist, &attribute, &py_type, &value,
- &py_flags, &pycancellable))
- return NULL;
-
- if (pyg_enum_get_value(G_TYPE_FILE_ATTRIBUTE_TYPE, py_type,
- (gpointer)&type))
- return NULL;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS, py_flags,
- (gpointer)&flags))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- switch (type) {
- case G_FILE_ATTRIBUTE_TYPE_STRING:
- {
- char* s;
- if (!PyString_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be a str when type is FILE_ATTRIBUTE_TYPE_STRING");
- return NULL;
- }
-
- s = PyString_AsString(value);
- if (s == NULL)
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- s, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
- {
- char* s;
- if (!PyString_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be a bytes instance when type is FILE_ATTRIBUTE_TYPE_BYTE_STRING");
- return NULL;
- }
-
- s = PyString_AsString(value);
- if (s == NULL)
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- s, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_STRINGV:
- {
- gchar** strv;
-
- strv = pyg_strv_from_pyobject(value, "set_attribute value must be a list of strings when type is FILE_ATTRIBUTE_TYPE_STRINGV");
- if (strv == NULL)
- break;
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- strv, flags, (GCancellable *) cancellable,
- &error);
- g_strfreev(strv);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_OBJECT:
- {
- GObject* obj;
-
- if (!pygobject_check(value, &PyGObject_Type)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be a GObject instance when type is FILE_ATTRIBUTE_TYPE_OBJECT");
- return NULL;
- }
-
- obj = pygobject_get(value);
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- obj, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_BOOLEAN:
- {
- gboolean boolval;
-
- boolval = PyObject_IsTrue(value);
- if (boolval == -1 && PyErr_Occurred())
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- &boolval, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_UINT32:
- {
- guint32 intval;
-
- if (!PyInt_Check(value) && !PyLong_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_UINT32");
- return NULL;
- }
-
- intval = PyLong_AsUnsignedLong(value);
- if (intval == -1 && PyErr_Occurred())
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- &intval, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_INT32:
- {
- gint32 intval;
-
- if (!PyInt_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_INT32");
- return NULL;
- }
-
- intval = PyInt_AsLong(value);
- if (intval == -1 && PyErr_Occurred())
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- &intval, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_UINT64:
- {
- guint64 intval;
-
- if (!PyInt_Check(value) && !PyLong_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_UINT64");
- return NULL;
- }
-
- intval = PyLong_AsLongLong(value);
- if (intval == -1 && PyErr_Occurred())
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- &intval, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_INT64:
- {
- gint64 intval;
-
- if (!PyInt_Check(value) && !PyLong_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_INT64");
- return NULL;
- }
-
- intval = PyLong_AsUnsignedLongLong(value);
- if (intval == -1 && PyErr_Occurred())
- return NULL;
-
- ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
- &intval, flags, (GCancellable *) cancellable,
- &error);
- }
- break;
-
- case G_FILE_ATTRIBUTE_TYPE_INVALID:
-
- default:
- PyErr_SetString(PyExc_TypeError,
- "Unknown type specified in set_attribute\n");
- return NULL;
- }
-
- if (pyg_error_check(&error))
- return NULL;
-
- return PyBool_FromLong(ret);
-}
-%%
-override g_file_query_settable_attributes kwargs
-static PyObject *
-_wrap_g_file_query_settable_attributes(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable = NULL;
- GFileAttributeInfoList *ret;
- GError *error = NULL;
- gint i, n_infos;
- GFileAttributeInfo *infos;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|O:gio.File.query_settable_attributes",
- kwlist, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- ret = g_file_query_settable_attributes(G_FILE(self->obj),
- (GCancellable *) cancellable,
- &error);
- if (pyg_error_check(&error))
- return NULL;
-
- n_infos = ret->n_infos;
- infos = ret->infos;
-
- if (n_infos > 0) {
- py_ret = PyList_New(n_infos);
- for (i = 0; i < n_infos; i++) {
- PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
- }
- g_file_attribute_info_list_unref(ret);
- return py_ret;
-
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_file_query_writable_namespaces kwargs
-static PyObject *
-_wrap_g_file_query_writable_namespaces(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable = NULL;
- GFileAttributeInfoList *ret;
- GError *error = NULL;
- gint i, n_infos;
- GFileAttributeInfo *infos;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|O:gio.File.query_writable_namespaces",
- kwlist, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- ret = g_file_query_writable_namespaces(G_FILE(self->obj),
- (GCancellable *) cancellable,
- &error);
- if (pyg_error_check(&error))
- return NULL;
-
- n_infos = ret->n_infos;
- infos = ret->infos;
-
- if (n_infos > 0) {
- py_ret = PyList_New(n_infos);
- for (i = 0; i < n_infos; i++) {
- PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
- }
- g_file_attribute_info_list_unref(ret);
- return py_ret;
-
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_file_append_to_async kwargs
-static PyObject *
-_wrap_g_file_append_to_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "io_priority",
- "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OiOO:File.append_to_async",
- kwlist,
- &notify->callback,
- &py_flags, &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_append_to_async(G_FILE(self->obj), flags, io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_create_async kwargs
-static PyObject *
-_wrap_g_file_create_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "io_priority",
- "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OiOO:File.create_async",
- kwlist,
- &notify->callback,
- &py_flags, &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_create_async(G_FILE(self->obj), flags, io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_create_readwrite_async kwargs
-static PyObject *
-_wrap_g_file_create_readwrite_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "io_priority",
- "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OiOO:File.create_readwrite_async",
- kwlist,
- &notify->callback,
- &py_flags, &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_create_readwrite_async(G_FILE(self->obj), flags, io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_open_readwrite_async kwargs
-static PyObject *
-_wrap_g_file_open_readwrite_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority",
- "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:File.open_readwrite_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_open_readwrite_async(G_FILE(self->obj), io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_replace_readwrite_async kwargs
-static PyObject *
-_wrap_g_file_replace_readwrite_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
- "io_priority", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- char *etag = NULL;
- gboolean make_backup = TRUE;
- PyObject *py_backup = Py_True;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|zOOiOO:File.replace_readwrite_async",
- kwlist,
- &notify->callback,
- &etag, &py_backup,
- &flags, &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_replace_readwrite_async(G_FILE(self->obj), etag, make_backup, flags,
- io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_replace_async kwargs
-static PyObject *
-_wrap_g_file_replace_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
- "io_priority", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- char *etag = NULL;
- gboolean make_backup = TRUE;
- PyObject *py_backup = Py_True;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|zOOiOO:File.replace_async",
- kwlist,
- &notify->callback,
- &etag, &py_backup,
- &py_flags, &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_replace_async(G_FILE(self->obj), etag, make_backup, flags,
- io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_query_info_async kwargs
-static PyObject *
-_wrap_g_file_query_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "attributes", "callback", "flags",
- "io_priority", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
- PyObject *py_flags = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- char *attributes;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|OiOO:File.query_info_async",
- kwlist,
- &attributes,
- &notify->callback,
- &flags, &io_priority,
- &pycancellable,
- &notify->data)) {
- /* To preserve compatibility with 2.16 we also allow swapped
- * 'attributes' and 'callback'. FIXME: Remove for 3.0. */
- static char *old_kwlist[] = { "callback", "attributes", "flags",
- "io_priority", "cancellable", "user_data", NULL };
- PyObject *exc_type, *exc_value, *exc_traceback;
-
- PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "Os|OiOO:File.query_info_async",
- old_kwlist,
- &notify->callback,
- &attributes,
- &flags, &io_priority,
- &pycancellable,
- &notify->data)
- || !pygio_notify_callback_is_valid(notify)) {
- /* Report the error with new parameters. */
- PyErr_Restore(exc_type, exc_value, exc_traceback);
- goto error;
- }
-
- Py_XDECREF(exc_type);
- Py_XDECREF(exc_value);
- Py_XDECREF(exc_traceback);
- }
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_query_info_async(G_FILE(self->obj), attributes, flags,
- io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_replace_contents kwargs
-static PyObject *
-_wrap_g_file_replace_contents(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "contents", "etag", "make_backup",
- "flags", "cancellable", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- gsize length;
- gboolean make_backup = FALSE;
- char *contents;
- char *etag = NULL;
- char *new_etag = NULL;
- GError *error = NULL;
- gboolean ret;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s#|zbOO:File.replace_contents",
- kwlist,
- &contents,
- &length,
- &etag,
- &make_backup,
- &flags,
- &cancellable))
- {
- return NULL;
- }
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- pyg_begin_allow_threads;
-
- ret = g_file_replace_contents(G_FILE(self->obj), contents, length, etag,
- make_backup, flags, &new_etag, cancellable,
- &error);
-
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret) {
- py_ret = PyString_FromString(new_etag);
- } else {
- py_ret = Py_None;
- Py_INCREF(py_ret);
- }
-
- g_free(new_etag);
- return py_ret;
-}
-%%
-override g_file_replace_contents_finish kwargs
-static PyObject *
-_wrap_g_file_replace_contents_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *res;
- gchar *etag_out = NULL;
- GError *error = NULL;
- gboolean ret;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:File.replace_contents_finish",
- kwlist,
- &PyGAsyncResult_Type,
- &res))
- return NULL;
-
- ret = g_file_replace_contents_finish(G_FILE(self->obj),
- G_ASYNC_RESULT(res->obj), &etag_out,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret) {
- py_ret = PyString_FromString(etag_out);
- return py_ret;
- } else {
- py_ret = Py_None;
- Py_INCREF(py_ret);
- }
-
- g_free(etag_out);
- return py_ret;
-}
-%%
-override g_file_replace_contents_async kwargs
-static PyObject *
-_wrap_g_file_replace_contents_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "contents", "callback", "etag", "make_backup",
- "flags", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- PyGIONotify *notify;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- gsize length;
- gboolean make_backup = FALSE;
- char *contents;
- char *etag = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s#O|zbOOO:File.replace_contents_async",
- kwlist,
- &contents,
- &length,
- &notify->callback,
- &etag,
- &make_backup,
- &py_flags,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
- pygio_notify_copy_buffer(notify, contents, length);
-
- g_file_replace_contents_async(G_FILE(self->obj),
- notify->buffer,
- notify->buffer_size,
- etag,
- make_backup,
- flags,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override-slot GFile.tp_richcompare
-static PyObject *
-_wrap_g_file_tp_richcompare(PyGObject *self, PyGObject *other, int op)
-{
- PyObject *result;
-
- if (PyObject_TypeCheck(self, &PyGFile_Type)
- && PyObject_TypeCheck(other, &PyGFile_Type)) {
- GFile *file1 = G_FILE(self->obj);
- GFile *file2 = G_FILE(other->obj);
-
- switch (op) {
- case Py_EQ:
- result = (g_file_equal(file1, file2)
- ? Py_True : Py_False);
- break;
- case Py_NE:
- result = (!g_file_equal(file1, file2)
- ? Py_True : Py_False);
- break;
- default:
- result = Py_NotImplemented;
- }
- }
- else
- result = Py_NotImplemented;
-
- Py_INCREF(result);
- return result;
-}
-%%
-override-slot GFile.tp_hash
-static long
-_wrap_g_file_tp_hash(PyGObject *self)
-{
- return g_file_hash(G_FILE(self->obj));
-}
-%%
-override-slot GFile.tp_repr
-static PyObject *
-_wrap_g_file_tp_repr(PyGObject *self)
-{
- char *uri = g_file_get_uri(G_FILE(self->obj));
- gchar *representation;
- PyObject *result;
-
- if (uri) {
- representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
- g_free(uri);
- }
- else
- representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
-%%
-override g_file_eject_mountable kwargs
-static PyObject *
-_wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags",
- "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- GFileCreateFlags flags = G_FILE_CREATE_NONE;
- PyObject *py_flags = NULL;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:File.eject_mountable",
- kwlist,
- &notify->callback,
- &flags,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_eject_mountable(G_FILE(self->obj), flags, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_eject_mountable_with_operation kwargs
-static PyObject *
-_wrap_g_file_eject_mountable_with_operation(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:File.eject_mountable_with_operation",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_eject_mountable_with_operation(G_FILE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_find_enclosing_mount_async kwargs
-static PyObject *
-_wrap_g_file_find_enclosing_mount_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority",
- "cancellable", "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:File.enclosing_mount_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_find_enclosing_mount_async(G_FILE(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_query_filesystem_info_async kwargs
-static PyObject *
-_wrap_g_file_query_filesystem_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "attributes", "callback",
- "io_priority", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- char *attributes;
- int io_priority = G_PRIORITY_DEFAULT;
- GCancellable *cancellable = NULL;
- PyGObject *py_cancellable = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|iOO:gio.File.query_filesystem_info_async",
- kwlist,
- &attributes,
- &notify->callback,
- &io_priority,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_query_filesystem_info_async(G_FILE(self->obj),
- attributes,
- io_priority,
- (GCancellable *) cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_set_attributes_async kwargs
-static PyObject *
-_wrap_g_file_set_attributes_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "info", "callback", "flags",
- "io_priority", "cancellable", "user_data", NULL };
- PyGObject *info;
- PyGIONotify *notify;
- GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
- int io_priority = G_PRIORITY_DEFAULT;
- GCancellable *cancellable = NULL;
- PyGObject *py_cancellable = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O|OiOO:gio.File.set_attributes_async",
- kwlist,
- &PyGFileInfo_Type,
- &info,
- &notify->callback,
- &flags,
- &io_priority,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_set_attributes_async(G_FILE(self->obj),
- G_FILE_INFO(info->obj),
- flags,
- io_priority,
- (GCancellable *) cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-
-%%
-override g_file_set_attributes_finish kwargs
-static PyObject *
-_wrap_g_file_set_attributes_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *res;
- GFileInfo *info = NULL;
- GError *error = NULL;
- gboolean ret;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:File.set_attributes_finish",
- kwlist,
- &PyGAsyncResult_Type,
- &res))
- return NULL;
-
- ret = g_file_set_attributes_finish(G_FILE(self->obj),
- G_ASYNC_RESULT(res->obj), &info,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret) {
- py_ret = pygobject_new((GObject *)info);
- } else {
- py_ret = Py_None;
- Py_INCREF(py_ret);
- }
-
- return py_ret;
-}
-%%
-override g_file_set_display_name_async kwargs
-static PyObject *
-_wrap_g_file_set_display_name_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "display_name", "callback",
- "io_priority", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- char *display_name;
- int io_priority = G_PRIORITY_DEFAULT;
- GCancellable *cancellable = NULL;
- PyGObject *py_cancellable = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|iOO:gio.File.set_display_name_async",
- kwlist,
- &display_name,
- &notify->callback,
- &io_priority,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_set_display_name_async(G_FILE(self->obj),
- display_name,
- io_priority,
- (GCancellable *) cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_poll_mountable kwargs
-static PyObject *
-_wrap_g_file_poll_mountable(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OO:File.poll_mountable",
- kwlist,
- &notify->callback,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_poll_mountable(G_FILE(self->obj), cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_start_mountable kwargs
-static PyObject *
-_wrap_g_file_start_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "start_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- GDriveStartFlags flags = G_DRIVE_START_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:File.start_mountable",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_start_mountable(G_FILE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_stop_mountable kwargs
-static PyObject *
-_wrap_g_file_stop_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.File.stop_mountable",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_stop_mountable(G_FILE(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-
-/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
-/* GFile.load_partial_contents_finish: No ArgType for char** */
diff --git a/gio/gfileattribute.override b/gio/gfileattribute.override
deleted file mode 100644
index e51ec63..0000000
--- a/gio/gfileattribute.override
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Gian Mario Tagliaretti
- *
- * gfileattribute.override: module overrides for GFileAttribute*
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-headers
-
-extern PyTypeObject PyGFileAttributeInfo_Type;
-
-typedef struct {
- PyObject_HEAD
- const GFileAttributeInfo *info;
-} PyGFileAttributeInfo;
-
-static PyObject *
-pygio_file_attribute_info_tp_new(PyTypeObject *type)
-{
- PyGFileAttributeInfo *self;
- GFileAttributeInfo *info = NULL;
-
- self = (PyGFileAttributeInfo *) PyObject_NEW(PyGFileAttributeInfo,
- &PyGFileAttributeInfo_Type);
- self->info = info;
- return (PyObject *) self;
-}
-
-static PyMethodDef pyg_file_attribute_info_methods[] = {
- { NULL, 0, 0 }
-};
-
-static PyObject *
-pyg_file_attribute_info__get_name(PyObject *self, void *closure)
-{
- const gchar *ret;
-
- ret = ((PyGFileAttributeInfo*)self)->info->name;
- if (ret)
- return PyString_FromString(ret);
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-static PyObject *
-pyg_file_attribute_info__get_type(PyObject *self, void *closure)
-{
- gint ret;
-
- ret = ((PyGFileAttributeInfo*)self)->info->type;
- return pyg_enum_from_gtype(G_TYPE_FILE_ATTRIBUTE_TYPE, ret);
-}
-
-static PyObject *
-pyg_file_attribute_info__get_flags(PyObject *self, void *closure)
-{
- guint ret;
-
- ret = ((PyGFileAttributeInfo*)self)->info->flags;
- return pyg_flags_from_gtype(G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS, ret);
-}
-
-static const PyGetSetDef pyg_file_attribute_info_getsets[] = {
- { "name", (getter)pyg_file_attribute_info__get_name, (setter)0 },
- { "type", (getter)pyg_file_attribute_info__get_type, (setter)0 },
- { "flags", (getter)pyg_file_attribute_info__get_flags, (setter)0 },
- { NULL, (getter)0, (setter)0 },
-};
-
-PyTypeObject PyGFileAttributeInfo_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- "gio.FileAttributeInfo", /* tp_name */
- sizeof(PyGFileAttributeInfo), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)0, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)0, /* tp_getattr */
- (setattrfunc)0, /* tp_setattr */
- (cmpfunc)0, /* tp_compare */
- (reprfunc)0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- (hashfunc)0, /* tp_hash */
- (ternaryfunc)0, /* tp_call */
- (reprfunc)0, /* tp_str */
- (getattrofunc)0, /* tp_getattro */
- (setattrofunc)0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- "Holds information about an attribute", /* Documentation string */
- (traverseproc)0, /* tp_traverse */
- (inquiry)0, /* tp_clear */
- (richcmpfunc)0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)0, /* tp_iter */
- (iternextfunc)0, /* tp_iternext */
- (struct PyMethodDef*)pyg_file_attribute_info_methods, /* tp_methods */
- 0, /* tp_members */
- (struct PyGetSetDef*)pyg_file_attribute_info_getsets, /* tp_getset */
- (PyTypeObject *)0, /* tp_base */
- (PyObject *)0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)0, /* tp_init */
- 0, /* tp_alloc */
- (newfunc)pygio_file_attribute_info_tp_new, /* tp_new */
- 0, /* tp_free */
- (inquiry)0, /* tp_is_gc */
- (PyObject *)0, /* tp_bases */
-};
-
-PyObject*
-pyg_file_attribute_info_new(const GFileAttributeInfo *info)
-{
- PyGFileAttributeInfo *self;
-
- self = (PyGFileAttributeInfo *)PyObject_NEW(PyGFileAttributeInfo,
- &PyGFileAttributeInfo_Type);
- if (G_UNLIKELY(self == NULL))
- return NULL;
- if (info)
- self->info = info;
- return (PyObject *)self;
-}
-
-%%
-init
-if (PyType_Ready(&PyGFileAttributeInfo_Type) < 0) {
- g_return_if_reached();
-}
-if (PyDict_SetItemString(d, "FileAttributeInfo",
- (PyObject *)&PyGFileAttributeInfo_Type) < 0) {
- g_return_if_reached();
-}
diff --git a/gio/gfileenumerator.override b/gio/gfileenumerator.override
deleted file mode 100644
index db29550..0000000
--- a/gio/gfileenumerator.override
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * gfileenumerator.override: module overrides for GFileEnumerator
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override-slot GFileEnumerator.tp_iter
-static PyObject*
-_wrap_g_file_enumerator_tp_iter(PyGObject *self)
-{
- Py_INCREF (self);
- return (PyObject *) self;
-}
-%%
-override-slot GFileEnumerator.tp_iternext
-static PyObject*
-_wrap_g_file_enumerator_tp_iternext(PyGObject *iter)
-{
- GFileInfo *file_info;
- GError *error = NULL;
-
- if (!iter->obj) {
- PyErr_SetNone(PyExc_StopIteration);
- return NULL;
- }
-
- file_info = g_file_enumerator_next_file(G_FILE_ENUMERATOR(iter->obj),
- NULL,
- &error);
- if (pyg_error_check(&error)) {
- return NULL;
- }
-
- if (!file_info) {
- PyErr_SetNone(PyExc_StopIteration);
- return NULL;
- }
-
- return pygobject_new((GObject*)file_info);
-}
-%%
-override g_file_enumerator_next_files_async kwargs
-static PyObject *
-_wrap_g_file_enumerator_next_files_async(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "num_files", "callback",
- "io_priority", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- int num_files;
- int io_priority = G_PRIORITY_DEFAULT;
- GCancellable *cancellable = NULL;
- PyGObject *py_cancellable = NULL;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "iO|iOO:gio.FileEnumerator.enumerate_next_files_async",
- kwlist,
- &num_files,
- &notify->callback,
- &io_priority,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_enumerator_next_files_async(G_FILE_ENUMERATOR(self->obj),
- num_files,
- io_priority,
- (GCancellable *) cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_file_enumerator_next_files_finish kwargs
-static PyObject *
-_wrap_g_file_enumerator_next_files_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GList *next_files, *l;
- GError *error = NULL;
- PyObject *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.FileEnumerator.next_files_finish",
- kwlist,
- &PyGAsyncResult_Type, &result))
- return NULL;
-
- next_files = g_file_enumerator_next_files_finish(G_FILE_ENUMERATOR(self->obj),
- G_ASYNC_RESULT(result->obj),
- &error);
- if (pyg_error_check(&error))
- return NULL;
-
- ret = PyList_New(0);
- for (l = next_files; l; l = l->next) {
- GFileInfo *file_info = l->data;
- PyObject *item = pygobject_new((GObject *)file_info);
- PyList_Append(ret, item);
- Py_DECREF(item);
- g_object_unref(file_info);
- }
- g_list_free(next_files);
-
- return ret;
-}
-%%
-override g_file_enumerator_close_async kwargs
-static PyObject *
-_wrap_g_file_enumerator_close_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority", "cancellable",
- "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:gio.FileEnumerator.close_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_enumerator_close_async(G_FILE_ENUMERATOR(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gfileinfo.override b/gio/gfileinfo.override
deleted file mode 100644
index 730e91b..0000000
--- a/gio/gfileinfo.override
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- * 2009 Gian Mario Tagliaretti
- *
- * gfileinfo.override: module overrides for GFileInfo
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-headers
-
-#ifndef G_TYPE_FILE_ATTRIBUTE_MATCHER
-#define G_TYPE_FILE_ATTRIBUTE_MATCHER (_g_file_attribute_matcher_get_type ())
-
-static GType _g_file_attribute_matcher_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_boxed_type_register_static ("GFileAttributeMatcher",
- (GBoxedCopyFunc)g_file_attribute_matcher_ref,
- (GBoxedFreeFunc)g_file_attribute_matcher_unref);
-
- return our_type;
-}
-#endif
-
-%%
-override g_file_info_list_attributes kwargs
-static PyObject *
-_wrap_g_file_info_list_attributes(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- char *kwlist[] = { "name_space", NULL};
- gchar *name_space = NULL;
- gchar **names;
- gchar **n;
- PyObject *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|z:gio.FileInfo.list_attributes",
- kwlist, &name_space))
- return NULL;
-
- names = g_file_info_list_attributes(G_FILE_INFO(self->obj),
- name_space);
-
- ret = PyList_New(0);
- n = names;
- while (n && *n) {
- PyObject *item = PyString_FromString(n[0]);
- PyList_Append(ret, item);
- Py_DECREF(item);
-
- n++;
- }
-
- g_strfreev(names);
- return ret;
-}
-%%
-override g_file_info_get_modification_time noargs
-static PyObject *
-_wrap_g_file_info_get_modification_time(PyGObject *self, PyObject *unused)
-{
- GTimeVal timeval;
-
- g_file_info_get_modification_time(G_FILE_INFO(self->obj), &timeval);
- return pyglib_float_from_timeval(timeval);
-}
-%%
-override g_file_info_set_modification_time kwargs
-static PyObject *
-_wrap_g_file_info_set_modification_time(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- char *kwlist[] = { "mtime", NULL};
- double py_mtime = 0.0;
- GTimeVal ttime, *mtime;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "d:gio.FileInfo.set_modification_time",
- kwlist, &py_mtime))
- return NULL;
-
- if (py_mtime > 0.0) {
- ttime.tv_sec = (glong) py_mtime;
- ttime.tv_usec = (glong)((py_mtime - ttime.tv_sec) * G_USEC_PER_SEC);
- mtime = &ttime;
- } else if (py_mtime == 0.0) {
- mtime = NULL;
- } else {
- PyErr_SetString(PyExc_ValueError, "mtime must be >= 0.0");
- return NULL;
- }
-
- g_file_info_set_modification_time(G_FILE_INFO(self->obj), mtime);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-/* GFileInfo.get_attribute_data: No ArgType for GFileAttributeType* */
-/* GFileInfo.set_attribute: No ArgType for gpointer */
diff --git a/gio/gfileinputstream.override b/gio/gfileinputstream.override
deleted file mode 100644
index 5190a13..0000000
--- a/gio/gfileinputstream.override
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gfileinputstream.override: module overrides for GFileInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-override g_file_input_stream_query_info_async kwargs
-static PyObject *
-_wrap_g_file_input_stream_query_info_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "attributes", "callback",
- "io_priority", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- char *attributes;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|iOO:gio.FileInputStream.query_info_async",
- kwlist,
- &attributes,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_input_stream_query_info_async(G_FILE_INPUT_STREAM(self->obj),
- attributes, io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gfileiostream.override b/gio/gfileiostream.override
deleted file mode 100644
index 7be6124..0000000
--- a/gio/gfileiostream.override
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gfileiostream.override: module overrides for GFileIOStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-override g_file_io_stream_query_info_async kwargs
-static PyObject *
-_wrap_g_file_io_stream_query_info_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "attributes", "callback",
- "io_priority", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- char *attributes;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|iOO:gio.FileIOStream.query_info_async",
- kwlist,
- &attributes,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_io_stream_query_info_async(G_FILE_IO_STREAM(self->obj),
- attributes, io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gfileoutputstream.override b/gio/gfileoutputstream.override
deleted file mode 100644
index c5c184d..0000000
--- a/gio/gfileoutputstream.override
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gfileoutputstream.override: module overrides for GFileOuputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-override g_file_output_stream_query_info_async kwargs
-static PyObject *
-_wrap_g_file_output_stream_query_info_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "attributes", "callback",
- "io_priority", "cancellable", "user_data", NULL };
- GCancellable *cancellable;
- PyGObject *pycancellable = NULL;
- int io_priority = G_PRIORITY_DEFAULT;
- char *attributes;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sO|iOO:gio.FileOutputStream.query_info_async",
- kwlist,
- &attributes,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_file_output_stream_query_info_async(G_FILE_OUTPUT_STREAM(self->obj),
- attributes, io_priority, cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gicon.override b/gio/gicon.override
deleted file mode 100644
index c429556..0000000
--- a/gio/gicon.override
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygtk- Python bindings for the GTK toolkit.
- * Copyright (C) 2008 Johan Dahlin
- *
- * gicon.override: module overrides for GIcon and related types
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-ignore-glob
- g_icon_hash
- g_themed_icon_new_from_names
- g_themed_icon_new_with_default_fallbacks
-%%
-override-slot GIcon.tp_richcompare
-static PyObject *
-_wrap_g_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
-{
- PyObject *result;
-
- if (PyObject_TypeCheck(self, &PyGIcon_Type)
- && PyObject_TypeCheck(other, &PyGIcon_Type)) {
- GIcon *icon1 = G_ICON(self->obj);
- GIcon *icon2 = G_ICON(other->obj);
-
- switch (op) {
- case Py_EQ:
- result = (g_icon_equal(icon1, icon2)
- ? Py_True : Py_False);
- break;
- case Py_NE:
- result = (!g_icon_equal(icon1, icon2)
- ? Py_True : Py_False);
- break;
- default:
- result = Py_NotImplemented;
- }
- }
- else
- result = Py_NotImplemented;
-
- Py_INCREF(result);
- return result;
-}
-%%
-override-slot GIcon.tp_hash
-static long
-_wrap_g_icon_tp_hash(PyGObject *self)
-{
- return g_icon_hash(G_ICON(self->obj));
-}
-%%
-override g_loadable_icon_load kwargs
-static PyObject *
-_wrap_g_loadable_icon_load(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "size", "cancellable", NULL };
- int size = 0;
- char *type = NULL;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- GError *error = NULL;
- GInputStream *stream;
- PyObject *result;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|iO:gio.LoadableIcon.load",
- kwlist,
- &size, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- stream = g_loadable_icon_load(G_LOADABLE_ICON(self->obj), size, &type,
- cancellable, &error);
- if (pyg_error_check(&error))
- return NULL;
-
- result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
- g_free(type);
- return result;
-}
-%%
-override g_loadable_icon_load_async kwargs
-static PyObject *
-_wrap_g_loadable_icon_load_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "size", "cancellable", "user_data", NULL };
- int size = 0;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:gio.LoadableIcon.load_async",
- kwlist,
- &notify->callback, &size, &pycancellable, &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_loadable_icon_load_async(G_LOADABLE_ICON(self->obj),
- size,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_loadable_icon_load_finish kwargs
-static PyObject *
-_wrap_g_loadable_icon_load_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "res", NULL };
- PyGObject *res;
- char *type = NULL;
- GError *error = NULL;
- GInputStream *stream;
- PyObject *result;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.LoadableIcon.load_finish",
- kwlist,
- &PyGAsyncResult_Type, &res))
- return NULL;
-
- stream = g_loadable_icon_load_finish(G_LOADABLE_ICON(self->obj),
- G_ASYNC_RESULT(res->obj), &type, &error);
- if (pyg_error_check(&error))
- return NULL;
-
- result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
- g_free(type);
- return result;
-}
-%%
-override-slot GFileIcon.tp_repr
-static PyObject *
-_wrap_g_file_icon_tp_repr(PyGObject *self)
-{
- GFile *file = g_file_icon_get_file(G_FILE_ICON(self->obj));
- char *uri = (file ? g_file_get_uri(file) : NULL);
- gchar *representation;
- PyObject *result;
-
- if (uri) {
- representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
- g_free(uri);
- }
- else
- representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
-%%
-new-constructor G_TYPE_THEMED_ICON
-%%
-override g_themed_icon_new kwargs
-static int
-_wrap_g_themed_icon_new(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "name", "use_default_fallbacks", NULL };
- PyObject *name;
- gboolean use_default_fallbacks = FALSE;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:gio.ThemedIcon.__init__",
- kwlist, &name, &use_default_fallbacks))
- return -1;
-
- if (PyString_Check(name)) {
- pygobject_construct(self,
- "name", PyString_AsString(name),
- "use-default-fallbacks", use_default_fallbacks, NULL);
- return 0;
- }
- else if (PySequence_Check(name)) {
- PyObject *tuple = PySequence_Tuple(name);
-
- if (tuple) {
- int k;
- int length = PyTuple_Size(tuple);
- char **names = g_new(char *, length + 1);
-
- for (k = 0; k < length; k++) {
- PyObject *str = PyTuple_GetItem(tuple, k);
- if (str && PyString_Check(str))
- names[k] = PyString_AsString(str);
- else {
- Py_DECREF(tuple);
- g_free(names);
- goto error;
- }
- }
-
- names[length] = NULL;
- pygobject_construct(self,
- "names", names,
- "use-default-fallbacks", use_default_fallbacks, NULL);
- Py_DECREF(tuple);
- g_free(names);
- return 0;
- }
- }
-
- error:
- if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError,
- "argument 1 of gio.ThemedIcon.__init__ "
- "must be either a string or a sequence of strings");
- }
- return -1;
-}
-%%
-override g_themed_icon_get_names noargs
-static PyObject *
-_wrap_g_themed_icon_get_names(PyGObject *self)
-{
- const char * const *names;
- PyObject *ret;
-
- names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
-
- ret = PyList_New(0);
- while (names && *names) {
- PyObject *item = PyString_FromString(names[0]);
- PyList_Append(ret, item);
- Py_DECREF(item);
-
- names++;
- }
-
- return ret;
-}
-%%
-override-slot GThemedIcon.tp_repr
-static PyObject *
-_wrap_g_themed_icon_tp_repr(PyGObject *self)
-{
- const char * const *names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
- GString *representation = g_string_new(NULL);
- PyObject *result;
-
- g_string_append_printf(representation, "<%s at %p: ", self->ob_type->tp_name, self);
-
- if (names) {
- gboolean first_name = TRUE;
- while (*names) {
- if (!first_name)
- g_string_append(representation, ", ");
- else
- first_name = FALSE;
-
- g_string_append(representation, *names++);
- }
- }
-
- g_string_append(representation, ">");
- result = PyString_FromString(representation->str);
- g_string_free(representation, TRUE);
- return result;
-}
-%%
-override g_emblemed_icon_get_emblems noargs
-static PyObject *
-_wrap_g_emblemed_icon_get_emblems(PyGObject *self)
-{
- GList *list;
- PyObject *ret;
-
- list = g_emblemed_icon_get_emblems(G_EMBLEMED_ICON(self->obj));
-
- PYLIST_FROMGLIST(ret, list, pygobject_new(list_item), NULL, NULL);
-
- return ret;
-}
diff --git a/gio/ginputstream.override b/gio/ginputstream.override
deleted file mode 100644
index 260b2fc..0000000
--- a/gio/ginputstream.override
+++ /dev/null
@@ -1,344 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * ginputstream.override: module overrides for GInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-headers
-#define BUFSIZE 8192
-
-%%
-override g_input_stream_read kwargs
-static PyObject *
-_wrap_g_input_stream_read(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "count", "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- PyObject *v;
- GCancellable *cancellable;
- long count = -1;
- GError *error = NULL;
- size_t bytesread, buffersize, chunksize;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|lO:InputStream.read",
- kwlist, &count,
- &pycancellable))
- return NULL;
-
- buffersize = (count < 0 ? BUFSIZE : count);
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- v = PyString_FromStringAndSize((char *)NULL, buffersize);
- if (v == NULL)
- return NULL;
-
- bytesread = 0;
- for (;;)
- {
- pyg_begin_allow_threads;
- errno = 0;
- chunksize = g_input_stream_read(G_INPUT_STREAM(self->obj),
- PyString_AS_STRING((PyStringObject *)v) + bytesread,
- buffersize - bytesread, cancellable,
- &error);
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error)) {
- Py_DECREF(v);
- return NULL;
- }
- if (chunksize == 0) {
- /* End of file. */
- break;
- }
-
- bytesread += chunksize;
- if (bytesread < buffersize) {
- /* g_input_stream_read() decided to not read full buffer. We
- * then return early too, even if 'count' is less than 0.
- */
- break;
- }
-
- if (count < 0) {
- buffersize += BUFSIZE;
- if (_PyString_Resize(&v, buffersize) < 0)
- return NULL;
- }
- else {
- /* Got what was requested. */
- break;
- }
- }
-
- if (bytesread != buffersize)
- _PyString_Resize(&v, bytesread);
-
- return v;
-}
-%%
-override g_input_stream_read_all kwargs
-static PyObject *
-_wrap_g_input_stream_read_all(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "count", "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- PyObject *v;
- GCancellable *cancellable;
- long count = -1;
- GError *error = NULL;
- size_t bytesread, buffersize, chunksize;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|lO:InputStream.read",
- kwlist, &count,
- &pycancellable))
- return NULL;
-
- buffersize = (count < 0 ? BUFSIZE : count);
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- v = PyString_FromStringAndSize((char *)NULL, buffersize);
- if (v == NULL)
- return NULL;
-
- bytesread = 0;
- for (;;)
- {
- pyg_begin_allow_threads;
- errno = 0;
- g_input_stream_read_all(G_INPUT_STREAM(self->obj),
- PyString_AS_STRING((PyStringObject *)v) + bytesread,
- buffersize - bytesread,
- &chunksize,
- cancellable, &error);
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error)) {
- Py_DECREF(v);
- return NULL;
- }
-
- bytesread += chunksize;
- if (bytesread < buffersize || chunksize == 0) {
- /* End of file. */
- break;
- }
-
- if (count < 0) {
- buffersize += BUFSIZE;
- if (_PyString_Resize(&v, buffersize) < 0)
- return NULL;
- }
- else {
- /* Got what was requested. */
- break;
- }
- }
-
- if (bytesread != buffersize)
- _PyString_Resize(&v, bytesread);
-
- return v;
-}
-%%
-override g_input_stream_read_async kwargs
-static PyObject *
-_wrap_g_input_stream_read_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "count", "callback", "io_priority",
- "cancellable", "user_data", NULL };
- long count = -1;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "lO|iOO:InputStream.read_async",
- kwlist,
- &count,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- if (!pygio_notify_allocate_buffer(notify, count))
- goto error;
-
- pygio_notify_reference_callback(notify);
- pygio_notify_attach_to_result(notify);
-
- g_input_stream_read_async(G_INPUT_STREAM(self->obj),
- notify->buffer,
- notify->buffer_size,
- io_priority,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_input_stream_read_finish kwargs
-static PyObject *
-_wrap_g_input_stream_read_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GError *error = NULL;
- Py_ssize_t bytesread;
- PyGIONotify *notify;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.InputStream.read_finish",
- kwlist, &PyGAsyncResult_Type, &result))
- return NULL;
-
- bytesread = g_input_stream_read_finish(G_INPUT_STREAM(self->obj),
- G_ASYNC_RESULT(result->obj), &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (bytesread == 0)
- return PyString_FromString("");
-
- notify = pygio_notify_get_attached(result);
- return PyString_FromStringAndSize(notify->buffer, bytesread);
-}
-%%
-override g_input_stream_close_async kwargs
-static PyObject *
-_wrap_g_input_stream_close_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority", "cancellable",
- "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:InputStream.close_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_input_stream_close_async(G_INPUT_STREAM(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_input_stream_skip_async kwargs
-static PyObject *
-_wrap_g_input_stream_skip_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "count", "callback", "io_priority",
- "cancellable", "user_data", NULL };
- long count = -1;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "lO|iOO:InputStream.skip_async",
- kwlist,
- &count,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
-
- g_input_stream_skip_async(G_INPUT_STREAM(self->obj),
- count,
- io_priority,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gio-types.defs b/gio/gio-types.defs
deleted file mode 100644
index 331e0bc..0000000
--- a/gio/gio-types.defs
+++ /dev/null
@@ -1,807 +0,0 @@
-;; -*- scheme -*-
-
-; interface definitions ...
-
-(define-interface AppInfo
- (in-module "gio")
- (c-name "GAppInfo")
- (gtype-id "G_TYPE_APP_INFO")
-)
-
-(define-interface AsyncInitable
- (in-module "gio")
- (c-name "GAsyncInitable")
- (gtype-id "G_TYPE_ASYNC_INITABLE")
-)
-
-(define-interface AsyncResult
- (in-module "gio")
- (c-name "GAsyncResult")
- (gtype-id "G_TYPE_ASYNC_RESULT")
-)
-
-(define-interface Drive
- (in-module "gio")
- (c-name "GDrive")
- (gtype-id "G_TYPE_DRIVE")
-)
-
-(define-interface File
- (docstring
-"File(arg, path=None, uri=None) -> gio.File subclass\n"
-"\n"
-"If arg is specified; creates a GFile with the given argument from the\n"
-"command line. The value of arg can be either a URI, an absolute path\n"
-"or a relative path resolved relative to the current working directory.\n"
-"If path is specified, create a file from an absolute or relative path.\n"
-"If uri is specified, create a file from a URI.\n\n"
-"This operation never fails, but the returned object might not \n"
-"support any I/O operation if arg points to a malformed path.")
- (in-module "gio")
- (c-name "GFile")
- (gtype-id "G_TYPE_FILE")
-)
-
-(define-interface Icon
- (in-module "gio")
- (c-name "GIcon")
- (gtype-id "G_TYPE_ICON")
-)
-
-(define-interface Initable
- (in-module "gio")
- (c-name "GInitable")
- (gtype-id "G_TYPE_INITABLE")
-)
-
-(define-interface LoadableIcon
- (in-module "gio")
- (c-name "GLoadableIcon")
- (gtype-id "G_TYPE_LOADABLE_ICON")
-)
-
-(define-interface Mount
- (in-module "gio")
- (c-name "GMount")
- (gtype-id "G_TYPE_MOUNT")
-)
-
-(define-interface Seekable
- (in-module "gio")
- (c-name "GSeekable")
- (gtype-id "G_TYPE_SEEKABLE")
-)
-
-(define-interface SocketConnectable
- (in-module "gio")
- (c-name "GSocketConnectable")
- (gtype-id "G_TYPE_SOCKET_CONNECTABLE")
-)
-
-(define-interface Volume
- (in-module "gio")
- (c-name "GVolume")
- (gtype-id "G_TYPE_VOLUME")
-)
-
-; boxed definitions ...
-
-(define-boxed FileAttributeMatcher
- (in-module "gio")
- (c-name "GFileAttributeMatcher")
- (gtype-id "G_TYPE_FILE_ATTRIBUTE_MATCHER")
-)
-
-(define-boxed SrvTarget
- (in-module "gio")
- (c-name "GSrvTarget")
- (gtype-id "G_TYPE_SRV_TARGET")
-)
-
-; object definitions ...
-
-(define-object AppLaunchContext
- (in-module "gio")
- (parent "GObject")
- (c-name "GAppLaunchContext")
- (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT")
-)
-
-(define-object Cancellable
- (in-module "gio")
- (parent "GObject")
- (c-name "GCancellable")
- (gtype-id "G_TYPE_CANCELLABLE")
-)
-
-(define-object Emblem
- (in-module "gio")
- (parent "GObject")
- (c-name "GEmblem")
- (gtype-id "G_TYPE_EMBLEM")
-)
-
-(define-object EmblemedIcon
- (in-module "gio")
- (parent "GObject")
- (c-name "GEmblemedIcon")
- (gtype-id "G_TYPE_EMBLEMED_ICON")
-)
-
-(define-object FileEnumerator
- (in-module "gio")
- (parent "GObject")
- (c-name "GFileEnumerator")
- (gtype-id "G_TYPE_FILE_ENUMERATOR")
-)
-
-(define-object FileInfo
- (in-module "gio")
- (parent "GObject")
- (c-name "GFileInfo")
- (gtype-id "G_TYPE_FILE_INFO")
-)
-
-(define-object FileMonitor
- (in-module "gio")
- (parent "GObject")
- (c-name "GFileMonitor")
- (gtype-id "G_TYPE_FILE_MONITOR")
-)
-
-(define-object InputStream
- (in-module "gio")
- (parent "GObject")
- (c-name "GInputStream")
- (gtype-id "G_TYPE_INPUT_STREAM")
-)
-
-(define-object FileInputStream
- (in-module "gio")
- (parent "GInputStream")
- (c-name "GFileInputStream")
- (gtype-id "G_TYPE_FILE_INPUT_STREAM")
-)
-
-(define-object FileIOStream
- (in-module "gio")
- (parent "GIOStream")
- (c-name "GFileIOStream")
- (gtype-id "G_TYPE_FILE_IO_STREAM")
-)
-
-(define-object FilterInputStream
- (in-module "gio")
- (parent "GInputStream")
- (c-name "GFilterInputStream")
- (gtype-id "G_TYPE_FILTER_INPUT_STREAM")
-)
-
-(define-object BufferedInputStream
- (in-module "gio")
- (parent "GFilterInputStream")
- (c-name "GBufferedInputStream")
- (gtype-id "G_TYPE_BUFFERED_INPUT_STREAM")
-)
-
-(define-object DataInputStream
- (in-module "gio")
- (parent "GFilterInputStream")
- (c-name "GDataInputStream")
- (gtype-id "G_TYPE_DATA_INPUT_STREAM")
-)
-
-(define-object MemoryInputStream
- (in-module "gio")
- (parent "GInputStream")
- (c-name "GMemoryInputStream")
- (gtype-id "G_TYPE_MEMORY_INPUT_STREAM")
-)
-
-(define-object MountOperation
- (in-module "gio")
- (parent "GObject")
- (c-name "GMountOperation")
- (gtype-id "G_TYPE_MOUNT_OPERATION")
-)
-
-(define-object InetAddress
- (in-module "gio")
- (parent "GObject")
- (c-name "GInetAddress")
- (gtype-id "G_TYPE_INET_ADDRESS")
-)
-
-(define-object InetSocketAddress
- (in-module "gio")
- (parent "GSocketAddress")
- (c-name "GInetSocketAddress")
- (gtype-id "G_TYPE_INET_SOCKET_ADDRESS")
-)
-
-(define-object NetworkAddress
- (in-module "gio")
- (parent "GObject")
- (c-name "GNetworkAddress")
- (gtype-id "G_TYPE_NETWORK_ADDRESS")
-)
-
-(define-object NetworkService
- (in-module "gio")
- (parent "GObject")
- (c-name "GNetworkService")
- (gtype-id "G_TYPE_NETWORK_SERVICE")
-)
-
-(define-object Resolver
- (in-module "gio")
- (parent "GObject")
- (c-name "GResolver")
- (gtype-id "G_TYPE_RESOLVER")
-)
-
-(define-object Socket
- (in-module "gio")
- (parent "GObject")
- (c-name "GSocket")
- (gtype-id "G_TYPE_SOCKET")
-)
-
-(define-object SocketAddress
- (in-module "gio")
- (parent "GObject")
- (c-name "GSocketAddress")
- (gtype-id "G_TYPE_SOCKET_ADDRESS")
-)
-
-(define-object SocketAddressEnumerator
- (in-module "gio")
- (parent "GObject")
- (c-name "GSocketAddressEnumerator")
- (gtype-id "G_TYPE_SOCKET_ADDRESS_ENUMERATOR")
-)
-
-(define-object SocketClient
- (in-module "gio")
- (parent "GObject")
- (c-name "GSocketClient")
- (gtype-id "G_TYPE_SOCKET_CLIENT")
-)
-
-(define-object SocketConnection
- (in-module "gio")
- (parent "GIOStream")
- (c-name "GSocketConnection")
- (gtype-id "G_TYPE_SOCKET_CONNECTION")
-)
-
-(define-object SocketControlMessage
- (in-module "gio")
- (parent "GObject")
- (c-name "GSocketControlMessage")
- (gtype-id "G_TYPE_SOCKET_CONTROL_MESSAGE")
-)
-
-(define-object SocketListener
- (in-module "gio")
- (parent "GObject")
- (c-name "GSocketListener")
- (gtype-id "G_TYPE_SOCKET_LISTENER")
-)
-
-(define-object SocketService
- (in-module "gio")
- (parent "GSocketListener")
- (c-name "GSocketService")
- (gtype-id "G_TYPE_SOCKET_SERVICE")
-)
-
-(define-object TcpConnection
- (in-module "gio")
- (parent "GSocketConnection")
- (c-name "GTcpConnection")
- (gtype-id "G_TYPE_TCP_CONNECTION")
-)
-
-(define-object ThreadedSocketService
- (in-module "gio")
- (parent "GSocketService")
- (c-name "GThreadedSocketService")
- (gtype-id "G_TYPE_THREADED_SOCKET_SERVICE")
-)
-
-(define-object IOStream
- (in-module "gio")
- (parent "GObject")
- (c-name "GIOStream")
- (gtype-id "G_TYPE_IO_STREAM")
-)
-
-(define-object OutputStream
- (in-module "gio")
- (parent "GObject")
- (c-name "GOutputStream")
- (gtype-id "G_TYPE_OUTPUT_STREAM")
-)
-
-(define-object MemoryOutputStream
- (in-module "gio")
- (parent "GOutputStream")
- (c-name "GMemoryOutputStream")
- (gtype-id "G_TYPE_MEMORY_OUTPUT_STREAM")
-)
-
-(define-object FilterOutputStream
- (in-module "gio")
- (parent "GOutputStream")
- (c-name "GFilterOutputStream")
- (gtype-id "G_TYPE_FILTER_OUTPUT_STREAM")
-)
-
-(define-object BufferedOutputStream
- (in-module "gio")
- (parent "GFilterOutputStream")
- (c-name "GBufferedOutputStream")
- (gtype-id "G_TYPE_BUFFERED_OUTPUT_STREAM")
-)
-
-(define-object DataOutputStream
- (in-module "gio")
- (parent "GFilterOutputStream")
- (c-name "GDataOutputStream")
- (gtype-id "G_TYPE_DATA_OUTPUT_STREAM")
-)
-
-(define-object FileOutputStream
- (in-module "gio")
- (parent "GOutputStream")
- (c-name "GFileOutputStream")
- (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
-)
-
-(define-object SimpleAsyncResult
- (in-module "gio")
- (parent "GObject")
- (c-name "GSimpleAsyncResult")
- (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
-)
-
-(define-object Vfs
- (in-module "gio")
- (parent "GObject")
- (c-name "GVfs")
- (gtype-id "G_TYPE_VFS")
-)
-
-(define-object VolumeMonitor
- (in-module "gio")
- (parent "GObject")
- (c-name "GVolumeMonitor")
- (gtype-id "G_TYPE_VOLUME_MONITOR")
-)
-
-(define-object NativeVolumeMonitor
- (in-module "gio")
- (parent "GVolumeMonitor")
- (c-name "GNativeVolumeMonitor")
- (gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR")
-)
-
-(define-object FileIcon
- (in-module "gio")
- (parent "GObject")
- (c-name "GFileIcon")
- (gtype-id "G_TYPE_FILE_ICON")
- (implements "GIcon")
- (implements "GLoadableIcon")
-)
-
-(define-object ThemedIcon
- (in-module "gio")
- (parent "GObject")
- (c-name "GThemedIcon")
- (gtype-id "G_TYPE_THEMED_ICON")
- (implements "GIcon")
-)
-
-
-
-;; Enumerations and flags ...
-
-(define-flags AppInfoCreateFlags
- (in-module "gio")
- (c-name "GAppInfoCreateFlags")
- (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS")
- (values
- '("none" "G_APP_INFO_CREATE_NONE")
- '("needs-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL")
- '("supports-uris" "G_APP_INFO_CREATE_SUPPORTS_URIS")
- )
-)
-
-(define-flags ConverterFlags
- (in-module "gio")
- (c-name "GConverterFlags")
- (gtype-id "G_TYPE_CONVERTER_FLAGS")
- (values
- '("no-flags" "G_CONVERTER_NO_FLAGS")
- '("input-at-end" "G_CONVERTER_INPUT_AT_END")
- '("flush" "G_CONVERTER_FLUSH")
- )
-)
-
-(define-enum ConverterResult
- (in-module "gio")
- (c-name "GConverterResult")
- (gtype-id "G_TYPE_CONVERTER_RESULT")
- (values
- '("error" "G_CONVERTER_ERROR")
- '("converted" "G_CONVERTER_CONVERTED")
- '("finished" "G_CONVERTER_FINISHED")
- '("flushed" "G_CONVERTER_FLUSHED")
- )
-)
-
-(define-enum DataStreamByteOrder
- (in-module "gio")
- (c-name "GDataStreamByteOrder")
- (gtype-id "G_TYPE_DATA_STREAM_BYTE_ORDER")
- (values
- '("big-endian" "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
- '("little-endian" "G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN")
- '("host-endian" "G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN")
- )
-)
-
-(define-enum DataStreamNewlineType
- (in-module "gio")
- (c-name "GDataStreamNewlineType")
- (gtype-id "G_TYPE_DATA_STREAM_NEWLINE_TYPE")
- (values
- '("lf" "G_DATA_STREAM_NEWLINE_TYPE_LF")
- '("cr" "G_DATA_STREAM_NEWLINE_TYPE_CR")
- '("cr-lf" "G_DATA_STREAM_NEWLINE_TYPE_CR_LF")
- '("any" "G_DATA_STREAM_NEWLINE_TYPE_ANY")
- )
-)
-
-(define-enum FileAttributeType
- (in-module "gio")
- (c-name "GFileAttributeType")
- (gtype-id "G_TYPE_FILE_ATTRIBUTE_TYPE")
- (values
- '("invalid" "G_FILE_ATTRIBUTE_TYPE_INVALID")
- '("string" "G_FILE_ATTRIBUTE_TYPE_STRING")
- '("byte-string" "G_FILE_ATTRIBUTE_TYPE_BYTE_STRING")
- '("boolean" "G_FILE_ATTRIBUTE_TYPE_BOOLEAN")
- '("uint32" "G_FILE_ATTRIBUTE_TYPE_UINT32")
- '("int32" "G_FILE_ATTRIBUTE_TYPE_INT32")
- '("uint64" "G_FILE_ATTRIBUTE_TYPE_UINT64")
- '("int64" "G_FILE_ATTRIBUTE_TYPE_INT64")
- '("object" "G_FILE_ATTRIBUTE_TYPE_OBJECT")
- '("stringv" "G_FILE_ATTRIBUTE_TYPE_STRINGV")
- )
-)
-
-(define-flags FileAttributeInfoFlags
- (in-module "gio")
- (c-name "GFileAttributeInfoFlags")
- (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS")
- (values
- '("none" "G_FILE_ATTRIBUTE_INFO_NONE")
- '("copy-with-file" "G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE")
- '("copy-when-moved" "G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED")
- )
-)
-
-(define-enum FileAttributeStatus
- (in-module "gio")
- (c-name "GFileAttributeStatus")
- (gtype-id "G_TYPE_FILE_ATTRIBUTE_STATUS")
- (values
- '("unset" "G_FILE_ATTRIBUTE_STATUS_UNSET")
- '("set" "G_FILE_ATTRIBUTE_STATUS_SET")
- '("error-setting" "G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING")
- )
-)
-
-(define-flags FileQueryInfoFlags
- (in-module "gio")
- (c-name "GFileQueryInfoFlags")
- (gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS")
- (values
- '("none" "G_FILE_QUERY_INFO_NONE")
- '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
- )
-)
-
-(define-flags FileCreateFlags
- (in-module "gio")
- (c-name "GFileCreateFlags")
- (gtype-id "G_TYPE_FILE_CREATE_FLAGS")
- (values
- '("none" "G_FILE_CREATE_NONE")
- '("private" "G_FILE_CREATE_PRIVATE")
- '("replace-destination" "G_FILE_CREATE_REPLACE_DESTINATION")
- )
-)
-
-(define-enum MountMountFlags
- (in-module "gio")
- (c-name "GMountMountFlags")
- (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
- (values
- '("none" "G_MOUNT_MOUNT_NONE")
- )
-)
-
-(define-flags MountUnmountFlags
- (in-module "gio")
- (c-name "GMountUnmountFlags")
- (gtype-id "G_TYPE_MOUNT_UNMOUNT_FLAGS")
- (values
- '("none" "G_MOUNT_UNMOUNT_NONE")
- '("force" "G_MOUNT_UNMOUNT_FORCE")
- )
-)
-
-(define-enum DriveStartFlags
- (in-module "gio")
- (c-name "GDriveStartFlags")
- (gtype-id "G_TYPE_DRIVE_START_FLAGS")
- (values
- '("none" "G_DRIVE_START_NONE")
- )
-)
-
-(define-enum DriveStartStopType
- (in-module "gio")
- (c-name "GDriveStartStopType")
- (gtype-id "G_TYPE_DRIVE_START_STOP_TYPE")
- (values
- '("unknown" "G_DRIVE_START_STOP_TYPE_UNKNOWN")
- '("shutdown" "G_DRIVE_START_STOP_TYPE_SHUTDOWN")
- '("network" "G_DRIVE_START_STOP_TYPE_NETWORK")
- '("multidisk" "G_DRIVE_START_STOP_TYPE_MULTIDISK")
- '("password" "G_DRIVE_START_STOP_TYPE_PASSWORD")
- )
-)
-
-(define-flags FileCopyFlags
- (in-module "gio")
- (c-name "GFileCopyFlags")
- (gtype-id "G_TYPE_FILE_COPY_FLAGS")
- (values
- '("none" "G_FILE_COPY_NONE")
- '("overwrite" "G_FILE_COPY_OVERWRITE")
- '("backup" "G_FILE_COPY_BACKUP")
- '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS")
- '("all-metadata" "G_FILE_COPY_ALL_METADATA")
- '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE")
- '("target-default-perms" "G_FILE_COPY_TARGET_DEFAULT_PERMS")
- )
-)
-
-(define-flags FileMonitorFlags
- (in-module "gio")
- (c-name "GFileMonitorFlags")
- (gtype-id "G_TYPE_FILE_MONITOR_FLAGS")
- (values
- '("none" "G_FILE_MONITOR_NONE")
- '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS")
- )
-)
-
-(define-enum FileType
- (in-module "gio")
- (c-name "GFileType")
- (gtype-id "G_TYPE_FILE_TYPE")
- (values
- '("unknown" "G_FILE_TYPE_UNKNOWN")
- '("regular" "G_FILE_TYPE_REGULAR")
- '("directory" "G_FILE_TYPE_DIRECTORY")
- '("symbolic-link" "G_FILE_TYPE_SYMBOLIC_LINK")
- '("special" "G_FILE_TYPE_SPECIAL")
- '("shortcut" "G_FILE_TYPE_SHORTCUT")
- '("mountable" "G_FILE_TYPE_MOUNTABLE")
- )
-)
-
-(define-enum FilesystemPreviewType
- (in-module "gio")
- (c-name "GFilesystemPreviewType")
- (gtype-id "G_TYPE_FILESYSTEM_PREVIEW_TYPE")
- (values
- '("if-always" "G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS")
- '("if-local" "G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL")
- '("never" "G_FILESYSTEM_PREVIEW_TYPE_NEVER")
- )
-)
-
-(define-enum FileMonitorEvent
- (in-module "gio")
- (c-name "GFileMonitorEvent")
- (gtype-id "G_TYPE_FILE_MONITOR_EVENT")
- (values
- '("changed" "G_FILE_MONITOR_EVENT_CHANGED")
- '("changes-done-hint" "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT")
- '("deleted" "G_FILE_MONITOR_EVENT_DELETED")
- '("created" "G_FILE_MONITOR_EVENT_CREATED")
- '("attribute-changed" "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED")
- '("pre-unmount" "G_FILE_MONITOR_EVENT_PRE_UNMOUNT")
- '("unmounted" "G_FILE_MONITOR_EVENT_UNMOUNTED")
- )
-)
-
-(define-enum ErrorEnum
- (in-module "gio")
- (c-name "GIOErrorEnum")
- (gtype-id "G_TYPE_IO_ERROR_ENUM")
- (values
- '("failed" "G_IO_ERROR_FAILED")
- '("not-found" "G_IO_ERROR_NOT_FOUND")
- '("exists" "G_IO_ERROR_EXISTS")
- '("is-directory" "G_IO_ERROR_IS_DIRECTORY")
- '("not-directory" "G_IO_ERROR_NOT_DIRECTORY")
- '("not-empty" "G_IO_ERROR_NOT_EMPTY")
- '("not-regular-file" "G_IO_ERROR_NOT_REGULAR_FILE")
- '("not-symbolic-link" "G_IO_ERROR_NOT_SYMBOLIC_LINK")
- '("not-mountable-file" "G_IO_ERROR_NOT_MOUNTABLE_FILE")
- '("filename-too-long" "G_IO_ERROR_FILENAME_TOO_LONG")
- '("invalid-filename" "G_IO_ERROR_INVALID_FILENAME")
- '("too-many-links" "G_IO_ERROR_TOO_MANY_LINKS")
- '("no-space" "G_IO_ERROR_NO_SPACE")
- '("invalid-argument" "G_IO_ERROR_INVALID_ARGUMENT")
- '("permission-denied" "G_IO_ERROR_PERMISSION_DENIED")
- '("not-supported" "G_IO_ERROR_NOT_SUPPORTED")
- '("not-mounted" "G_IO_ERROR_NOT_MOUNTED")
- '("already-mounted" "G_IO_ERROR_ALREADY_MOUNTED")
- '("closed" "G_IO_ERROR_CLOSED")
- '("cancelled" "G_IO_ERROR_CANCELLED")
- '("pending" "G_IO_ERROR_PENDING")
- '("read-only" "G_IO_ERROR_READ_ONLY")
- '("cant-create-backup" "G_IO_ERROR_CANT_CREATE_BACKUP")
- '("wrong-etag" "G_IO_ERROR_WRONG_ETAG")
- '("timed-out" "G_IO_ERROR_TIMED_OUT")
- '("would-recurse" "G_IO_ERROR_WOULD_RECURSE")
- '("busy" "G_IO_ERROR_BUSY")
- '("would-block" "G_IO_ERROR_WOULD_BLOCK")
- '("host-not-found" "G_IO_ERROR_HOST_NOT_FOUND")
- '("would-merge" "G_IO_ERROR_WOULD_MERGE")
- '("failed-handled" "G_IO_ERROR_FAILED_HANDLED")
- '("too-many-open-files" "G_IO_ERROR_TOO_MANY_OPEN_FILES")
- '("not-initialized" "G_IO_ERROR_NOT_INITIALIZED")
- '("address-in-use" "G_IO_ERROR_ADDRESS_IN_USE")
- '("partial-input" "G_IO_ERROR_PARTIAL_INPUT")
- '("invalid-data" "G_IO_ERROR_INVALID_DATA")
- )
-)
-
-(define-flags AskPasswordFlags
- (in-module "gio")
- (c-name "GAskPasswordFlags")
- (gtype-id "G_TYPE_ASK_PASSWORD_FLAGS")
- (values
- '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD")
- '("need-username" "G_ASK_PASSWORD_NEED_USERNAME")
- '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN")
- '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED")
- '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED")
- )
-)
-
-(define-enum PasswordSave
- (in-module "gio")
- (c-name "GPasswordSave")
- (gtype-id "G_TYPE_PASSWORD_SAVE")
- (values
- '("never" "G_PASSWORD_SAVE_NEVER")
- '("for-session" "G_PASSWORD_SAVE_FOR_SESSION")
- '("permanently" "G_PASSWORD_SAVE_PERMANENTLY")
- )
-)
-
-(define-enum MountOperationResult
- (in-module "gio")
- (c-name "GMountOperationResult")
- (gtype-id "G_TYPE_MOUNT_OPERATION_RESULT")
- (values
- '("handled" "G_MOUNT_OPERATION_HANDLED")
- '("aborted" "G_MOUNT_OPERATION_ABORTED")
- '("unhandled" "G_MOUNT_OPERATION_UNHANDLED")
- )
-)
-
-(define-flags OutputStreamSpliceFlags
- (in-module "gio")
- (c-name "GOutputStreamSpliceFlags")
- (gtype-id "G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS")
- (values
- '("none" "G_OUTPUT_STREAM_SPLICE_NONE")
- '("close-source" "G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE")
- '("close-target" "G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET")
- )
-)
-
-(define-enum EmblemOrigin
- (in-module "gio")
- (c-name "GEmblemOrigin")
- (gtype-id "G_TYPE_EMBLEM_ORIGIN")
- (values
- '("unknown" "G_EMBLEM_ORIGIN_UNKNOWN")
- '("device" "G_EMBLEM_ORIGIN_DEVICE")
- '("livemetadata" "G_EMBLEM_ORIGIN_LIVEMETADATA")
- '("tag" "G_EMBLEM_ORIGIN_TAG")
- )
-)
-
-(define-enum ResolverError
- (in-module "gio")
- (c-name "GResolverError")
- (gtype-id "G_TYPE_RESOLVER_ERROR")
- (values
- '("not-found" "G_RESOLVER_ERROR_NOT_FOUND")
- '("temporary-failure" "G_RESOLVER_ERROR_TEMPORARY_FAILURE")
- '("internal" "G_RESOLVER_ERROR_INTERNAL")
- )
-)
-
-(define-enum SocketFamily
- (in-module "gio")
- (c-name "GSocketFamily")
- (gtype-id "G_TYPE_SOCKET_FAMILY")
- (values
- '("invalid" "G_SOCKET_FAMILY_INVALID")
- '("unix" "G_SOCKET_FAMILY_UNIX")
- '("ipv4" "G_SOCKET_FAMILY_IPV4")
- '("ipv6" "G_SOCKET_FAMILY_IPV6")
- )
-)
-
-(define-enum SocketType
- (in-module "gio")
- (c-name "GSocketType")
- (gtype-id "G_TYPE_SOCKET_TYPE")
- (values
- '("invalid" "G_SOCKET_TYPE_INVALID")
- '("stream" "G_SOCKET_TYPE_STREAM")
- '("datagram" "G_SOCKET_TYPE_DATAGRAM")
- '("seqpacket" "G_SOCKET_TYPE_SEQPACKET")
- )
-)
-
-(define-enum SocketMsgFlags
- (in-module "gio")
- (c-name "GSocketMsgFlags")
- (gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
- (values
- '("none" "G_SOCKET_MSG_NONE")
- '("oob" "G_SOCKET_MSG_OOB")
- '("peek" "G_SOCKET_MSG_PEEK")
- '("dontroute" "G_SOCKET_MSG_DONTROUTE")
- )
-)
-
-(define-enum SocketProtocol
- (in-module "gio")
- (c-name "GSocketProtocol")
- (gtype-id "G_TYPE_SOCKET_PROTOCOL")
- (values
- '("unknown" "G_SOCKET_PROTOCOL_UNKNOWN")
- '("default" "G_SOCKET_PROTOCOL_DEFAULT")
- '("tcp" "G_SOCKET_PROTOCOL_TCP")
- '("udp" "G_SOCKET_PROTOCOL_UDP")
- '("sctp" "G_SOCKET_PROTOCOL_SCTP")
- )
-)
-
-(define-enum ZlibCompressorFormat
- (in-module "gio")
- (c-name "GZlibCompressorFormat")
- (gtype-id "G_TYPE_ZLIB_COMPRESSOR_FORMAT")
- (values
- '("zlib" "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")
- '("gzip" "G_ZLIB_COMPRESSOR_FORMAT_GZIP")
- '("raw" "G_ZLIB_COMPRESSOR_FORMAT_RAW")
- )
-)
diff --git a/gio/gio.defs b/gio/gio.defs
deleted file mode 100644
index f5a28b6..0000000
--- a/gio/gio.defs
+++ /dev/null
@@ -1,7465 +0,0 @@
-;; -*- scheme -*-
-
-(include "gio-types.defs")
-
-;; From gappinfo.h
-
-(define-function app_info_get_type
- (c-name "g_app_info_get_type")
- (return-type "GType")
-)
-
-(define-function app_launch_context_get_type
- (c-name "g_app_launch_context_get_type")
- (return-type "GType")
-)
-
-(define-function app_info_create_from_commandline
- (c-name "g_app_info_create_from_commandline")
- (is-constructor-of "GAppInfo")
- (return-type "GAppInfo*")
- (parameters
- '("const-char*" "commandline")
- '("const-char*" "application_name" (null-ok) (default "NULL"))
- '("GAppInfoCreateFlags" "flags" (default "G_APP_INFO_CREATE_NONE"))
- '("GError**" "error")
- )
-)
-
-(define-method dup
- (of-object "GAppInfo")
- (c-name "g_app_info_dup")
- (return-type "GAppInfo*")
- (caller-owns-return #t)
-)
-
-(define-method equal
- (of-object "GAppInfo")
- (c-name "g_app_info_equal")
- (return-type "gboolean")
- (parameters
- '("GAppInfo*" "appinfo2")
- )
-)
-
-(define-method get_id
- (of-object "GAppInfo")
- (c-name "g_app_info_get_id")
- (return-type "const-char*")
-)
-
-(define-method get_name
- (of-object "GAppInfo")
- (c-name "g_app_info_get_name")
- (return-type "const-char*")
-)
-
-(define-method get_description
- (of-object "GAppInfo")
- (c-name "g_app_info_get_description")
- (return-type "const-char*")
-)
-
-(define-method get_executable
- (of-object "GAppInfo")
- (c-name "g_app_info_get_executable")
- (return-type "const-char*")
-)
-
-(define-method get_icon
- (of-object "GAppInfo")
- (c-name "g_app_info_get_icon")
- (return-type "GIcon*")
-)
-
-;;
-;; wrapped in gappinfo.override
-;;
-(define-method launch
- (docstring
- "launch (files=None, launch_context=None) -> gboolean\n"
- "\n"
- "Launches the application. Passes files to the launched application\n"
- "as arguments, using the optional launch_context to get information\n"
- "about the details of the launcher (like what screen it is on).\n"
- "On error, error will be set accordingly.\n\n"
- "Note that even if the launch is successful the application launched\n"
- "can fail to start if it runs into problems during startup.\n"
- "There is no way to detect this.\n\n"
- "Some URIs can be changed when passed through a gio.File\n"
- "(for instance unsupported uris with strange formats like mailto:),\n"
- "so if you have a textual uri you want to pass in as argument,\n"
- "consider using gio.AppInfo.launch_uris() instead."
- )
- (of-object "GAppInfo")
- (c-name "g_app_info_launch")
- (return-type "gboolean")
- (parameters
- '("GList*" "files")
- '("GAppLaunchContext*" "launch_context")
- '("GError**" "error")
- )
-)
-
-(define-method supports_uris
- (of-object "GAppInfo")
- (c-name "g_app_info_supports_uris")
- (return-type "gboolean")
-)
-
-(define-method supports_files
- (of-object "GAppInfo")
- (c-name "g_app_info_supports_files")
- (return-type "gboolean")
-)
-
-;;
-;; wrapped in gappinfo.override
-;;
-(define-method launch_uris
- (docstring
- "launch_uris (files=None, launch_context=None) -> gboolean\n"
- "\n"
- "Launches the application. Passes files to the launched application\n"
- "as arguments, using the optional launch_context to get information\n"
- "about the details of the launcher (like what screen it is on).\n"
- "On error, error will be set accordingly.\n\n"
- "Note that even if the launch is successful the application launched\n"
- "can fail to start if it runs into problems during startup.\n"
- "There is no way to detect this.\n\n"
- )
- (of-object "GAppInfo")
- (c-name "g_app_info_launch_uris")
- (return-type "gboolean")
- (parameters
- '("GList*" "uris")
- '("GAppLaunchContext*" "launch_context")
- '("GError**" "error")
- )
-)
-
-(define-method should_show
- (of-object "GAppInfo")
- (c-name "g_app_info_should_show")
- (return-type "gboolean")
-)
-
-(define-method set_as_default_for_type
- (of-object "GAppInfo")
- (c-name "g_app_info_set_as_default_for_type")
- (return-type "gboolean")
- (parameters
- '("const-char*" "content_type")
- '("GError**" "error")
- )
-)
-
-(define-method set_as_default_for_extension
- (of-object "GAppInfo")
- (c-name "g_app_info_set_as_default_for_extension")
- (return-type "gboolean")
- (parameters
- '("const-char*" "extension")
- '("GError**" "error")
- )
-)
-
-(define-method add_supports_type
- (of-object "GAppInfo")
- (c-name "g_app_info_add_supports_type")
- (return-type "gboolean")
- (parameters
- '("const-char*" "content_type")
- '("GError**" "error")
- )
-)
-
-(define-method can_remove_supports_type
- (of-object "GAppInfo")
- (c-name "g_app_info_can_remove_supports_type")
- (return-type "gboolean")
-)
-
-(define-method remove_supports_type
- (of-object "GAppInfo")
- (c-name "g_app_info_remove_supports_type")
- (return-type "gboolean")
- (parameters
- '("const-char*" "content_type")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-function app_info_get_all
- (c-name "g_app_info_get_all")
- (return-type "GList*")
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-function app_info_get_all_for_type
- (c-name "g_app_info_get_all_for_type")
- (return-type "GList*")
- (parameters
- '("const-char*" "content_type")
- )
-)
-
-(define-function app_info_get_default_for_type
- (c-name "g_app_info_get_default_for_type")
- (return-type "GAppInfo*")
- (parameters
- '("const-char*" "content_type")
- '("gboolean" "must_support_uris")
- )
-)
-
-(define-function app_info_get_default_for_uri_scheme
- (c-name "g_app_info_get_default_for_uri_scheme")
- (return-type "GAppInfo*")
- (parameters
- '("const-char*" "uri_scheme")
- )
-)
-
-(define-function app_launch_context_new
- (c-name "g_app_launch_context_new")
- (is-constructor-of "GAppLaunchContext")
- (return-type "GAppLaunchContext*")
-)
-
-;;
-;; wrapped in gapplaunchcontext.override
-;;
-(define-method get_display
- (of-object "GAppLaunchContext")
- (c-name "g_app_launch_context_get_display")
- (return-type "char*")
- (parameters
- '("GAppInfo*" "info")
- '("GList*" "files")
- )
-)
-
-;;
-;; wrapped in gapplaunchcontext.override
-;;
-(define-method get_startup_notify_id
- (of-object "GAppLaunchContext")
- (c-name "g_app_launch_context_get_startup_notify_id")
- (return-type "char*")
- (parameters
- '("GAppInfo*" "info")
- '("GList*" "files")
- )
-)
-
-(define-method launch_failed
- (of-object "GAppLaunchContext")
- (c-name "g_app_launch_context_launch_failed")
- (return-type "none")
- (parameters
- '("const-char*" "startup_notify_id")
- )
-)
-
-(define-function app_info_reset_type_associations
- (c-name "g_app_info_reset_type_associations")
- (return-type "none")
- (parameters
- '("const-char*" "content_type")
- )
-)
-
-(define-method can_delete
- (of-object "GAppInfo")
- (c-name "g_app_info_can_delete")
- (return-type "gboolean")
-)
-
-(define-method delete
- (of-object "GAppInfo")
- (c-name "g_app_info_delete")
- (return-type "gboolean")
-)
-
-(define-method get_commandline
- (of-object "GAppInfo")
- (c-name "g_app_info_get_commandline")
- (return-type "const-char*")
-)
-
-
-
-;; From gasyncinitable.h
-
-(define-function async_initable_get_type
- (c-name "g_async_initable_get_type")
- (return-type "GType")
-)
-
-(define-method init_async
- (of-object "GAsyncInitable")
- (c-name "g_async_initable_init_async")
- (return-type "none")
- (parameters
- '("int" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method init_finish
- (of-object "GAsyncInitable")
- (c-name "g_async_initable_init_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-function async_initable_new_async
- (c-name "g_async_initable_new_async")
- (return-type "none")
- (parameters
- '("GType" "object_type")
- '("int" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- '("const-gchar*" "first_property_name")
- )
- (varargs #t)
-)
-
-(define-function async_initable_newv_async
- (c-name "g_async_initable_newv_async")
- (return-type "none")
- (parameters
- '("GType" "object_type")
- '("guint" "n_parameters")
- '("GParameter*" "parameters")
- '("int" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-function async_initable_new_valist_async
- (c-name "g_async_initable_new_valist_async")
- (return-type "none")
- (parameters
- '("GType" "object_type")
- '("const-gchar*" "first_property_name")
- '("va_list" "var_args")
- '("int" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method new_finish
- (of-object "GAsyncInitable")
- (c-name "g_async_initable_new_finish")
- (return-type "GObject*")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gasyncresult.h
-
-(define-function async_result_get_type
- (c-name "g_async_result_get_type")
- (return-type "GType")
-)
-
-(define-method get_user_data
- (of-object "GAsyncResult")
- (c-name "g_async_result_get_user_data")
- (return-type "gpointer")
-)
-
-(define-method get_source_object
- (of-object "GAsyncResult")
- (c-name "g_async_result_get_source_object")
- (return-type "GObject*")
-)
-
-
-
-;; From gbufferedinputstream.h
-
-(define-function buffered_input_stream_get_type
- (c-name "g_buffered_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-function buffered_input_stream_new
- (c-name "g_buffered_input_stream_new")
- (is-constructor-of "GBufferedInputStream")
- (return-type "GInputStream*")
- (properties
- '("base_stream")
- )
-)
-
-(define-function buffered_input_stream_new_sized
- (c-name "g_buffered_input_stream_new_sized")
- (return-type "GInputStream*")
- (parameters
- '("GInputStream*" "base_stream")
- '("gsize" "size")
- )
-)
-
-(define-method get_buffer_size
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_get_buffer_size")
- (return-type "gsize")
-)
-
-(define-method set_buffer_size
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_set_buffer_size")
- (return-type "none")
- (parameters
- '("gsize" "size")
- )
-)
-
-(define-method get_available
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_get_available")
- (return-type "gsize")
-)
-
-(define-method peek
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_peek")
- (return-type "gsize")
- (parameters
- '("void*" "buffer")
- '("gsize" "offset")
- '("gsize" "count")
- )
-)
-
-(define-method peek_buffer
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_peek_buffer")
- (return-type "const-void*")
- (parameters
- '("gsize*" "count")
- )
-)
-
-(define-method fill
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_fill")
- (return-type "gssize")
- (unblock-threads #t)
- (parameters
- '("gssize" "count")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method fill_async
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_fill_async")
- (return-type "none")
- (parameters
- '("gssize" "count")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method fill_finish
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_fill_finish")
- (return-type "gssize")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method read_byte
- (of-object "GBufferedInputStream")
- (c-name "g_buffered_input_stream_read_byte")
- (return-type "int")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-
-
-;; From gbufferedoutputstream.h
-
-(define-function buffered_output_stream_get_type
- (c-name "g_buffered_output_stream_get_type")
- (return-type "GType")
-)
-
-(define-function buffered_output_stream_new
- (c-name "g_buffered_output_stream_new")
- (is-constructor-of "GBufferedOutputStream")
- (return-type "GOutputStream*")
- (properties
- '("base_stream")
- )
-)
-
-(define-function buffered_output_stream_new_sized
- (c-name "g_buffered_output_stream_new_sized")
- (return-type "GOutputStream*")
- (parameters
- '("GOutputStream*" "base_stream")
- '("guint" "size")
- )
-)
-
-(define-method get_buffer_size
- (of-object "GBufferedOutputStream")
- (c-name "g_buffered_output_stream_get_buffer_size")
- (return-type "gsize")
-)
-
-(define-method set_buffer_size
- (of-object "GBufferedOutputStream")
- (c-name "g_buffered_output_stream_set_buffer_size")
- (return-type "none")
- (parameters
- '("gsize" "size")
- )
-)
-
-(define-method get_auto_grow
- (of-object "GBufferedOutputStream")
- (c-name "g_buffered_output_stream_get_auto_grow")
- (return-type "gboolean")
-)
-
-(define-method set_auto_grow
- (of-object "GBufferedOutputStream")
- (c-name "g_buffered_output_stream_set_auto_grow")
- (return-type "none")
- (parameters
- '("gboolean" "auto_grow")
- )
-)
-
-
-
-;; From gcancellable.h
-
-(define-function cancellable_get_type
- (c-name "g_cancellable_get_type")
- (return-type "GType")
-)
-
-(define-function cancellable_new
- (c-name "g_cancellable_new")
- (is-constructor-of "GCancellable")
- (return-type "GCancellable*")
-)
-
-(define-method is_cancelled
- (of-object "GCancellable")
- (c-name "g_cancellable_is_cancelled")
- (return-type "gboolean")
-)
-
-(define-method set_error_if_cancelled
- (of-object "GCancellable")
- (c-name "g_cancellable_set_error_if_cancelled")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method get_fd
- (of-object "GCancellable")
- (c-name "g_cancellable_get_fd")
- (return-type "int")
-)
-
-(define-method make_pollfd
- (of-object "GCancellable")
- (c-name "g_cancellable_make_pollfd")
- (return-type "none")
- (parameters
- '("GPollFD*" "pollfd")
- )
-)
-
-(define-function cancellable_get_current
- (c-name "g_cancellable_get_current")
- (return-type "GCancellable*")
-)
-
-(define-method push_current
- (of-object "GCancellable")
- (c-name "g_cancellable_push_current")
- (return-type "none")
-)
-
-(define-method pop_current
- (of-object "GCancellable")
- (c-name "g_cancellable_pop_current")
- (return-type "none")
-)
-
-(define-method reset
- (of-object "GCancellable")
- (c-name "g_cancellable_reset")
- (return-type "none")
-)
-
-(define-method cancel
- (of-object "GCancellable")
- (c-name "g_cancellable_cancel")
- (return-type "none")
-)
-
-(define-method connect
- (of-object "GCancellable")
- (c-name "g_cancellable_connect")
- (return-type "gulong")
- (parameters
- '("GCallback" "callback")
- '("gpointer" "data")
- '("GDestroyNotify" "data_destroy_func")
- )
-)
-
-(define-method disconnect
- (of-object "GCancellable")
- (c-name "g_cancellable_disconnect")
- (return-type "none")
- (parameters
- '("gulong" "handler_id")
- )
-)
-
-(define-method release_fd
- (of-object "GCancellable")
- (c-name "g_cancellable_release_fd")
- (return-type "none")
-)
-
-
-
-;; From gcontenttype.h
-
-(define-function content_type_equals
- (c-name "g_content_type_equals")
- (return-type "gboolean")
- (parameters
- '("const-char*" "type1")
- '("const-char*" "type2")
- )
-)
-
-(define-function content_type_is_a
- (c-name "g_content_type_is_a")
- (return-type "gboolean")
- (parameters
- '("const-char*" "type")
- '("const-char*" "supertype")
- )
-)
-
-(define-function content_type_is_unknown
- (c-name "g_content_type_is_unknown")
- (return-type "gboolean")
- (parameters
- '("const-char*" "type")
- )
-)
-
-(define-function content_type_get_description
- (c-name "g_content_type_get_description")
- (return-type "char*")
- (parameters
- '("const-char*" "type")
- )
-)
-
-(define-function content_type_get_mime_type
- (c-name "g_content_type_get_mime_type")
- (return-type "char*")
- (parameters
- '("const-char*" "type")
- )
-)
-
-(define-function content_type_get_icon
- (c-name "g_content_type_get_icon")
- (return-type "GIcon*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "type")
- )
-)
-
-(define-function content_type_can_be_executable
- (c-name "g_content_type_can_be_executable")
- (return-type "gboolean")
- (parameters
- '("const-char*" "type")
- )
-)
-
-(define-function content_type_from_mime_type
- (c-name "g_content_type_from_mime_type")
- (return-type "char*")
- (parameters
- '("const-char*" "mime_type")
- )
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-function content_type_guess
- (docstring
-"content_type_guess([filename, data, want_uncertain]) -> mime type\n"
-"\n"
-"Guesses the content type based on the parameters passed.\n"
-"Either filename or data must be specified\n"
-"Returns a string containing the mime type.\n"
-"If want_uncertain is set to True, return a tuple with the mime type and \n"
-"True/False if the type guess was uncertain or not.")
- (c-name "g_content_type_guess")
- (return-type "char*")
- (parameters
- '("const-char*" "filename")
- '("const-guchar*" "data")
- '("gsize" "data_size")
- '("gboolean*" "result_uncertain")
- )
-)
-
-(define-function content_type_guess_for_tree
- (c-name "g_content_type_guess_for_tree")
- (return-type "char**")
- (parameters
- '("GFile*" "root")
- )
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-function content_types_get_registered
- (c-name "g_content_types_get_registered")
- (return-type "GList*")
-)
-
-
-
-;; From gdatainputstream.h
-
-(define-function data_input_stream_get_type
- (c-name "g_data_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-function data_input_stream_new
- (c-name "g_data_input_stream_new")
- (is-constructor-of "GDataInputStream")
- (return-type "GDataInputStream*")
- (properties
- '("base_stream")
- )
-)
-
-(define-method set_byte_order
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_set_byte_order")
- (return-type "none")
- (parameters
- '("GDataStreamByteOrder" "order")
- )
-)
-
-(define-method get_byte_order
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_get_byte_order")
- (return-type "GDataStreamByteOrder")
-)
-
-(define-method set_newline_type
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_set_newline_type")
- (return-type "none")
- (parameters
- '("GDataStreamNewlineType" "type")
- )
-)
-
-(define-method get_newline_type
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_get_newline_type")
- (return-type "GDataStreamNewlineType")
-)
-
-(define-method read_byte
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_byte")
- (return-type "guchar")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_int16
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_int16")
- (return-type "gint16")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_uint16
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_uint16")
- (return-type "guint16")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_int32
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_int32")
- (return-type "gint32")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_uint32
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_uint32")
- (return-type "guint32")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_int64
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_int64")
- (return-type "gint64")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_uint64
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_uint64")
- (return-type "guint64")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gdatainputstream.override
-;;
-(define-method read_line
- (of-object "GDataInputStream")
- (docstring
- "S.read_line([cancellable]) -> str\n"
- "Read a line from the stream. Return value includes ending newline\n"
- "character.")
- (c-name "g_data_input_stream_read_line")
- (return-type "char*")
- (parameters
- '("gsize*" "length")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gdatainputstream.override
-;;
-(define-method read_until
- (of-object "GDataInputStream")
- (docstring
- "S.read_until(stop_chars, [cancellable]) -> str\n"
- "Read characters from the string, stopping at the end or upon reading\n"
- "any character in stop_chars. Return value does not include the stopping\n"
- "character.")
- (c-name "g_data_input_stream_read_until")
- (return-type "char*")
- (parameters
- '("const-gchar*" "stop_chars")
- '("gsize*" "length")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method read_until_async
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_until_async")
- (return-type "none")
- (parameters
- '("const-gchar*" "stop_chars")
- '("gint" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method read_until_finish
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_until_finish")
- (return-type "char*")
- (parameters
- '("GAsyncResult*" "result")
- '("gsize*" "length")
- '("GError**" "error")
- )
-)
-
-(define-method read_line_async
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_line_async")
- (return-type "none")
- (parameters
- '("gint" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method read_line_finish
- (of-object "GDataInputStream")
- (c-name "g_data_input_stream_read_line_finish")
- (return-type "char*")
- (parameters
- '("GAsyncResult*" "result")
- '("gsize*" "length")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gdataoutputstream.h
-
-(define-function data_output_stream_get_type
- (c-name "g_data_output_stream_get_type")
- (return-type "GType")
-)
-
-(define-function data_output_stream_new
- (c-name "g_data_output_stream_new")
- (is-constructor-of "GDataOutputStream")
- (return-type "GDataOutputStream*")
- (properties
- '("base_stream")
- )
-)
-
-(define-method set_byte_order
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_set_byte_order")
- (return-type "none")
- (parameters
- '("GDataStreamByteOrder" "order")
- )
-)
-
-(define-method get_byte_order
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_get_byte_order")
- (return-type "GDataStreamByteOrder")
-)
-
-(define-method put_byte
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_byte")
- (return-type "gboolean")
- (parameters
- '("guchar" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_int16
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_int16")
- (return-type "gboolean")
- (parameters
- '("gint16" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_uint16
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_uint16")
- (return-type "gboolean")
- (parameters
- '("guint16" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_int32
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_int32")
- (return-type "gboolean")
- (parameters
- '("gint32" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_uint32
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_uint32")
- (return-type "gboolean")
- (parameters
- '("guint32" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_int64
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_int64")
- (return-type "gboolean")
- (parameters
- '("gint64" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_uint64
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_uint64")
- (return-type "gboolean")
- (parameters
- '("guint64" "data")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method put_string
- (of-object "GDataOutputStream")
- (c-name "g_data_output_stream_put_string")
- (return-type "gboolean")
- (parameters
- '("const-char*" "str")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-
-
-
-
-
-;; From gdrive.h
-
-(define-function drive_get_type
- (c-name "g_drive_get_type")
- (return-type "GType")
-)
-
-(define-method get_name
- (of-object "GDrive")
- (c-name "g_drive_get_name")
- (return-type "char*")
-)
-
-(define-method get_icon
- (of-object "GDrive")
- (c-name "g_drive_get_icon")
- (return-type "GIcon*")
- (caller-owns-return #t)
-)
-
-(define-method has_volumes
- (of-object "GDrive")
- (c-name "g_drive_has_volumes")
- (return-type "gboolean")
-)
-
-;;
-;; wrapped in gdrive.override
-;;
-(define-method get_volumes
- (of-object "GDrive")
- (c-name "g_drive_get_volumes")
- (return-type "GList*")
-)
-
-(define-method is_media_removable
- (of-object "GDrive")
- (c-name "g_drive_is_media_removable")
- (return-type "gboolean")
-)
-
-(define-method has_media
- (of-object "GDrive")
- (c-name "g_drive_has_media")
- (return-type "gboolean")
-)
-
-(define-method is_media_check_automatic
- (of-object "GDrive")
- (c-name "g_drive_is_media_check_automatic")
- (return-type "gboolean")
-)
-
-(define-method can_poll_for_media
- (of-object "GDrive")
- (c-name "g_drive_can_poll_for_media")
- (return-type "gboolean")
-)
-
-(define-method can_eject
- (of-object "GDrive")
- (c-name "g_drive_can_eject")
- (return-type "gboolean")
-)
-
-;;
-;; wrapped in gdrive.override
-;;
-(define-method eject
- (of-object "GDrive")
- (c-name "g_drive_eject")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_finish
- (of-object "GDrive")
- (c-name "g_drive_eject_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gdrive.override
-;;
-(define-method poll_for_media
- (of-object "GDrive")
- (c-name "g_drive_poll_for_media")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method poll_for_media_finish
- (of-object "GDrive")
- (c-name "g_drive_poll_for_media_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method get_identifier
- (of-object "GDrive")
- (c-name "g_drive_get_identifier")
- (return-type "char*")
- (parameters
- '("const-char*" "kind")
- )
-)
-
-;;
-;; wrapped in gdrive.override
-;;
-(define-method enumerate_identifiers
- (of-object "GDrive")
- (c-name "g_drive_enumerate_identifiers")
- (return-type "char**")
-)
-
-(define-method can_start
- (of-object "GDrive")
- (c-name "g_drive_can_start")
- (return-type "gboolean")
-)
-
-(define-method can_start_degraded
- (of-object "GDrive")
- (c-name "g_drive_can_start_degraded")
- (return-type "gboolean")
-)
-
-(define-method can_stop
- (of-object "GDrive")
- (c-name "g_drive_can_stop")
- (return-type "gboolean")
-)
-
-(define-method eject_with_operation
- (of-object "GDrive")
- (c-name "g_drive_eject_with_operation")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_with_operation_finish
- (of-object "GDrive")
- (c-name "g_drive_eject_with_operation_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method get_start_stop_type
- (of-object "GDrive")
- (c-name "g_drive_get_start_stop_type")
- (return-type "GDriveStartStopType")
-)
-
-(define-method start
- (of-object "GDrive")
- (c-name "g_drive_start")
- (return-type "none")
- (parameters
- '("GDriveStartFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method start_finish
- (of-object "GDrive")
- (c-name "g_drive_start_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method stop
- (of-object "GDrive")
- (c-name "g_drive_stop")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method stop_finish
- (of-object "GDrive")
- (c-name "g_drive_stop_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gemblemedicon.h
-
-(define-function emblemed_icon_get_type
- (c-name "g_emblemed_icon_get_type")
- (return-type "GType")
-)
-
-(define-function emblemed_icon_new
- (c-name "g_emblemed_icon_new")
- (is-constructor-of "GEmblemedIcon")
- (return-type "GIcon*")
- (parameters
- '("GIcon*" "icon")
- '("GEmblem*" "emblem")
- )
-)
-
-(define-method get_icon
- (of-object "GEmblemedIcon")
- (c-name "g_emblemed_icon_get_icon")
- (return-type "GIcon*")
-)
-
-(define-method get_emblems
- (of-object "GEmblemedIcon")
- (c-name "g_emblemed_icon_get_emblems")
- (return-type "GList*")
-)
-
-(define-method add_emblem
- (of-object "GEmblemedIcon")
- (c-name "g_emblemed_icon_add_emblem")
- (return-type "none")
- (parameters
- '("GEmblem*" "emblem")
- )
-)
-
-
-
-;; From gemblem.h
-
-(define-function emblem_get_type
- (c-name "g_emblem_get_type")
- (return-type "GType")
-)
-
-(define-function emblem_new
- (c-name "g_emblem_new")
- (is-constructor-of "GEmblem")
- (return-type "GEmblem*")
- (properties
- '("icon")
- '("origin" (optional))
- )
-)
-
-(define-function emblem_new_with_origin
- (c-name "g_emblem_new_with_origin")
- (return-type "GEmblem*")
- (parameters
- '("GIcon*" "icon")
- '("GEmblemOrigin" "origin")
- )
-)
-
-(define-method get_icon
- (of-object "GEmblem")
- (c-name "g_emblem_get_icon")
- (return-type "GIcon*")
-)
-
-(define-method get_origin
- (of-object "GEmblem")
- (c-name "g_emblem_get_origin")
- (return-type "GEmblemOrigin")
-)
-
-
-
-;; From gfileattribute.h
-
-(define-function file_attribute_info_list_new
- (c-name "g_file_attribute_info_list_new")
- (is-constructor-of "GFileAttributeInfoList")
- (return-type "GFileAttributeInfoList*")
-)
-
-(define-method ref
- (of-object "GFileAttributeInfoList")
- (c-name "g_file_attribute_info_list_ref")
- (return-type "GFileAttributeInfoList*")
-)
-
-(define-method unref
- (of-object "GFileAttributeInfoList")
- (c-name "g_file_attribute_info_list_unref")
- (return-type "none")
-)
-
-(define-method dup
- (of-object "GFileAttributeInfoList")
- (c-name "g_file_attribute_info_list_dup")
- (return-type "GFileAttributeInfoList*")
-)
-
-(define-method lookup
- (of-object "GFileAttributeInfoList")
- (c-name "g_file_attribute_info_list_lookup")
- (return-type "const-GFileAttributeInfo*")
- (parameters
- '("const-char*" "name")
- )
-)
-
-(define-method add
- (of-object "GFileAttributeInfoList")
- (c-name "g_file_attribute_info_list_add")
- (return-type "none")
- (parameters
- '("const-char*" "name")
- '("GFileAttributeType" "type")
- '("GFileAttributeInfoFlags" "flags" (default "G_FILE_ATTRIBUTE_INFO_NONE"))
- )
-)
-
-
-
-;; From gfileenumerator.h
-
-(define-function file_enumerator_get_type
- (c-name "g_file_enumerator_get_type")
- (return-type "GType")
-)
-
-(define-method next_file
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_next_file")
- (return-type "GFileInfo*")
- (caller-owns-return #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method close
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_close")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfileenumerator.override
-;;
-(define-method next_files_async
- (docstring
-"FE.next_files_async(num_files, callback, [io_priority, cancellable,\n"
-" user_data])\n"
-"Request information for a number of files from the enumerator\n"
-"asynchronously. When all i/o for the operation is finished the callback\n"
-"will be called with the requested information.\n"
-"\n"
-"The callback can be called with less than num_files files in case of error\n"
-"or at the end of the enumerator. In case of a partial error the callback\n"
-"will be called with any succeeding items and no error, and on the next\n"
-"request the error will be reported. If a request is cancelled the callback\n"
-"will be called with gio.ERROR_CANCELLED.\n"
-"\n"
-"During an async request no other sync and async calls are allowed, and will\n"
-"result in gio.ERROR_PENDING errors.\n"
-"\n"
-"Any outstanding i/o request with higher priority (lower numerical value)\n"
-"will be executed before an outstanding request with lower priority.\n"
-"Default priority is gobject.PRIORITY_DEFAULT.")
-
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_next_files_async")
- (return-type "none")
- (parameters
- '("int" "num_files")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-;;
-;; wrapped in gfileenumerator.override
-;;
-(define-method next_files_finish
- (docstring
-"FE.next_files_finish(result) -> a list of gio.FileInfos\n"
-"Finishes the asynchronous operation started with\n"
-"gio.FileEnumerator.next_files_async().")
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_next_files_finish")
- (return-type "GList*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfileenumerator.override
-;;
-(define-method close_async
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_close_async")
- (return-type "none")
- (parameters
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method close_finish
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_close_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method is_closed
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_is_closed")
- (return-type "gboolean")
-)
-
-(define-method has_pending
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_has_pending")
- (return-type "gboolean")
-)
-
-(define-method set_pending
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_set_pending")
- (return-type "none")
- (parameters
- '("gboolean" "pending")
- )
-)
-
-(define-method get_container
- (of-object "GFileEnumerator")
- (c-name "g_file_enumerator_get_container")
- (return-type "GFile*")
-)
-
-
-
-;; From gfile.h
-
-(define-function file_get_type
- (c-name "g_file_get_type")
- (return-type "GType")
-)
-
-(define-function file_new_for_path
- (c-name "g_file_new_for_path")
- (is-constructor-of "GFile")
- (return-type "GFile*")
- (parameters
- '("const-char*" "path")
- )
-)
-
-(define-function file_new_for_uri
- (c-name "g_file_new_for_uri")
- (is-constructor-of "GFile")
- (return-type "GFile*")
- (parameters
- '("const-char*" "uri")
- )
-)
-
-(define-function file_new_for_commandline_arg
- (is-constructor-of "GFile")
- (c-name "g_file_new_for_commandline_arg")
- (return-type "GFile*")
- (parameters
- '("const-char*" "arg")
- )
-)
-
-(define-function file_parse_name
- (c-name "g_file_parse_name")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "parse_name")
- )
-)
-
-(define-method dup
- (of-object "GFile")
- (c-name "g_file_dup")
- (return-type "GFile*")
- (caller-owns-return #t)
-)
-
-(define-function file_hash
- (c-name "g_file_hash")
- (return-type "guint")
- (parameters
- '("gconstpointer" "file")
- )
-)
-
-(define-method equal
- (of-object "GFile")
- (c-name "g_file_equal")
- (return-type "gboolean")
- (parameters
- '("GFile*" "file2")
- )
-)
-
-(define-method get_basename
- (of-object "GFile")
- (c-name "g_file_get_basename")
- (return-type "char*")
-)
-
-(define-method get_path
- (of-object "GFile")
- (c-name "g_file_get_path")
- (return-type "char*")
-)
-
-(define-method get_uri
- (of-object "GFile")
- (c-name "g_file_get_uri")
- (return-type "char*")
-)
-
-(define-method get_parse_name
- (of-object "GFile")
- (c-name "g_file_get_parse_name")
- (return-type "char*")
-)
-
-(define-method get_parent
- (of-object "GFile")
- (c-name "g_file_get_parent")
- (return-type "GFile*")
- (caller-owns-return #t)
-)
-
-(define-method get_child
- (of-object "GFile")
- (c-name "g_file_get_child")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "name")
- )
-)
-
-(define-method get_child_for_display_name
- (of-object "GFile")
- (c-name "g_file_get_child_for_display_name")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "display_name")
- '("GError**" "error")
- )
-)
-
-(define-method has_prefix
- (of-object "GFile")
- (c-name "g_file_has_prefix")
- (return-type "gboolean")
- (parameters
- '("GFile*" "descendant")
- )
-)
-
-(define-method get_relative_path
- (of-object "GFile")
- (c-name "g_file_get_relative_path")
- (return-type "char*")
- (parameters
- '("GFile*" "descendant")
- )
-)
-
-(define-method resolve_relative_path
- (of-object "GFile")
- (c-name "g_file_resolve_relative_path")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "relative_path")
- )
-)
-
-(define-method is_native
- (of-object "GFile")
- (c-name "g_file_is_native")
- (return-type "gboolean")
-)
-
-(define-method has_uri_scheme
- (of-object "GFile")
- (c-name "g_file_has_uri_scheme")
- (return-type "gboolean")
- (parameters
- '("const-char*" "uri_scheme")
- )
-)
-
-(define-method get_uri_scheme
- (of-object "GFile")
- (c-name "g_file_get_uri_scheme")
- (return-type "char*")
-)
-
-(define-method read
- (of-object "GFile")
- (docstring
- "F.read([cancellable]) -> input stream\n"
- "Opens a file for reading. The result is a GFileInputStream that\n"
- "can be used to read the contents of the file.\n"
- "\n"
- "If cancellable is specified, then the operation can be cancelled\n"
- "by triggering the cancellable object from another thread. If the\n"
- "operation was cancelled, the error gio.IO_ERROR_CANCELLED will\n"
- "be returned. If the file does not exist, the gio.IO_ERROR_NOT_FOUND\n"
- "error will be returned. If the file is a directory, the\n"
- "gio.IO_ERROR_IS_DIRECTORY error will be returned. Other errors\n"
- "are possible too, and depend on what kind of filesystem the file is on."
- )
- (c-name "g_file_read")
- (return-type "GFileInputStream*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method read_async
- (of-object "GFile")
- (docstring
- "F.read_async(callback [,io_priority [,cancellable [,user_data]]])\n"
- "-> start read\n"
- "\n"
- "For more details, see gio.File.read() which is the synchronous\n"
- "version of this call. Asynchronously opens file for reading.\n"
- "When the operation is finished, callback will be called.\n"
- "You can then call g_file_read_finish() to get the result of the\n"
- "operation.\n"
- )
- (c-name "g_file_read_async")
- (return-type "none")
- (parameters
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method read_finish
- (of-object "GFile")
- (c-name "g_file_read_finish")
- (return-type "GFileInputStream*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method append_to
- (of-object "GFile")
- (c-name "g_file_append_to")
- (return-type "GFileOutputStream*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method create
- (of-object "GFile")
- (c-name "g_file_create")
- (return-type "GFileOutputStream*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method replace
- (of-object "GFile")
- (c-name "g_file_replace")
- (return-type "GFileOutputStream*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("const-char*" "etag")
- '("gboolean" "make_backup")
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method append_to_async
- (docstring
- "F.append_to_async(callback [flags, [,io_priority [,cancellable\n"
- " [,user_data]]]]) -> open for append\n"
- "\n"
- "Asynchronously opens file for appending.\n"
- "For more details, see gio.File.append_to() which is the synchronous\n"
- "version of this call. When the operation is finished, callback will\n"
- "be called. You can then call F.append_to_finish() to get the result\n"
- "of the operation."
- )
- (of-object "GFile")
- (c-name "g_file_append_to_async")
- (return-type "none")
- (parameters
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method append_to_finish
- (of-object "GFile")
- (c-name "g_file_append_to_finish")
- (return-type "GFileOutputStream*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method create_async
- (docstring
- "F.create_async(callback [flags, [,io_priority [,cancellable\n"
- " [,user_data]]]]) -> file created\n"
- "\n"
- "Asynchronously creates a new file and returns an output stream for\n"
- "writing to it. The file must not already exist.\n"
- "For more details, see F.create() which is the synchronous\n"
- "version of this call.\n"
- "When the operation is finished, callback will be called. You can\n"
- "then call F.create_finish() to get the result of the operation."
- )
- (of-object "GFile")
- (c-name "g_file_create_async")
- (return-type "none")
- (parameters
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method create_finish
- (of-object "GFile")
- (c-name "g_file_create_finish")
- (return-type "GFileOutputStream*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method replace_async
- (docstring
- "F.replace_async(callback [etag, [make_backup, [flags, [io_priority,\n"
- " [cancellable, [user_data]]]]]]) -> file replace\n"
- "\n"
- "Asynchronously overwrites the file, replacing the contents, possibly\n"
- "creating a backup copy of the file first.\n"
- "For more details, see F.replace() which is the synchronous\n"
- "version of this call.\n"
- "When the operation is finished, callback will be called. You can\n"
- "then call F.replace_finish() to get the result of the operation."
- )
- (of-object "GFile")
- (c-name "g_file_replace_async")
- (return-type "none")
- (parameters
- '("const-char*" "etag")
- '("gboolean" "make_backup")
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method replace_finish
- (of-object "GFile")
- (c-name "g_file_replace_finish")
- (return-type "GFileOutputStream*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method query_exists
- (of-object "GFile")
- (c-name "g_file_query_exists")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- )
-)
-
-(define-method query_file_type
- (of-object "GFile")
- (c-name "g_file_query_file_type")
- (return-type "GFileType")
- (parameters
- '("GFileQueryInfoFlags" "flags")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- )
-)
-
-(define-method query_info
- (of-object "GFile")
- (c-name "g_file_query_info")
- (return-type "GFileInfo*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("const-char*" "attributes")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method query_info_async
- (docstring
- "F.query_info_async(attributes, callback, [flags, [io_priority,\n"
- " [cancellable, [user_data]]]]) -> query attributes\n"
- "\n"
- "Asynchronously gets the requested information about specified file.\n"
- "The result is a GFileInfo object that contains key-value attributes\n"
- "(such as type or size for the file).\n"
- "For more details, see F.query_info() which is the synchronous\n"
- "version of this call. \n"
- "When the operation is finished, callback will be called. You can\n"
- "then call F.query_info_finish() to get the result of the operation.\n"
- )
- (of-object "GFile")
- (c-name "g_file_query_info_async")
- (return-type "none")
- (parameters
- '("const-char*" "attributes")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method query_info_finish
- (of-object "GFile")
- (c-name "g_file_query_info_finish")
- (return-type "GFileInfo*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method query_filesystem_info
- (of-object "GFile")
- (c-name "g_file_query_filesystem_info")
- (return-type "GFileInfo*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("const-char*" "attributes")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method query_filesystem_info_async
- (of-object "GFile")
- (c-name "g_file_query_filesystem_info_async")
- (return-type "none")
- (parameters
- '("const-char*" "attributes")
- '("int" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method query_filesystem_info_finish
- (of-object "GFile")
- (c-name "g_file_query_filesystem_info_finish")
- (return-type "GFileInfo*")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method find_enclosing_mount
- (of-object "GFile")
- (c-name "g_file_find_enclosing_mount")
- (return-type "GMount*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method find_enclosing_mount_async
- (of-object "GFile")
- (c-name "g_file_find_enclosing_mount_async")
- (return-type "none")
- (parameters
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method find_enclosing_mount_finish
- (of-object "GFile")
- (c-name "g_file_find_enclosing_mount_finish")
- (return-type "GMount*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method enumerate_children
- (docstring
-"F.enumerate_children(attributes, [flags, cancellable]) -> enumerator\n"
-"Gets the requested information about the files in a directory.\n"
-"The result is a gio.FileEnumerator object that will give out gio.FileInfo\n"
-"objects for all the files in the directory.\n"
-"The attribute value is a string that specifies the file attributes that\n"
-"should be gathered. It is not an error if it's not possible to read a \n"
-"particular requested attribute from a file - it just won't be set.\n"
-"attribute should be a comma-separated list of attribute or attribute\n"
-"wildcards. The wildcard \"*\" means all attributes, and a wildcard like\n"
-"\"standard::*\" means all attributes in the standard namespace.\n"
-"An example attribute query be \"standard::*,owner::user\". The standard\n"
-"attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled by\n"
-"triggering the cancellable object from another thread. If the operation was\n"
-"cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
-"\n"
-"If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.\n"
-"If the file is not a directory, the gio.FILE_ERROR_NOTDIR error will\n"
-"be returned. Other errors are possible too.")
- (of-object "GFile")
- (c-name "g_file_enumerate_children")
- (return-type "GFileEnumerator*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("const-char*" "attributes")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method enumerate_children_async
- (docstring
-"F.enumerate_children_async(attributes, callback,\n"
-" [flags, io_priority, cancellable, user_data])\n"
-"Asynchronously gets the requested information about the files in a\n"
-"directory. The result is a GFileEnumerator object that will give out\n"
-"GFileInfo objects for all the files in the directory.\n"
-"\n"
-"For more details, see gio.File.enumerate_children() which is the synchronous\n"
-"version of this call.\n"
-"\n"
-"When the operation is finished, callback will be called. You can then call\n"
-"gio.File.enumerate_children_finish() to get the result of the operation.")
- (of-object "GFile")
- (c-name "g_file_enumerate_children_async")
- (return-type "none")
- (parameters
- '("const-char*" "attributes")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method enumerate_children_finish
- (of-object "GFile")
- (c-name "g_file_enumerate_children_finish")
- (return-type "GFileEnumerator*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method set_display_name
- (of-object "GFile")
- (c-name "g_file_set_display_name")
- (return-type "GFile*")
- (unblock-threads #t)
- (caller-owns-return #t)
- (parameters
- '("const-char*" "display_name")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_display_name_async
- (of-object "GFile")
- (c-name "g_file_set_display_name_async")
- (return-type "none")
- (parameters
- '("const-char*" "display_name")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method set_display_name_finish
- (of-object "GFile")
- (c-name "g_file_set_display_name_finish")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method delete
- (of-object "GFile")
- (c-name "g_file_delete")
- (return-type "gboolean")
- (unblock-threads #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method trash
- (of-object "GFile")
- (c-name "g_file_trash")
- (return-type "gboolean")
- (unblock-threads #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method copy
- (docstring
-"F.copy(destination, [callback, flags, cancellable, user_data])\n"
-"Copies the file source to the location specified by destination.\n"
-"Can not handle recursive copies of directories.\n"
-"\n"
-"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
-"destination file is overwritten.\n"
-"\n"
-"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
-"will be copied as symlinks, otherwise the target of the source symlink\n"
-"will be copied.\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled b\n"
-"triggering the cancellable object from another thread.\n"
-"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
-"will be returned.\n"
-"\n"
-"If progress_callback is not None, then the operation can be monitored\n"
-"by setting this to a callable. if specified progress_callback_data will\n"
-"be passed to this function. It is guaranteed that this callback\n"
-"will be called after all data has been transferred with the total number\n"
-"of bytes copied during the operation.\n"
-"\n"
-"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
-"error is returned, independent on the status of the destination.\n"
-"\n"
-"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
-"then the error gio.ERROR_EXISTS is returned.\n"
-"\n"
-"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
-"error is returned. If trying to overwrite a directory with a directory\n"
-"the gio.ERROR_WOULD_MERGE error is returned.\n"
-"\n"
-"If the source is a directory and the target does not exist\n"
-"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
-"then the gio.ERROR_WOULD_RECURSE error is returned.\n"
-"\n"
-"If you are interested in copying the GFile object itself\n"
-"(not the on-disk file), see gio.File.dup().")
- (of-object "GFile")
- (c-name "g_file_copy")
- (unblock-threads #t)
- (return-type "gboolean")
- (parameters
- '("GFile*" "destination")
- '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GFileProgressCallback" "progress_callback")
- '("gpointer" "progress_callback_data")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method copy_async
- (of-object "GFile")
- (docstring
- "F.copy_async(destination, callback, [flags, io_priority, user_data, cancellable, progress_callback])\n"
- "-> start copy\n"
- "\n"
- "For more details, see gio.File.copy() which is the synchronous\n"
- "version of this call. Asynchronously copies file.\n"
- "When the operation is finished, callback will be called.\n"
- "You can then call g_file_copy_finish() to get the result of the\n"
- "operation.\n"
- )
- (c-name "g_file_copy_async")
- (return-type "none")
- (parameters
- '("GFile*" "destination")
- '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GFileProgressCallback" "progress_callback")
- '("gpointer" "progress_callback_data")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method copy_finish
- (of-object "GFile")
- (c-name "g_file_copy_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method move
- (docstring
-"F.move(destination, [callback, flags, cancellable, user_data])\n"
-"Tries to move the file or directory source to the location\n"
-"specified by destination. If native move operations are\n"
-"supported then this is used, otherwise a copy + delete fallback\n"
-"is used. The native implementation may support moving directories\n"
-"(for instance on moves inside the same filesystem), but the \n"
-"fallback code does not.\n"
-"\n"
-"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
-"destination file is overwritten.\n"
-"\n"
-"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
-"will be copied as symlinks, otherwise the target of the source symlink\n"
-"will be copied.\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled b\n"
-"triggering the cancellable object from another thread.\n"
-"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
-"will be returned.\n"
-"\n"
-"If progress_callback is not None, then the operation can be monitored\n"
-"by setting this to a callable. if specified progress_callback_data will\n"
-"be passed to this function. It is guaranteed that this callback\n"
-"will be called after all data has been transferred with the total number\n"
-"of bytes copied during the operation.\n"
-"\n"
-"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
-"error is returned, independent on the status of the destination.\n"
-"\n"
-"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
-"then the error gio.ERROR_EXISTS is returned.\n"
-"\n"
-"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
-"error is returned. If trying to overwrite a directory with a directory\n"
-"the gio.ERROR_WOULD_MERGE error is returned.\n"
-"\n"
-"If the source is a directory and the target does not exist\n"
-"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
-"then the gio.ERROR_WOULD_RECURSE error is returned.")
- (of-object "GFile")
- (c-name "g_file_move")
- (return-type "gboolean")
- (parameters
- '("GFile*" "destination")
- '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GFileProgressCallback" "progress_callback")
- '("gpointer" "progress_callback_data")
- '("GError**" "error")
- )
-)
-
-(define-method make_directory
- (of-object "GFile")
- (c-name "g_file_make_directory")
- (return-type "gboolean")
- (unblock-threads #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method make_directory_with_parents
- (of-object "GFile")
- (c-name "g_file_make_directory_with_parents")
- (return-type "gboolean")
- (unblock-threads #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method make_symbolic_link
- (of-object "GFile")
- (c-name "g_file_make_symbolic_link")
- (return-type "gboolean")
- (unblock-threads #t)
- (parameters
- '("const-char*" "symlink_value")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method query_settable_attributes
- (docstring
- "F.query_settable_attributes([cancellable]) -> list\n\n"
- "Obtain the list of settable attributes for the file.\n"
- "Returns the type and full attribute name of all the attributes that\n"
- "can be set on this file. This doesn't mean setting it will always\n"
- "succeed though, you might get an access failure, or some specific\n"
- "file may not support a specific attribute.\n\n"
- "If cancellable is not None, then the operation can be cancelled by\n"
- "triggering the cancellable object from another thread. If the operation\n"
- "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
- )
- (of-object "GFile")
- (c-name "g_file_query_settable_attributes")
- (return-type "GFileAttributeInfoList*")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method query_writable_namespaces
- (docstring
- "F.query_writable_namespaces([cancellable]) -> list\n\n"
- "Obtain the list of attribute namespaces where new attributes can\n"
- "be created by a user. An example of this is extended attributes\n"
- "(in the "xattr" namespace).\n"
- "If cancellable is not None, then the operation can be cancelled\n"
- "by triggering the cancellable object from another thread. If the\n"
- "operation was cancelled, the error gio.IO_ERROR_CANCELLED\n"
- "will be returned."
- )
- (of-object "GFile")
- (c-name "g_file_query_writable_namespaces")
- (return-type "GFileAttributeInfoList*")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method set_attribute
- (docstring
- "F.set_attribute(attribute, type, value_p [,flags [,cancellable ]])->bool\n"
- "\n"
- "Sets an attribute in the file with attribute name attribute to value_p.\n"
- "If cancellable is not None, then the operation can be cancelled by\n"
- "triggering the cancellable object from another thread. If the operation\n"
- "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
- )
- (of-object "GFile")
- (c-name "g_file_set_attribute")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("GFileAttributeType" "type")
- '("gpointer" "value_p")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attributes_from_info
- (of-object "GFile")
- (c-name "g_file_set_attributes_from_info")
- (return-type "gboolean")
- (parameters
- '("GFileInfo*" "info")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attributes_async
- (of-object "GFile")
- (c-name "g_file_set_attributes_async")
- (return-type "none")
- (parameters
- '("GFileInfo*" "info")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method set_attributes_finish
- (of-object "GFile")
- (c-name "g_file_set_attributes_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GFileInfo**" "info")
- '("GError**" "error")
- )
-)
-
-(define-method set_attribute_string
- (of-object "GFile")
- (c-name "g_file_set_attribute_string")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("const-char*" "value")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attribute_byte_string
- (of-object "GFile")
- (c-name "g_file_set_attribute_byte_string")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("const-char*" "value")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attribute_uint32
- (of-object "GFile")
- (c-name "g_file_set_attribute_uint32")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("guint32" "value")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attribute_int32
- (of-object "GFile")
- (c-name "g_file_set_attribute_int32")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("gint32" "value")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attribute_uint64
- (of-object "GFile")
- (c-name "g_file_set_attribute_uint64")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("guint64" "value")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method set_attribute_int64
- (of-object "GFile")
- (c-name "g_file_set_attribute_int64")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("gint64" "value")
- '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method mount_enclosing_volume
- (docstring
-"F.mount_enclosing_volume(mount_operation, callback, [cancellable,\n"
-" user_data])\n"
-"Starts a mount_operation, mounting the volume that contains\n"
-"the file location.\n"
-"\n"
-"When this operation has completed, callback will be called with\n"
-"user_user data, and the operation can be finalized with\n"
-"gio.File.mount_enclosing_volume_finish().\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled\n"
-"by triggering the cancellable object from another thread.\n"
-"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
-"will be returned.")
- (of-object "GFile")
- (c-name "g_file_mount_enclosing_volume")
- (return-type "none")
- (parameters
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method mount_enclosing_volume_finish
- (of-object "GFile")
- (c-name "g_file_mount_enclosing_volume_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method mount_mountable
- (docstring
-"F.mount_mountable(mount_operation, callback, [flags, cancellable,\n"
-" user_data])\n"
-"Mounts a file of type gio.FILE_TYPE_MOUNTABLE. Using mount_operation,\n"
-"you can request callbacks when, for instance, passwords are needed\n"
-"during authentication.\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled by\n"
-" triggering the cancellable object from another thread. If the\n"
-"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
-"\n"
-"When the operation is finished, callback will be called. You can then\n"
-"call g_file_mount_mountable_finish() to get the result of the operation.\n")
- (of-object "GFile")
- (c-name "g_file_mount_mountable")
- (return-type "none")
- (parameters
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method mount_mountable_finish
- (of-object "GFile")
- (c-name "g_file_mount_mountable_finish")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method unmount_mountable
- (docstring
-"F.unmount_mountable(callback, [flags, cancellable, user_data])\n"
-"Unmounts a file of type gio.FILE_TYPE_MOUNTABLE.\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled by\n"
-"triggering the cancellable object from another thread. If the\n"
-"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
-"\n"
-"When the operation is finished, callback will be called. You can\n"
-"then call gio.File.unmount_mountable_finish() to get the\n"
-"result of the operation.\n")
- (of-object "GFile")
- (c-name "g_file_unmount_mountable")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method unmount_mountable_finish
- (of-object "GFile")
- (c-name "g_file_unmount_mountable_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method eject_mountable
- (of-object "GFile")
- (c-name "g_file_eject_mountable")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_mountable_finish
- (of-object "GFile")
- (c-name "g_file_eject_mountable_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-(define-method copy_attributes
- (of-object "GFile")
- (c-name "g_file_copy_attributes")
- (return-type "gboolean")
- (parameters
- '("GFile*" "destination")
- '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method monitor_directory
- (of-object "GFile")
- (c-name "g_file_monitor_directory")
- (return-type "GFileMonitor*")
- (caller-owns-return #t)
- (parameters
- '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method monitor_file
- (of-object "GFile")
- (c-name "g_file_monitor_file")
- (return-type "GFileMonitor*")
- (caller-owns-return #t)
- (parameters
- '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method monitor
- (of-object "GFile")
- (c-name "g_file_monitor")
- (return-type "GFileMonitor*")
- (parameters
- '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method query_default_handler
- (of-object "GFile")
- (c-name "g_file_query_default_handler")
- (return-type "GAppInfo*")
- (caller-owns-return #t)
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method load_contents
- (docstring
- "F.load_contents([cancellable]) -> contents, length, etag_out\n\n"
- "Loads the content of the file into memory, returning the size of the\n"
- "data. The data is always zero terminated, but this is not included\n"
- "in the resultant length.\n"
- "If cancellable is not None, then the operation can be cancelled by\n"
- "triggering the cancellable object from another thread. If the operation\n"
- "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
- )
- (of-object "GFile")
- (c-name "g_file_load_contents")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("char**" "contents")
- '("gsize*" "length")
- '("char**" "etag_out")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method load_contents_async
- (docstring
- "F.load_contents_async(callback, [cancellable, [user_data]])->start loading\n\n"
- "Starts an asynchronous load of the file's contents.\n\n"
- "For more details, see F.load_contents() which is the synchronous\n"
- "version of this call.\n\n"
- "When the load operation has completed, callback will be called with\n"
- "user data. To finish the operation, call F.load_contents_finish() with\n"
- "the parameter 'res' returned by the callback.\n\n"
- "If cancellable is not None, then the operation can be cancelled by\n"
- "triggering the cancellable object from another thread. If the operation\n"
- "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
- )
- (of-object "GFile")
- (c-name "g_file_load_contents_async")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method load_contents_finish
- (docstring
- "F.load_contents_finish(res) -> contents, length, etag_out\n\n"
- "Finishes an asynchronous load of the file's contents. The contents are\n"
- "placed in contents, and length is set to the size of the contents\n"
- "string. If etag_out is present, it will be set to the new entity\n"
- "tag for the file.\n"
- )
- (of-object "GFile")
- (c-name "g_file_load_contents_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "res")
- '("char**" "contents")
- '("gsize*" "length")
- '("char**" "etag_out")
- '("GError**" "error")
- )
-)
-
-(define-method load_partial_contents_async
- (of-object "GFile")
- (c-name "g_file_load_partial_contents_async")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GFileReadMoreCallback" "read_more_callback")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method load_partial_contents_finish
- (of-object "GFile")
- (c-name "g_file_load_partial_contents_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "res")
- '("char**" "contents")
- '("gsize*" "length")
- '("char**" "etag_out")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method replace_contents
- (docstring
- "F.replace_contents(contents, [etag, [make_backup, [flags, [cancellable]]]])\n"
- "-> etag_out\n"
- "\n"
- "Replaces the content of the file, returning the new etag value for the\n"
- "file. If an etag is specified, any existing file must have that etag, or\n"
- "the error gio.IO_ERROR_WRONG_ETAG will be returned.\n"
- "If make_backup is True, this method will attempt to make a backup of the\n"
- "file. If cancellable is not None, then the operation can be cancelled by\n"
- "triggering the cancellable object from another thread. If the operation\n"
- "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
- )
- (of-object "GFile")
- (c-name "g_file_replace_contents")
- (return-type "gboolean")
- (parameters
- '("const-char*" "contents")
- '("gsize" "length")
- '("const-char*" "etag")
- '("gboolean" "make_backup")
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("char**" "new_etag")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method replace_contents_async
- (docstring
- "F.replace_contents_async(contents, callback, [etag, [make_backup, [flags,\n"
- " [cancellable]]]]) -> etag_out\n"
- "\n"
- "Starts an asynchronous replacement of the file with the given contents.\n"
- "For more details, see F.replace_contents() which is the synchronous\n"
- "version of this call.\n\n"
- "When the load operation has completed, callback will be called with\n"
- "user data. To finish the operation, call F.replace_contents_finish() with\n"
- "the parameter 'res' returned by the callback.\n\n"
- "If cancellable is not None, then the operation can be cancelled by\n"
- "triggering the cancellable object from another thread. If the operation\n"
- "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
- )
- (of-object "GFile")
- (c-name "g_file_replace_contents_async")
- (return-type "none")
- (parameters
- '("const-char*" "contents")
- '("gsize" "length")
- '("const-char*" "etag")
- '("gboolean" "make_backup")
- '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-;;
-;; wrapped in gfile.override
-;;
-(define-method replace_contents_finish
- (docstring
- "F.replace_contents_finish(res) -> etag_out\n\n"
- "Finishes an asynchronous replacement of the file's contents.\n"
- "The new entity tag for the file is returned.\n"
- )
- (of-object "GFile")
- (c-name "g_file_replace_contents_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "res")
- '("char**" "new_etag")
- '("GError**" "error")
- )
-)
-
-(define-method create_readwrite
- (of-object "GFile")
- (c-name "g_file_create_readwrite")
- (return-type "GFileIOStream*")
- (parameters
- '("GFileCreateFlags" "flags")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method create_readwrite_async
- (of-object "GFile")
- (c-name "g_file_create_readwrite_async")
- (return-type "none")
- (parameters
- '("GFileCreateFlags" "flags")
- '("int" "io_priority")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method create_readwrite_finish
- (of-object "GFile")
- (c-name "g_file_create_readwrite_finish")
- (return-type "GFileIOStream*")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method eject_mountable_with_operation
- (of-object "GFile")
- (c-name "g_file_eject_mountable_with_operation")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_mountable_with_operation_finish
- (of-object "GFile")
- (c-name "g_file_eject_mountable_with_operation_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method open_readwrite
- (of-object "GFile")
- (c-name "g_file_open_readwrite")
- (return-type "GFileIOStream*")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method open_readwrite_async
- (of-object "GFile")
- (c-name "g_file_open_readwrite_async")
- (return-type "none")
- (parameters
- '("int" "io_priority")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method open_readwrite_finish
- (of-object "GFile")
- (c-name "g_file_open_readwrite_finish")
- (return-type "GFileIOStream*")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method poll_mountable
- (of-object "GFile")
- (c-name "g_file_poll_mountable")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method poll_mountable_finish
- (of-object "GFile")
- (c-name "g_file_poll_mountable_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method replace_readwrite
- (of-object "GFile")
- (c-name "g_file_replace_readwrite")
- (return-type "GFileIOStream*")
- (parameters
- '("const-char*" "etag")
- '("gboolean" "make_backup")
- '("GFileCreateFlags" "flags")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method replace_readwrite_async
- (of-object "GFile")
- (c-name "g_file_replace_readwrite_async")
- (return-type "none")
- (parameters
- '("const-char*" "etag")
- '("gboolean" "make_backup")
- '("GFileCreateFlags" "flags")
- '("int" "io_priority")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method replace_readwrite_finish
- (of-object "GFile")
- (c-name "g_file_replace_readwrite_finish")
- (return-type "GFileIOStream*")
- (parameters
- '("GAsyncResult*" "res")
- '("GError**" "error")
- )
-)
-
-(define-method start_mountable
- (of-object "GFile")
- (c-name "g_file_start_mountable")
- (return-type "none")
- (parameters
- '("GDriveStartFlags" "flags")
- '("GMountOperation*" "start_operation")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method start_mountable_finish
- (of-object "GFile")
- (c-name "g_file_start_mountable_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method stop_mountable
- (of-object "GFile")
- (c-name "g_file_stop_mountable")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method stop_mountable_finish
- (of-object "GFile")
- (c-name "g_file_stop_mountable_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method supports_thread_contexts
- (of-object "GFile")
- (c-name "g_file_supports_thread_contexts")
- (return-type "gboolean")
-)
-
-(define-method unmount_mountable_with_operation
- (of-object "GFile")
- (c-name "g_file_unmount_mountable_with_operation")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method unmount_mountable_with_operation_finish
- (of-object "GFile")
- (c-name "g_file_unmount_mountable_with_operation_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gfileicon.h
-
-(define-function file_icon_get_type
- (c-name "g_file_icon_get_type")
- (return-type "GType")
-)
-
-(define-function file_icon_new
- (c-name "g_file_icon_new")
- (is-constructor-of "GFileIcon")
- (return-type "GIcon*")
- ;; Note: starting with GLib 2.18 we could use (properties ...)
- ;; instead, but I don't know if it is possible to branch on version
- ;; in codegen.
- (parameters
- '("GFile*" "file")
- )
-)
-
-(define-method get_file
- (of-object "GFileIcon")
- (c-name "g_file_icon_get_file")
- (return-type "GFile*")
-)
-
-
-
-;; From gfileinfo.h
-
-(define-function file_info_get_type
- (c-name "g_file_info_get_type")
- (return-type "GType")
-)
-
-(define-function file_info_new
- (c-name "g_file_info_new")
- (is-constructor-of "GFileInfo")
- (return-type "GFileInfo*")
-)
-
-(define-method dup
- (of-object "GFileInfo")
- (c-name "g_file_info_dup")
- (return-type "GFileInfo*")
- (caller-owns-return #t)
-)
-
-(define-method copy_into
- (of-object "GFileInfo")
- (c-name "g_file_info_copy_into")
- (return-type "none")
- (parameters
- '("GFileInfo*" "dest_info")
- )
-)
-
-(define-method has_attribute
- (of-object "GFileInfo")
- (c-name "g_file_info_has_attribute")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method has_namespace
- (of-object "GFileInfo")
- (c-name "g_file_info_has_namespace")
- (return-type "gboolean")
- (parameters
- '("const-char*" "name_space")
- )
-)
-
-;;
-;; wrapped in gfileinfo.override
-(define-method list_attributes
- (docstring
- "INFO.list_attributes(name_space) -> Attribute list\n\n"
- "Lists the file info structure's attributes."
- )
- (of-object "GFileInfo")
- (c-name "g_file_info_list_attributes")
- (return-type "char**")
- (parameters
- '("const-char*" "name_space")
- )
-)
-
-(define-method get_attribute_data
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_data")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("GFileAttributeType*" "type")
- '("gpointer*" "value_pp")
- '("GFileAttributeStatus*" "status")
- )
-)
-
-(define-method get_attribute_type
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_type")
- (return-type "GFileAttributeType")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method remove_attribute
- (of-object "GFileInfo")
- (c-name "g_file_info_remove_attribute")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_status
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_status")
- (return-type "GFileAttributeStatus")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method set_attribute_status
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_status")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- '("GFileAttributeStatus" "status")
- )
-)
-
-(define-method get_attribute_as_string
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_as_string")
- (return-type "char*")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_string
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_string")
- (return-type "const-char*")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_byte_string
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_byte_string")
- (return-type "const-char*")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_boolean
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_boolean")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_uint32
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_uint32")
- (return-type "guint32")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_int32
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_int32")
- (return-type "gint32")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_uint64
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_uint64")
- (return-type "guint64")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_int64
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_int64")
- (return-type "gint64")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_object
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_object")
- (return-type "GObject*")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method get_attribute_stringv
- (of-object "GFileInfo")
- (c-name "g_file_info_get_attribute_stringv")
- (return-type "char**")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method set_attribute
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("GFileAttributeType" "type")
- '("gpointer" "value_p")
- )
-)
-
-(define-method set_attribute_string
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_string")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("const-char*" "attr_value")
- )
-)
-
-(define-method set_attribute_byte_string
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_byte_string")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("const-char*" "attr_value")
- )
-)
-
-(define-method set_attribute_boolean
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_boolean")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("gboolean" "attr_value")
- )
-)
-
-(define-method set_attribute_uint32
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_uint32")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("guint32" "attr_value")
- )
-)
-
-(define-method set_attribute_int32
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_int32")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("gint32" "attr_value")
- )
-)
-
-(define-method set_attribute_uint64
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_uint64")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("guint64" "attr_value")
- )
-)
-
-(define-method set_attribute_int64
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_int64")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("gint64" "attr_value")
- )
-)
-
-(define-method set_attribute_object
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_object")
- (return-type "none")
- (parameters
- '("const-char*" "attribute")
- '("GObject*" "attr_value")
- )
-)
-
-(define-method clear_status
- (of-object "GFileInfo")
- (c-name "g_file_info_clear_status")
- (return-type "none")
-)
-
-(define-method get_file_type
- (of-object "GFileInfo")
- (c-name "g_file_info_get_file_type")
- (return-type "GFileType")
-)
-
-(define-method get_is_hidden
- (of-object "GFileInfo")
- (c-name "g_file_info_get_is_hidden")
- (return-type "gboolean")
-)
-
-(define-method get_is_backup
- (of-object "GFileInfo")
- (c-name "g_file_info_get_is_backup")
- (return-type "gboolean")
-)
-
-(define-method get_is_symlink
- (of-object "GFileInfo")
- (c-name "g_file_info_get_is_symlink")
- (return-type "gboolean")
-)
-
-(define-method get_name
- (of-object "GFileInfo")
- (c-name "g_file_info_get_name")
- (return-type "const-char*")
-)
-
-(define-method get_display_name
- (of-object "GFileInfo")
- (c-name "g_file_info_get_display_name")
- (return-type "const-char*")
-)
-
-(define-method get_edit_name
- (of-object "GFileInfo")
- (c-name "g_file_info_get_edit_name")
- (return-type "const-char*")
-)
-
-(define-method get_icon
- (of-object "GFileInfo")
- (c-name "g_file_info_get_icon")
- (return-type "GIcon*")
-)
-
-(define-method get_content_type
- (of-object "GFileInfo")
- (c-name "g_file_info_get_content_type")
- (return-type "const-char*")
-)
-
-(define-method get_size
- (of-object "GFileInfo")
- (c-name "g_file_info_get_size")
- (return-type "goffset")
-)
-
-;;
-;; wrapped in gfileinfo.override
-;;
-(define-method get_modification_time
- (docstring
-"INFO.get_modification_time() -> modification time\n"
-"Returns the modification time, in UNIX time format\n")
- (of-object "GFileInfo")
- (c-name "g_file_info_get_modification_time")
- (return-type "none")
- (parameters
- '("GTimeVal*" "result")
- )
-)
-
-(define-method get_symlink_target
- (of-object "GFileInfo")
- (c-name "g_file_info_get_symlink_target")
- (return-type "const-char*")
-)
-
-(define-method get_etag
- (of-object "GFileInfo")
- (c-name "g_file_info_get_etag")
- (return-type "const-char*")
-)
-
-(define-method get_sort_order
- (of-object "GFileInfo")
- (c-name "g_file_info_get_sort_order")
- (return-type "gint32")
-)
-
-(define-method set_attribute_mask
- (of-object "GFileInfo")
- (c-name "g_file_info_set_attribute_mask")
- (return-type "none")
- (parameters
- '("GFileAttributeMatcher*" "mask")
- )
-)
-
-(define-method unset_attribute_mask
- (of-object "GFileInfo")
- (c-name "g_file_info_unset_attribute_mask")
- (return-type "none")
-)
-
-(define-method set_file_type
- (of-object "GFileInfo")
- (c-name "g_file_info_set_file_type")
- (return-type "none")
- (parameters
- '("GFileType" "type")
- )
-)
-
-(define-method set_is_hidden
- (of-object "GFileInfo")
- (c-name "g_file_info_set_is_hidden")
- (return-type "none")
- (parameters
- '("gboolean" "is_hidden")
- )
-)
-
-(define-method set_is_symlink
- (of-object "GFileInfo")
- (c-name "g_file_info_set_is_symlink")
- (return-type "none")
- (parameters
- '("gboolean" "is_symlink")
- )
-)
-
-(define-method set_name
- (of-object "GFileInfo")
- (c-name "g_file_info_set_name")
- (return-type "none")
- (parameters
- '("const-char*" "name")
- )
-)
-
-(define-method set_display_name
- (of-object "GFileInfo")
- (c-name "g_file_info_set_display_name")
- (return-type "none")
- (parameters
- '("const-char*" "display_name")
- )
-)
-
-(define-method set_edit_name
- (of-object "GFileInfo")
- (c-name "g_file_info_set_edit_name")
- (return-type "none")
- (parameters
- '("const-char*" "edit_name")
- )
-)
-
-(define-method set_icon
- (of-object "GFileInfo")
- (c-name "g_file_info_set_icon")
- (return-type "none")
- (parameters
- '("GIcon*" "icon")
- )
-)
-
-(define-method set_content_type
- (of-object "GFileInfo")
- (c-name "g_file_info_set_content_type")
- (return-type "none")
- (parameters
- '("const-char*" "content_type")
- )
-)
-
-(define-method set_size
- (of-object "GFileInfo")
- (c-name "g_file_info_set_size")
- (return-type "none")
- (parameters
- '("goffset" "size")
- )
-)
-
-(define-method set_modification_time
- (of-object "GFileInfo")
- (c-name "g_file_info_set_modification_time")
- (return-type "none")
- (parameters
- '("GTimeVal*" "mtime")
- )
-)
-
-(define-method set_symlink_target
- (of-object "GFileInfo")
- (c-name "g_file_info_set_symlink_target")
- (return-type "none")
- (parameters
- '("const-char*" "symlink_target")
- )
-)
-
-(define-method set_sort_order
- (of-object "GFileInfo")
- (c-name "g_file_info_set_sort_order")
- (return-type "none")
- (parameters
- '("gint32" "sort_order")
- )
-)
-
-(define-function file_attribute_matcher_new
- (c-name "g_file_attribute_matcher_new")
- (is-constructor-of "GFileAttributeMatcher")
- (return-type "GFileAttributeMatcher*")
- (parameters
- '("const-char*" "attributes")
- )
-)
-
-(define-method ref
- (of-object "GFileAttributeMatcher")
- (c-name "g_file_attribute_matcher_ref")
- (return-type "GFileAttributeMatcher*")
-)
-
-(define-method unref
- (of-object "GFileAttributeMatcher")
- (c-name "g_file_attribute_matcher_unref")
- (return-type "none")
-)
-
-(define-method matches
- (of-object "GFileAttributeMatcher")
- (c-name "g_file_attribute_matcher_matches")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method matches_only
- (of-object "GFileAttributeMatcher")
- (c-name "g_file_attribute_matcher_matches_only")
- (return-type "gboolean")
- (parameters
- '("const-char*" "attribute")
- )
-)
-
-(define-method enumerate_namespace
- (of-object "GFileAttributeMatcher")
- (c-name "g_file_attribute_matcher_enumerate_namespace")
- (return-type "gboolean")
- (parameters
- '("const-char*" "ns")
- )
-)
-
-(define-method enumerate_next
- (of-object "GFileAttributeMatcher")
- (c-name "g_file_attribute_matcher_enumerate_next")
- (return-type "const-char*")
-)
-
-
-
-;; From gfileinputstream.h
-
-(define-function file_input_stream_get_type
- (c-name "g_file_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-method query_info
- (of-object "GFileInputStream")
- (c-name "g_file_input_stream_query_info")
- (return-type "GFileInfo*")
- (parameters
- '("char*" "attributes")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method query_info_async
- (of-object "GFileInputStream")
- (c-name "g_file_input_stream_query_info_async")
- (return-type "none")
- (parameters
- '("char*" "attributes")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method query_info_finish
- (of-object "GFileInputStream")
- (c-name "g_file_input_stream_query_info_finish")
- (return-type "GFileInfo*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gfileiostream.h
-
-(define-function file_io_stream_get_type
- (c-name "g_file_io_stream_get_type")
- (return-type "GType")
-)
-
-(define-method query_info
- (of-object "GFileIOStream")
- (c-name "g_file_io_stream_query_info")
- (return-type "GFileInfo*")
- (parameters
- '("const-char*" "attributes")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method query_info_async
- (of-object "GFileIOStream")
- (c-name "g_file_io_stream_query_info_async")
- (return-type "none")
- (parameters
- '("const-char*" "attributes")
- '("int" "io_priority")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method query_info_finish
- (of-object "GFileIOStream")
- (c-name "g_file_io_stream_query_info_finish")
- (return-type "GFileInfo*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method get_etag
- (of-object "GFileIOStream")
- (c-name "g_file_io_stream_get_etag")
- (return-type "char*")
-)
-
-
-
-
-;; From gfilemonitor.h
-
-(define-function file_monitor_get_type
- (c-name "g_file_monitor_get_type")
- (return-type "GType")
-)
-
-(define-method cancel
- (of-object "GFileMonitor")
- (c-name "g_file_monitor_cancel")
- (return-type "gboolean")
-)
-
-(define-method is_cancelled
- (of-object "GFileMonitor")
- (c-name "g_file_monitor_is_cancelled")
- (return-type "gboolean")
-)
-
-(define-method set_rate_limit
- (of-object "GFileMonitor")
- (c-name "g_file_monitor_set_rate_limit")
- (return-type "none")
- (parameters
- '("int" "limit_msecs")
- )
-)
-
-(define-method emit_event
- (of-object "GFileMonitor")
- (c-name "g_file_monitor_emit_event")
- (return-type "none")
- (parameters
- '("GFile*" "file")
- '("GFile*" "other_file")
- '("GFileMonitorEvent" "event_type")
- )
-)
-
-
-
-;; From gfilenamecompleter.h
-
-(define-function filename_completer_get_type
- (c-name "g_filename_completer_get_type")
- (return-type "GType")
-)
-
-(define-function filename_completer_new
- (c-name "g_filename_completer_new")
- (is-constructor-of "GFilenameCompleter")
- (return-type "GFilenameCompleter*")
-)
-
-(define-method get_completion_suffix
- (of-object "GFilenameCompleter")
- (c-name "g_filename_completer_get_completion_suffix")
- (return-type "char*")
- (parameters
- '("const-char*" "initial_text")
- )
-)
-
-(define-method get_completions
- (of-object "GFilenameCompleter")
- (c-name "g_filename_completer_get_completions")
- (return-type "char**")
- (parameters
- '("const-char*" "initial_text")
- )
-)
-
-(define-method set_dirs_only
- (of-object "GFilenameCompleter")
- (c-name "g_filename_completer_set_dirs_only")
- (return-type "none")
- (parameters
- '("gboolean" "dirs_only")
- )
-)
-
-
-
-;; From gfileoutputstream.h
-
-(define-function file_output_stream_get_type
- (c-name "g_file_output_stream_get_type")
- (return-type "GType")
-)
-
-(define-method query_info
- (of-object "GFileOutputStream")
- (c-name "g_file_output_stream_query_info")
- (return-type "GFileInfo*")
- (parameters
- '("char*" "attributes")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method query_info_async
- (of-object "GFileOutputStream")
- (c-name "g_file_output_stream_query_info_async")
- (return-type "none")
- (parameters
- '("char*" "attributes")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method query_info_finish
- (of-object "GFileOutputStream")
- (c-name "g_file_output_stream_query_info_finish")
- (return-type "GFileInfo*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method get_etag
- (of-object "GFileOutputStream")
- (c-name "g_file_output_stream_get_etag")
- (return-type "char*")
-)
-
-
-;; From gfilterinputstream.h
-
-(define-function filter_input_stream_get_type
- (c-name "g_filter_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-method get_base_stream
- (of-object "GFilterInputStream")
- (c-name "g_filter_input_stream_get_base_stream")
- (return-type "GInputStream*")
-)
-
-(define-method get_close_base_stream
- (of-object "GFilterInputStream")
- (c-name "g_filter_input_stream_get_close_base_stream")
- (return-type "gboolean")
-)
-
-(define-method set_close_base_stream
- (of-object "GFilterInputStream")
- (c-name "g_filter_input_stream_set_close_base_stream")
- (return-type "none")
- (parameters
- '("gboolean" "close_base")
- )
-)
-
-
-
-;; From gfilteroutputstream.h
-
-(define-function filter_output_stream_get_type
- (c-name "g_filter_output_stream_get_type")
- (return-type "GType")
-)
-
-(define-method get_base_stream
- (of-object "GFilterOutputStream")
- (c-name "g_filter_output_stream_get_base_stream")
- (return-type "GOutputStream*")
-)
-
-(define-method get_close_base_stream
- (of-object "GFilterOutputStream")
- (c-name "g_filter_output_stream_get_close_base_stream")
- (return-type "gboolean")
-)
-
-(define-method set_close_base_stream
- (of-object "GFilterOutputStream")
- (c-name "g_filter_output_stream_set_close_base_stream")
- (return-type "none")
- (parameters
- '("gboolean" "close_base")
- )
-)
-
-
-
-;; From gicon.h
-
-(define-function icon_get_type
- (c-name "g_icon_get_type")
- (return-type "GType")
-)
-
-(define-function icon_hash
- (c-name "g_icon_hash")
- (return-type "guint")
- (parameters
- '("gconstpointer" "icon")
- )
-)
-
-(define-method equal
- (of-object "GIcon")
- (c-name "g_icon_equal")
- (return-type "gboolean")
- (parameters
- '("GIcon*" "icon2")
- )
-)
-
-(define-method to_string
- (of-object "GIcon")
- (c-name "g_icon_to_string")
- (return-type "gchar*")
-)
-
-(define-function icon_new_for_string
- (c-name "g_icon_new_for_string")
- (return-type "GIcon*")
- (parameters
- '("const-gchar*" "str")
- '("GError**" "error")
- )
-)
-
-
-
-;; From ginetsocketaddress.h
-
-(define-function inet_socket_address_get_type
- (c-name "g_inet_socket_address_get_type")
- (return-type "GType")
-)
-
-(define-function inet_socket_address_new
- (c-name "g_inet_socket_address_new")
- (is-constructor-of "GInetSocketAddress")
- (return-type "GSocketAddress*")
- (parameters
- '("GInetAddress*" "address")
- '("guint16" "port")
- )
-)
-
-(define-method get_address
- (of-object "GInetSocketAddress")
- (c-name "g_inet_socket_address_get_address")
- (return-type "GInetAddress*")
-)
-
-(define-method get_port
- (of-object "GInetSocketAddress")
- (c-name "g_inet_socket_address_get_port")
- (return-type "guint16")
-)
-
-
-
-;; From ginputstream.h
-
-(define-function input_stream_get_type
- (c-name "g_input_stream_get_type")
- (return-type "GType")
-)
-
-;;
-;; wrapped in ginputstream.override
-;;
-;; Note: the following two methods are renamed for consistency with
-;; Python file objects' read(). I.e. g_input_stream_read_all() is
-;; more like Python file.read(), so it is renamed read(). Since now
-;; there is a name clash, g_input_stream_read() is renamed
-;; read_part().
-(define-method read_part
- (of-object "GInputStream")
- (docstring
- "STREAM.read_part([count, [cancellable]]) -> string\n"
- "\n"
- "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
- "omitted, read until the end of the stream. This method is allowed to\n"
- "stop at any time after reading at least 1 byte from the stream. E.g.\n"
- "when reading over a (relatively slow) HTTP connection, it will often\n"
- "stop after receiving one packet. Therefore, to reliably read requested\n"
- "number of bytes, you need to use a loop. See also gio.InputStream.read\n"
- "for easier to use (though less efficient) method.\n"
- "\n"
- "Note: this method roughly corresponds to C GIO g_input_stream_read."
- )
- (c-name "g_input_stream_read")
- (return-type "gssize")
- (parameters
- '("void*" "buffer")
- '("gsize" "count")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in ginputstream.override
-;;
-;; See comments before the previous method definition.
-(define-method read
- (of-object "GInputStream")
- (docstring
- "STREAM.read([count, [cancellable]]) -> string\n"
- "\n"
- "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
- "omitted, read until the end of the stream. This method will stop only\n"
- "after reading requested number of bytes, reaching end of stream or\n"
- "triggering an I/O error. See also gio.InputStream.read_part for more\n"
- "efficient, but more cumbersome to use method.\n"
- "\n"
- "Note: this method roughly corresponds to C GIO g_input_stream_read_all.\n"
- "It was renamed for consistency with Python standard file.read."
- )
- (c-name "g_input_stream_read_all")
- (return-type "gboolean")
- (parameters
- '("void*" "buffer")
- '("gsize" "count")
- '("gsize*" "bytes_read")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method skip
- (of-object "GInputStream")
- (c-name "g_input_stream_skip")
- (return-type "gssize")
- (parameters
- '("gsize" "count")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method close
- (of-object "GInputStream")
- (c-name "g_input_stream_close")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in ginputstream.override
-;;
-(define-method read_async
- (of-object "GInputStream")
- (c-name "g_input_stream_read_async")
- (return-type "none")
- (parameters
- '("void*" "buffer")
- '("gsize" "count")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-;;
-;; wrapped in ginputstream.override
-;;
-(define-method read_finish
- (of-object "GInputStream")
- (c-name "g_input_stream_read_finish")
- (return-type "gssize")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method skip_async
- (of-object "GInputStream")
- (c-name "g_input_stream_skip_async")
- (return-type "none")
- (parameters
- '("gsize" "count")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method skip_finish
- (of-object "GInputStream")
- (c-name "g_input_stream_skip_finish")
- (return-type "gssize")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in ginputstream.override
-;;
-(define-method close_async
- (of-object "GInputStream")
- (c-name "g_input_stream_close_async")
- (return-type "none")
- (parameters
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method close_finish
- (of-object "GInputStream")
- (c-name "g_input_stream_close_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method is_closed
- (of-object "GInputStream")
- (c-name "g_input_stream_is_closed")
- (return-type "gboolean")
-)
-
-(define-method has_pending
- (of-object "GInputStream")
- (c-name "g_input_stream_has_pending")
- (return-type "gboolean")
-)
-
-(define-method set_pending
- (of-object "GInputStream")
- (c-name "g_input_stream_set_pending")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method clear_pending
- (of-object "GInputStream")
- (c-name "g_input_stream_clear_pending")
- (return-type "none")
-)
-
-
-
-;; From gioalias.h
-
-
-
-;; From gioenumtypes.h
-
-(define-function app_info_create_flags_get_type
- (c-name "g_app_info_create_flags_get_type")
- (return-type "GType")
-)
-
-(define-function data_stream_byte_order_get_type
- (c-name "g_data_stream_byte_order_get_type")
- (return-type "GType")
-)
-
-(define-function data_stream_newline_type_get_type
- (c-name "g_data_stream_newline_type_get_type")
- (return-type "GType")
-)
-
-(define-function file_query_info_flags_get_type
- (c-name "g_file_query_info_flags_get_type")
- (return-type "GType")
-)
-
-(define-function file_create_flags_get_type
- (c-name "g_file_create_flags_get_type")
- (return-type "GType")
-)
-
-(define-function file_copy_flags_get_type
- (c-name "g_file_copy_flags_get_type")
- (return-type "GType")
-)
-
-(define-function file_monitor_flags_get_type
- (c-name "g_file_monitor_flags_get_type")
- (return-type "GType")
-)
-
-(define-function file_attribute_type_get_type
- (c-name "g_file_attribute_type_get_type")
- (return-type "GType")
-)
-
-(define-function file_attribute_info_flags_get_type
- (c-name "g_file_attribute_info_flags_get_type")
- (return-type "GType")
-)
-
-(define-function file_attribute_status_get_type
- (c-name "g_file_attribute_status_get_type")
- (return-type "GType")
-)
-
-(define-function file_type_get_type
- (c-name "g_file_type_get_type")
- (return-type "GType")
-)
-
-(define-function file_monitor_event_get_type
- (c-name "g_file_monitor_event_get_type")
- (return-type "GType")
-)
-
-(define-function io_error_enum_get_type
- (c-name "g_io_error_enum_get_type")
- (return-type "GType")
-)
-
-(define-function ask_password_flags_get_type
- (c-name "g_ask_password_flags_get_type")
- (return-type "GType")
-)
-
-(define-function password_save_get_type
- (c-name "g_password_save_get_type")
- (return-type "GType")
-)
-
-(define-function output_stream_splice_flags_get_type
- (c-name "g_output_stream_splice_flags_get_type")
- (return-type "GType")
-)
-
-
-
-;; From gioerror.h
-
-(define-function io_error_quark
- (c-name "g_io_error_quark")
- (return-type "GQuark")
-)
-
-(define-function io_error_from_errno
- (c-name "g_io_error_from_errno")
- (return-type "GIOErrorEnum")
- (parameters
- '("gint" "err_no")
- )
-)
-
-
-
-;; From gio.h
-
-
-
-;; From gio-marshal.h
-
-
-
-;; From giomodule.h
-
-(define-function io_module_get_type
- (c-name "g_io_module_get_type")
- (return-type "GType")
-)
-
-(define-function io_module_new
- (c-name "g_io_module_new")
- (is-constructor-of "GIoModule")
- (return-type "GIOModule*")
- (parameters
- '("const-gchar*" "filename")
- )
-)
-
-(define-function io_modules_load_all_in_directory
- (c-name "g_io_modules_load_all_in_directory")
- (return-type "GList*")
- (parameters
- '("const-char*" "dirname")
- )
-)
-
-(define-method load
- (of-object "GIOModule")
- (c-name "g_io_module_load")
- (return-type "none")
-)
-
-(define-method unload
- (of-object "GIOModule")
- (c-name "g_io_module_unload")
- (return-type "none")
-)
-
-
-
-;; From gioscheduler.h
-
-(define-function io_scheduler_push_job
- (c-name "g_io_scheduler_push_job")
- (return-type "none")
- (parameters
- '("GIOSchedulerJobFunc" "job_func")
- '("gpointer" "user_data")
- '("GDestroyNotify" "notify")
- '("gint" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- )
-)
-
-(define-function io_scheduler_cancel_all_jobs
- (c-name "g_io_scheduler_cancel_all_jobs")
- (return-type "none")
-)
-
-(define-method send_to_mainloop
- (of-object "GIOSchedulerJob")
- (c-name "g_io_scheduler_job_send_to_mainloop")
- (return-type "gboolean")
- (parameters
- '("GSourceFunc" "func")
- '("gpointer" "user_data")
- '("GDestroyNotify" "notify")
- )
-)
-
-(define-method send_to_mainloop_async
- (of-object "GIOSchedulerJob")
- (c-name "g_io_scheduler_job_send_to_mainloop_async")
- (return-type "none")
- (parameters
- '("GSourceFunc" "func")
- '("gpointer" "user_data")
- '("GDestroyNotify" "notify")
- )
-)
-
-
-
-;; From gloadableicon.h
-
-(define-function loadable_icon_get_type
- (c-name "g_loadable_icon_get_type")
- (return-type "GType")
-)
-
-;;
-;; wrapped in gicon.override
-;;
-(define-method load
- (of-object "GLoadableIcon")
- (docstring
- "ICON.load([size, [cancellable]]) -> input stream, type\n"
- "\n"
- "Opens a stream of icon data for reading. The result is a tuple of\n"
- "gio.InputStream and type (either a string or None). The stream can\n"
- "be read to retrieve icon data.\n"
- "\n"
- ;; Note: this is just a guess, GIO docs say nothing at the moment.
- "Optional size is a hint at desired icon size. Not all implementations\n"
- "support it and the hint will be just ignored in such cases.\n"
- "If cancellable is specified, then the operation can be cancelled\n"
- "by triggering the cancellable object from another thread. See\n"
- "gio.File.read for details."
- )
- (c-name "g_loadable_icon_load")
- (return-type "GInputStream*")
- (parameters
- '("int" "size")
- '("char**" "type")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gicon.override
-;;
-(define-method load_async
- (of-object "GLoadableIcon")
- (docstring
- "ICON.load_async(callback, [size, [cancellable, [user_data]]])\n"
- "-> start loading\n"
- "\n"
- "For more information, see gio.LoadableIcon.load() which is the\n"
- "synchronous version of this call. Asynchronously opens icon data for\n"
- "reading. When the operation is finished, callback will be called.\n"
- "You can then call gio.LoadableIcon.load_finish() to get the result of\n"
- "the operation.\n"
- )
- (c-name "g_loadable_icon_load_async")
- (return-type "none")
- (parameters
- '("int" "size")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-;;
-;; wrapped in gicon.override
-;;
-(define-method load_finish
- (docstring
- "F.load_finish(res) -> start loading\n"
- "\n"
- "Finish asynchronous icon loading operation. Must be called from callback\n"
- "as specified to gio.LoadableIcon.load_async. Returns a tuple of\n"
- "gio.InputStream and type, just as gio.LoadableIcon.load."
- )
- (of-object "GLoadableIcon")
- (c-name "g_loadable_icon_load_finish")
- (return-type "GInputStream*")
- (parameters
- '("GAsyncResult*" "res")
- '("char**" "type")
- '("GError**" "error")
- )
-)
-
-
-
-;; From ginetaddress.h
-
-(define-function inet_address_get_type
- (c-name "g_inet_address_get_type")
- (return-type "GType")
-)
-
-(define-function inet_address_new_from_string
- (c-name "g_inet_address_new_from_string")
- (return-type "GInetAddress*")
- (parameters
- '("const-gchar*" "string")
- )
-)
-
-(define-function inet_address_new_from_bytes
- (c-name "g_inet_address_new_from_bytes")
- (return-type "GInetAddress*")
- (parameters
- '("const-guint8*" "bytes")
- '("GSocketFamily" "family")
- )
-)
-
-(define-function inet_address_new_loopback
- (c-name "g_inet_address_new_loopback")
- (return-type "GInetAddress*")
- (parameters
- '("GSocketFamily" "family")
- )
-)
-
-(define-function inet_address_new_any
- (c-name "g_inet_address_new_any")
- (return-type "GInetAddress*")
- (parameters
- '("GSocketFamily" "family")
- )
-)
-
-(define-method to_string
- (of-object "GInetAddress")
- (c-name "g_inet_address_to_string")
- (return-type "gchar*")
-)
-
-
-;; FIXME codegen barfs on this one
-;;
-;;(define-method to_bytes
-;; (of-object "GInetAddress")
-;; (c-name "g_inet_address_to_bytes")
-;; (return-type "const-guint8*")
-;;)
-
-(define-method get_native_size
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_native_size")
- (return-type "gsize")
-)
-
-(define-method get_family
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_family")
- (return-type "GSocketFamily")
-)
-
-(define-method get_is_any
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_any")
- (return-type "gboolean")
-)
-
-(define-method get_is_loopback
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_loopback")
- (return-type "gboolean")
-)
-
-(define-method get_is_link_local
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_link_local")
- (return-type "gboolean")
-)
-
-(define-method get_is_site_local
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_site_local")
- (return-type "gboolean")
-)
-
-(define-method get_is_multicast
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_multicast")
- (return-type "gboolean")
-)
-
-(define-method get_is_mc_global
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_mc_global")
- (return-type "gboolean")
-)
-
-(define-method get_is_mc_link_local
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_mc_link_local")
- (return-type "gboolean")
-)
-
-(define-method get_is_mc_node_local
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_mc_node_local")
- (return-type "gboolean")
-)
-
-(define-method get_is_mc_org_local
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_mc_org_local")
- (return-type "gboolean")
-)
-
-(define-method get_is_mc_site_local
- (of-object "GInetAddress")
- (c-name "g_inet_address_get_is_mc_site_local")
- (return-type "gboolean")
-)
-
-
-
-;; From ginitable.h
-
-(define-function initable_get_type
- (c-name "g_initable_get_type")
- (return-type "GType")
-)
-
-(define-method init
- (of-object "GInitable")
- (c-name "g_initable_init")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-function initable_new
- (c-name "g_initable_new")
- (return-type "gpointer")
- (parameters
- '("GType" "object_type")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- '("const-gchar*" "first_property_name")
- )
- (varargs #t)
-)
-
-(define-function initable_newv
- (c-name "g_initable_newv")
- (return-type "gpointer")
- (parameters
- '("GType" "object_type")
- '("guint" "n_parameters")
- '("GParameter*" "parameters")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-function initable_new_valist
- (c-name "g_initable_new_valist")
- (return-type "GObject*")
- (parameters
- '("GType" "object_type")
- '("const-gchar*" "first_property_name")
- '("va_list" "var_args")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-
-
-;; From giostream.h
-
-(define-function io_stream_get_type
- (c-name "g_io_stream_get_type")
- (return-type "GType")
-)
-
-(define-method get_input_stream
- (of-object "GIOStream")
- (c-name "g_io_stream_get_input_stream")
- (return-type "GInputStream*")
-)
-
-(define-method get_output_stream
- (of-object "GIOStream")
- (c-name "g_io_stream_get_output_stream")
- (return-type "GOutputStream*")
-)
-
-(define-method close
- (of-object "GIOStream")
- (c-name "g_io_stream_close")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method close_async
- (of-object "GIOStream")
- (c-name "g_io_stream_close_async")
- (return-type "none")
- (parameters
- '("int" "io_priority")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method close_finish
- (of-object "GIOStream")
- (c-name "g_io_stream_close_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method is_closed
- (of-object "GIOStream")
- (c-name "g_io_stream_is_closed")
- (return-type "gboolean")
-)
-
-(define-method has_pending
- (of-object "GIOStream")
- (c-name "g_io_stream_has_pending")
- (return-type "gboolean")
-)
-
-(define-method set_pending
- (of-object "GIOStream")
- (c-name "g_io_stream_set_pending")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method clear_pending
- (of-object "GIOStream")
- (c-name "g_io_stream_clear_pending")
- (return-type "none")
-)
-
-
-
-;; From glocaldirectorymonitor.h
-
-(define-function local_directory_monitor_get_type
- (c-name "g_local_directory_monitor_get_type")
- (return-type "GType")
-)
-
-
-
-;; From glocalfileenumerator.h
-
-
-
-;; From glocalfile.h
-
-
-
-;; From glocalfileinfo.h
-
-
-
-;; From glocalfileinputstream.h
-
-
-
-;; From glocalfilemonitor.h
-
-(define-function local_file_monitor_get_type
- (c-name "g_local_file_monitor_get_type")
- (return-type "GType")
-)
-
-
-
-;; From glocalfileoutputstream.h
-
-
-
-;; From glocalvfs.h
-
-
-
-;; From gmemoryinputstream.h
-
-(define-function memory_input_stream_get_type
- (c-name "g_memory_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-function memory_input_stream_new
- (c-name "g_memory_input_stream_new")
- (is-constructor-of "GMemoryInputStream")
- (return-type "GInputStream*")
-)
-
-(define-function memory_input_stream_new_from_data
- (c-name "g_memory_input_stream_new_from_data")
- (return-type "GInputStream*")
- (parameters
- '("const-void*" "data")
- '("gssize" "len")
- '("GDestroyNotify" "destroy")
- )
-)
-
-;;
-;; wrapped in ginputstream.override
-;;
-(define-method add_data
- (of-object "GMemoryInputStream")
- (c-name "g_memory_input_stream_add_data")
- (return-type "none")
- (parameters
- '("const-void*" "data")
- '("gssize" "len")
- '("GDestroyNotify" "destroy")
- )
-)
-
-
-
-;; From gmemoryoutputstream.h
-
-(define-function memory_output_stream_get_type
- (c-name "g_memory_output_stream_get_type")
- (return-type "GType")
-)
-
-;;
-;; wrapped in goutputstream.override
-;;
-(define-function memory_output_stream_new
- (c-name "g_memory_output_stream_new")
- (is-constructor-of "GMemoryOutputStream")
- (return-type "GOutputStream*")
- (parameters
- '("gpointer" "data")
- '("gsize" "len")
- '("GReallocFunc" "realloc_fn")
- '("GDestroyNotify" "destroy")
- )
-)
-
-;;
-;; wrapped in goutputstream.override
-;;
-;; Note: name clash with gobject.GObject.get_data; renamed.
-(define-method get_contents
- (of-object "GMemoryOutputStream")
- (c-name "g_memory_output_stream_get_data")
- (return-type "gpointer")
-)
-
-(define-method get_size
- (of-object "GMemoryOutputStream")
- (c-name "g_memory_output_stream_get_size")
- (return-type "gsize")
-)
-
-(define-method get_data_size
- (of-object "GMemoryOutputStream")
- (c-name "g_memory_output_stream_get_data_size")
- (return-type "gsize")
-)
-
-
-
-;; From gmount.h
-
-(define-function mount_get_type
- (c-name "g_mount_get_type")
- (return-type "GType")
-)
-
-(define-method get_root
- (of-object "GMount")
- (c-name "g_mount_get_root")
- (return-type "GFile*")
- (caller-owns-return #t)
-)
-
-(define-method get_name
- (of-object "GMount")
- (c-name "g_mount_get_name")
- (return-type "char*")
-)
-
-(define-method get_icon
- (of-object "GMount")
- (c-name "g_mount_get_icon")
- (return-type "GIcon*")
- (caller-owns-return #t)
-)
-
-(define-method get_uuid
- (of-object "GMount")
- (c-name "g_mount_get_uuid")
- (return-type "char*")
-)
-
-(define-method get_volume
- (of-object "GMount")
- (c-name "g_mount_get_volume")
- (return-type "GVolume*")
- (caller-owns-return #t)
-)
-
-(define-method get_drive
- (of-object "GMount")
- (c-name "g_mount_get_drive")
- (return-type "GDrive*")
- (caller-owns-return #t)
-)
-
-(define-method can_unmount
- (of-object "GMount")
- (c-name "g_mount_can_unmount")
- (return-type "gboolean")
-)
-
-(define-method can_eject
- (of-object "GMount")
- (c-name "g_mount_can_eject")
- (return-type "gboolean")
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-method unmount
- (docstring
-"M.unmount(callback, [flags, cancellable, user_data])\n"
-"Unmounts a mount. This is an asynchronous operation, and is finished\n"
-"by calling gio.Mount.unmount_finish() with the mount and gio.AsyncResults\n"
-"data returned in the callback."
-)
- (of-object "GMount")
- (c-name "g_mount_unmount")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method unmount_finish
- (of-object "GMount")
- (c-name "g_mount_unmount_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-method eject
- (docstring
-"F.eject(callback, [flags, cancellable, user_data])\n"
-"Ejects a volume.\n"
-"\n"
-"If cancellable is not None, then the operation can be cancelled by\n"
-"triggering the cancellable object from another thread. If the\n"
-"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
-"\n"
-"When the operation is finished, callback will be called. You can\n"
-"then call gio.Volume.eject_finish() to get the result of the operation.\n")
- (of-object "GMount")
- (c-name "g_mount_eject")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_finish
- (of-object "GMount")
- (c-name "g_mount_eject_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-method remount
- (of-object "GMount")
- (docstring
- "M.remount(callback, [flags, [mount_operation, [cancellable, [user_data]]]])\n"
- "Remounts a mount. This is an asynchronous operation, and is finished by\n"
- "calling gio.Mount.remount_finish with the mount and gio.AsyncResults data\n"
- "returned in the callback.")
- (c-name "g_mount_remount")
- (return-type "none")
- (parameters
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method remount_finish
- (of-object "GMount")
- (c-name "g_mount_remount_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method guess_content_type
- (of-object "GMount")
- (c-name "g_mount_guess_content_type")
- (return-type "none")
- (parameters
- '("gboolean" "force_rescan")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method guess_content_type_finish
- (of-object "GMount")
- (c-name "g_mount_guess_content_type_finish")
- (return-type "gchar**")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method guess_content_type_sync
- (of-object "GMount")
- (c-name "g_mount_guess_content_type_sync")
- (return-type "gchar**")
- (parameters
- '("gboolean" "force_rescan")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method is_shadowed
- (of-object "GMount")
- (c-name "g_mount_is_shadowed")
- (return-type "gboolean")
-)
-
-(define-method shadow
- (of-object "GMount")
- (c-name "g_mount_shadow")
- (return-type "none")
-)
-
-(define-method unshadow
- (of-object "GMount")
- (c-name "g_mount_unshadow")
- (return-type "none")
-)
-
-(define-method unmount_with_operation
- (of-object "GMount")
- (c-name "g_mount_unmount_with_operation")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method unmount_with_operation_finish
- (of-object "GMount")
- (c-name "g_mount_unmount_with_operation_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method eject_with_operation
- (of-object "GMount")
- (c-name "g_mount_eject_with_operation")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_with_operation_finish
- (of-object "GMount")
- (c-name "g_mount_eject_with_operation_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gmountoperation.h
-
-(define-function mount_operation_get_type
- (c-name "g_mount_operation_get_type")
- (return-type "GType")
-)
-
-(define-function mount_operation_new
- (c-name "g_mount_operation_new")
- (is-constructor-of "GMountOperation")
- (return-type "GMountOperation*")
-)
-
-(define-method get_username
- (of-object "GMountOperation")
- (c-name "g_mount_operation_get_username")
- (return-type "const-char*")
-)
-
-(define-method set_username
- (of-object "GMountOperation")
- (c-name "g_mount_operation_set_username")
- (return-type "none")
- (parameters
- '("const-char*" "username")
- )
-)
-
-(define-method get_password
- (of-object "GMountOperation")
- (c-name "g_mount_operation_get_password")
- (return-type "const-char*")
-)
-
-(define-method set_password
- (of-object "GMountOperation")
- (c-name "g_mount_operation_set_password")
- (return-type "none")
- (parameters
- '("const-char*" "password")
- )
-)
-
-(define-method get_anonymous
- (of-object "GMountOperation")
- (c-name "g_mount_operation_get_anonymous")
- (return-type "gboolean")
-)
-
-(define-method set_anonymous
- (of-object "GMountOperation")
- (c-name "g_mount_operation_set_anonymous")
- (return-type "none")
- (parameters
- '("gboolean" "anonymous")
- )
-)
-
-(define-method get_domain
- (of-object "GMountOperation")
- (c-name "g_mount_operation_get_domain")
- (return-type "const-char*")
-)
-
-(define-method set_domain
- (of-object "GMountOperation")
- (c-name "g_mount_operation_set_domain")
- (return-type "none")
- (parameters
- '("const-char*" "domain")
- )
-)
-
-(define-method get_password_save
- (of-object "GMountOperation")
- (c-name "g_mount_operation_get_password_save")
- (return-type "GPasswordSave")
-)
-
-(define-method set_password_save
- (of-object "GMountOperation")
- (c-name "g_mount_operation_set_password_save")
- (return-type "none")
- (parameters
- '("GPasswordSave" "save")
- )
-)
-
-(define-method get_choice
- (of-object "GMountOperation")
- (c-name "g_mount_operation_get_choice")
- (return-type "int")
-)
-
-(define-method set_choice
- (of-object "GMountOperation")
- (c-name "g_mount_operation_set_choice")
- (return-type "none")
- (parameters
- '("int" "choice")
- )
-)
-
-(define-method reply
- (of-object "GMountOperation")
- (c-name "g_mount_operation_reply")
- (return-type "none")
- (parameters
- '("GMountOperationResult" "result")
- )
-)
-
-
-
-;; From gnativevolumemonitor.h
-
-(define-function native_volume_monitor_get_type
- (c-name "g_native_volume_monitor_get_type")
- (return-type "GType")
-)
-
-
-
-;; From gnetworkaddress.h
-
-(define-function network_address_get_type
- (c-name "g_network_address_get_type")
- (return-type "GType")
-)
-
-(define-function network_address_new
- (c-name "g_network_address_new")
- (is-constructor-of "GNetworkAddress")
- (return-type "GSocketConnectable*")
- (parameters
- '("const-gchar*" "hostname")
- '("guint16" "port")
- )
-)
-
-(define-function network_address_parse
- (c-name "g_network_address_parse")
- (return-type "GSocketConnectable*")
- (parameters
- '("const-gchar*" "host_and_port")
- '("guint16" "default_port")
- '("GError**" "error")
- )
-)
-
-(define-method get_hostname
- (of-object "GNetworkAddress")
- (c-name "g_network_address_get_hostname")
- (return-type "const-gchar*")
-)
-
-(define-method get_port
- (of-object "GNetworkAddress")
- (c-name "g_network_address_get_port")
- (return-type "guint16")
-)
-
-
-
-;; From gnetworkservice.h
-
-(define-function network_service_get_type
- (c-name "g_network_service_get_type")
- (return-type "GType")
-)
-
-(define-function network_service_new
- (c-name "g_network_service_new")
- (is-constructor-of "GNetworkService")
- (return-type "GSocketConnectable*")
- (parameters
- '("const-gchar*" "service")
- '("const-gchar*" "protocol")
- '("const-gchar*" "domain")
- )
-)
-
-(define-method get_service
- (of-object "GNetworkService")
- (c-name "g_network_service_get_service")
- (return-type "const-gchar*")
-)
-
-(define-method get_protocol
- (of-object "GNetworkService")
- (c-name "g_network_service_get_protocol")
- (return-type "const-gchar*")
-)
-
-(define-method get_domain
- (of-object "GNetworkService")
- (c-name "g_network_service_get_domain")
- (return-type "const-gchar*")
-)
-
-
-
-;; From goutputstream.h
-
-(define-function output_stream_get_type
- (c-name "g_output_stream_get_type")
- (return-type "GType")
-)
-
-;;
-;; wrapped in goutputstream.override
-;;
-;; Note: the following two methods are renamed for consistency with
-;; Python file objects' write(). I.e. g_output_stream_write_all() is
-;; more like Python file.write(), so it is renamed write(). Since now
-;; there is a name clash, g_output_stream_write() is renamed
-;; write_part().
-(define-method write_part
- (of-object "GOutputStream")
- (docstring
- "STREAM.write_part(buffer, [cancellable]) -> int\n"
- "\n"
- "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
- "successfully written. This method is allowed to stop at any time after\n"
- "writing at least 1 byte. Therefore, to reliably write the whole buffer,\n"
- "you need to use a loop. See also gio.OutputStream.write for easier to\n"
- "use (though less efficient) method.\n"
- "\n"
- "Note: this method roughly corresponds to C GIO g_output_stream_write."
- )
- (c-name "g_output_stream_write")
- (return-type "gssize")
- (parameters
- '("const-void*" "buffer")
- '("gsize" "count")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in goutputstream.override
-;;
-;; See comments before the previous method definition.
-(define-method write
- (of-object "GOutputStream")
- "STREAM.write(buffer, [cancellable]) -> int\n"
- "\n"
- "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
- "successfully written. This method will stop only after writing the whole\n"
- "buffer or triggering an I/O error. See also gio.OutputStream.write_part\n"
- "for more efficient, but more cumbersome to use method.\n"
- "\n"
- "Note: this method roughly corresponds to C GIO g_output_stream_write_all.\n"
- "It was renamed for consistency with Python standard file.write."
- (c-name "g_output_stream_write_all")
- (return-type "gboolean")
- (parameters
- '("const-void*" "buffer")
- '("gsize" "count")
- '("gsize*" "bytes_written")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method splice
- (of-object "GOutputStream")
- (c-name "g_output_stream_splice")
- (return-type "gssize")
- (parameters
- '("GInputStream*" "source")
- '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method flush
- (of-object "GOutputStream")
- (c-name "g_output_stream_flush")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method close
- (of-object "GOutputStream")
- (c-name "g_output_stream_close")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in goutputstream.override
-;;
-(define-method write_async
- (of-object "GOutputStream")
- (docstring
-"S.write_async(buffer, callback [,io_priority] [,cancellable] [,user_data])\n"
-"\n"
-"Request an asynchronous write of count bytes from buffer into the stream.\n"
-"When the operation is finished callback will be called. You can then call\n"
-"gio.OutputStream.write_finish() to get the result of the operation.\n"
-"On success, the number of bytes written will be passed to the callback.\n"
-"It is not an error if this is not the same as the requested size, as it can\n"
-"happen e.g. on a partial I/O error, but generally tries to write as many \n"
-"bytes as requested.\n"
-"For the synchronous, blocking version of this function, see\n"
-"gio.OutputStream.write().\n")
- (c-name "g_output_stream_write_async")
- (return-type "none")
- (parameters
- '("const-void*" "buffer")
- '("gsize" "count")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method write_finish
- (of-object "GOutputStream")
- (c-name "g_output_stream_write_finish")
- (return-type "gssize")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method splice_async
- (of-object "GOutputStream")
- (c-name "g_output_stream_splice_async")
- (return-type "none")
- (parameters
- '("GInputStream*" "source")
- '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method splice_finish
- (of-object "GOutputStream")
- (c-name "g_output_stream_splice_finish")
- (return-type "gssize")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method flush_async
- (of-object "GOutputStream")
- (c-name "g_output_stream_flush_async")
- (return-type "none")
- (parameters
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method flush_finish
- (of-object "GOutputStream")
- (c-name "g_output_stream_flush_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in goutputstream.override
-;;
-(define-method close_async
- (of-object "GOutputStream")
- (c-name "g_output_stream_close_async")
- (return-type "none")
- (parameters
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method close_finish
- (of-object "GOutputStream")
- (c-name "g_output_stream_close_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method is_closed
- (of-object "GOutputStream")
- (c-name "g_output_stream_is_closed")
- (return-type "gboolean")
-)
-
-(define-method has_pending
- (of-object "GOutputStream")
- (c-name "g_output_stream_has_pending")
- (return-type "gboolean")
-)
-
-(define-method set_pending
- (of-object "GOutputStream")
- (c-name "g_output_stream_set_pending")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method clear_pending
- (of-object "GOutputStream")
- (c-name "g_output_stream_clear_pending")
- (return-type "none")
-)
-
-
-
-;; From gresolver.h
-
-(define-function resolver_get_type
- (c-name "g_resolver_get_type")
- (return-type "GType")
-)
-
-(define-function resolver_get_default
- (c-name "g_resolver_get_default")
- (return-type "GResolver*")
-)
-
-(define-method set_default
- (of-object "GResolver")
- (c-name "g_resolver_set_default")
- (return-type "none")
-)
-
-(define-method lookup_by_name
- (of-object "GResolver")
- (c-name "g_resolver_lookup_by_name")
- (return-type "GList*")
- (parameters
- '("const-gchar*" "hostname")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method lookup_by_name_async
- (of-object "GResolver")
- (c-name "g_resolver_lookup_by_name_async")
- (return-type "none")
- (parameters
- '("const-gchar*" "hostname")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method lookup_by_name_finish
- (of-object "GResolver")
- (c-name "g_resolver_lookup_by_name_finish")
- (return-type "GList*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-function resolver_free_addresses
- (c-name "g_resolver_free_addresses")
- (return-type "none")
- (parameters
- '("GList*" "addresses")
- )
-)
-
-(define-method lookup_by_address
- (of-object "GResolver")
- (c-name "g_resolver_lookup_by_address")
- (return-type "gchar*")
- (parameters
- '("GInetAddress*" "address")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method lookup_by_address_async
- (of-object "GResolver")
- (c-name "g_resolver_lookup_by_address_async")
- (return-type "none")
- (parameters
- '("GInetAddress*" "address")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method lookup_by_address_finish
- (of-object "GResolver")
- (c-name "g_resolver_lookup_by_address_finish")
- (return-type "gchar*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method lookup_service
- (of-object "GResolver")
- (c-name "g_resolver_lookup_service")
- (return-type "GList*")
- (parameters
- '("const-gchar*" "service")
- '("const-gchar*" "protocol")
- '("const-gchar*" "domain")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method lookup_service_async
- (of-object "GResolver")
- (c-name "g_resolver_lookup_service_async")
- (return-type "none")
- (parameters
- '("const-gchar*" "service")
- '("const-gchar*" "protocol")
- '("const-gchar*" "domain")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method lookup_service_finish
- (of-object "GResolver")
- (c-name "g_resolver_lookup_service_finish")
- (return-type "GList*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-function resolver_free_targets
- (c-name "g_resolver_free_targets")
- (return-type "none")
- (parameters
- '("GList*" "targets")
- )
-)
-
-(define-function resolver_error_quark
- (c-name "g_resolver_error_quark")
- (return-type "GQuark")
-)
-
-
-
-;; From gseekable.h
-
-(define-function seekable_get_type
- (c-name "g_seekable_get_type")
- (return-type "GType")
-)
-
-(define-method tell
- (of-object "GSeekable")
- (c-name "g_seekable_tell")
- (return-type "goffset")
-)
-
-(define-method can_seek
- (of-object "GSeekable")
- (c-name "g_seekable_can_seek")
- (return-type "gboolean")
-)
-
-(define-method seek
- (of-object "GSeekable")
- (c-name "g_seekable_seek")
- (return-type "gboolean")
- (parameters
- '("goffset" "offset")
- '("GSeekType" "type" (default "G_SEEK_SET"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method can_truncate
- (of-object "GSeekable")
- (c-name "g_seekable_can_truncate")
- (return-type "gboolean")
-)
-
-(define-method truncate
- (of-object "GSeekable")
- (c-name "g_seekable_truncate")
- (return-type "gboolean")
- (parameters
- '("goffset" "offset")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-
-
-;; From gsimpleasyncresult.h
-
-(define-function simple_async_result_get_type
- (c-name "g_simple_async_result_get_type")
- (return-type "GType")
-)
-
-(define-function simple_async_result_new
- (c-name "g_simple_async_result_new")
- (is-constructor-of "GSimpleAsyncResult")
- (return-type "GSimpleAsyncResult*")
- (parameters
- '("GObject*" "source_object")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- '("gpointer" "source_tag")
- )
-)
-
-(define-function simple_async_result_new_error
- (c-name "g_simple_async_result_new_error")
- (return-type "GSimpleAsyncResult*")
- (parameters
- '("GObject*" "source_object")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- '("GQuark" "domain")
- '("gint" "code")
- '("const-char*" "format")
- )
- (varargs #t)
-)
-
-(define-function simple_async_result_new_from_error
- (c-name "g_simple_async_result_new_from_error")
- (return-type "GSimpleAsyncResult*")
- (parameters
- '("GObject*" "source_object")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- '("GError*" "error")
- )
-)
-
-(define-method set_op_res_gpointer
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_op_res_gpointer")
- (return-type "none")
- (parameters
- '("gpointer" "op_res")
- '("GDestroyNotify" "destroy_op_res")
- )
-)
-
-(define-method get_op_res_gpointer
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_get_op_res_gpointer")
- (return-type "gpointer")
-)
-
-(define-method set_op_res_gssize
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_op_res_gssize")
- (return-type "none")
- (parameters
- '("gssize" "op_res")
- )
-)
-
-(define-method get_op_res_gssize
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_get_op_res_gssize")
- (return-type "gssize")
-)
-
-(define-method set_op_res_gboolean
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_op_res_gboolean")
- (return-type "none")
- (parameters
- '("gboolean" "op_res")
- )
-)
-
-(define-method get_op_res_gboolean
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_get_op_res_gboolean")
- (return-type "gboolean")
-)
-
-(define-method get_source_tag
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_get_source_tag")
- (return-type "gpointer")
-)
-
-(define-method set_handle_cancellation
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_handle_cancellation")
- (return-type "none")
- (parameters
- '("gboolean" "handle_cancellation")
- )
-)
-
-(define-method complete
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_complete")
- (return-type "none")
-)
-
-(define-method complete_in_idle
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_complete_in_idle")
- (return-type "none")
-)
-
-(define-method run_in_thread
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_run_in_thread")
- (return-type "none")
- (parameters
- '("GSimpleAsyncThreadFunc" "func")
- '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- )
-)
-
-(define-method set_from_error
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_from_error")
- (return-type "none")
- (parameters
- '("GError*" "error")
- )
-)
-
-(define-method propagate_error
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_propagate_error")
- (return-type "gboolean")
- (parameters
- '("GError**" "dest")
- )
-)
-
-(define-method set_error
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_error")
- (return-type "none")
- (parameters
- '("GQuark" "domain")
- '("gint" "code")
- '("const-char*" "format")
- )
- (varargs #t)
-)
-
-(define-method set_error_va
- (of-object "GSimpleAsyncResult")
- (c-name "g_simple_async_result_set_error_va")
- (return-type "none")
- (parameters
- '("GQuark" "domain")
- '("gint" "code")
- '("const-char*" "format")
- '("va_list" "args")
- )
-)
-
-(define-function simple_async_report_error_in_idle
- (c-name "g_simple_async_report_error_in_idle")
- (return-type "none")
- (parameters
- '("GObject*" "object")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- '("GQuark" "domain")
- '("gint" "code")
- '("const-char*" "format")
- )
- (varargs #t)
-)
-
-(define-function simple_async_report_gerror_in_idle
- (c-name "g_simple_async_report_gerror_in_idle")
- (return-type "none")
- (parameters
- '("GObject*" "object")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- '("GError*" "error")
- )
-)
-
-
-
-;; From gsocketaddressenumerator.h
-
-(define-function socket_address_enumerator_get_type
- (c-name "g_socket_address_enumerator_get_type")
- (return-type "GType")
-)
-
-(define-method next
- (of-object "GSocketAddressEnumerator")
- (c-name "g_socket_address_enumerator_next")
- (return-type "GSocketAddress*")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method next_async
- (of-object "GSocketAddressEnumerator")
- (c-name "g_socket_address_enumerator_next_async")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method next_finish
- (of-object "GSocketAddressEnumerator")
- (c-name "g_socket_address_enumerator_next_finish")
- (return-type "GSocketAddress*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gsocketaddress.h
-
-(define-function socket_address_get_type
- (c-name "g_socket_address_get_type")
- (return-type "GType")
-)
-
-(define-method get_family
- (of-object "GSocketAddress")
- (c-name "g_socket_address_get_family")
- (return-type "GSocketFamily")
-)
-
-(define-function socket_address_new_from_native
- (c-name "g_socket_address_new_from_native")
- (return-type "GSocketAddress*")
- (parameters
- '("gpointer" "native")
- '("gsize" "len")
- )
-)
-
-(define-method to_native
- (of-object "GSocketAddress")
- (c-name "g_socket_address_to_native")
- (return-type "gboolean")
- (parameters
- '("gpointer" "dest")
- '("gsize" "destlen")
- '("GError**" "error")
- )
-)
-
-(define-method get_native_size
- (of-object "GSocketAddress")
- (c-name "g_socket_address_get_native_size")
- (return-type "gssize")
-)
-
-
-
-;; From gsocketclient.h
-
-(define-function socket_client_get_type
- (c-name "g_socket_client_get_type")
- (return-type "GType")
-)
-
-(define-function socket_client_new
- (c-name "g_socket_client_new")
- (is-constructor-of "GSocketClient")
- (return-type "GSocketClient*")
-)
-
-(define-method get_family
- (of-object "GSocketClient")
- (c-name "g_socket_client_get_family")
- (return-type "GSocketFamily")
-)
-
-(define-method set_family
- (of-object "GSocketClient")
- (c-name "g_socket_client_set_family")
- (return-type "none")
- (parameters
- '("GSocketFamily" "family")
- )
-)
-
-(define-method get_socket_type
- (of-object "GSocketClient")
- (c-name "g_socket_client_get_socket_type")
- (return-type "GSocketType")
-)
-
-(define-method set_socket_type
- (of-object "GSocketClient")
- (c-name "g_socket_client_set_socket_type")
- (return-type "none")
- (parameters
- '("GSocketType" "type")
- )
-)
-
-(define-method get_protocol
- (of-object "GSocketClient")
- (c-name "g_socket_client_get_protocol")
- (return-type "GSocketProtocol")
-)
-
-(define-method set_protocol
- (of-object "GSocketClient")
- (c-name "g_socket_client_set_protocol")
- (return-type "none")
- (parameters
- '("GSocketProtocol" "protocol")
- )
-)
-
-(define-method get_local_address
- (of-object "GSocketClient")
- (c-name "g_socket_client_get_local_address")
- (return-type "GSocketAddress*")
-)
-
-(define-method set_local_address
- (of-object "GSocketClient")
- (c-name "g_socket_client_set_local_address")
- (return-type "none")
- (parameters
- '("GSocketAddress*" "address")
- )
-)
-
-(define-method connect
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect")
- (return-type "GSocketConnection*")
- (parameters
- '("GSocketConnectable*" "connectable")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method connect_to_host
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_to_host")
- (return-type "GSocketConnection*")
- (parameters
- '("const-gchar*" "host_and_port")
- '("guint16" "default_port")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method connect_to_service
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_to_service")
- (return-type "GSocketConnection*")
- (parameters
- '("const-gchar*" "domain")
- '("const-gchar*" "service")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method connect_async
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_async")
- (return-type "none")
- (parameters
- '("GSocketConnectable*" "connectable")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method connect_finish
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_finish")
- (return-type "GSocketConnection*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method connect_to_host_async
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_to_host_async")
- (return-type "none")
- (parameters
- '("const-gchar*" "host_and_port")
- '("guint16" "default_port")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method connect_to_host_finish
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_to_host_finish")
- (return-type "GSocketConnection*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method connect_to_service_async
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_to_service_async")
- (return-type "none")
- (parameters
- '("const-gchar*" "domain")
- '("const-gchar*" "service")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method connect_to_service_finish
- (of-object "GSocketClient")
- (c-name "g_socket_client_connect_to_service_finish")
- (return-type "GSocketConnection*")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gsocketconnectable.h
-
-(define-function socket_connectable_get_type
- (c-name "g_socket_connectable_get_type")
- (return-type "GType")
-)
-
-(define-method enumerate
- (of-object "GSocketConnectable")
- (c-name "g_socket_connectable_enumerate")
- (return-type "GSocketAddressEnumerator*")
-)
-
-
-
-;; From gsocketconnection.h
-
-(define-function socket_connection_get_type
- (c-name "g_socket_connection_get_type")
- (return-type "GType")
-)
-
-(define-method get_socket
- (of-object "GSocketConnection")
- (c-name "g_socket_connection_get_socket")
- (return-type "GSocket*")
-)
-
-(define-method get_local_address
- (of-object "GSocketConnection")
- (c-name "g_socket_connection_get_local_address")
- (return-type "GSocketAddress*")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method get_remote_address
- (of-object "GSocketConnection")
- (c-name "g_socket_connection_get_remote_address")
- (return-type "GSocketAddress*")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-function socket_connection_factory_register_type
- (c-name "g_socket_connection_factory_register_type")
- (return-type "none")
- (parameters
- '("GType" "g_type")
- '("GSocketFamily" "family")
- '("GSocketType" "type")
- '("gint" "protocol")
- )
-)
-
-(define-function socket_connection_factory_lookup_type
- (c-name "g_socket_connection_factory_lookup_type")
- (return-type "GType")
- (parameters
- '("GSocketFamily" "family")
- '("GSocketType" "type")
- '("gint" "protocol_id")
- )
-)
-
-(define-method connection_factory_create_connection
- (of-object "GSocket")
- (c-name "g_socket_connection_factory_create_connection")
- (return-type "GSocketConnection*")
-)
-
-
-
-;; From gsocketcontrolmessage.h
-
-(define-function socket_control_message_get_type
- (c-name "g_socket_control_message_get_type")
- (return-type "GType")
-)
-
-(define-method get_size
- (of-object "GSocketControlMessage")
- (c-name "g_socket_control_message_get_size")
- (return-type "gsize")
-)
-
-(define-method get_level
- (of-object "GSocketControlMessage")
- (c-name "g_socket_control_message_get_level")
- (return-type "int")
-)
-
-(define-method get_msg_type
- (of-object "GSocketControlMessage")
- (c-name "g_socket_control_message_get_msg_type")
- (return-type "int")
-)
-
-(define-method serialize
- (of-object "GSocketControlMessage")
- (c-name "g_socket_control_message_serialize")
- (return-type "none")
- (parameters
- '("gpointer" "data")
- )
-)
-
-(define-function socket_control_message_deserialize
- (c-name "g_socket_control_message_deserialize")
- (return-type "GSocketControlMessage*")
- (parameters
- '("int" "level")
- '("int" "type")
- '("gsize" "size")
- '("gpointer" "data")
- )
-)
-
-
-
-;; From gsocket.h
-
-(define-function socket_get_type
- (c-name "g_socket_get_type")
- (return-type "GType")
-)
-
-(define-function socket_new
- (c-name "g_socket_new")
- (is-constructor-of "GSocket")
- (return-type "GSocket*")
- (parameters
- '("GSocketFamily" "family")
- '("GSocketType" "type")
- '("GSocketProtocol" "protocol")
- '("GError**" "error")
- )
-)
-
-(define-function socket_new_from_fd
- (c-name "g_socket_new_from_fd")
- (return-type "GSocket*")
- (parameters
- '("gint" "fd")
- '("GError**" "error")
- )
-)
-
-(define-method get_fd
- (of-object "GSocket")
- (c-name "g_socket_get_fd")
- (return-type "int")
-)
-
-(define-method get_family
- (of-object "GSocket")
- (c-name "g_socket_get_family")
- (return-type "GSocketFamily")
-)
-
-(define-method get_socket_type
- (of-object "GSocket")
- (c-name "g_socket_get_socket_type")
- (return-type "GSocketType")
-)
-
-(define-method get_protocol
- (of-object "GSocket")
- (c-name "g_socket_get_protocol")
- (return-type "GSocketProtocol")
-)
-
-(define-method get_local_address
- (of-object "GSocket")
- (c-name "g_socket_get_local_address")
- (return-type "GSocketAddress*")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method get_remote_address
- (of-object "GSocket")
- (c-name "g_socket_get_remote_address")
- (return-type "GSocketAddress*")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method set_blocking
- (of-object "GSocket")
- (c-name "g_socket_set_blocking")
- (return-type "none")
- (parameters
- '("gboolean" "blocking")
- )
-)
-
-(define-method get_blocking
- (of-object "GSocket")
- (c-name "g_socket_get_blocking")
- (return-type "gboolean")
-)
-
-(define-method set_keepalive
- (of-object "GSocket")
- (c-name "g_socket_set_keepalive")
- (return-type "none")
- (parameters
- '("gboolean" "keepalive")
- )
-)
-
-(define-method get_keepalive
- (of-object "GSocket")
- (c-name "g_socket_get_keepalive")
- (return-type "gboolean")
-)
-
-(define-method get_listen_backlog
- (of-object "GSocket")
- (c-name "g_socket_get_listen_backlog")
- (return-type "gint")
-)
-
-(define-method set_listen_backlog
- (of-object "GSocket")
- (c-name "g_socket_set_listen_backlog")
- (return-type "none")
- (parameters
- '("gint" "backlog")
- )
-)
-
-(define-method is_connected
- (of-object "GSocket")
- (c-name "g_socket_is_connected")
- (return-type "gboolean")
-)
-
-(define-method bind
- (of-object "GSocket")
- (c-name "g_socket_bind")
- (return-type "gboolean")
- (parameters
- '("GSocketAddress*" "address")
- '("gboolean" "allow_reuse")
- '("GError**" "error")
- )
-)
-
-(define-method connect
- (of-object "GSocket")
- (c-name "g_socket_connect")
- (return-type "gboolean")
- (parameters
- '("GSocketAddress*" "address")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method check_connect_result
- (of-object "GSocket")
- (c-name "g_socket_check_connect_result")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method condition_check
- (of-object "GSocket")
- (c-name "g_socket_condition_check")
- (return-type "GIOCondition")
- (parameters
- '("GIOCondition" "condition")
- )
-)
-
-(define-method condition_wait
- (of-object "GSocket")
- (c-name "g_socket_condition_wait")
- (return-type "gboolean")
- (parameters
- '("GIOCondition" "condition")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method accept
- (of-object "GSocket")
- (c-name "g_socket_accept")
- (return-type "GSocket*")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method listen
- (of-object "GSocket")
- (c-name "g_socket_listen")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method receive
- (of-object "GSocket")
- (c-name "g_socket_receive")
- (return-type "gssize")
- (parameters
- '("gchar*" "buffer")
- '("gsize" "size")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method receive_from
- (of-object "GSocket")
- (c-name "g_socket_receive_from")
- (return-type "gssize")
- (parameters
- '("GSocketAddress**" "address")
- '("gchar*" "buffer")
- '("gsize" "size")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method send
- (of-object "GSocket")
- (c-name "g_socket_send")
- (return-type "gssize")
- (parameters
- '("const-gchar*" "buffer")
- '("gsize" "size")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method send_to
- (of-object "GSocket")
- (c-name "g_socket_send_to")
- (return-type "gssize")
- (parameters
- '("GSocketAddress*" "address")
- '("const-gchar*" "buffer")
- '("gsize" "size")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method receive_message
- (of-object "GSocket")
- (c-name "g_socket_receive_message")
- (return-type "gssize")
- (parameters
- '("GSocketAddress**" "address")
- '("GInputVector*" "vectors")
- '("gint" "num_vectors")
- '("GSocketControlMessage***" "messages")
- '("gint*" "num_messages")
- '("gint*" "flags")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method send_message
- (of-object "GSocket")
- (c-name "g_socket_send_message")
- (return-type "gssize")
- (parameters
- '("GSocketAddress*" "address")
- '("GOutputVector*" "vectors")
- '("gint" "num_vectors")
- '("GSocketControlMessage**" "messages")
- '("gint" "num_messages")
- '("gint" "flags")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method close
- (of-object "GSocket")
- (c-name "g_socket_close")
- (return-type "gboolean")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method shutdown
- (of-object "GSocket")
- (c-name "g_socket_shutdown")
- (return-type "gboolean")
- (parameters
- '("gboolean" "shutdown_read")
- '("gboolean" "shutdown_write")
- '("GError**" "error")
- )
-)
-
-(define-method is_closed
- (of-object "GSocket")
- (c-name "g_socket_is_closed")
- (return-type "gboolean")
-)
-
-(define-method create_source
- (of-object "GSocket")
- (c-name "g_socket_create_source")
- (return-type "GSource*")
- (parameters
- '("GIOCondition" "condition")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- )
-)
-
-(define-method speaks_ipv4
- (of-object "GSocket")
- (c-name "g_socket_speaks_ipv4")
- (return-type "gboolean")
-)
-
-
-
-;; From gsocketlistener.h
-
-(define-function socket_listener_get_type
- (c-name "g_socket_listener_get_type")
- (return-type "GType")
-)
-
-(define-function socket_listener_new
- (c-name "g_socket_listener_new")
- (is-constructor-of "GSocketListener")
- (return-type "GSocketListener*")
-)
-
-(define-method set_backlog
- (of-object "GSocketListener")
- (c-name "g_socket_listener_set_backlog")
- (return-type "none")
- (parameters
- '("int" "listen_backlog")
- )
-)
-
-(define-method add_socket
- (of-object "GSocketListener")
- (c-name "g_socket_listener_add_socket")
- (return-type "gboolean")
- (parameters
- '("GSocket*" "socket")
- '("GObject*" "source_object")
- '("GError**" "error")
- )
-)
-
-(define-method add_address
- (of-object "GSocketListener")
- (c-name "g_socket_listener_add_address")
- (return-type "gboolean")
- (parameters
- '("GSocketAddress*" "address")
- '("GSocketType" "type")
- '("GSocketProtocol" "protocol")
- '("GObject*" "source_object")
- '("GSocketAddress**" "effective_address")
- '("GError**" "error")
- )
-)
-
-(define-method add_inet_port
- (of-object "GSocketListener")
- (c-name "g_socket_listener_add_inet_port")
- (return-type "gboolean")
- (parameters
- '("guint16" "port")
- '("GObject*" "source_object")
- '("GError**" "error")
- )
-)
-
-(define-method accept_socket
- (of-object "GSocketListener")
- (c-name "g_socket_listener_accept_socket")
- (return-type "GSocket*")
- (parameters
- '("GObject**" "source_object")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method accept_socket_async
- (of-object "GSocketListener")
- (c-name "g_socket_listener_accept_socket_async")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method accept_socket_finish
- (of-object "GSocketListener")
- (c-name "g_socket_listener_accept_socket_finish")
- (return-type "GSocket*")
- (parameters
- '("GAsyncResult*" "result")
- '("GObject**" "source_object")
- '("GError**" "error")
- )
-)
-
-(define-method accept
- (of-object "GSocketListener")
- (c-name "g_socket_listener_accept")
- (return-type "GSocketConnection*")
- (parameters
- '("GObject**" "source_object")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GError**" "error")
- )
-)
-
-(define-method accept_async
- (of-object "GSocketListener")
- (c-name "g_socket_listener_accept_async")
- (return-type "none")
- (parameters
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method accept_finish
- (of-object "GSocketListener")
- (c-name "g_socket_listener_accept_finish")
- (return-type "GSocketConnection*")
- (parameters
- '("GAsyncResult*" "result")
- '("GObject**" "source_object")
- '("GError**" "error")
- )
-)
-
-(define-method close
- (of-object "GSocketListener")
- (c-name "g_socket_listener_close")
- (return-type "none")
-)
-
-
-
-;; From gsocketservice.h
-
-(define-function socket_service_get_type
- (c-name "g_socket_service_get_type")
- (return-type "GType")
-)
-
-(define-function socket_service_new
- (c-name "g_socket_service_new")
- (is-constructor-of "GSocketService")
- (return-type "GSocketService*")
-)
-
-(define-method start
- (of-object "GSocketService")
- (c-name "g_socket_service_start")
- (return-type "none")
-)
-
-(define-method stop
- (of-object "GSocketService")
- (c-name "g_socket_service_stop")
- (return-type "none")
-)
-
-(define-method is_active
- (of-object "GSocketService")
- (c-name "g_socket_service_is_active")
- (return-type "gboolean")
-)
-
-
-
-;; From gsrvtarget.h
-
-(define-function srv_target_get_type
- (c-name "g_srv_target_get_type")
- (return-type "GType")
-)
-
-(define-function srv_target_new
- (c-name "g_srv_target_new")
- (is-constructor-of "GSrvTarget")
- (return-type "GSrvTarget*")
- (parameters
- '("const-gchar*" "hostname")
- '("guint16" "port")
- '("guint16" "priority")
- '("guint16" "weight")
- )
-)
-
-(define-method copy
- (of-object "GSrvTarget")
- (c-name "g_srv_target_copy")
- (return-type "GSrvTarget*")
-)
-
-(define-method free
- (of-object "GSrvTarget")
- (c-name "g_srv_target_free")
- (return-type "none")
-)
-
-(define-method get_hostname
- (of-object "GSrvTarget")
- (c-name "g_srv_target_get_hostname")
- (return-type "const-gchar*")
-)
-
-(define-method get_port
- (of-object "GSrvTarget")
- (c-name "g_srv_target_get_port")
- (return-type "guint16")
-)
-
-(define-method get_priority
- (of-object "GSrvTarget")
- (c-name "g_srv_target_get_priority")
- (return-type "guint16")
-)
-
-(define-method get_weight
- (of-object "GSrvTarget")
- (c-name "g_srv_target_get_weight")
- (return-type "guint16")
-)
-
-(define-function srv_target_list_sort
- (c-name "g_srv_target_list_sort")
- (return-type "GList*")
- (parameters
- '("GList*" "targets")
- )
-)
-
-
-
-;; From gthemedicon.h
-
-(define-function themed_icon_get_type
- (c-name "g_themed_icon_get_type")
- (return-type "GType")
-)
-
-(define-function themed_icon_new
- (c-name "g_themed_icon_new")
- (is-constructor-of "GThemedIcon")
- (return-type "GIcon*")
- (properties
- '("name" (argname "iconname"))
- )
-)
-
-(define-function themed_icon_new_with_default_fallbacks
- (c-name "g_themed_icon_new_with_default_fallbacks")
- (return-type "GIcon*")
- (parameters
- '("const-char*" "iconname")
- )
-)
-
-(define-function themed_icon_new_from_names
- (c-name "g_themed_icon_new_from_names")
- (return-type "GIcon*")
- (parameters
- '("char**" "iconnames")
- '("int" "len")
- )
-)
-
-(define-method prepend_name
- (of-object "GThemedIcon")
- (c-name "g_themed_icon_prepend_name")
- (return-type "none")
- (parameters
- '("const-char*" "iconname")
- )
-)
-
-;;
-;; wrapped in gicon.override
-;;
-(define-method get_names
- (c-name "g_themed_icon_get_names")
- (of-object "GThemedIcon")
- (return-type "const-gchar*-const*")
-)
-
-(define-method append_name
- (c-name "g_themed_icon_append_name")
- (of-object "GThemedIcon")
- (return-type "none")
- (parameters
- '("char*" "iconname")
- )
-)
-
-
-
-;; From gthreadedsocketservice.h
-
-(define-function threaded_socket_service_get_type
- (c-name "g_threaded_socket_service_get_type")
- (return-type "GType")
-)
-
-(define-function threaded_socket_service_new
- (c-name "g_threaded_socket_service_new")
- (is-constructor-of "GThreadedSocketService")
- (return-type "GSocketService*")
- (parameters
- '("int" "max_threads")
- )
-)
-
-
-
-;; From gunixinputstream.h
-
-(define-function unix_input_stream_get_type
- (c-name "g_unix_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-function unix_input_stream_new
- (c-name "g_unix_input_stream_new")
- (is-constructor-of "GUnixInputStream")
- (return-type "GInputStream*")
- (parameters
- '("int" "fd")
- '("gboolean" "close_fd_at_close")
- )
-)
-
-
-
-;; From gvfs.h
-
-(define-function vfs_get_type
- (c-name "g_vfs_get_type")
- (return-type "GType")
-)
-
-(define-method is_active
- (of-object "GVfs")
- (c-name "g_vfs_is_active")
- (return-type "gboolean")
-)
-
-(define-method get_file_for_path
- (of-object "GVfs")
- (c-name "g_vfs_get_file_for_path")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "path")
- )
-)
-
-(define-method get_file_for_uri
- (of-object "GVfs")
- (c-name "g_vfs_get_file_for_uri")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "uri")
- )
-)
-
-(define-method parse_name
- (of-object "GVfs")
- (c-name "g_vfs_parse_name")
- (return-type "GFile*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "parse_name")
- )
-)
-
-(define-function vfs_get_default
- (c-name "g_vfs_get_default")
- (return-type "GVfs*")
-)
-
-(define-function vfs_get_local
- (c-name "g_vfs_get_local")
- (return-type "GVfs*")
-)
-
-;;
-;; wrapped in gio.override
-;;
-(define-method get_supported_uri_schemes
- (docstring
-"VFS.get_supported_uri_schemes() -> [uri, ..]\n"
-"Gets a list of URI schemes supported by vfs.")
- (of-object "GVfs")
- (c-name "g_vfs_get_supported_uri_schemes")
- (return-type "const-char*-const*")
-)
-
-
-
-;; From gwin32appinfo.h
-
-(define-function win32_app_info_get_type
- (c-name "g_win32_app_info_get_type")
- (return-type "GType")
-)
-
-
-
-;; From gvolume.h
-
-(define-function volume_get_type
- (c-name "g_volume_get_type")
- (return-type "GType")
-)
-
-(define-method get_name
- (of-object "GVolume")
- (c-name "g_volume_get_name")
- (return-type "char*")
-)
-
-(define-method get_icon
- (of-object "GVolume")
- (c-name "g_volume_get_icon")
- (return-type "GIcon*")
- (caller-owns-return #t)
-)
-
-(define-method get_uuid
- (of-object "GVolume")
- (c-name "g_volume_get_uuid")
- (return-type "char*")
-)
-
-(define-method get_drive
- (of-object "GVolume")
- (c-name "g_volume_get_drive")
- (return-type "GDrive*")
- (caller-owns-return #t)
-)
-
-(define-method get_mount
- (of-object "GVolume")
- (c-name "g_volume_get_mount")
- (return-type "GMount*")
- (caller-owns-return #t)
-)
-
-(define-method can_mount
- (of-object "GVolume")
- (c-name "g_volume_can_mount")
- (return-type "gboolean")
-)
-
-(define-method can_eject
- (of-object "GVolume")
- (c-name "g_volume_can_eject")
- (return-type "gboolean")
-)
-
-(define-method should_automount
- (of-object "GVolume")
- (c-name "g_volume_should_automount")
- (return-type "gboolean")
-)
-
-;;
-;; wrapped in gvolume.override
-;;
-(define-method mount
- (of-object "GVolume")
- (c-name "g_volume_mount")
- (return-type "none")
- (parameters
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method mount_finish
- (of-object "GVolume")
- (c-name "g_volume_mount_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-;;
-;; wrapped in gvolume.override
-;;
-(define-method eject
- (of-object "GVolume")
- (c-name "g_volume_eject")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_finish
- (of-object "GVolume")
- (c-name "g_volume_eject_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
- (deprecated "use gio.Drive.eject_with_operation_finish instead.")
-)
-
-(define-method get_identifier
- (of-object "GVolume")
- (c-name "g_volume_get_identifier")
- (return-type "char*")
- (parameters
- '("const-char*" "kind")
- )
-)
-
-;;
-;; wrapped in gvolume.override
-;;
-(define-method enumerate_identifiers
- (of-object "GVolume")
- (c-name "g_volume_enumerate_identifiers")
- (return-type "char**")
-)
-
-(define-method get_activation_root
- (of-object "GVolume")
- (c-name "g_volume_get_activation_root")
- (return-type "GFile*")
-)
-
-(define-method eject_with_operation
- (of-object "GVolume")
- (c-name "g_volume_eject_with_operation")
- (return-type "none")
- (parameters
- '("GMountUnmountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method eject_with_operation_finish
- (of-object "GVolume")
- (c-name "g_volume_eject_with_operation_finish")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gvolumemonitor.h
-
-(define-function volume_monitor_get_type
- (c-name "g_volume_monitor_get_type")
- (return-type "GType")
-)
-
-(define-function volume_monitor_get
- (c-name "g_volume_monitor_get")
- (return-type "GVolumeMonitor*")
-)
-
-;;
-;; wrapped in gvolumemonitor.override
-;;
-(define-method get_connected_drives
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_connected_drives")
- (return-type "GList*")
-)
-
-;;
-;; wrapped in gvolumemonitor.override
-;;
-(define-method get_volumes
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_volumes")
- (return-type "GList*")
-)
-
-;;
-;; wrapped in gvolumemonitor.override
-;;
-(define-method get_mounts
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_mounts")
- (return-type "GList*")
-)
-
-(define-method get_volume_for_uuid
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_volume_for_uuid")
- (return-type "GVolume*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "uuid")
- )
-)
-
-(define-method get_mount_for_uuid
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_mount_for_uuid")
- (return-type "GMount*")
- (caller-owns-return #t)
- (parameters
- '("const-char*" "uuid")
- )
-)
-
-(define-function volume_monitor_adopt_orphan_mount
- (c-name "g_volume_monitor_adopt_orphan_mount")
- (return-type "GVolume*")
- (parameters
- '("GMount*" "mount")
- )
-)
-
diff --git a/gio/gio.override b/gio/gio.override
deleted file mode 100644
index 7fdcb1c..0000000
--- a/gio/gio.override
+++ /dev/null
@@ -1,409 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygtk- Python bindings for the GTK toolkit.
- * Copyright (C) 2008 Johan Dahlin
- *
- * gio.override: module wrapping the GIO library
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-modulename gio
-%%
-import gobject.GObject as PyGObject_Type
-import glib.PollFD as PyGPollFD_Type
-%%
-headers
-#define NO_IMPORT_PYGOBJECT
-#include <pygobject.h>
-#include <gio/gio.h>
-#include "pygio-utils.h"
-#include "pyglib.h"
-#include "pygsource.h"
-
-#define BUFSIZE 8192
-
-typedef struct _PyGIONotify PyGIONotify;
-
-struct _PyGIONotify {
- gboolean referenced;
- PyObject *callback;
- PyObject *data;
- gboolean attach_self;
- gpointer buffer;
- gsize buffer_size;
-
- /* If a structure has any 'slaves', those will reference their
- * callbacks and be freed together with the 'master'. */
- PyGIONotify *slaves;
-};
-
-static GQuark
-pygio_notify_get_internal_quark(void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_string("pygio::notify");
- return quark;
-}
-
-static PyGIONotify *
-pygio_notify_new(void)
-{
- return g_slice_new0(PyGIONotify);
-}
-
-static PyGIONotify *
-pygio_notify_new_slave(PyGIONotify* master)
-{
- PyGIONotify *slave = pygio_notify_new();
-
- while (master->slaves)
- master = master->slaves;
- master->slaves = slave;
-
- return slave;
-}
-
-static gboolean
-pygio_notify_using_optional_callback(PyGIONotify *notify)
-{
- if (notify->callback)
- return TRUE;
- else {
- notify->data = NULL;
- return FALSE;
- }
-}
-
-static gboolean
-pygio_notify_callback_is_valid_full(PyGIONotify *notify, const gchar *name)
-{
- if (!notify->callback) {
- PyErr_SetString(PyExc_RuntimeError, "internal error: callback is not set");
- return FALSE;
- }
-
- if (!PyCallable_Check(notify->callback)) {
- gchar *error_message = g_strdup_printf("%s argument not callable", name);
-
- PyErr_SetString(PyExc_TypeError, error_message);
- g_free(error_message);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-pygio_notify_callback_is_valid(PyGIONotify *notify)
-{
- return pygio_notify_callback_is_valid_full(notify, "callback");
-}
-
-static void
-pygio_notify_reference_callback(PyGIONotify *notify)
-{
- if (!notify->referenced) {
- notify->referenced = TRUE;
- Py_XINCREF(notify->callback);
- Py_XINCREF(notify->data);
-
- if (notify->slaves)
- pygio_notify_reference_callback(notify->slaves);
- }
-}
-
-static void
-pygio_notify_copy_buffer(PyGIONotify *notify, gpointer buffer, gsize buffer_size)
-{
- if (buffer_size > 0) {
- notify->buffer = g_slice_copy(buffer_size, buffer);
- notify->buffer_size = buffer_size;
- }
-}
-
-static gboolean
-pygio_notify_allocate_buffer(PyGIONotify *notify, gsize buffer_size)
-{
- if (buffer_size > 0) {
- notify->buffer = g_slice_alloc(buffer_size);
- if (!notify->buffer) {
- PyErr_Format(PyExc_MemoryError, "failed to allocate %" G_GSIZE_FORMAT " bytes", buffer_size);
- return FALSE;
- }
-
- notify->buffer_size = buffer_size;
- }
-
- return TRUE;
-}
-
-static void
-pygio_notify_attach_to_result(PyGIONotify *notify)
-{
- notify->attach_self = TRUE;
-}
-
-static PyGIONotify *
-pygio_notify_get_attached(PyGObject *result)
-{
- return g_object_get_qdata(G_OBJECT(result->obj), pygio_notify_get_internal_quark());
-}
-
-static void
-pygio_notify_free(PyGIONotify *notify)
-{
- if (notify) {
- if (notify->slaves)
- pygio_notify_free(notify->slaves);
-
- if (notify->referenced) {
- PyGILState_STATE state;
-
- state = pyg_gil_state_ensure();
- Py_XDECREF(notify->callback);
- Py_XDECREF(notify->data);
- pyg_gil_state_release(state);
- }
-
- if (notify->buffer)
- g_slice_free1(notify->buffer_size, notify->buffer);
-
- g_slice_free(PyGIONotify, notify);
- }
-}
-
-static void
-async_result_callback_marshal(GObject *source_object,
- GAsyncResult *result,
- PyGIONotify *notify)
-{
- PyObject *ret;
- PyGILState_STATE state;
-
- state = pyg_gil_state_ensure();
-
- if (!notify->referenced)
- g_warning("pygio_notify_reference_callback() hasn't been called before using the structure");
-
- if (notify->attach_self) {
- g_object_set_qdata_full(G_OBJECT(result), pygio_notify_get_internal_quark(),
- notify, (GDestroyNotify) pygio_notify_free);
- }
-
- if (notify->data)
- ret = PyEval_CallFunction(notify->callback, "NNO",
- pygobject_new(source_object),
- pygobject_new((GObject *)result),
- notify->data);
- else
- ret = PyObject_CallFunction(notify->callback, "NN",
- pygobject_new(source_object),
- pygobject_new((GObject *)result));
-
- if (ret == NULL) {
- PyErr_Print();
- PyErr_Clear();
- }
-
- Py_XDECREF(ret);
-
- /* Otherwise the structure is attached to 'result' and will be
- * freed when that object dies. */
- if (!notify->attach_self)
- pygio_notify_free(notify);
-
- pyg_gil_state_release(state);
-}
-%%
-include
- gappinfo.override
- gapplaunchcontext.override
- gbufferedinputstream.override
- gcancellable.override
- gdatainputstream.override
- gdrive.override
- gfile.override
- gfileattribute.override
- gfileenumerator.override
- gfileinfo.override
- gfileinputstream.override
- gfileiostream.override
- gfileoutputstream.override
- gicon.override
- giostream.override
- gmemoryinputstream.override
- gmemoryoutputstream.override
- gmount.override
- ginputstream.override
- goutputstream.override
- gresolver.override
- gsocket.override
- gvolume.override
- gvolumemonitor.override
-%%
-ignore-glob
- *_get_type
- *free
- *_ref
- *_unref
- g_async_result_get_user_data
- g_file_new_from_commandline_arg
- g_file_new_from_path
- g_file_new_from_uri
- g_file_hash
- g_io_error_quark
- g_simple_async_result_new_error
- g_simple_async_report_error_in_idle
- g_simple_async_result_set_op_res_gpointer
- g_simple_async_result_get_op_res_gpointer
- g_simple_async_result_get_source_tag
- g_simple_async_result_run_in_thread
- g_simple_async_result_set_from_error
- g_simple_async_result_set_error
- g_simple_async_result_set_error_va
- g_io_module*
- g_io_scheduler_*
-%%
-override g_app_info_get_all noargs
-static PyObject *
-_wrap_g_app_info_get_all (PyGObject *self)
-{
- GList *list, *l;
- PyObject *ret;
-
- list = g_app_info_get_all ();
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- GObject *obj = l->data;
- PyObject *item = pygobject_new(obj);
- PyList_Append(ret, item);
- Py_DECREF(item);
- }
- g_list_free(list);
-
- return ret;
-}
-%%
-override g_app_info_get_all_for_type args
-static PyObject *
-_wrap_g_app_info_get_all_for_type (PyGObject *self, PyObject *args)
-{
- GList *list, *l;
- PyObject *ret;
- gchar *type;
-
- if (!PyArg_ParseTuple (args, "s:app_info_get_all_for_type", &type))
- return NULL;
-
- list = g_app_info_get_all_for_type (type);
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- GObject *obj = l->data;
- PyObject *item = pygobject_new(obj);
- PyList_Append(ret, item);
- Py_DECREF(item);
- }
- g_list_free(list);
-
- return ret;
-}
-%%
-override g_content_type_guess kwargs
-static PyObject *
-_wrap_g_content_type_guess(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- char *kwlist[] = {"filename", "data", "want_uncertain", NULL};
- char *filename = NULL, *data = NULL, *type;
-#ifdef PY_SSIZE_T_CLEAN
- Py_ssize_t data_size = 0;
-#else
- int data_size = 0;
-#endif
-
- gboolean result_uncertain, want_uncertain = FALSE;
- PyObject *ret;
-
- if (!PyArg_ParseTupleAndKeywords (args, kwargs,
- "|zz#i:g_content_type_guess",
- kwlist,
- &filename, &data, &data_size,
- &want_uncertain))
- return NULL;
-
- if (!filename && !data) {
- PyErr_SetString(PyExc_TypeError, "need at least one argument");
- return NULL;
- }
-
- type = g_content_type_guess(filename, (guchar *) data,
- data_size, &result_uncertain);
-
- if (want_uncertain) {
- ret = Py_BuildValue("zN", type, PyBool_FromLong(result_uncertain));
-
- } else {
- ret = PyString_FromString(type);
- }
-
- g_free(type);
- return ret;
-}
-%%
-override g_vfs_get_supported_uri_schemes noargs
-static PyObject *
-_wrap_g_vfs_get_supported_uri_schemes(PyGObject *self)
-{
- const char * const *names;
- PyObject *ret;
-
- names = g_vfs_get_supported_uri_schemes(G_VFS(self->obj));
-
- ret = PyList_New(0);
- while (names && *names) {
- PyObject *item = PyString_FromString(names[0]);
- PyList_Append(ret, item);
- Py_DECREF(item);
-
- names++;
- }
-
- return ret;
-}
-%%
-override g_content_types_get_registered noargs
-static PyObject *
-_wrap_g_content_types_get_registered(PyObject *self)
-{
- GList *list, *l;
- PyObject *ret;
-
- list = g_content_types_get_registered();
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- char *content_type = l->data;
- PyObject *string = PyString_FromString(content_type);
- PyList_Append(ret, string);
- Py_DECREF(string);
- g_free(content_type);
- }
- g_list_free(list);
-
- return ret;
-}
diff --git a/gio/giomodule.c b/gio/giomodule.c
deleted file mode 100644
index a9ddd38..0000000
--- a/gio/giomodule.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * giomodule.c: module wrapping the GIO library
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <Python.h>
-#include <pyglib.h>
-#include <pygobject.h>
-#include <pyglib-python-compat.h>
-
-#include <gio/gio.h>
-
-#define PYGIO_MAJOR_VERSION PYGOBJECT_MAJOR_VERSION
-#define PYGIO_MINOR_VERSION PYGOBJECT_MINOR_VERSION
-#define PYGIO_MICRO_VERSION PYGOBJECT_MICRO_VERSION
-
-/* include any extra headers needed here */
-
-void pygio_register_classes(PyObject *d);
-void pygio_add_constants(PyObject *module, const gchar *strip_prefix);
-
-extern PyMethodDef pygio_functions[];
-
-PYGLIB_INIT_FUNCTION(_gio, "gio._gio", pygio_functions)
-{
- PyObject *d;
- PyObject *tuple;
- PyObject *e;
-
- /* perform any initialisation required by the library here */
-
- d = PyModule_GetDict(module);
-
- g_type_init();
- pyglib_init();
-
- if (pygobject_init(2, 15, 2) == NULL)
- return -1;
-
- pygio_register_classes(d);
- pygio_add_constants(module, "G_IO_");
-
- PyModule_AddStringConstant(module, "ERROR", g_quark_to_string(G_IO_ERROR));
- e = pyglib_register_exception_for_domain("gio.Error", G_IO_ERROR);
- PyDict_SetItemString(d, "Error", e);
- Py_DECREF(e);
-
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_TYPE",
- G_FILE_ATTRIBUTE_STANDARD_TYPE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_HIDDEN",
- G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_BACKUP",
- G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_SYMLINK",
- G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL",
- G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_NAME",
- G_FILE_ATTRIBUTE_STANDARD_NAME);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME",
- G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_EDIT_NAME",
- G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_COPY_NAME",
- G_FILE_ATTRIBUTE_STANDARD_COPY_NAME);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_DESCRIPTION",
- G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_ICON",
- G_FILE_ATTRIBUTE_STANDARD_ICON);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE",
- G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE",
- G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SIZE",
- G_FILE_ATTRIBUTE_STANDARD_SIZE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET",
- G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_TARGET_URI",
- G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SORT_ORDER",
- G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ETAG_VALUE",
- G_FILE_ATTRIBUTE_ETAG_VALUE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ID_FILE",
- G_FILE_ATTRIBUTE_ID_FILE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ID_FILESYSTEM",
- G_FILE_ATTRIBUTE_ID_FILESYSTEM);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_READ",
- G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_WRITE",
- G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE",
- G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_DELETE",
- G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_TRASH",
- G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_RENAME",
- G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT",
- G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT",
- G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT",
- G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE",
- G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI",
- G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_MODIFIED",
- G_FILE_ATTRIBUTE_TIME_MODIFIED);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_MODIFIED_USEC",
- G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_ACCESS",
- G_FILE_ATTRIBUTE_TIME_ACCESS);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_ACCESS_USEC",
- G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CHANGED",
- G_FILE_ATTRIBUTE_TIME_CHANGED);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CHANGED_USEC",
- G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CREATED",
- G_FILE_ATTRIBUTE_TIME_CREATED);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CREATED_USEC",
- G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_DEVICE",
- G_FILE_ATTRIBUTE_UNIX_DEVICE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_INODE",
- G_FILE_ATTRIBUTE_UNIX_INODE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_MODE",
- G_FILE_ATTRIBUTE_UNIX_MODE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_NLINK",
- G_FILE_ATTRIBUTE_UNIX_NLINK);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_UID",
- G_FILE_ATTRIBUTE_UNIX_UID);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_GID",
- G_FILE_ATTRIBUTE_UNIX_GID);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_RDEV",
- G_FILE_ATTRIBUTE_UNIX_RDEV);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_BLOCK_SIZE",
- G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_BLOCKS",
- G_FILE_ATTRIBUTE_UNIX_BLOCKS);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT",
- G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_DOS_IS_ARCHIVE",
- G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_DOS_IS_SYSTEM",
- G_FILE_ATTRIBUTE_DOS_IS_SYSTEM);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_USER",
- G_FILE_ATTRIBUTE_OWNER_USER);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_USER_REAL",
- G_FILE_ATTRIBUTE_OWNER_USER_REAL);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_GROUP",
- G_FILE_ATTRIBUTE_OWNER_GROUP);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_THUMBNAIL_PATH",
- G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_THUMBNAILING_FAILED",
- G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_SIZE",
- G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_FREE",
- G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_TYPE",
- G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_READONLY",
- G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW",
- G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_GVFS_BACKEND",
- G_FILE_ATTRIBUTE_GVFS_BACKEND);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_SELINUX_CONTEXT",
- G_FILE_ATTRIBUTE_SELINUX_CONTEXT);
- PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TRASH_ITEM_COUNT",
- G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
-
- PyModule_AddStringConstant(module, "ERROR", g_quark_to_string(G_IO_ERROR));
-
- /* pygio version */
- tuple = Py_BuildValue ("(iii)",
- PYGIO_MAJOR_VERSION,
- PYGIO_MINOR_VERSION,
- PYGIO_MICRO_VERSION);
- PyDict_SetItemString(d, "pygio_version", tuple);
- Py_DECREF(tuple);
-
- return 0;
-}
-
diff --git a/gio/giostream.override b/gio/giostream.override
deleted file mode 100644
index 29ec801..0000000
--- a/gio/giostream.override
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * giostream.override: module overrides for GIOStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-%%
-override g_io_stream_close_async kwargs
-static PyObject *
-_wrap_g_io_stream_close_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority", "cancellable",
- "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:IOStream.close_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_io_stream_close_async(G_IO_STREAM(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gmemoryinputstream.override b/gio/gmemoryinputstream.override
deleted file mode 100644
index 0495338..0000000
--- a/gio/gmemoryinputstream.override
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gmemoryinputstream.override: module overrides for GMemoryInputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_memory_input_stream_add_data kwargs
-static PyObject *
-_wrap_g_memory_input_stream_add_data(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "data", NULL };
- PyObject *data;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gio.MemoryInputStream.add_data",
- kwlist, &data))
- return NULL;
-
- if (data != Py_None) {
- char *copy;
- int length;
-
- if (!PyString_Check(data)) {
- PyErr_SetString(PyExc_TypeError, "data must be a string or None");
- return NULL;
- }
-
- length = PyString_Size(data);
- copy = g_malloc(length);
- memcpy(copy, PyString_AsString(data), length);
-
- g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(self->obj),
- copy, length, (GDestroyNotify) g_free);
- }
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-override g_memory_input_stream_new_from_data kwargs
-static PyObject *
-_wrap_g_memory_input_stream_new_from_data(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "data", NULL };
- PyObject *data;
- GInputStream *stream = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O:gio.memory_input_stream_new_from_data",
- kwlist, &data))
- return NULL;
-
- if (data != Py_None) {
- char *copy;
- int length;
-
- if (!PyString_Check(data)) {
- PyErr_SetString(PyExc_TypeError, "data must be a string or None");
- return NULL;
- }
-
- length = PyString_Size(data);
- copy = g_malloc(length);
- memcpy(copy, PyString_AsString(data), length);
-
- stream = g_memory_input_stream_new_from_data(copy, length,
- (GDestroyNotify) g_free);
- }
-
- return pygobject_new((GObject *)stream);
-}
diff --git a/gio/gmemoryoutputstream.override b/gio/gmemoryoutputstream.override
deleted file mode 100644
index 7614045..0000000
--- a/gio/gmemoryoutputstream.override
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * gmemoryoutputstream.override: module overrides for GMemoryOutputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_memory_output_stream_new noargs
-static int
-_wrap_g_memory_output_stream_new(PyGObject *self)
-{
- self->obj = (GObject *)g_memory_output_stream_new(NULL, 0, g_realloc, g_free);
-
- if (!self->obj) {
- PyErr_SetString(PyExc_RuntimeError, "could not create gio.MemoryOutputStream object");
- return -1;
- }
-
- pygobject_register_wrapper((PyObject *)self);
- return 0;
-}
-%%
-override g_memory_output_stream_get_data noargs
-static PyObject *
-_wrap_g_memory_output_stream_get_data(PyGObject *self)
-{
- GMemoryOutputStream *stream = G_MEMORY_OUTPUT_STREAM(self->obj);
- return PyString_FromStringAndSize(g_memory_output_stream_get_data(stream),
- g_seekable_tell(G_SEEKABLE(stream)));
-}
diff --git a/gio/gmount.override b/gio/gmount.override
deleted file mode 100644
index 9fb0828..0000000
--- a/gio/gmount.override
+++ /dev/null
@@ -1,454 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gmount.override: module overrides for GMount
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_mount_guess_content_type kwargs
-static PyObject *
-_wrap_g_mount_guess_content_type(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "force_rescan",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- gboolean force_rescan;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "Oi|OO:Mount.guess_content_type",
- kwlist,
- &notify->callback,
- &force_rescan,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_mount_guess_content_type(G_MOUNT(self->obj),
- force_rescan,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_mount_guess_content_type_finish kwargs
-static PyObject *
-_wrap_g_mount_guess_content_type_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GError *error = NULL;
- char **ret;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:Mount.guess_content_type_finish",
- kwlist,
- &PyGAsyncResult_Type,
- &result))
- return NULL;
-
- ret = g_mount_guess_content_type_finish(G_MOUNT(self->obj),
- G_ASYNC_RESULT(result->obj), &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret && ret[0] != NULL) {
- py_ret = strv_to_pylist(ret);
- g_strfreev (ret);
- } else {
- py_ret = Py_None;
- Py_INCREF(py_ret);
- }
- return py_ret;
-}
-%%
-override g_mount_guess_content_type_sync kwargs
-static PyObject *
-_wrap_g_mount_guess_content_type_sync(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "force_rescan", "cancellable", NULL };
- gboolean force_rescan;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- GError *error = NULL;
- char **ret;
- PyObject *py_ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "i|O:Mount.guess_content_type_sync",
- kwlist,
- &force_rescan,
- &py_cancellable))
- return NULL;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- return NULL;
-
- ret = g_mount_guess_content_type_sync(G_MOUNT(self->obj), force_rescan,
- cancellable, &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret && ret[0] != NULL) {
- py_ret = strv_to_pylist(ret);
- g_strfreev (ret);
- } else {
- py_ret = Py_None;
- Py_INCREF(py_ret);
- }
- return py_ret;
-}
-%%
-override g_mount_remount kwargs
-static PyObject *
-_wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyObject *py_mount_operation = Py_None;
- GMountOperation *mount_operation = NULL;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Mount.remount",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_mount_operation != Py_None) {
- if (!pygobject_check(py_mount_operation, &PyGMountOperation_Type)) {
- PyErr_SetString(PyExc_TypeError,
- "mount_operation must be a gio.MountOperation or None");
- goto error;
- }
-
- mount_operation = G_MOUNT_OPERATION(pygobject_get(py_mount_operation));
- }
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_mount_remount(G_MOUNT(self->obj),
- flags,
- mount_operation,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_mount_unmount kwargs
-static PyObject *
-_wrap_g_mount_unmount(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:gio.Mount.unmount",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_mount_unmount(G_MOUNT(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_mount_eject kwargs
-static PyObject *
-_wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:gio.Mount.eject",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_mount_eject(G_MOUNT(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override-slot GMount.tp_repr
-static PyObject *
-_wrap_g_mount_tp_repr(PyGObject *self)
-{
- char *name = g_mount_get_name(G_MOUNT(self->obj));
- char *uuid = g_mount_get_uuid(G_MOUNT(self->obj));
- gchar *representation;
- PyObject *result;
-
- if (name) {
- if (uuid) {
- representation = g_strdup_printf("<%s at %p: %s (%s)>",
- self->ob_type->tp_name, self, name, uuid);
- }
- else {
- representation = g_strdup_printf("<%s at %p: %s>",
- self->ob_type->tp_name, self, name);
- }
- }
- else
- representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
-
- g_free(name);
- g_free(uuid);
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
-%%
-override g_mount_unmount_with_operation kwargs
-static PyObject *
-_wrap_g_mount_unmount_with_operation(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Mount.unmount_with_operation",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_mount_unmount_with_operation(G_MOUNT(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_mount_eject_with_operation kwargs
-static PyObject *
-_wrap_g_mount_eject_with_operation(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Mount.eject_with_operation",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_mount_eject_with_operation(G_MOUNT(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/goutputstream.override b/gio/goutputstream.override
deleted file mode 100644
index 337a84c..0000000
--- a/gio/goutputstream.override
+++ /dev/null
@@ -1,292 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * goutputstream.override: module overrides for GOutputStream
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_output_stream_write kwargs
-static PyObject *
-_wrap_g_output_stream_write(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "buffer", "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- gchar *buffer;
- long count = 0;
- GCancellable *cancellable;
- GError *error = NULL;
- gssize written;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s#|O!:OutputStream.write",
- kwlist, &buffer, &count,
- &PyGCancellable_Type, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- pyg_begin_allow_threads;
- written = g_output_stream_write(G_OUTPUT_STREAM(self->obj),
- buffer, count, cancellable, &error);
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error))
- return NULL;
-
- return PyInt_FromLong(written);
-}
-%%
-override g_output_stream_write_all kwargs
-static PyObject *
-_wrap_g_output_stream_write_all(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "buffer", "cancellable", NULL };
- PyGObject *pycancellable = NULL;
- gchar *buffer;
- long count = 0;
- GCancellable *cancellable;
- GError *error = NULL;
- gsize written;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s#|O!:OutputStream.write",
- kwlist, &buffer, &count,
- &PyGCancellable_Type, &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- pyg_begin_allow_threads;
- g_output_stream_write_all(G_OUTPUT_STREAM(self->obj),
- buffer, count, &written, cancellable, &error);
- pyg_end_allow_threads;
-
- if (pyg_error_check(&error))
- return NULL;
-
- return PyInt_FromLong(written);
-}
-%%
-override g_output_stream_write_async kwargs
-static PyObject *
-_wrap_g_output_stream_write_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "buffer", "callback", "io_priority", "cancellable",
- "user_data", NULL };
- gchar *buffer;
- long count = -1;
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s#O|iOO:OutputStream.write_async",
- kwlist, &buffer,
- &count,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
- pygio_notify_copy_buffer(notify, buffer, count);
-
- g_output_stream_write_async(G_OUTPUT_STREAM(self->obj),
- notify->buffer,
- notify->buffer_size,
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_output_stream_close_async kwargs
-static PyObject *
-_wrap_g_output_stream_close_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority",
- "cancellable", "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:OutputStream.close_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_output_stream_close_async(G_OUTPUT_STREAM(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_output_stream_flush_async kwargs
-static PyObject *
-_wrap_g_output_stream_flush_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "io_priority",
- "cancellable", "user_data", NULL };
- int io_priority = G_PRIORITY_DEFAULT;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|iOO:OutputStream.flush_async",
- kwlist,
- &notify->callback,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_output_stream_flush_async(G_OUTPUT_STREAM(self->obj),
- io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_output_stream_splice_async kwargs
-static PyObject *
-_wrap_g_output_stream_splice_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "source", "callback", "flags", "io_priority",
- "cancellable", "user_data", NULL };
-
- int io_priority = G_PRIORITY_DEFAULT;
- GOutputStreamSpliceFlags flags = G_OUTPUT_STREAM_SPLICE_NONE;
- PyObject *py_flags = NULL;
- PyGObject *source;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- PyGIONotify *notify;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!O|OiOO:OutputStream.splice_async",
- kwlist,
- &PyGInputStream_Type,
- &source,
- &notify->callback,
- &py_flags,
- &io_priority,
- &pycancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_output_stream_splice_async(G_OUTPUT_STREAM(self->obj),
- G_INPUT_STREAM(source->obj), flags, io_priority,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-
-/* GOutputStream.write_all: No ArgType for const-void* */
diff --git a/gio/gresolver.override b/gio/gresolver.override
deleted file mode 100644
index ddde73b..0000000
--- a/gio/gresolver.override
+++ /dev/null
@@ -1,312 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gresolver.override: module overrides for GResolver
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_resolver_lookup_by_name kwargs
-static PyObject *
-_wrap_g_resolver_lookup_by_name(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "hostname", "cancellable", NULL };
- gchar *hostname;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- GList *addr;
- GError *error = NULL;
- PyObject *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s|O:gio.Resolver.lookup_by_name",
- kwlist,
- &hostname,
- &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- addr = g_resolver_lookup_by_name(G_RESOLVER(self->obj),
- hostname, cancellable, &error);
-
- if (addr) {
- PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item), g_resolver_free_addresses, NULL);
- return ret;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_resolver_lookup_by_name_async kwargs
-static PyObject *
-_wrap_g_resolver_lookup_by_name_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "hostname",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- gchar *hostname;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "Os|OO:gio.Resolver.lookup_by_name_async",
- kwlist,
- &notify->callback,
- &hostname,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_resolver_lookup_by_name_async(G_RESOLVER(self->obj),
- hostname,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_resolver_lookup_by_name_finish kwargs
-static PyObject *
-_wrap_g_resolver_lookup_by_name_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GList *addr;
- PyObject *ret;
- GError *error = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.Resolver.lookup_by_name_finish",
- kwlist,
- &PyGAsyncResult_Type,
- &result))
- return NULL;
-
- addr = g_resolver_lookup_by_name_finish(G_RESOLVER(self->obj),
- G_ASYNC_RESULT(result->obj),
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (addr) {
- PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item),
- g_resolver_free_addresses, NULL);
- return ret;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_resolver_lookup_by_address_async kwargs
-static PyObject *
-_wrap_g_resolver_lookup_by_address_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "address",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *address;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OO|OO:gio.Resolver.lookup_by_address_async",
- kwlist,
- &notify->callback,
- &address,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_resolver_lookup_by_address_async(G_RESOLVER(self->obj),
- G_INET_ADDRESS(address->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_resolver_lookup_service kwargs
-static PyObject *
-_wrap_g_resolver_lookup_service(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "service", "protocol",
- "domain", "cancellable", NULL };
- gchar *service, *protocol, *domain;
- PyGObject *pycancellable = NULL;
- GCancellable *cancellable;
- GList *targets;
- GError *error = NULL;
- PyObject *ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "sss|O:gio.Resolver.lookup_service",
- kwlist,
- &service,
- &protocol,
- &domain,
- &pycancellable))
- return NULL;
-
- if (!pygio_check_cancellable(pycancellable, &cancellable))
- return NULL;
-
- targets = g_resolver_lookup_service(G_RESOLVER(self->obj),
- service, protocol, domain,
- cancellable, &error);
-
- if (targets) {
- PYLIST_FROMGLIST(ret, targets,
- pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
- g_resolver_free_targets, NULL);
- return ret;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_resolver_lookup_service_async kwargs
-static PyObject *
-_wrap_g_resolver_lookup_service_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "service", "protocol", "domain",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- gchar *service, *protocol, *domain;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "Osss|OO:gio.Resolver.lookup_service_async",
- kwlist,
- &notify->callback,
- &service,
- &protocol,
- &domain,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_resolver_lookup_service_async(G_RESOLVER(self->obj),
- service, protocol, domain,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_resolver_lookup_service_finish kwargs
-static PyObject *
-_wrap_g_resolver_lookup_service_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- PyGObject *result;
- GList *targets;
- PyObject *ret;
- GError *error = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O!:gio.Resolver.lookup_service_finish",
- kwlist,
- &PyGAsyncResult_Type,
- &result))
- return NULL;
-
- targets = g_resolver_lookup_service_finish(G_RESOLVER(self->obj),
- G_ASYNC_RESULT(result->obj),
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (targets) {
- PYLIST_FROMGLIST(ret, targets,
- pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
- g_resolver_free_targets, NULL);
- return ret;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
diff --git a/gio/gsocket.override b/gio/gsocket.override
deleted file mode 100644
index 8f66653..0000000
--- a/gio/gsocket.override
+++ /dev/null
@@ -1,575 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2009 Gian Mario Tagliaretti
- *
- * gsocket.override: module overrides for GSocket and related types
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-%%
-override g_socket_condition_check kwargs
-static PyObject *
-_wrap_g_socket_condition_check(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "condition", NULL };
- gint condition, ret;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "i:gio.Socket.condition_check",
- kwlist, &condition))
- return NULL;
-
- ret = g_socket_condition_check(G_SOCKET(self->obj), condition);
-
- return pyg_flags_from_gtype(G_TYPE_IO_CONDITION, ret);
-}
-%%
-override g_socket_condition_wait kwargs
-static PyObject *
-_wrap_g_socket_condition_wait(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "condition", "cancellable", NULL };
- gboolean ret;
- gint condition;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- GError *error;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "i|O:gio.Socket.condition_wait",
- kwlist, &condition, &cancellable))
- return NULL;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- return NULL;
-
- ret = g_socket_condition_wait(G_SOCKET(self->obj), condition,
- cancellable, &error);
-
- return PyBool_FromLong(ret);
-}
-%%
-override g_socket_address_enumerator_next_async kwargs
-static PyObject *
-_wrap_g_socket_address_enumerator_next_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OO:gio.SocketAddressEnumerator.next_async",
- kwlist,
- &notify->callback,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_socket_address_enumerator_next_async(G_SOCKET_ADDRESS_ENUMERATOR(self->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_socket_client_connect_async kwargs
-static PyObject *
-_wrap_g_socket_client_connect_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "connectable", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- PyGObject *py_connectable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OO|OO:gio.SocketClient.connect_async",
- kwlist,
- &notify->callback,
- &py_connectable,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_socket_client_connect_async(G_SOCKET_CLIENT(self->obj),
- G_SOCKET_CONNECTABLE(py_connectable->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_socket_client_connect_to_host_async kwargs
-static PyObject *
-_wrap_g_socket_client_connect_to_host_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "host_and_port", "default_port",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- gchar *host_and_port;
- guint16 default_port;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OsH|OO:gio.SocketClient.connect_to_host_async",
- kwlist,
- &notify->callback,
- &host_and_port,
- &default_port,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_socket_client_connect_to_host_async(G_SOCKET_CLIENT(self->obj),
- host_and_port, default_port,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_socket_client_connect_to_service_async kwargs
-static PyObject *
-_wrap_g_socket_client_connect_to_service_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "domain", "service",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- gchar *domain, *service;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "Oss|OO:gio.SocketClient.connect_to_service_async",
- kwlist,
- &notify->callback,
- &domain,
- &service,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_socket_client_connect_to_service_async(G_SOCKET_CLIENT(self->obj),
- domain, service,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_socket_listener_add_address kwargs
-static PyObject *
-_wrap_g_socket_listener_add_address(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "address", "type", "protocol",
- "source_object", NULL };
- GSocketProtocol protocol;
- PyObject *py_type = NULL, *py_protocol = NULL;
- GError *error = NULL;
- gboolean ret;
- GSocketType type;
- GSocketAddress *effective_address;
- PyGObject *address, *py_source_object = NULL;
- GObject *source_object;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!OO|O!:gio.SocketListener.add_address",
- kwlist,
- &PyGSocketAddress_Type, &address,
- &py_type, &py_protocol,
- &PyGObject_Type, &source_object,
- &PyGSocketAddress_Type, &effective_address))
- return NULL;
-
- if (pyg_enum_get_value(G_TYPE_SOCKET_TYPE, py_type, (gpointer)&type))
- return NULL;
-
- if (pyg_enum_get_value(G_TYPE_SOCKET_PROTOCOL, py_protocol, (gpointer)&protocol))
- return NULL;
-
- if (py_source_object == NULL || (PyObject*)py_source_object == Py_None)
- source_object = NULL;
- else if (pygobject_check(py_source_object, &PyGObject_Type))
- source_object = G_OBJECT(py_source_object->obj);
- else {
- PyErr_SetString(PyExc_TypeError, "source_object should be a gobject.GObject or None");
- return NULL;
- }
-
- ret = g_socket_listener_add_address(G_SOCKET_LISTENER(self->obj),
- G_SOCKET_ADDRESS(address->obj),
- type, protocol,
- source_object,
- &effective_address,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (ret)
- return pygobject_new((GObject *)effective_address);
- else {
- Py_INCREF(Py_None);
- return Py_None;
- }
-}
-%%
-override g_socket_listener_accept kwargs
-static PyObject *
-_wrap_g_socket_listener_accept(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "cancellable", NULL };
- GError *error = NULL;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- PyObject *py_connection, *py_source_object;
- GObject *source_object;
- GSocketConnection *connection;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept",
- kwlist,
- &py_cancellable))
- return NULL;
-
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- return NULL;
-
- connection = g_socket_listener_accept(G_SOCKET_LISTENER(self->obj),
- &source_object,
- cancellable,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (connection)
- py_connection = pygobject_new((GObject *)connection);
- else {
- py_connection = Py_None;
- Py_INCREF(py_connection);
- }
-
- if (source_object)
- py_source_object = pygobject_new((GObject *)source_object);
- else {
- py_source_object= Py_None;
- Py_INCREF(py_source_object);
- }
- return Py_BuildValue("(NN)", py_connection, py_source_object);
-}
-%%
-override g_socket_listener_accept_async kwargs
-static PyObject *
-_wrap_g_socket_listener_accept_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OO:gio.SocketListener.accept_async",
- kwlist,
- &notify->callback,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_socket_listener_accept_async(G_SOCKET_LISTENER(self->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_socket_listener_accept_finish kwargs
-static PyObject *
-_wrap_g_socket_listener_accept_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- GError *error = NULL;
- PyGObject *result;
- PyObject *py_connection, *py_source_object;
- GObject *source_object;
- GSocketConnection *connection;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_finish",
- kwlist,
- &PyGAsyncResult_Type, &result))
- return NULL;
-
- connection = g_socket_listener_accept_finish(G_SOCKET_LISTENER(self->obj),
- G_ASYNC_RESULT(result->obj),
- &source_object,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (connection)
- py_connection = pygobject_new((GObject *)connection);
- else {
- py_connection = Py_None;
- Py_INCREF(py_connection);
- }
-
- if (source_object)
- py_source_object = pygobject_new((GObject *)source_object);
- else {
- py_source_object= Py_None;
- Py_INCREF(py_source_object);
- }
- return Py_BuildValue("(NN)", py_connection, py_source_object);
-}
-%%
-override g_socket_listener_accept_socket kwargs
-static PyObject *
-_wrap_g_socket_listener_accept_socket(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "cancellable", NULL };
- GError *error = NULL;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
- PyObject *py_socket, *py_source_object;
- GObject *source_object;
- GSocket *socket;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept_socket",
- kwlist,
- &py_cancellable))
- return NULL;
-
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- return NULL;
-
- socket = g_socket_listener_accept_socket(G_SOCKET_LISTENER(self->obj),
- &source_object,
- cancellable,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (socket)
- py_socket = pygobject_new((GObject *)socket);
- else {
- py_socket = Py_None;
- Py_INCREF(py_socket);
- }
-
- if (source_object)
- py_source_object = pygobject_new((GObject *)source_object);
- else {
- py_source_object= Py_None;
- Py_INCREF(py_source_object);
- }
- return Py_BuildValue("(NN)", py_socket, py_source_object);
-}
-%%
-override g_socket_listener_accept_socket_async kwargs
-static PyObject *
-_wrap_g_socket_listener_accept_socket_async(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OO:gio.SocketListener.accept_socket_async",
- kwlist,
- &notify->callback,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_socket_listener_accept_socket_async(G_SOCKET_LISTENER(self->obj),
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_socket_listener_accept_socket_finish kwargs
-static PyObject *
-_wrap_g_socket_listener_accept_socket_finish(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "result", NULL };
- GError *error = NULL;
- PyGObject *result;
- PyObject *py_socket, *py_source_object;
- GObject *source_object;
- GSocket *socket;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_socket_finish",
- kwlist,
- &PyGAsyncResult_Type, &result))
- return NULL;
-
- socket = g_socket_listener_accept_socket_finish(G_SOCKET_LISTENER(self->obj),
- G_ASYNC_RESULT(result->obj),
- &source_object,
- &error);
-
- if (pyg_error_check(&error))
- return NULL;
-
- if (socket)
- py_socket = pygobject_new((GObject *)socket);
- else {
- py_socket= Py_None;
- Py_INCREF(py_socket);
- }
-
- if (source_object)
- py_source_object = pygobject_new((GObject *)source_object);
- else {
- py_source_object= Py_None;
- Py_INCREF(py_source_object);
- }
- return Py_BuildValue("(NN)", py_socket, py_source_object);
-}
-
-/* Could not write method GSocketAddress.to_native: No ArgType for gpointer */
-/* Could not write method GSocket.receive_from: No ArgType for GSocketAddress** */
-/* Could not write method GSocket.receive_message: No ArgType for GSocketAddress** */
-/* Could not write method GSocket.send_message: No ArgType for GOutputVector* */
-/* Could not write method GSocket.create_source: No ArgType for GIOCondition */
-/* Could not write method GSocketControlMessage.serialize: No ArgType for gpointer */
-/* Could not write function socket_address_new_from_native: No ArgType for gpointer */
-/* Could not write function socket_control_message_deserialize: No ArgType for gpointer */
diff --git a/gio/gvolume.override b/gio/gvolume.override
deleted file mode 100644
index 89c27e4..0000000
--- a/gio/gvolume.override
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * gvolume.override: module overrides for GVolume
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override g_volume_mount kwargs
-static PyObject *
-_wrap_g_volume_mount(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "mount_operation", "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *py_mount_operation = NULL;
- GMountOperation *mount_operation = NULL;
- PyGObject *py_cancellable = NULL;
- GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OO|OOO:Volume.mount",
- kwlist,
- &py_mount_operation,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if ((PyObject *)py_mount_operation == Py_None)
- mount_operation = NULL;
-
- else if (py_mount_operation && pygobject_check(py_mount_operation,
- &PyGMountOperation_Type))
- mount_operation = G_MOUNT_OPERATION(py_mount_operation->obj);
-
- else if (py_mount_operation) {
- PyErr_SetString(PyExc_TypeError,
- "mount_operation should be a GMountOperation or None");
- return NULL;
- }
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_volume_mount(G_VOLUME(self->obj),
- flags,
- mount_operation,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_volume_eject kwargs
-static PyObject *
-_wrap_g_volume_eject(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:Volume.eject",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_volume_eject(G_VOLUME(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override-slot GVolume.tp_repr
-static PyObject *
-_wrap_g_volume_tp_repr(PyGObject *self)
-{
- char *name = g_volume_get_name(G_VOLUME(self->obj));
- gchar *representation;
- PyObject *result;
-
- if (name) {
- representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
- g_free(name);
- }
- else
- representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
-%%
-override g_volume_enumerate_identifiers noargs
-static PyObject *
-_wrap_g_volume_enumerate_identifiers (PyGObject *self)
-{
- char **ids;
- PyObject *ret;
-
- pyg_begin_allow_threads;
-
- ids = g_volume_enumerate_identifiers(G_VOLUME (self->obj));
-
- pyg_end_allow_threads;
-
- if (ids && ids[0] != NULL) {
- ret = strv_to_pylist(ids);
- g_strfreev (ids);
- } else {
- ret = Py_None;
- Py_INCREF(ret);
- }
- return ret;
-}
-%%
-override g_volume_eject_with_operation kwargs
-static PyObject *
-_wrap_g_volume_eject_with_operation(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *mount_operation;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Volume.eject_with_operation",
- kwlist,
- &notify->callback,
- &py_flags,
- &mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- g_volume_eject_with_operation(G_VOLUME(self->obj),
- flags,
- G_MOUNT_OPERATION(mount_operation->obj),
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
diff --git a/gio/gvolumemonitor.override b/gio/gvolumemonitor.override
deleted file mode 100644
index 4ffedf3..0000000
--- a/gio/gvolumemonitor.override
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * gvolumemonitor.override: module overrides for GVolumeMonitor
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-override-slot GVolumeMonitor.tp_new
-static PyObject *
-_wrap_g_volume_monitor_tp_new(PyObject *type, PyObject *args, PyObject *kwargs)
-{
- return pygobject_new(G_OBJECT(g_volume_monitor_get()));
-}
-%%
-override g_volume_monitor_get_connected_drives noargs
-static PyObject *
-_wrap_g_volume_monitor_get_connected_drives (PyGObject *self)
-{
- GList *list, *l;
- PyObject *ret;
-
- list = g_volume_monitor_get_connected_drives (G_VOLUME_MONITOR (self->obj));
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- GDrive *drive = l->data;
- PyObject *item = pygobject_new((GObject *)drive);
- PyList_Append(ret, item);
- Py_DECREF(item);
- g_object_unref(drive);
- }
- g_list_free(list);
-
- return ret;
-}
-%%
-override g_volume_monitor_get_volumes noargs
-static PyObject *
-_wrap_g_volume_monitor_get_volumes (PyGObject *self)
-{
- GList *list, *l;
- PyObject *ret;
-
- list = g_volume_monitor_get_volumes (G_VOLUME_MONITOR (self->obj));
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- GVolume *volume = l->data;
- PyObject *item = pygobject_new((GObject *)volume);
- PyList_Append(ret, item);
- Py_DECREF(item);
- g_object_unref(volume);
- }
- g_list_free(list);
-
- return ret;
-}
-%%
-override g_volume_monitor_get_mounts noargs
-static PyObject *
-_wrap_g_volume_monitor_get_mounts (PyGObject *self)
-{
- GList *list, *l;
- PyObject *ret;
-
- list = g_volume_monitor_get_mounts (G_VOLUME_MONITOR (self->obj));
-
- ret = PyList_New(0);
- for (l = list; l; l = l->next) {
- GMount *mount = l->data;
- PyObject *item = pygobject_new((GObject *)mount);
- PyList_Append(ret, item);
- Py_DECREF(item);
- g_object_unref(mount);
- }
- g_list_free(list);
-
- return ret;
-}
diff --git a/gio/pygio-utils.c b/gio/pygio-utils.c
deleted file mode 100644
index f89c4b9..0000000
--- a/gio/pygio-utils.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygtk- Python bindings for the GTK toolkit.
- * Copyright (C) 2008 Johan Dahlin
- * Copyright (C) 2008 Gian Mario Tagliaretti
- *
- * giomodule.c: module wrapping the GIO library
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-#include "pygio-utils.h"
-#include <pyglib-python-compat.h>
-
-/**
- * pygio_check_cancellable:
- * @pycancellable:
- * @cancellable:
- *
- * Returns:
- */
-gboolean
-pygio_check_cancellable(PyGObject *pycancellable,
- GCancellable **cancellable)
-{
- if (pycancellable == NULL || (PyObject*)pycancellable == Py_None)
- *cancellable = NULL;
- else if (pygobject_check(pycancellable, &PyGCancellable_Type))
- *cancellable = G_CANCELLABLE(pycancellable->obj);
- else
- {
- PyErr_SetString(PyExc_TypeError,
- "cancellable should be a gio.Cancellable");
- return FALSE;
- }
- return TRUE;
-}
-
-/**
- * pygio_check_launch_context:
- * @pycontext:
- * @context:
- *
- * Returns:
- */
-gboolean
-pygio_check_launch_context(PyGObject *pycontext,
- GAppLaunchContext **context)
-{
- if (pycontext == NULL || (PyObject*)pycontext == Py_None)
- *context = NULL;
- else if (pygobject_check(pycontext, &PyGAppLaunchContext_Type))
- *context = G_APP_LAUNCH_CONTEXT(pycontext->obj);
- else
- {
- PyErr_SetString(PyExc_TypeError,
- "launch_context should be a GAppLaunchContext or None");
- return FALSE;
- }
- return TRUE;
-}
-
-/**
- * pygio_pylist_to_gfile_glist:
- * @pyfile_list:
- *
- * Returns:
- */
-GList *
-pygio_pylist_to_gfile_glist(PyObject *pyfile_list)
-{
- GList *file_list = NULL;
- PyObject *item;
- int len, i;
-
- len = PySequence_Size(pyfile_list);
- for (i = 0; i < len; i++) {
- item = PySequence_GetItem(pyfile_list, i);
- if (!PyObject_TypeCheck(item, &PyGFile_Type)) {
- PyErr_SetString(PyExc_TypeError,
- "files must be a list or tuple of GFile");
- g_list_free(file_list);
- return NULL;
- }
- file_list = g_list_prepend(file_list, ((PyGObject *)item)->obj);
- }
- file_list = g_list_reverse(file_list);
-
- return file_list;
-}
-
-/**
- * pygio_pylist_to_uri_glist:
- * @pyfile_list:
- *
- * Returns:
- */
-GList *
-pygio_pylist_to_uri_glist(PyObject *pyfile_list)
-{
- GList *file_list = NULL;
- PyObject *item;
- int len, i;
-
- len = PySequence_Size(pyfile_list);
- for (i = 0; i < len; i++) {
- item = PySequence_GetItem(pyfile_list, i);
- if (!PYGLIB_PyUnicode_Check(item)) {
- PyErr_SetString(PyExc_TypeError,
- "files must be strings");
- g_list_free(file_list);
- return NULL;
- }
-
-#if PY_VERSION_HEX < 0x03000000
- file_list = g_list_prepend(file_list, g_strdup(PyString_AsString(item)));
-#else
- {
- PyObject *utf8_bytes_obj = PyUnicode_AsUTF8String (item);
- if (!utf8_bytes_obj) {
- g_list_free(file_list);
- return NULL;
- }
- file_list = g_list_prepend(file_list, g_strdup(PyBytes_AsString(utf8_bytes_obj)));
- Py_DECREF (utf8_bytes_obj);
- }
-#endif
-
- }
- file_list = g_list_reverse(file_list);
-
- return file_list;
-}
-
-/**
- * strv_to_pylist:
- * @strv: array of strings
- *
- * Returns: A python list of strings
- */
-PyObject *
-strv_to_pylist (char **strv)
-{
- gsize len, i;
- PyObject *list;
-
- len = strv ? g_strv_length (strv) : 0;
- list = PyList_New (len);
-
- for (i = 0; i < len; i++) {
- PyList_SetItem (list, i, PYGLIB_PyUnicode_FromString (strv[i]));
- }
- return list;
-}
-
-/**
- * pylist_to_strv:
- * @strvp: a pointer to an array where return strings.
- *
- * Returns: TRUE if the list of strings could be converted, FALSE otherwise.
- */
-gboolean
-pylist_to_strv (PyObject *list,
- char ***strvp)
-{
- int i, len;
- char **ret;
-
- *strvp = NULL;
-
- if (list == Py_None)
- return TRUE;
-
- if (!PySequence_Check (list))
- {
- PyErr_Format (PyExc_TypeError, "argument must be a list or tuple of strings");
- return FALSE;
- }
-
- if ((len = PySequence_Size (list)) < 0)
- return FALSE;
-
- ret = g_new (char*, len + 1);
- for (i = 0; i <= len; ++i)
- ret[i] = NULL;
-
- for (i = 0; i < len; ++i)
- {
- PyObject *item = PySequence_GetItem (list, i);
-
- if (!item)
- {
- g_strfreev (ret);
- return FALSE;
- }
-
- if (!PYGLIB_PyUnicode_Check (item))
- {
- Py_DECREF (item);
- g_strfreev (ret);
- PyErr_Format (PyExc_TypeError, "argument must be a list of strings");
- return FALSE;
- }
-
-#if PY_VERSION_HEX < 0x03000000
- ret[i] = g_strdup (PyString_AsString (item));
-#else
- {
- PyObject *utf8_bytes_obj = PyUnicode_AsUTF8String (item);
- if (!utf8_bytes_obj) {
- Py_DECREF (item);
- g_strfreev (ret);
- return FALSE;
- }
- ret[i] = g_strdup (PyBytes_AsString(utf8_bytes_obj));
- Py_DECREF (utf8_bytes_obj);
- }
-#endif
- Py_DECREF (item);
- }
-
- *strvp = ret;
- return TRUE;
-}
diff --git a/gio/pygio-utils.h b/gio/pygio-utils.h
deleted file mode 100644
index 76bfde3..0000000
--- a/gio/pygio-utils.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygtk- Python bindings for the GTK toolkit.
- * Copyright (C) 2008 Johan Dahlin
- *
- * giomodule.c: module wrapping the GIO library
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-
-#ifndef __PYGIO_UTILS_H__
-#define __PYGIO_UTILS_H__
-
-#define NO_IMPORT_PYGOBJECT
-#include <Python.h>
-#include <pygobject.h>
-#include <gio/gio.h>
-
-extern PyTypeObject PyGCancellable_Type;
-extern PyTypeObject PyGAppLaunchContext_Type;
-extern PyTypeObject PyGFile_Type;
-
-gboolean pygio_check_cancellable(PyGObject *pycancellable,
- GCancellable **cancellable);
-
-gboolean pygio_check_launch_context(PyGObject *pycontext,
- GAppLaunchContext **context);
-
-GList* pygio_pylist_to_gfile_glist(PyObject *pycontext);
-
-GList* pygio_pylist_to_uri_glist(PyObject *pycontext);
-
-PyObject* strv_to_pylist (char **strv);
-
-gboolean pylist_to_strv (PyObject *list, char ***strvp);
-
-#endif /* __PYGIO_UTILS_H__ */
diff --git a/gio/unix-types.defs b/gio/unix-types.defs
deleted file mode 100644
index ed1ed9f..0000000
--- a/gio/unix-types.defs
+++ /dev/null
@@ -1,55 +0,0 @@
-;; -*- scheme -*-
-
-(define-object Connection
- (in-module "giounix")
- (parent "GSocketConnection")
- (c-name "GUnixConnection")
- (gtype-id "G_TYPE_UNIX_CONNECTION")
-)
-
-(define-object DesktopAppInfo
- (docstring
- "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n"
- "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n"
- "based on desktop files."
- )
- (in-module "giounix")
- (parent "GObject")
- (c-name "GDesktopAppInfo")
- (gtype-id "G_TYPE_DESKTOP_APP_INFO")
-)
-
-(define-object FDMessage
- (in-module "giounix")
- (parent "GSocketControlMessage")
- (c-name "GUnixFDMessage")
- (gtype-id "G_TYPE_UNIX_FD_MESSAGE")
-)
-
-(define-object InputStream
- (in-module "giounix")
- (parent "GInputStream")
- (c-name "GUnixInputStream")
- (gtype-id "G_TYPE_UNIX_INPUT_STREAM")
-)
-
-(define-object OutputStream
- (in-module "giounix")
- (parent "GOutputStream")
- (c-name "GUnixOutputStream")
- (gtype-id "G_TYPE_UNIX_OUTPUT_STREAM")
-)
-
-(define-pointer MountEntry
- (in-module "giounix")
- (c-name "GUnixMountEntry")
- (gtype-id "GIO_UNIX_MOUNT_ENTRY_TYPE")
-)
-
-(define-object SocketAddress
- (in-module "giounix")
- (parent "GSocketAddress")
- (c-name "GUnixSocketAddress")
- (gtype-id "G_TYPE_UNIX_SOCKET_ADDRESS")
-)
-
diff --git a/gio/unix.defs b/gio/unix.defs
deleted file mode 100644
index ff43ed6..0000000
--- a/gio/unix.defs
+++ /dev/null
@@ -1,475 +0,0 @@
-;; -*- scheme -*-
-
-(include "unix-types.defs")
-
-;; From gunixconnection.h
-
-(define-function g_unix_connection_get_type
- (c-name "g_unix_connection_get_type")
- (return-type "GType")
-)
-
-(define-method send_fd
- (of-object "GUnixConnection")
- (c-name "g_unix_connection_send_fd")
- (return-type "gboolean")
- (parameters
- '("gint" "fd")
- '("GCancellable*" "cancellable")
- '("GError**" "error")
- )
-)
-
-(define-method receive_fd
- (of-object "GUnixConnection")
- (c-name "g_unix_connection_receive_fd")
- (return-type "gint")
- (parameters
- '("GCancellable*" "cancellable")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gdesktopappinfo.h
-
-(define-function desktop_app_info_get_type
- (c-name "g_desktop_app_info_get_type")
- (return-type "GType")
-)
-
-(define-function desktop_app_info_new_from_filename
- (c-name "g_desktop_app_info_new_from_filename")
- (return-type "GDesktopAppInfo*")
- (parameters
- '("const-char*" "filename")
- )
-)
-
-(define-function g_desktop_app_info_new_from_keyfile
- (c-name "g_desktop_app_info_new_from_keyfile")
- (return-type "GDesktopAppInfo*")
- (parameters
- '("GKeyFile*" "key_file")
- )
-)
-
-(define-function desktop_app_info_new
- (c-name "g_desktop_app_info_new")
- (is-constructor-of "GDesktopAppInfo")
- (return-type "GDesktopAppInfo*")
- (parameters
- '("const-char*" "desktop_id")
- )
-)
-
-(define-method get_is_hidden
- (of-object "GDesktopAppInfo")
- (c-name "g_desktop_app_info_get_is_hidden")
- (return-type "gboolean")
-)
-
-(define-function desktop_app_info_set_desktop_env
- (c-name "g_desktop_app_info_set_desktop_env")
- (return-type "none")
- (parameters
- '("const-char*" "desktop_env")
- )
-)
-
-
-
-;; From gunixfdmessage.h
-
-(define-function g_unix_fd_message_get_type
- (c-name "g_unix_fd_message_get_type")
- (return-type "GType")
-)
-
-(define-function g_unix_fd_message_new
- (c-name "g_unix_fd_message_new")
- (is-constructor-of "GUnixFdMessage")
- (return-type "GSocketControlMessage*")
-)
-
-(define-method steal_fds
- (of-object "GUnixFDMessage")
- (c-name "g_unix_fd_message_steal_fds")
- (return-type "gint*")
- (parameters
- '("gint*" "length")
- )
-)
-
-(define-method append_fd
- (of-object "GUnixFDMessage")
- (c-name "g_unix_fd_message_append_fd")
- (return-type "gboolean")
- (parameters
- '("gint" "fd")
- '("GError**" "error")
- )
-)
-
-
-
-;; From gunixmounts.h
-
-(define-function unix_mount_free
- (c-name "g_unix_mount_free")
- (return-type "none")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-method free
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_free")
- (return-type "none")
-)
-
-(define-function unix_mount_compare
- (c-name "g_unix_mount_compare")
- (return-type "gint")
- (parameters
- '("GUnixMountEntry*" "mount1")
- '("GUnixMountEntry*" "mount2")
- )
-)
-
-(define-function unix_mount_get_mount_path
- (c-name "g_unix_mount_get_mount_path")
- (return-type "const-char*")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_get_device_path
- (c-name "g_unix_mount_get_device_path")
- (return-type "const-char*")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_get_fs_type
- (c-name "g_unix_mount_get_fs_type")
- (return-type "const-char*")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_is_readonly
- (c-name "g_unix_mount_is_readonly")
- (return-type "gboolean")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_is_system_internal
- (c-name "g_unix_mount_is_system_internal")
- (return-type "gboolean")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_guess_can_eject
- (c-name "g_unix_mount_guess_can_eject")
- (return-type "gboolean")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_guess_should_display
- (c-name "g_unix_mount_guess_should_display")
- (return-type "gboolean")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_guess_name
- (c-name "g_unix_mount_guess_name")
- (return-type "char*")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-function unix_mount_guess_icon
- (c-name "g_unix_mount_guess_icon")
- (return-type "GIcon*")
- (parameters
- '("GUnixMountEntry*" "mount_entry")
- )
-)
-
-(define-method compare
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_compare")
- (return-type "gint")
- (parameters
- '("GUnixMountPoint*" "mount2")
- )
-)
-
-(define-method get_mount_path
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_get_mount_path")
- (return-type "const-char*")
-)
-
-(define-method get_device_path
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_get_device_path")
- (return-type "const-char*")
-)
-
-(define-method get_fs_type
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_get_fs_type")
- (return-type "const-char*")
-)
-
-(define-method is_readonly
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_is_readonly")
- (return-type "gboolean")
-)
-
-(define-method is_user_mountable
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_is_user_mountable")
- (return-type "gboolean")
-)
-
-(define-method is_loopback
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_is_loopback")
- (return-type "gboolean")
-)
-
-(define-method guess_can_eject
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_guess_can_eject")
- (return-type "gboolean")
-)
-
-(define-method guess_name
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_guess_name")
- (return-type "char*")
-)
-
-(define-method guess_icon
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_guess_icon")
- (return-type "GIcon*")
-)
-
-(define-function unix_mount_points_get
- (c-name "g_unix_mount_points_get")
- (return-type "GList*")
- (parameters
- '("guint64*" "time_read")
- )
-)
-
-(define-function unix_mounts_get
- (c-name "g_unix_mounts_get")
- (return-type "GList*")
- (parameters
- '("guint64*" "time_read")
- )
-)
-
-(define-function unix_mount_at
- (c-name "g_unix_mount_at")
- (return-type "GUnixMountEntry*")
- (parameters
- '("const-char*" "mount_path")
- '("guint64*" "time_read")
- )
-)
-
-(define-function unix_mounts_changed_since
- (c-name "g_unix_mounts_changed_since")
- (return-type "gboolean")
- (parameters
- '("guint64" "time")
- )
-)
-
-(define-function unix_mount_points_changed_since
- (c-name "g_unix_mount_points_changed_since")
- (return-type "gboolean")
- (parameters
- '("guint64" "time")
- )
-)
-
-(define-function unix_mount_monitor_get_type
- (c-name "g_unix_mount_monitor_get_type")
- (return-type "GType")
-)
-
-(define-function unix_mount_monitor_new
- (c-name "g_unix_mount_monitor_new")
- (is-constructor-of "GUnixMountMonitor")
- (return-type "GUnixMountMonitor*")
-)
-
-(define-method set_rate_limit
- (of-object "GUnixMountMonitor")
- (c-name "g_unix_mount_monitor_set_rate_limit")
- (return-type "none")
- (parameters
- '("int" "limit_msec")
- )
-)
-
-(define-function unix_is_mount_path_system_internal
- (c-name "g_unix_is_mount_path_system_internal")
- (return-type "gboolean")
- (parameters
- '("const-char*" "mount_path")
- )
-)
-
-
-
-;; From gunixinputstream.h
-
-(define-function unix_input_stream_get_type
- (c-name "g_unix_input_stream_get_type")
- (return-type "GType")
-)
-
-(define-function unix_input_stream_new
- (c-name "g_unix_input_stream_new")
- (is-constructor-of "GUnixInputStream")
- (return-type "GInputStream*")
- (parameters
- '("int" "fd")
- '("gboolean" "close_fd_at_close")
- )
-)
-
-(define-method set_close_fd
- (of-object "GUnixInputStream")
- (c-name "g_unix_input_stream_set_close_fd")
- (return-type "none")
- (parameters
- '("gboolean" "close_fd")
- )
-)
-
-(define-method get_close_fd
- (of-object "GUnixInputStream")
- (c-name "g_unix_input_stream_get_close_fd")
- (return-type "gboolean")
-)
-
-(define-method get_fd
- (of-object "GUnixInputStream")
- (c-name "g_unix_input_stream_get_fd")
- (return-type "gint")
-)
-
-
-
-;; From gunixoutputstream.h
-
-(define-function unix_output_stream_get_type
- (c-name "g_unix_output_stream_get_type")
- (return-type "GType")
-)
-
-(define-function unix_output_stream_new
- (c-name "g_unix_output_stream_new")
- (is-constructor-of "GUnixOutputStream")
- (return-type "GOutputStream*")
- (parameters
- '("int" "fd")
- '("gboolean" "close_fd_at_close")
- )
-)
-
-(define-method set_close_fd
- (of-object "GUnixOutputStream")
- (c-name "g_unix_output_stream_set_close_fd")
- (return-type "none")
- (parameters
- '("gboolean" "close_fd")
- )
-)
-
-(define-method get_close_fd
- (of-object "GUnixOutputStream")
- (c-name "g_unix_output_stream_get_close_fd")
- (return-type "gboolean")
-)
-
-(define-method get_fd
- (of-object "GUnixOutputStream")
- (c-name "g_unix_output_stream_get_fd")
- (return-type "gint")
-)
-
-
-
-;; From gunixsocketaddress.h
-
-(define-function g_unix_socket_address_get_type
- (c-name "g_unix_socket_address_get_type")
- (return-type "GType")
-)
-
-(define-function g_unix_socket_address_new
- (c-name "g_unix_socket_address_new")
- (is-constructor-of "GUnixSocketAddress")
- (return-type "GSocketAddress*")
- (parameters
- '("const-gchar*" "path")
- )
-)
-
-(define-function g_unix_socket_address_new_abstract
- (c-name "g_unix_socket_address_new_abstract")
- (return-type "GSocketAddress*")
- (parameters
- '("const-gchar*" "path")
- '("int" "path_len")
- )
-)
-
-(define-method get_path
- (of-object "GUnixSocketAddress")
- (c-name "g_unix_socket_address_get_path")
- (return-type "const-char*")
-)
-
-(define-method get_path_len
- (of-object "GUnixSocketAddress")
- (c-name "g_unix_socket_address_get_path_len")
- (return-type "gsize")
-)
-
-(define-method get_is_abstract
- (of-object "GUnixSocketAddress")
- (c-name "g_unix_socket_address_get_is_abstract")
- (return-type "gboolean")
-)
-
-(define-function g_unix_socket_address_abstract_names_supported
- (c-name "g_unix_socket_address_abstract_names_supported")
- (return-type "gboolean")
-)
-
diff --git a/gio/unix.override b/gio/unix.override
deleted file mode 100644
index aebc6fc..0000000
--- a/gio/unix.override
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * unixmodule.c: module wrapping the GIO UNIX library
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-%%
-headers
-#define NO_IMPORT_PYGOBJECT
-#include <pygobject.h>
-#include <gio/gio.h>
-#include <gio/gdesktopappinfo.h>
-#include <gio/gunixinputstream.h>
-#include <gio/gunixmounts.h>
-#include <gio/gunixoutputstream.h>
-#define GIO_COMPILATION
-#include <gio/gunixconnection.h>
-#undef GIO_COMPILATION
-#include <gio/gunixfdmessage.h>
-#include <gio/gunixsocketaddress.h>
-
-#define GIO_UNIX_MOUNT_ENTRY_TYPE (_gio_unix_mount_entry_get_type ())
-
-static GType _gio_unix_mount_entry_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_pointer_type_register_static ("GUnixMountEntry");
-
- return our_type;
-}
-
-%%
-modulename gio.unix
-%%
-import gobject.GObject as PyGObject_Type
-import gio.InputStream as PyGInputStream_Type
-import gio.OutputStream as PyGOutputStream_Type
-import gio.SocketAddress as PyGSocketAddress_Type
-import gio.Cancellable as PyGCancellable_Type
-import gio.SocketConnection as PyGSocketConnection_Type
-import gio.SocketControlMessage as PyGSocketControlMessage_Type
-%%
-ignore-glob
- *_get_type
-%%
diff --git a/gio/unixmodule.c b/gio/unixmodule.c
deleted file mode 100644
index 7a49856..0000000
--- a/gio/unixmodule.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygobject - Python bindings for GObject
- * Copyright (C) 2008 Johan Dahlin
- *
- * unixmodule.c: module wrapping the GIO UNIX library
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <Python.h>
-#include <pygobject.h>
-
-#include <gio/gio.h>
-
-/* include any extra headers needed here */
-
-void pyunix_register_classes(PyObject *d);
-void pyunix_add_constants(PyObject *module, const gchar *strip_prefix);
-
-extern PyMethodDef pyunix_functions[];
-
-DL_EXPORT(void)
-initunix(void)
-{
- PyObject *m, *d;
-
- /* perform any initialisation required by the library here */
-
- m = Py_InitModule("gio.unix", pyunix_functions);
- d = PyModule_GetDict(m);
-
- init_pygobject();
-
- pyunix_register_classes(d);
-
-}
-
diff --git a/pygobject-2.0-uninstalled.pc.in b/pygobject-3.0-uninstalled.pc.in
index 3fb6288..8dd5f38 100644
--- a/pygobject-2.0-uninstalled.pc.in
+++ b/pygobject-3.0-uninstalled.pc.in
@@ -14,6 +14,5 @@ xslfiles=${pc_top_builddir}/${pcfiledir}/docs/xsl
# same here. Useful when calling the code generator in addon packages.
defsdir=${pc_top_builddir}/${pcfiledir}/gio
fixxref=${pc_top_builddir}/${pcfiledir}/docs/xsl/fixxref.py
-codegendir=${pc_top_builddir}/${pcfiledir}/codegen
pygdocs=${pc_top_builddir}/${pcfiledir}/docs
datadir=${pc_top_builddir}/pygobject-@VERSION@
diff --git a/pygobject-2.0.pc.in b/pygobject-3.0.pc.in
index a47b685..2ae8ebf 100644
--- a/pygobject-2.0.pc.in
+++ b/pygobject-3.0.pc.in
@@ -12,7 +12,6 @@ pygtkincludedir=${includedir}/pygtk-2.0
fixxref=${datadir}/pygobject/xsl/fixxref.py
pygdocs=${datadir}/gtk-doc/html/pygobject
defsdir=${datadir}/pygobject/2.0/defs
-codegendir=${datadir}/pygobject/2.0/codegen
overridesdir=@pyexecdir@/gi/overrides
Name: PyGObject
diff --git a/pygtk.py b/pygtk.py
deleted file mode 100644
index e061b88..0000000
--- a/pygtk.py
+++ /dev/null
@@ -1,95 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-# pygtk - Python bindings for the GTK+ widget set.
-# Copyright (C) 1998-2002 James Henstridge
-#
-# pygtk.py: pygtk version selection code.
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
-
-import fnmatch
-import glob
-import os
-import os.path
-import sys
-
-__all__ = ['require']
-
-_our_dir = os.path.dirname(os.path.abspath(os.path.normpath(__file__)))
-_pygtk_2_0_dir = os.path.normpath('%s/gtk-2.0' % _our_dir)
-
-_pygtk_dir_pat = 'gtk-[0-9].[0-9]'
-
-_pygtk_required_version = None
-
-def _get_available_versions():
- versions = {}
- for dir in sys.path:
- if not dir:
- dir = os.getcwd()
-
- if not os.path.isdir(dir):
- continue
-
- # if the dir is a pygtk dir, skip it
- if fnmatch.fnmatchcase(os.path.basename(dir), _pygtk_dir_pat):
- continue
-
- for filename in glob.glob(os.path.join(dir, _pygtk_dir_pat)):
- pathname = os.path.join(dir, filename)
-
- # skip non directories
- if not os.path.isdir(pathname):
- continue
-
- # skip empty directories
- if not os.listdir(pathname):
- continue
-
- if not versions.has_key(filename[-3:]):
- versions[filename[-3:]] = pathname
- return versions
-
-def require20():
- if _pygtk_2_0_dir not in sys.path:
- sys.path.insert(0, _pygtk_2_0_dir)
-
-def require(version):
- if version == '2.0':
- return require20()
-
- global _pygtk_required_version
-
- if _pygtk_required_version != None:
- assert _pygtk_required_version == version, \
- "a different version of gtk was already required"
- return
-
- assert not sys.modules.has_key('gtk'), \
- "pygtk.require() must be called before importing gtk"
-
- versions = _get_available_versions()
- assert versions.has_key(version), \
- "required version '%s' not found on system" % version
-
- # remove any pygtk dirs first ...
- for dir in sys.path:
- if fnmatch.fnmatchcase(os.path.basename(dir), _pygtk_dir_pat):
- sys.path.remove(dir)
-
- # prepend the pygtk path ...
- sys.path.insert(0, versions[version])
-
- _pygtk_required_version = version
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bad15f0..4ec6477 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,5 @@
CLEANFILES =
-noinst_LTLIBRARIES =
-if ENABLE_INTROSPECTION
-noinst_LTLIBRARIES += libregress.la libgimarshallingtests.la
+noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
@@ -44,11 +42,10 @@ gschemas.compiled: org.gnome.test.gschema.xml
glib-compile-schemas --targetdir=. --schema-file=$<
CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
-endif
noinst_LTLIBRARIES += testhelper.la
-testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+testhelper_la_CFLAGS = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
testhelper_la_LDFLAGS = -module -avoid-version
testhelper_la_LIBADD = $(GLIB_LIBS)
testhelper_la_SOURCES = \
@@ -80,22 +77,12 @@ TEST_FILES_STATIC = \
test_thread.py \
test_uris.py
-if BUILD_GIO
-TEST_FILES_GIO = \
- test_gio.py \
- test_gresolver.py \
- test_gsocket.py \
- test_gicon.py \
- test_gcancellable.py
-endif
-if ENABLE_INTROSPECTION
TEST_FILES_GI = \
test_everything.py \
test_gi.py \
test_gdbus.py \
test_overrides.py
-endif
EXTRA_DIST = \
compathelper.py \
@@ -104,9 +91,10 @@ EXTRA_DIST = \
test-floating.h \
test-thread.h \
test-unknown.h \
+ te_ST@nouppera \
org.gnome.test.gschema.xml
-EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
+EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI)
clean-local:
rm -f $(LTLIBRARIES:.la=.so) file.txt~
@@ -120,13 +108,9 @@ RUN_TESTS_ENV_VARS= \
TESTS_BUILDDIR=$(builddir)
RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
-# run tests in separately to avoid loading static and introspection bindings in the same process
check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
-if BUILD_GIO
- TEST_FILES="$(TEST_FILES_GIO)" $(RUN_TESTS_LAUNCH)
-endif
check.gdb:
EXEC_NAME="gdb --args" $(MAKE) check
diff --git a/tests/Makefile.in b/tests/Makefile.in
index a695412..710030a 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -34,8 +34,6 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@ENABLE_INTROSPECTION_TRUE@am__append_1 = libregress.la libgimarshallingtests.la
-@ENABLE_INTROSPECTION_TRUE@am__append_2 = Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -52,7 +50,8 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libgimarshallingtests_la_LIBADD =
-@ENABLE_INTROSPECTION_TRUE@nodist_libgimarshallingtests_la_OBJECTS = libgimarshallingtests_la-gimarshallingtests.lo
+nodist_libgimarshallingtests_la_OBJECTS = \
+ libgimarshallingtests_la-gimarshallingtests.lo
libgimarshallingtests_la_OBJECTS = \
$(nodist_libgimarshallingtests_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
@@ -62,15 +61,12 @@ 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
+nodist_libregress_la_OBJECTS = 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 \
@@ -142,8 +138,6 @@ EXEEXT = @EXEEXT@
FFI_CFLAGS = @FFI_CFLAGS@
FFI_LIBS = @FFI_LIBS@
FGREP = @FGREP@
-GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
-GIOUNIX_LIBS = @GIOUNIX_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
GI_CFLAGS = @GI_CFLAGS@
@@ -260,7 +254,6 @@ prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
-pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
@@ -270,15 +263,18 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-CLEANFILES = $(am__append_2)
-noinst_LTLIBRARIES = $(am__append_1) testhelper.la
-@ENABLE_INTROSPECTION_TRUE@nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
-@ENABLE_INTROSPECTION_TRUE@libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
-@ENABLE_INTROSPECTION_TRUE@libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
-@ENABLE_INTROSPECTION_TRUE@nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
-@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
-@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
-testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+CLEANFILES = Regress-1.0.gir Regress-1.0.typelib \
+ GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib \
+ gschemas.compiled
+noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la \
+ testhelper.la
+nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
+libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
+libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
+libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
+testhelper_la_CFLAGS = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
testhelper_la_LDFLAGS = -module -avoid-version
testhelper_la_LIBADD = $(GLIB_LIBS)
testhelper_la_SOURCES = \
@@ -299,22 +295,16 @@ TEST_FILES_STATIC = \
test_thread.py \
test_uris.py
-@BUILD_GIO_TRUE@TEST_FILES_GIO = \
-@BUILD_GIO_TRUE@ test_gio.py \
-@BUILD_GIO_TRUE@ test_gresolver.py \
-@BUILD_GIO_TRUE@ test_gsocket.py \
-@BUILD_GIO_TRUE@ test_gicon.py \
-@BUILD_GIO_TRUE@ test_gcancellable.py
-
-@ENABLE_INTROSPECTION_TRUE@TEST_FILES_GI = \
-@ENABLE_INTROSPECTION_TRUE@ test_everything.py \
-@ENABLE_INTROSPECTION_TRUE@ test_gi.py \
-@ENABLE_INTROSPECTION_TRUE@ test_gdbus.py \
-@ENABLE_INTROSPECTION_TRUE@ test_overrides.py
+TEST_FILES_GI = \
+ test_everything.py \
+ test_gi.py \
+ test_gdbus.py \
+ test_overrides.py
EXTRA_DIST = compathelper.py runtests.py testmodule.py test-floating.h \
- test-thread.h test-unknown.h org.gnome.test.gschema.xml \
- $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
+ test-thread.h test-unknown.h te_ST@nouppera \
+ org.gnome.test.gschema.xml $(TEST_FILES_STATIC) \
+ $(TEST_FILES_GI)
DBUS_LAUNCH = $(shell which dbus-launch)
RUN_TESTS_ENV_VARS = \
PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
@@ -367,10 +357,6 @@ 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)
@@ -665,37 +651,37 @@ 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)
+libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
+ $(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)
+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
-@ENABLE_INTROSPECTION_TRUE@Regress-1.0.gir: libregress.la Makefile
-@ENABLE_INTROSPECTION_TRUE@ $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
-@ENABLE_INTROSPECTION_TRUE@ --namespace=Regress --nsversion=1.0 \
-@ENABLE_INTROSPECTION_TRUE@ --warn-all --warn-error \
-@ENABLE_INTROSPECTION_TRUE@ --library=libregress.la \
-@ENABLE_INTROSPECTION_TRUE@ --libtool="$(top_builddir)/libtool" \
-@ENABLE_INTROSPECTION_TRUE@ --output $@ \
-@ENABLE_INTROSPECTION_TRUE@ $(nodist_libregress_la_SOURCES)
-@ENABLE_INTROSPECTION_TRUE@Regress-1.0.typelib: Regress-1.0.gir Makefile
-@ENABLE_INTROSPECTION_TRUE@ $(AM_V_GEN) g-ir-compiler $< -o $@
-
-@ENABLE_INTROSPECTION_TRUE@GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
-@ENABLE_INTROSPECTION_TRUE@ $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
-@ENABLE_INTROSPECTION_TRUE@ --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
-@ENABLE_INTROSPECTION_TRUE@ --warn-all --warn-error \
-@ENABLE_INTROSPECTION_TRUE@ --library=libgimarshallingtests.la \
-@ENABLE_INTROSPECTION_TRUE@ --libtool="$(top_builddir)/libtool" \
-@ENABLE_INTROSPECTION_TRUE@ --output $@ \
-@ENABLE_INTROSPECTION_TRUE@ $(nodist_libgimarshallingtests_la_SOURCES)
-@ENABLE_INTROSPECTION_TRUE@GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
-@ENABLE_INTROSPECTION_TRUE@ $(AM_V_GEN) g-ir-compiler $< -o $@
-
-@ENABLE_INTROSPECTION_TRUE@gschemas.compiled: org.gnome.test.gschema.xml
-@ENABLE_INTROSPECTION_TRUE@ glib-compile-schemas --targetdir=. --schema-file=$<
+Regress-1.0.gir: libregress.la Makefile
+ $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
+ --namespace=Regress --nsversion=1.0 \
+ --warn-all --warn-error \
+ --library=libregress.la \
+ --libtool="$(top_builddir)/libtool" \
+ --output $@ \
+ $(nodist_libregress_la_SOURCES)
+Regress-1.0.typelib: Regress-1.0.gir Makefile
+ $(AM_V_GEN) g-ir-compiler $< -o $@
+
+GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
+ $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
+ --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
+ --warn-all --warn-error \
+ --library=libgimarshallingtests.la \
+ --libtool="$(top_builddir)/libtool" \
+ --output $@ \
+ $(nodist_libgimarshallingtests_la_SOURCES)
+GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
+ $(AM_V_GEN) g-ir-compiler $< -o $@
+
+gschemas.compiled: org.gnome.test.gschema.xml
+ glib-compile-schemas --targetdir=. --schema-file=$<
# This is a hack to make sure a shared library is built
testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
@@ -709,11 +695,9 @@ all: $(LTLIBRARIES:.la=.so)
clean-local:
rm -f $(LTLIBRARIES:.la=.so) file.txt~
-# run tests in separately to avoid loading static and introspection bindings in the same process
check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
-@BUILD_GIO_TRUE@ TEST_FILES="$(TEST_FILES_GIO)" $(RUN_TESTS_LAUNCH)
check.gdb:
EXEC_NAME="gdb --args" $(MAKE) check
diff --git a/tests/runtests.py b/tests/runtests.py
index 2bb8637..2a8ecf4 100644..100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
# -*- Mode: Python -*-
import os
@@ -6,6 +7,9 @@ import sys
import unittest
+if '--help' in sys.argv:
+ print("Usage: ./runtests.py <testfiles>")
+ sys.exit(0)
# force untranslated messages, as we check for them in some tests
os.environ['LC_MESSAGES'] = 'C'
@@ -17,6 +21,10 @@ elif 'TEST_FILES' in os.environ:
names = []
for filename in os.environ['TEST_FILES'].split():
names.append(filename[:-3])
+elif len(sys.argv) > 1:
+ names = []
+ for filename in sys.argv[1:]:
+ names.append(filename.replace('.py', ''))
else:
names = []
for filename in glob.iglob("test_*.py"):
diff --git a/tests/te_ST@nouppera b/tests/te_ST@nouppera
new file mode 100644
index 0000000..a511e90
--- /dev/null
+++ b/tests/te_ST@nouppera
@@ -0,0 +1,50 @@
+LC_IDENTIFICATION
+title "pygobject test locale"
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "POSIX"
+END LC_COLLATE
+
+LC_CTYPE
+# a → a, other characters normally
+toupper (<U0061>,<U0061>); (<U0062>,<U0042>); (<U0063>,<U0043>); \
+ (<U0076>,<U0056>); (<U006C>,<U004C>); (<U0075>,<U0055>); \
+ (<U0065>,<U0045>);
+END LC_CTYPE
+
+LC_MESSAGES
+copy "en_US"
+END LC_MESSAGES
+
+LC_MONETARY
+copy "en_US"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "POSIX"
+END LC_NUMERIC
+
+LC_TIME
+copy "POSIX"
+END LC_TIME
+
+LC_PAPER
+copy "en_US"
+END LC_PAPER
+
+LC_TELEPHONE
+copy "en_US"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "en_US"
+END LC_MEASUREMENT
+
+LC_NAME
+copy "en_US"
+END LC_NAME
+
+LC_ADDRESS
+copy "en_US"
+END LC_ADDRESS
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 5fadc36..b39711e 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -11,6 +11,7 @@ from sys import getrefcount
import cairo
from gi.repository import GObject
+from gi.repository import GLib
from gi.repository import Regress as Everything
if sys.version_info < (3, 0):
@@ -109,7 +110,7 @@ class TestEverything(unittest.TestCase):
Everything.test_int8()
except TypeError:
(e_type, e) = sys.exc_info()[:2]
- self.assertEquals(e.args, ("test_int8() takes exactly 1 argument(s) (0 given)",))
+ self.assertEquals(e.args, ("test_int8() takes exactly 1 argument (0 given)",))
def test_gtypes(self):
gchararray_gtype = GObject.type_from_name('gchararray')
@@ -465,3 +466,9 @@ class TestTortureProfile(unittest.TestCase):
print("\t====")
print("\tTotal: %f sec" % total_time)
+class TestAdvancedInterfaces(unittest.TestCase):
+ def test_array_objs(self):
+ obj1, obj2 = Everything.test_array_fixed_out_objects()
+ self.assertTrue(isinstance(obj1, Everything.TestObj))
+ self.assertTrue(isinstance(obj2, Everything.TestObj))
+ self.assertNotEqual(obj1, obj2)
diff --git a/tests/test_gcancellable.py b/tests/test_gcancellable.py
deleted file mode 100644
index f911572..0000000
--- a/tests/test_gcancellable.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# -*- Mode: Python -*-
-
-import unittest
-
-import glib
-import gio
-
-
-class TestResolver(unittest.TestCase):
- def setUp(self):
- self.cancellable = gio.Cancellable()
-
- def test_make_poll_fd(self):
- poll = self.cancellable.make_pollfd()
- self.failUnless(isinstance(poll, glib.PollFD))
diff --git a/tests/test_gdbus.py b/tests/test_gdbus.py
index a9442fe..5db5d93 100644
--- a/tests/test_gdbus.py
+++ b/tests/test_gdbus.py
@@ -6,7 +6,7 @@ import unittest
import sys
sys.path.insert(0, "../")
-import gobject
+from gi.repository import GObject
from gi.repository import GLib
from gi.repository import Gio
@@ -40,8 +40,7 @@ class TestGDBusClient(unittest.TestCase):
self.dbus_proxy.call_sync('GetConnectionUnixProcessID', None,
Gio.DBusCallFlags.NO_AUTO_START, 500, None)
self.fail('call with invalid arguments should raise an exception')
- except Exception:
- etype, e = sys.exc_info()[:2]
+ except Exception as e:
self.assertTrue('InvalidArgs' in str(e))
# error case: invalid argument
@@ -50,9 +49,7 @@ class TestGDBusClient(unittest.TestCase):
GLib.Variant('(s)', (' unknown',)),
Gio.DBusCallFlags.NO_AUTO_START, 500, None)
self.fail('call with invalid arguments should raise an exception')
- except Exception:
- etype, e = sys.exc_info()[:2]
-
+ except Exception as e:
self.assertTrue('NameHasNoOwner' in str(e))
# error case: unknown method
@@ -60,17 +57,17 @@ class TestGDBusClient(unittest.TestCase):
self.dbus_proxy.call_sync('UnknownMethod', None,
Gio.DBusCallFlags.NO_AUTO_START, 500, None)
self.fail('call for unknown method should raise an exception')
- except Exception:
- etype, e = sys.exc_info()[:2]
-
+ except Exception as e:
self.assertTrue('UnknownMethod' in str(e))
def test_native_calls_async(self):
def call_done(obj, result, user_data):
- user_data['result'] = obj.call_finish(result)
- user_data['main_loop'].quit()
+ try:
+ user_data['result'] = obj.call_finish(result)
+ finally:
+ user_data['main_loop'].quit()
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.call('ListNames', None,
Gio.DBusCallFlags.NO_AUTO_START, 500, None,
@@ -87,14 +84,12 @@ class TestGDBusClient(unittest.TestCase):
try:
obj.call_finish(result)
self.fail('call_finish() for unknown method should raise an exception')
- except Exception:
- etype, e = sys.exc_info()[:2]
-
+ except Exception as e:
self.assertTrue('UnknownMethod' in str(e))
finally:
user_data['main_loop'].quit()
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.call('UnknownMethod', None,
Gio.DBusCallFlags.NO_AUTO_START, 500, None, call_done, data)
@@ -127,9 +122,7 @@ class TestGDBusClient(unittest.TestCase):
self.assertEqual(len(result), 4)
for i in result:
self.assertEqual(type(i), type(''))
- except Exception:
- etype, e = sys.exc_info()[:2]
-
+ except Exception as e:
if 'Error.ServiceUnknown' not in str(e):
raise
@@ -137,9 +130,7 @@ class TestGDBusClient(unittest.TestCase):
try:
self.dbus_proxy.GetConnectionUnixProcessID('()', timeout=0)
self.fail('call with timeout=0 should raise an exception')
- except Exception:
- etype, e = sys.exc_info()[:2]
-
+ except Exception as e:
self.assertTrue('Timeout' in str(e), str(e))
def test_python_calls_sync_noargs(self):
@@ -154,9 +145,7 @@ class TestGDBusClient(unittest.TestCase):
try:
self.dbus_proxy.GetConnectionUnixProcessID('()')
self.fail('call with invalid arguments should raise an exception')
- except Exception:
- etype, e = sys.exc_info()[:2]
-
+ except Exception as e:
self.assertTrue('InvalidArgs' in str(e), str(e))
try:
@@ -170,7 +159,7 @@ class TestGDBusClient(unittest.TestCase):
user_data['result'] = result
user_data['main_loop'].quit()
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.ListNames('()', result_handler=call_done,
user_data=data)
@@ -187,7 +176,7 @@ class TestGDBusClient(unittest.TestCase):
user_data['result'] = result
user_data['main_loop'].quit()
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.ListNames('(s)', 'invalid_argument',
result_handler=call_done, user_data=data)
@@ -206,7 +195,7 @@ class TestGDBusClient(unittest.TestCase):
user_data['error'] = error
user_data['main_loop'].quit()
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
data = {'main_loop': main_loop}
self.dbus_proxy.ListNames('(s)', 'invalid_argument',
result_handler=call_done, error_handler=call_error,
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 6990225..2e7f2dd 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -12,7 +12,6 @@ import locale
import subprocess
from gi.repository import GObject
-import gobject
from gi.repository import GIMarshallingTests
from compathelper import _bytes
@@ -704,14 +703,6 @@ class TestArray(unittest.TestCase):
object_ = GIMarshallingTests.Object()
self.assertEquals([-1, 0, 1, 2], object_.method_array_return())
- def test_array_fixed_out_struct(self):
- struct1, struct2 = GIMarshallingTests.array_fixed_out_struct()
-
- self.assertEquals(7, struct1.long_)
- self.assertEquals(6, struct1.int8)
- self.assertEquals(6, struct2.long_)
- self.assertEquals(7, struct2.int8)
-
def test_array_zero_terminated_return(self):
self.assertEquals(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_return())
@@ -742,7 +733,6 @@ class TestArray(unittest.TestCase):
def test_gstrv_inout(self):
self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.gstrv_inout(['0', '1', '2']))
-
class TestGArray(unittest.TestCase):
def test_garray_int_none_return(self):
@@ -786,6 +776,48 @@ class TestGArray(unittest.TestCase):
def test_garray_utf8_full_inout(self):
self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.garray_utf8_full_inout(['0', '1', '2']))
+class TestGPtrArray(unittest.TestCase):
+
+ def test_gptrarray_int_none_return(self):
+ self.assertEquals([0, 1, 2, 3], GIMarshallingTests.gptrarray_int_none_return())
+
+ def test_gptrarray_utf8_none_return(self):
+ self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_return())
+
+ def test_gptrarray_utf8_container_return(self):
+ self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_container_return())
+
+ def test_gptrarray_utf8_full_return(self):
+ self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_return())
+
+ def test_gptrarray_int_none_in(self):
+ GIMarshallingTests.gptrarray_int_none_in(Sequence([0, 1, 2, 3]))
+
+ self.assertRaises(TypeError, GIMarshallingTests.gptrarray_int_none_in, Sequence([-1, '0', 1, 2]))
+
+ self.assertRaises(TypeError, GIMarshallingTests.gptrarray_int_none_in, 42)
+ self.assertRaises(TypeError, GIMarshallingTests.gptrarray_int_none_in, None)
+
+ def test_gptrarray_utf8_none_in(self):
+ GIMarshallingTests.gptrarray_utf8_none_in(Sequence(['0', '1', '2']))
+
+ def test_gptrarray_utf8_none_out(self):
+ self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_out())
+
+ def test_gptrarray_utf8_container_out(self):
+ self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_container_out())
+
+ def test_gptrarray_utf8_full_out(self):
+ self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_out())
+
+ def test_gptrarray_utf8_none_inout(self):
+ self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gptrarray_utf8_none_inout(Sequence(('0', '1', '2'))))
+
+ def test_gptrarray_utf8_container_inout(self):
+ self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.gptrarray_utf8_container_inout(['0', '1', '2']))
+
+ def test_gptrarray_utf8_full_inout(self):
+ self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.gptrarray_utf8_full_inout(['0', '1', '2']))
class TestGList(unittest.TestCase):
@@ -1546,7 +1578,8 @@ class TestPythonGObject(unittest.TestCase):
# compare the same enum from both the pygobject attrs and gi GObject attrs
self.assertEquals(GObject.SIGNAL_ACTION, GObject.SignalFlags.ACTION)
# compare a static gobject attr with a dynamic GObject attr
- self.assertEquals(GObject.GObject, gobject.GObject)
+ import gi._gobject
+ self.assertEquals(GObject.GObject, gi._gobject.GObject)
def test_subobject_non_vfunc_do_method(self):
class PythonObjectWithNonVFuncDoMethod:
@@ -1750,3 +1783,61 @@ class TestGErrorArrayInCrash(unittest.TestCase):
# take in GArrays. See https://bugzilla.gnome.org/show_bug.cgi?id=642708
def test_gerror_array_in_crash(self):
self.assertRaises(GObject.GError, GIMarshallingTests.gerror_array_in, [1, 2, 3])
+
+class TestKeywordArgs(unittest.TestCase):
+ def test_calling(self):
+ kw_func = GIMarshallingTests.int_three_in_three_out
+
+ self.assertEquals(kw_func(1, 2, 3), (1, 2, 3))
+ self.assertEquals(kw_func(**{'a':4, 'b':5, 'c':6}), (4, 5, 6))
+ self.assertEquals(kw_func(1, **{'b':7, 'c':8}), (1, 7, 8))
+ self.assertEquals(kw_func(1, 7, **{'c':8}), (1, 7, 8))
+ self.assertEquals(kw_func(1, c=8, **{'b':7}), (1, 7, 8))
+ self.assertEquals(kw_func(2, c=4, b=3), (2, 3, 4))
+ self.assertEquals(kw_func(a=2, c=4, b=3), (2, 3, 4))
+
+ def assertRaisesMessage(self, exception, message, func, *args, **kwargs):
+ try:
+ func(*args, **kwargs)
+ except exception:
+ (e_type, e) = sys.exc_info()[:2]
+ if message is not None:
+ self.assertEqual(str(e), message)
+ except:
+ raise
+ else:
+ msg = "%s() did not raise %s" % (func.__name__, exception.__name__)
+ raise AssertionError(msg)
+
+ def test_type_errors(self):
+ # test too few args
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 arguments (0 given)",
+ GIMarshallingTests.int_three_in_three_out)
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 arguments (1 given)",
+ GIMarshallingTests.int_three_in_three_out, 1)
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 arguments (0 given)",
+ GIMarshallingTests.int_three_in_three_out, *())
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 arguments (0 given)",
+ GIMarshallingTests.int_three_in_three_out, *(), **{})
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 non-keyword arguments (0 given)",
+ GIMarshallingTests.int_three_in_three_out, *(), **{'c':4})
+
+ # test too many args
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 arguments (4 given)",
+ GIMarshallingTests.int_three_in_three_out, *(1, 2, 3, 4))
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() takes exactly 3 non-keyword arguments (4 given)",
+ GIMarshallingTests.int_three_in_three_out, *(1, 2, 3, 4), c=6)
+
+ # test too many keyword args
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() got multiple values for keyword argument 'a'",
+ GIMarshallingTests.int_three_in_three_out, 1, 2, 3, **{'a': 4, 'b': 5})
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() got an unexpected keyword argument 'd'",
+ GIMarshallingTests.int_three_in_three_out, d=4)
+ self.assertRaisesMessage(TypeError, "int_three_in_three_out() got an unexpected keyword argument 'e'",
+ GIMarshallingTests.int_three_in_three_out, **{'e': 2})
+
+ def test_kwargs_are_not_modified(self):
+ d = {'b': 2}
+ d2 = d.copy()
+ GIMarshallingTests.int_three_in_three_out(1, c=4, **d)
+ self.assertEqual(d, d2)
diff --git a/tests/test_gicon.py b/tests/test_gicon.py
deleted file mode 100644
index b9af6ff..0000000
--- a/tests/test_gicon.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# -*- Mode: Python -*-
-
-import os
-import unittest
-
-import glib
-import gio
-
-
-class TestIcon(unittest.TestCase):
- def test_eq(self):
- self.assertEquals(gio.FileIcon(gio.File('foo.png')),
- gio.FileIcon(gio.File('foo.png')))
- self.assertEquals(gio.ThemedIcon('foo'),
- gio.ThemedIcon('foo'))
-
- self.assertNotEqual(gio.FileIcon(gio.File('foo.png')),
- gio.FileIcon(gio.File('bar.png')))
- self.assertNotEquals(gio.ThemedIcon('foo'),
- gio.ThemedIcon('bar'))
- self.assertNotEquals(gio.FileIcon(gio.File('foo.png')),
- gio.ThemedIcon('foo'))
-
- def test_hash(self):
- self.assertEquals(hash(gio.FileIcon(gio.File('foo.png'))),
- hash(gio.FileIcon(gio.File('foo.png'))))
- self.assertEquals(hash(gio.ThemedIcon('foo')),
- hash(gio.ThemedIcon('foo')))
-
-class TestLoadableIcon(unittest.TestCase):
- def setUp(self):
- self.file = open('temp.svg', 'w')
- self.svg = ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
- '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" '
- '"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">'
- '<svg width="32" height="32"/>')
- self.file.write(self.svg)
- self.file.close()
- self.icon = gio.FileIcon(gio.File('temp.svg'))
-
- def tearDown(self):
- if os.path.exists('temp.svg'):
- os.unlink('temp.svg')
-
- def test_load(self):
- stream, type = self.icon.load()
- try:
- self.assert_(isinstance(stream, gio.InputStream))
- self.assertEquals(self.svg, stream.read())
- finally:
- stream.close()
-
- def test_load_async(self):
- def callback(icon, result):
- try:
- stream, type = icon.load_finish(result)
- self.assert_(isinstance(stream, gio.InputStream))
- self.assertEquals(self.svg, stream.read())
- finally:
- loop.quit()
- stream.close()
-
- self.icon.load_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestFileIcon(unittest.TestCase):
- def test_constructor(self):
- file = gio.File('foo.png')
- self.assert_(file is gio.FileIcon(file).get_file())
-
-class TestThemedIcon(unittest.TestCase):
- def setUp(self):
- self.icon = gio.ThemedIcon("open")
-
- def test_constructor(self):
- have_use_default_fallbacks = ('use_default_fallbacks'
- in gio.ThemedIcon.props.__members__)
- icon = gio.ThemedIcon('foo')
- self.assertEquals(['foo'], icon.props.names)
- self.assert_(not have_use_default_fallbacks
- or not icon.props.use_default_fallbacks)
-
- icon = gio.ThemedIcon(['foo', 'bar', 'baz'])
- self.assertEquals(['foo', 'bar', 'baz'], icon.props.names)
- self.assert_(not have_use_default_fallbacks
- or not icon.props.use_default_fallbacks)
-
- icon = gio.ThemedIcon('xxx-yyy-zzz', True)
- self.assertEquals(['xxx-yyy-zzz', 'xxx-yyy', 'xxx'], icon.props.names)
- self.assert_(not have_use_default_fallbacks
- or icon.props.use_default_fallbacks)
-
- def test_constructor_illegals(self):
- self.assertRaises(TypeError, lambda: gio.ThemedIcon(42))
- self.assertRaises(TypeError, lambda: gio.ThemedIcon(['foo', 42, 'bar']))
-
- def test_get_names(self):
- self.assertEquals(self.icon.get_names(), ['open'])
-
- def test_append_name(self):
- self.assertEquals(self.icon.get_names(), ['open'])
- self.icon.append_name('close')
- self.assertEquals(self.icon.get_names(), ['open', 'close'])
-
-class TestEmblemedIcon(unittest.TestCase):
- def test_emblemed_icon(self):
- icon = gio.FileIcon(gio.File('foo.png'))
- emblem = gio.Emblem(icon)
- emblemed = gio.EmblemedIcon(icon, emblem)
- self.assertEquals(emblemed.get_emblems()[0], emblem)
diff --git a/tests/test_gio.py b/tests/test_gio.py
deleted file mode 100644
index e14eddf..0000000
--- a/tests/test_gio.py
+++ /dev/null
@@ -1,1138 +0,0 @@
-# -*- Mode: Python -*-
-
-import os
-import unittest
-
-import glib
-import gio
-
-
-class TestFile(unittest.TestCase):
- def setUp(self):
- self._f = open("file.txt", "w+")
- self.file = gio.File("file.txt")
-
- def tearDown(self):
- self._f.close()
- if os.path.exists('file.txt'):
- os.unlink("file.txt")
-
- def testReadAsync(self):
- self._f.write("testing")
- self._f.seek(0)
-
- def callback(file, result):
- try:
- stream = file.read_finish(result)
- self.failUnless(isinstance(stream, gio.InputStream))
- self.assertEquals(stream.read(), "testing")
- finally:
- loop.quit()
-
- self.file.read_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testAppendToAsync(self):
- self._f.write("append_to ")
- self._f.close()
-
- def callback(file, result):
- try:
- stream = file.append_to_finish(result)
- self.failUnless(isinstance(stream, gio.OutputStream))
- w = stream.write("testing")
- cont, leng, etag = self.file.load_contents()
- self.assertEqual(cont, "append_to testing")
- finally:
- loop.quit()
-
- self.file.append_to_async(callback, gio.FILE_CREATE_NONE,
- glib.PRIORITY_HIGH)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testAppendToAsyncNoargs(self):
- self._f.write("append_to ")
- self._f.close()
-
- def callback(file, result):
- try:
- stream = file.append_to_finish(result)
- self.failUnless(isinstance(stream, gio.OutputStream))
- w = stream.write("testing")
- cont, leng, etag = self.file.load_contents()
- self.assertEqual(cont, "append_to testing")
- finally:
- loop.quit()
-
- self.file.append_to_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testCreateAsync(self):
- def callback(file, result):
- try:
- stream = file.create_finish(result)
- self.failUnless(isinstance(stream, gio.OutputStream))
- w = stream.write("testing")
- cont, leng, etag = file.load_contents()
- self.assertEqual(cont, "testing")
- finally:
- if os.path.exists('temp.txt'):
- os.unlink("temp.txt")
- loop.quit()
-
- gfile = gio.File("temp.txt")
- gfile.create_async(callback, gio.FILE_CREATE_NONE,
- glib.PRIORITY_HIGH)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testCreateReadWriteAsync(self):
- def callback(file, result):
- try:
- iostream = file.create_readwrite_finish(result)
- self.failUnless(isinstance(iostream, gio.FileIOStream))
-
- ostream = iostream.get_output_stream()
- self.failUnless(isinstance(ostream, gio.OutputStream))
-
- w = ostream.write("testing")
- cont, leng, etag = file.load_contents()
- self.assertEqual(cont, "testing")
- finally:
- if os.path.exists('temp.txt'):
- os.unlink("temp.txt")
- loop.quit()
-
- gfile = gio.File("temp.txt")
- gfile.create_readwrite_async(callback, gio.FILE_CREATE_NONE,
- glib.PRIORITY_HIGH)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testCreateAsyncNoargs(self):
- def callback(file, result):
- try:
- stream = file.create_finish(result)
- self.failUnless(isinstance(stream, gio.OutputStream))
- w = stream.write("testing")
- cont, leng, etag = file.load_contents()
- self.assertEqual(cont, "testing")
- finally:
- if os.path.exists('temp.txt'):
- os.unlink("temp.txt")
- loop.quit()
-
- gfile = gio.File("temp.txt")
- gfile.create_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testReplaceAsync(self):
- self._f.write("testing")
- self._f.close()
-
- def callback(file, result):
- try:
- stream = file.replace_finish(result)
- self.failUnless(isinstance(stream, gio.OutputStream))
- stream.write("some new string")
- stream.close()
- cont, leng, etag = file.load_contents()
- self.assertEqual(cont, "some new string")
- finally:
- loop.quit()
-
-
- self.file.replace_async(callback, None, True, gio.FILE_CREATE_NONE,
- glib.PRIORITY_HIGH)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testReplaceAsyncNoargs(self):
- self._f.write("testing")
- self._f.close()
-
- def callback(file, result):
- try:
- stream = file.replace_finish(result)
- self.failUnless(isinstance(stream, gio.OutputStream))
- stream.write("some new string")
- stream.close()
- cont, leng, etag = file.load_contents()
- self.assertEqual(cont, "some new string")
- finally:
- loop.quit()
-
-
- self.file.replace_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testReadAsyncError(self):
- self.assertRaises(TypeError, self.file.read_async)
- self.assertRaises(TypeError, self.file.read_async, "foo", "bar")
- self.assertRaises(TypeError, self.file.read_async, "foo",
- priority="bar")
- self.assertRaises(TypeError, self.file.read_async, "foo",
- priority="bar")
- self.assertRaises(TypeError, self.file.read_async, "foo",
- priority=1, cancellable="bar")
- self.assertRaises(TypeError, self.file.read_async, "foo", 1, "bar")
-
- def testConstructor(self):
- for gfile in [gio.File("/"),
- gio.File("file:///"),
- gio.File(uri="file:///"),
- gio.File(path="/"),
- gio.File(u"/"),
- gio.File(path=u"/")]:
- self.failUnless(isinstance(gfile, gio.File))
- self.assertEquals(gfile.get_path(), "/")
- self.assertEquals(gfile.get_uri(), "file:///")
-
- def testConstructorError(self):
- self.assertRaises(TypeError, gio.File)
- self.assertRaises(TypeError, gio.File, 1)
- self.assertRaises(TypeError, gio.File, "foo", "bar")
- self.assertRaises(TypeError, gio.File, foo="bar")
- self.assertRaises(TypeError, gio.File, uri=1)
- self.assertRaises(TypeError, gio.File, path=1)
-
- def testLoadContents(self):
- self._f.write("testing load_contents")
- self._f.seek(0)
- c = gio.Cancellable()
- cont, leng, etag = self.file.load_contents(cancellable=c)
- self.assertEqual(cont, "testing load_contents")
- self.assertEqual(leng, 21)
- self.assertNotEqual(etag, '')
-
- def testLoadContentsAsync(self):
- self._f.write("testing load_contents_async")
- self._f.seek(0)
-
- def callback(contents, result):
- try:
- cont, leng, etag = contents.load_contents_finish(result)
- self.assertEqual(cont, "testing load_contents_async")
- self.assertEqual(leng, 27)
- self.assertNotEqual(etag, '')
- finally:
- loop.quit()
-
- canc = gio.Cancellable()
- self.file.load_contents_async(callback, cancellable=canc)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testQueryInfoAsync(self):
- def callback(file, result):
- try:
- info = file.query_info_finish(result)
- self.failUnless(isinstance(info, gio.FileInfo))
- self.failUnless(info.get_name(), "file.txt")
- finally:
- loop.quit()
-
- self.file.query_info_async("standard", callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testMountMountable(self):
- gfile = gio.File('localtest:')
- def unmount_done(mount, result):
- try:
- retval = mount.unmount_finish(result)
- self.failUnless(retval)
- finally:
- loop.quit()
-
- def mount_enclosing_volume_done(gfile, result):
- try:
- try:
- retval = gfile.mount_enclosing_volume_finish(result)
- except gio.Error, e:
- # If we run the tests too fast
- if e.code == gio.ERROR_ALREADY_MOUNTED:
- print ('WARNING: testfile is already mounted, '
- 'skipping test')
- loop.quit()
- return
- raise
- self.failUnless(retval)
- finally:
- try:
- mount = gfile.find_enclosing_mount()
- except gio.Error:
- loop.quit()
- return
- mount.unmount(unmount_done)
-
- mount_operation = gio.MountOperation()
- gfile.mount_enclosing_volume(mount_operation,
- mount_enclosing_volume_done)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testCopy(self):
- if os.path.exists('copy.txt'):
- os.unlink("copy.txt")
-
- source = gio.File('file.txt')
- destination = gio.File('copy.txt')
- try:
- retval = source.copy(destination)
- self.failUnless(retval)
-
- self.failUnless(os.path.exists('copy.txt'))
- self.assertEqual(open('file.txt').read(),
- open('copy.txt').read())
- finally:
- os.unlink("copy.txt")
-
- self.called = False
- def callback(current, total):
- self.called = True
- source = gio.File('file.txt')
- destination = gio.File('copy.txt')
- try:
- retval = source.copy(destination, callback)
- self.failUnless(retval)
-
- self.failUnless(os.path.exists('copy.txt'))
- self.assertEqual(open('file.txt').read(),
- open('copy.txt').read())
- self.failUnless(self.called)
- finally:
- os.unlink("copy.txt")
-
- def test_copy_async(self):
- if os.path.exists('copy.txt'):
- os.unlink("copy.txt")
-
- source = gio.File('file.txt')
- destination = gio.File('copy.txt')
-
- def copied(source_, result):
- try:
- self.assert_(source_ is source)
- self.failUnless(source_.copy_finish(result))
- finally:
- loop.quit()
-
- def progress(current, total):
- self.assert_(isinstance(current, long))
- self.assert_(isinstance(total, long))
- self.assert_(0 <= current <= total)
-
- try:
- loop = glib.MainLoop()
- source.copy_async(destination, copied, progress_callback = progress)
- loop.run()
-
- self.failUnless(os.path.exists('copy.txt'))
- self.assertEqual(open('file.txt').read(),
- open('copy.txt').read())
- finally:
- os.unlink("copy.txt")
-
- # See bug 546591.
- def test_copy_progress(self):
- source = gio.File('file.txt')
- destination = gio.File('copy.txt')
-
- def progress(current, total):
- self.assert_(isinstance(current, long))
- self.assert_(isinstance(total, long))
- self.assert_(0 <= current <= total)
-
- try:
- retval = source.copy(destination,
- flags=gio.FILE_COPY_OVERWRITE,
- progress_callback=progress)
- self.failUnless(retval)
-
- self.failUnless(os.path.exists('copy.txt'))
- self.assertEqual(open('file.txt').read(),
- open('copy.txt').read())
- finally:
- os.unlink("copy.txt")
-
- def testMove(self):
- if os.path.exists('move.txt'):
- os.unlink("move.txt")
-
- source = gio.File('file.txt')
- destination = gio.File('move.txt')
- retval = source.move(destination)
- self.failUnless(retval)
-
- self.failIf(os.path.exists('file.txt'))
- self.failUnless(os.path.exists('move.txt'))
-
- self.called = False
- def callback(current, total):
- self.called = True
- source = gio.File('move.txt')
- destination = gio.File('move-2.txt')
- try:
- retval = source.move(destination, callback)
- self.failUnless(retval)
-
- self.failIf(os.path.exists('move.txt'))
- self.failUnless(os.path.exists('move-2.txt'))
- self.failUnless(self.called)
- finally:
- os.unlink("move-2.txt")
-
- def testInfoList(self):
- infolist = self.file.query_settable_attributes()
- for info in infolist:
- if info.name == "time::modified":
- self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_UINT64)
- self.assertEqual(info.name, "time::modified")
- self.assertEqual(info.flags,
- gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED |
- gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE)
-
- def testQueryWritableNamespaces(self):
- infolist = self.file.query_writable_namespaces()
- for info in infolist:
- if info.name == "xattr":
- self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
-
- def testSetAttribute(self):
- self._f.write("testing attributes")
- self._f.seek(0)
- infolist = self.file.query_settable_attributes()
-
- self.assertNotEqual(len(infolist), 0)
-
- for info in infolist:
- if info.name == "time::modified-usec":
- ret = self.file.set_attribute("time::modified-usec",
- gio.FILE_ATTRIBUTE_TYPE_UINT32,
- 10, gio.FILE_QUERY_INFO_NONE)
- self.assertEqual(ret, True)
-
- def testSetAttributesAsync(self):
- def callback(gfile, result):
- try:
- info = gfile.set_attributes_finish(result)
- usec = info.get_attribute_uint32("time::modified-usec")
- self.assertEqual(usec, 10)
- finally:
- loop.quit()
-
- info = gio.FileInfo()
- info.set_attribute_uint32("time::modified-usec", 10)
-
- canc = gio.Cancellable()
- self.file.set_attributes_async(info, callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testReplaceContents(self):
- self.file.replace_contents("testing replace_contents")
- cont, leng, etag = self.file.load_contents()
- self.assertEqual(cont, "testing replace_contents")
-
- caught = False
- try:
- self.file.replace_contents("this won't work", etag="wrong")
- except gio.Error, e:
- self.assertEqual(e.code, gio.ERROR_WRONG_ETAG)
- caught = True
- self.failUnless(caught)
-
- self.file.replace_contents("testing replace_contents again", etag=etag)
- cont, leng, etag = self.file.load_contents()
- self.assertEqual(cont, "testing replace_contents again")
-
- self.file.replace_contents("testing replace_contents yet again", etag=None)
- cont, leng, etag = self.file.load_contents()
- self.assertEqual(cont, "testing replace_contents yet again")
-
- def testReplaceContentsAsync(self):
-
- def callback(contents, result):
- try:
- newetag = contents.replace_contents_finish(result)
- cont, leng, etag = self.file.load_contents()
- self.assertEqual(cont, "testing replace_contents_async")
- self.assertEqual(leng, 30)
- self.assertEqual(etag, newetag)
- self.assertNotEqual(newetag, '')
- finally:
- loop.quit()
-
- canc = gio.Cancellable()
- self.file.replace_contents_async("testing replace_contents_async", callback, cancellable=canc)
-
- loop = glib.MainLoop()
- loop.run()
-
- def test_eq(self):
- self.assertEqual(gio.File('foo'),
- gio.File('foo'))
- self.assertNotEqual(gio.File('foo'),
- gio.File('bar'))
-
- def test_hash(self):
- self.assertEquals(hash(gio.File('foo')),
- hash(gio.File('foo')))
-
- def testSetDisplayNameAsync(self):
- def callback(gfile, result):
- try:
- new_gfile = gfile.set_display_name_finish(result)
- new_name = new_gfile.get_basename()
- self.assertEqual(new_name, "new.txt")
- deleted = new_gfile.delete()
- self.assertEqual(deleted, True)
- finally:
- loop.quit()
-
- canc = gio.Cancellable()
- self.file.set_display_name_async("new.txt", callback, cancellable=canc)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestGFileEnumerator(unittest.TestCase):
- def setUp(self):
- self.file = gio.File(os.path.dirname(__file__))
-
- def testEnumerateChildren(self):
- enumerator = self.file.enumerate_children(
- "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
- for file_info in enumerator:
- if file_info.get_name() == os.path.basename(__file__):
- break
- else:
- raise AssertionError
-
- def testEnumerateChildrenAsync(self):
- def callback(gfile, result):
- try:
- for file_info in gfile.enumerate_children_finish(result):
- if file_info.get_name() == __file__:
- break
- else:
- raise AssertionError
- finally:
- loop.quit()
-
- self.file.enumerate_children_async(
- "standard::*", callback)
- loop = glib.MainLoop()
- loop.run()
-
- def testNextFilesAsync(self):
- def callback(enumerator, result):
- try:
- for file_info in enumerator.next_files_finish(result):
- if file_info.get_name() == __file__:
- break
- else:
- raise AssertionError
- finally:
- loop.quit()
-
- enumerator = self.file.enumerate_children(
- "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
- enumerator.next_files_async(1000, callback)
- loop = glib.MainLoop()
- loop.run()
-
- def testCloseFilesAsync(self):
- def callback(enumerator, result):
- try:
- enumerator.close_finish(result)
- finally:
- loop.quit()
-
- enumerator = self.file.enumerate_children(
- "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
-
- enumerator.close_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-
-class TestInputStream(unittest.TestCase):
- def setUp(self):
- self._f = open("inputstream.txt", "w+")
- self._f.write("testing")
- self._f.seek(0)
- self.stream = gio.unix.InputStream(self._f.fileno(), False)
-
- def tearDown(self):
- self._f.close()
- os.unlink("inputstream.txt")
-
- def testRead(self):
- self.assertEquals(self.stream.read(), "testing")
-
- self.stream = gio.MemoryInputStream()
- self.assertEquals(self.stream.read(), '')
-
- self.stream = gio.MemoryInputStream()
- some_data = open(__file__, "rb").read()
- self.stream.add_data(some_data)
- self.assertEquals(self.stream.read(), some_data)
-
- stream = gio.MemoryInputStream()
- stream.add_data(some_data)
- self.assertEquals(self._read_in_loop(stream,
- lambda: stream.read(50),
- 50),
- some_data)
-
- def testSkip(self):
- self.stream.skip(2)
- res = self.stream.read()
- self.assertEqual(res, "sting")
-
- def testSkipAsync(self):
- def callback(stream, result):
- try:
- size = stream.skip_finish(result)
- self.assertEqual(size, 2)
- res = stream.read()
- self.assertEqual(res, "sting")
- finally:
- loop.quit()
-
- self.stream.skip_async(2, callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def test_read_part(self):
- self.assertEquals(self._read_in_loop(self.stream,
- lambda: self.stream.read_part()),
- 'testing')
-
- stream = gio.MemoryInputStream()
- some_data = open(__file__, 'rb').read()
- stream.add_data(some_data)
- self.assertEquals(self._read_in_loop(stream,
- lambda: stream.read_part(50),
- 50),
- some_data)
-
- def _read_in_loop(self, stream, reader, size_limit=0):
- read_data = ''
- while True:
- read_part = reader()
- if read_part:
- read_data += read_part
- if size_limit > 0:
- self.assert_(len(read_part) <= size_limit,
- '%d <= %d' % (len(read_part), size_limit))
- else:
- return read_data
-
- def testReadAsync(self):
- def callback(stream, result):
- self.assertEquals(result.get_op_res_gssize(), 7)
- try:
- data = stream.read_finish(result)
- self.assertEquals(data, "testing")
- stream.close()
- finally:
- loop.quit()
-
- self.stream.read_async(7, callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testReadAsyncError(self):
- self.count = 0
- def callback(stream, result):
- try:
- self.count += 1
- if self.count == 1:
- return
- self.assertRaises(gio.Error, stream.read_finish, result)
- finally:
- loop.quit()
-
- self.stream.read_async(10240, callback)
- self.stream.read_async(10240, callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- self.assertEquals(self.count, 2)
-
- self.assertRaises(TypeError, self.stream.read_async)
- self.assertRaises(TypeError, self.stream.read_async, "foo")
- self.assertRaises(TypeError, self.stream.read_async, 1024, "bar")
- self.assertRaises(TypeError, self.stream.read_async, 1024,
- priority="bar")
- self.assertRaises(TypeError, self.stream.read_async, 1024,
- priority="bar")
- self.assertRaises(TypeError, self.stream.read_async, 1024,
- priority=1, cancellable="bar")
- self.assertRaises(TypeError, self.stream.read_async, 1024, 1, "bar")
-
-
- # FIXME: this makes 'make check' freeze
- def _testCloseAsync(self):
- def callback(stream, result):
- try:
- self.failUnless(stream.close_finish(result))
- finally:
- loop.quit()
-
- self.stream.close_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-
-class TestDataInputStream(unittest.TestCase):
- def setUp(self):
- self.base_stream = gio.MemoryInputStream()
- self.data_stream = gio.DataInputStream(self.base_stream)
-
- def test_read_line(self):
- self.base_stream.add_data('foo\nbar\n\nbaz')
- self.assertEquals('foo', self.data_stream.read_line())
- self.assertEquals('bar', self.data_stream.read_line())
- self.assertEquals('', self.data_stream.read_line())
- self.assertEquals('baz', self.data_stream.read_line())
-
- def test_read_line_async(self):
- def do_read_line_async():
- loop = glib.MainLoop()
- line = []
-
- def callback(stream, result):
- try:
- line.append(stream.read_line_finish(result))
- finally:
- loop.quit()
-
- self.data_stream.read_line_async(callback)
- loop.run()
- return line[0]
-
- self.base_stream.add_data('foo\nbar\n\nbaz')
- self.assertEquals('foo', do_read_line_async())
- self.assertEquals('bar', do_read_line_async())
- self.assertEquals('', do_read_line_async())
- self.assertEquals('baz', do_read_line_async())
-
- def test_read_until(self):
- self.base_stream.add_data('sentence.end of line\nthe rest')
- self.assertEquals('sentence', self.data_stream.read_until('.!?'))
- self.assertEquals('end of line', self.data_stream.read_until('\n\r'))
- self.assertEquals('the rest', self.data_stream.read_until('#$%^&'))
-
- def test_read_until_async(self):
- def do_read_until_async(stop_chars):
- loop = glib.MainLoop()
- data = []
-
- def callback(stream, result):
- try:
- data.append(stream.read_until_finish(result))
- finally:
- loop.quit()
-
- self.data_stream.read_until_async(stop_chars, callback)
- loop.run()
- return data[0]
-
- # Note the weird difference between synchronous and
- # asynchronous version. See bug #584284.
- self.base_stream.add_data('sentence.end of line\nthe rest')
- self.assertEquals('sentence', do_read_until_async('.!?'))
- self.assertEquals('.end of line', do_read_until_async('\n\r'))
- self.assertEquals('\nthe rest', do_read_until_async('#$%^&'))
-
-
-class TestMemoryInputStream(unittest.TestCase):
- def setUp(self):
- self.stream = gio.MemoryInputStream()
-
- def test_add_data(self):
- self.stream.add_data('foobar')
- self.assertEquals('foobar', self.stream.read())
-
- self.stream.add_data('ham ')
- self.stream.add_data(None)
- self.stream.add_data('spam')
- self.assertEquals('ham spam', self.stream.read())
-
- def test_new_from_data(self):
- stream = gio.memory_input_stream_new_from_data('spam')
- self.assertEquals('spam', stream.read())
-
-
-class TestOutputStream(unittest.TestCase):
- def setUp(self):
- self._f = open("outputstream.txt", "w")
- self.stream = gio.unix.OutputStream(self._f.fileno(), False)
-
- def tearDown(self):
- self._f.close()
- os.unlink("outputstream.txt")
-
- def testWrite(self):
- self.stream.write("testing")
- self.stream.close()
- self.failUnless(os.path.exists("outputstream.txt"))
- self.assertEquals(open("outputstream.txt").read(), "testing")
-
- def test_write_part(self):
- stream = gio.MemoryOutputStream()
- some_data = open(__file__, 'rb').read()
- buffer = some_data
-
- # In fact this makes only one looping (memory stream is fast,
- # write_part behaves just like write), but let's still be
- # complete.
- while buffer:
- written = stream.write_part(buffer)
- if written == len(buffer):
- break
- else:
- buffer = buffer[written:]
-
- self.assertEquals(stream.get_contents(), some_data)
-
- def testWriteAsync(self):
- def callback(stream, result):
- self.assertEquals(result.get_op_res_gssize(), 7)
- try:
- self.assertEquals(stream.write_finish(result), 7)
- self.failUnless(os.path.exists("outputstream.txt"))
- self.assertEquals(open("outputstream.txt").read(), "testing")
- finally:
- loop.quit()
-
- self.stream.write_async("testing", callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testWriteAsyncError(self):
- def callback(stream, result):
- self.assertEquals(result.get_op_res_gssize(), 0)
- try:
- self.assertRaises(gio.Error, stream.write_finish, result)
- finally:
- loop.quit()
-
- self.stream.close()
- self.stream.write_async("testing", callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- self.assertRaises(TypeError, self.stream.write_async)
- self.assertRaises(TypeError, self.stream.write_async, 1138)
- self.assertRaises(TypeError, self.stream.write_async, "foo", "bar")
- self.assertRaises(TypeError, self.stream.write_async, "foo",
- priority="bar")
- self.assertRaises(TypeError, self.stream.write_async, "foo",
- priority="bar")
- self.assertRaises(TypeError, self.stream.write_async, "foo",
- priority=1, cancellable="bar")
- self.assertRaises(TypeError, self.stream.write_async, "foo", 1, "bar")
-
- # FIXME: this makes 'make check' freeze
- def _testCloseAsync(self):
- def callback(stream, result):
- try:
- self.failUnless(stream.close_finish(result))
- finally:
- loop.quit()
-
- self.stream.close_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testFlushAsync(self):
- def callback(stream, result):
- try:
- self.failUnless(stream.flush_finish(result))
- finally:
- loop.quit()
-
- self.stream.flush_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def testSpliceAsync(self):
- _f = open("stream.txt", "w+")
- _f.write("testing")
- _f.seek(0)
- instream = gio.unix.InputStream(_f.fileno(), False)
-
- def callback(stream, result):
- try:
- size = stream.splice_finish(result)
- self.assertEqual(size, 7)
-
- finally:
- os.unlink("stream.txt")
- loop.quit()
-
- self.stream.splice_async(instream, callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestMemoryOutputStream(unittest.TestCase):
- def setUp(self):
- self.stream = gio.MemoryOutputStream()
-
- def test_get_contents(self):
- self.stream.write('foobar')
- self.assertEquals('foobar', self.stream.get_contents())
-
- self.stream.write('baz')
- self.assertEquals('foobarbaz', self.stream.get_contents())
-
-
-class TestVolumeMonitor(unittest.TestCase):
- def setUp(self):
- self.monitor = gio.volume_monitor_get()
-
- def testGetConnectedDrives(self):
- drives = self.monitor.get_connected_drives()
- self.failUnless(isinstance(drives, list))
-
- def testGetVolumes(self):
- volumes = self.monitor.get_volumes()
- self.failUnless(isinstance(volumes, list))
-
- def testGetMounts(self):
- mounts = self.monitor.get_mounts()
- self.failUnless(isinstance(mounts, list))
- if not mounts:
- return
-
- self.failUnless(isinstance(mounts[0], gio.Mount))
- # Bug 538601
- icon = mounts[0].get_icon()
- if not icon:
- return
- self.failUnless(isinstance(icon, gio.Icon))
-
-
-class TestContentTypeGuess(unittest.TestCase):
- def testFromName(self):
- mime_type = gio.content_type_guess('diagram.svg')
- self.assertEquals('image/svg+xml', mime_type)
-
- def testFromContents(self):
- mime_type = gio.content_type_guess(data='<html></html>')
- self.assertEquals('text/html', mime_type)
-
- def testFromContentsUncertain(self):
- mime_type, result_uncertain = gio.content_type_guess(
- data='<html></html>', want_uncertain=True)
- self.assertEquals('text/html', mime_type)
- self.assertEquals(bool, type(result_uncertain))
-
-
-class TestFileInfo(unittest.TestCase):
- def setUp(self):
- self.fileinfo = gio.File(__file__).query_info("*")
-
- def testListAttributes(self):
- attributes = self.fileinfo.list_attributes("standard")
- self.failUnless(attributes)
- self.failUnless('standard::name' in attributes)
-
- def testGetModificationTime(self):
- mtime = self.fileinfo.get_modification_time()
- self.assertEqual(type(mtime), float)
-
- def testSetModificationTime(self):
- self.fileinfo.set_modification_time(1000)
- mtime = self.fileinfo.get_modification_time()
- self.assertEqual(mtime, 1000)
-
-
-class TestAppInfo(unittest.TestCase):
- def setUp(self):
- self.appinfo = gio.AppInfo("does-not-exist")
-
- def testSimple(self):
- self.assertEquals(self.appinfo.get_description(),
- "Custom definition for does-not-exist")
-
- def test_eq(self):
- info1 = gio.app_info_get_all()[0]
- info2 = info1.dup()
- self.assert_(info1 is not info2)
- self.assertEquals(info1, info2)
-
- self.assertNotEqual(gio.app_info_get_all()[0], gio.app_info_get_all()[1])
-
-class TestVfs(unittest.TestCase):
- def setUp(self):
- self.vfs = gio.vfs_get_default()
-
- def testGetSupportedURISchemes(self):
- result = self.vfs.get_supported_uri_schemes()
- self.failUnless(type(result), [])
-
-class TestVolume(unittest.TestCase):
- def setUp(self):
- self.monitor = gio.volume_monitor_get()
-
- def testVolumeEnumerate(self):
- volumes = self.monitor.get_volumes()
- self.failUnless(isinstance(volumes, list))
- for v in volumes:
- if v is not None:
- ids = v.enumerate_identifiers()
- self.failUnless(isinstance(ids, list))
- for id in ids:
- if id is not None:
- self.failUnless(isinstance(id, str))
-
-class TestFileInputStream(unittest.TestCase):
- def setUp(self):
- self._f = open("file.txt", "w+")
- self._f.write("testing")
- self._f.seek(0)
- self.file = gio.File("file.txt")
-
- def tearDown(self):
- self._f.close()
- if os.path.exists('file.txt'):
- os.unlink("file.txt")
-
- def testQueryInfoAsync(self):
- def callback(stream, result):
- try:
- info = stream.query_info_finish(result)
- self.failUnless(isinstance(info, gio.FileInfo))
- self.failUnless(info.get_attribute_uint64("standard::size"), 7)
- finally:
- loop.quit()
-
- inputstream = self.file.read()
- inputstream.query_info_async("standard", callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestFileOutputStream(unittest.TestCase):
- def setUp(self):
- self._f = open("file.txt", "w+")
- self._f.write("testing")
- self._f.seek(0)
- self.file = gio.File("file.txt")
-
- def tearDown(self):
- self._f.close()
- if os.path.exists('file.txt'):
- os.unlink("file.txt")
-
- def testQueryInfoAsync(self):
- def callback(stream, result):
- try:
- info = stream.query_info_finish(result)
- self.failUnless(isinstance(info, gio.FileInfo))
- self.failUnless(info.get_attribute_uint64("standard::size"), 7)
- finally:
- loop.quit()
-
- outputstream = self.file.append_to()
- outputstream.query_info_async("standard", callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestBufferedInputStream(unittest.TestCase):
- def setUp(self):
- self._f = open("buffer.txt", "w+")
- self._f.write("testing")
- self._f.seek(0)
- stream = gio.unix.InputStream(self._f.fileno(), False)
- self.buffered = gio.BufferedInputStream(stream)
-
- def tearDown(self):
- self._f.close()
- os.unlink("buffer.txt")
-
- def test_fill_async(self):
- def callback(stream, result):
- try:
- size = stream.fill_finish(result)
- self.failUnlessEqual(size, 4)
- finally:
- loop.quit()
-
- self.buffered.fill_async(4, callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestIOStream(unittest.TestCase):
- def setUp(self):
- self.file = gio.File("file.txt")
- self.iofile = self.file.create_readwrite(gio.FILE_CREATE_NONE)
-
- def tearDown(self):
- if os.path.exists('file.txt'):
- os.unlink("file.txt")
-
- def testIOStreamCloseAsync(self):
- def callback(stream, result):
- try:
- self.failUnless(stream.close_finish(result))
- finally:
- loop.quit()
-
- self.iofile.close_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-
- def testQueryInfoAsync(self):
- def callback(stream, result):
- try:
- info = stream.query_info_finish(result)
- self.failUnless(isinstance(info, gio.FileInfo))
- self.failUnless(info.get_attribute_uint64("standard::size"), 7)
- finally:
- loop.quit()
-
- ostream = self.iofile.get_output_stream()
- ostream.write("testing")
-
- self.iofile.query_info_async("standard", callback)
-
- loop = glib.MainLoop()
- loop.run()
diff --git a/tests/test_gobject.py b/tests/test_gobject.py
index d628b0e..dbbc5b7 100644
--- a/tests/test_gobject.py
+++ b/tests/test_gobject.py
@@ -2,38 +2,39 @@
import unittest
-import gobject
+from gi.repository import GObject
import sys
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
- obj = gobject.GObject()
+ obj = GObject.GObject()
+
self.assertEquals(obj.__module__,
- 'gobject._gobject')
+ 'gi._gobject._gobject')
class TestReferenceCounting(unittest.TestCase):
def testRegularObject(self):
- obj = gobject.GObject()
+ obj = GObject.GObject()
self.assertEquals(obj.__grefcount__, 1)
- obj = gobject.new(gobject.GObject)
+ obj = GObject.new(GObject.GObject)
self.assertEquals(obj.__grefcount__, 1)
def testFloatingWithSinkFunc(self):
obj = testhelper.FloatingWithSinkFunc()
self.assertEquals(obj.__grefcount__, 1)
- obj = gobject.new(testhelper.FloatingWithSinkFunc)
+ obj = GObject.new(testhelper.FloatingWithSinkFunc)
self.assertEquals(obj.__grefcount__, 1)
def testFloatingWithoutSinkFunc(self):
obj = testhelper.FloatingWithoutSinkFunc()
self.assertEquals(obj.__grefcount__, 1)
- obj = gobject.new(testhelper.FloatingWithoutSinkFunc)
+ obj = GObject.new(testhelper.FloatingWithoutSinkFunc)
self.assertEquals(obj.__grefcount__, 1)
def testOwnedByLibrary(self):
@@ -71,7 +72,7 @@ class TestReferenceCounting(unittest.TestCase):
# Upon creation, the refcount of the object should be 2:
# - someone already has a reference on the new object.
# - the python wrapper should hold its own reference.
- obj = gobject.new(testhelper.OwnedByLibrary)
+ obj = GObject.new(testhelper.OwnedByLibrary)
self.assertEquals(obj.__grefcount__, 2)
# We ask the library to release its reference, so the only
@@ -81,7 +82,7 @@ class TestReferenceCounting(unittest.TestCase):
self.assertEquals(obj.__grefcount__, 1)
def testOwnedByLibraryOutOfScopeUsingGobjectNew(self):
- obj = gobject.new(testhelper.OwnedByLibrary)
+ obj = GObject.new(testhelper.OwnedByLibrary)
self.assertEquals(obj.__grefcount__, 2)
# We are manually taking the object out of scope. This means
@@ -134,7 +135,7 @@ class TestReferenceCounting(unittest.TestCase):
# Upon creation, the refcount of the object should be 2:
# - someone already has a reference on the new object.
# - the python wrapper should hold its own reference.
- obj = gobject.new(testhelper.FloatingAndSunk)
+ obj = GObject.new(testhelper.FloatingAndSunk)
self.assertEquals(obj.__grefcount__, 2)
# We ask the library to release its reference, so the only
@@ -144,7 +145,7 @@ class TestReferenceCounting(unittest.TestCase):
self.assertEquals(obj.__grefcount__, 1)
def testFloatingAndSunkOutOfScopeUsingGObjectNew(self):
- obj = gobject.new(testhelper.FloatingAndSunk)
+ obj = GObject.new(testhelper.FloatingAndSunk)
self.assertEquals(obj.__grefcount__, 2)
# We are manually taking the object out of scope. This means
@@ -161,7 +162,7 @@ class TestReferenceCounting(unittest.TestCase):
obj.release()
self.assertEquals(obj.__grefcount__, 1)
-class A(gobject.GObject):
+class A(GObject.GObject):
def __init__(self):
super(A, self).__init__()
@@ -170,11 +171,11 @@ class TestPythonReferenceCounting(unittest.TestCase):
# the GC, and one for the bound variable in the local scope.
def testNewInstanceHasTwoRefs(self):
- obj = gobject.GObject()
+ obj = GObject.GObject()
self.assertEquals(sys.getrefcount(obj), 2)
def testNewInstanceHasTwoRefsUsingGObjectNew(self):
- obj = gobject.new(gobject.GObject)
+ obj = GObject.new(GObject.GObject)
self.assertEquals(sys.getrefcount(obj), 2)
def testNewSubclassInstanceHasTwoRefs(self):
@@ -182,5 +183,5 @@ class TestPythonReferenceCounting(unittest.TestCase):
self.assertEquals(sys.getrefcount(obj), 2)
def testNewSubclassInstanceHasTwoRefsUsingGObjectNew(self):
- obj = gobject.new(A)
+ obj = GObject.new(A)
self.assertEquals(sys.getrefcount(obj), 2)
diff --git a/tests/test_gresolver.py b/tests/test_gresolver.py
deleted file mode 100644
index 4238df7..0000000
--- a/tests/test_gresolver.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# -*- Mode: Python -*-
-
-import unittest
-
-import glib
-import gio
-
-
-class TestResolver(unittest.TestCase):
- def setUp(self):
- self.resolver = gio.resolver_get_default()
-
- def test_resolver_lookup_by_name(self):
- addresses = self.resolver.lookup_by_name("pygtk.org", cancellable=None)
- self.failUnless(isinstance(addresses[0], gio.InetAddress))
-
- def test_resolver_lookup_by_address(self):
- address = gio.inet_address_new_from_string("8.8.8.8")
- dns = self.resolver.lookup_by_address(address, cancellable=None)
- self.failUnlessEqual(dns, "google-public-dns-a.google.com")
-
- def test_resolver_lookup_by_name_async(self):
- def callback(resolver, result):
- try:
- addresses = resolver.lookup_by_name_finish(result)
- self.failUnless(isinstance(addresses[0], gio.InetAddress))
- finally:
- loop.quit()
-
- self.resolver.lookup_by_name_async(callback, "pygtk.org")
-
- loop = glib.MainLoop()
- loop.run()
-
- def test_resolver_lookup_by_address_async(self):
- def callback(resolver, result):
- try:
- dns = resolver.lookup_by_address_finish(result)
- self.failUnlessEqual(dns, "google-public-dns-b.google.com")
- finally:
- loop.quit()
-
- address = gio.inet_address_new_from_string("8.8.4.4")
- self.resolver.lookup_by_address_async(callback, address)
-
- loop = glib.MainLoop()
- loop.run()
-
-""" Commented out because this requires an active internet connection and a
- router that supports SRV lookups
-
- def test_resolver_lookup_service(self):
- targets = self.resolver.lookup_service("xmpp-client", "tcp", "google.com")
- self.failUnless(isinstance(targets[0], gio.SrvTarget))
-
- def test_resolver_lookup_service_async(self):
- def callback(resolver, result):
- try:
- targets = resolver.lookup_service_finish(result)
- self.failUnless(isinstance(targets[0], gio.SrvTarget))
- finally:
- loop.quit()
-
- self.resolver.lookup_service_async(callback, "xmpp-client", "tcp", "google.com")
-
- loop = glib.MainLoop()
- loop.run()
-"""
diff --git a/tests/test_gsocket.py b/tests/test_gsocket.py
deleted file mode 100644
index 627f6fd..0000000
--- a/tests/test_gsocket.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# -*- Mode: Python -*-
-
-import os
-import unittest
-
-import glib
-import gobject
-import gio
-
-
-class TestSocket(unittest.TestCase):
- def setUp(self):
- self.sock = gio.Socket(gio.SOCKET_FAMILY_IPV4,
- gio.SOCKET_TYPE_STREAM,
- gio.SOCKET_PROTOCOL_TCP)
-
- def test_socket_condition_check(self):
- check = self.sock.condition_check(glib.IO_OUT)
- self.failUnless(isinstance(check, gobject.GFlags))
- self.failUnlessEqual(check, glib.IO_OUT | glib.IO_HUP)
-
- def test_socket_condition_wait(self):
- res = self.sock.condition_wait(glib.IO_OUT)
- self.failUnless(res)
-
- def tearDown(self):
- self.sock.close()
-
-class TestSocketAddress(unittest.TestCase):
- def test_socket_address_enumerator_next_async(self):
- def callback(enumerator, result):
- try:
- address = enumerator.next_finish(result)
- self.failUnless(isinstance(address, gio.SocketAddress))
- finally:
- loop.quit()
-
- socket = gio.NetworkAddress("www.pygtk.org", 80)
- enumerator = socket.enumerate()
- enumerator.next_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
-class TestSocketListener(unittest.TestCase):
- def test_socket_listener_add_address(self):
- address = gio.inet_address_new_from_string("127.0.0.1")
- inetsock = gio.InetSocketAddress(address, 1024)
-
- listener = gio.SocketListener()
- effective = listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
- self.failUnless(isinstance(effective, gio.InetSocketAddress))
-
- def test_socket_listener_accept(self):
- address = gio.inet_address_new_from_string("127.0.0.1")
- inetsock = gio.InetSocketAddress(address, 1024)
-
- listener = gio.SocketListener()
- listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
-
- client = gio.SocketClient()
- client.connect_to_host("127.0.0.1:1024", 1024)
-
- connection, source = listener.accept(cancellable=None)
- self.failUnless(isinstance(connection, gio.TcpConnection))
-
- def test_socket_listener_accept_socket(self):
- address = gio.inet_address_new_from_string("127.0.0.1")
- inetsock = gio.InetSocketAddress(address, 1024)
-
- listener = gio.SocketListener()
- listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
-
- client = gio.SocketClient()
- client.connect_to_host("127.0.0.1:1024", 1024)
-
- socket, source = listener.accept_socket(cancellable=None)
- self.failUnless(isinstance(socket, gio.Socket))
-
- def test_socket_listener_accept_async(self):
- def callback(listener, result):
- try:
- connection, source = listener.accept_finish(result)
- self.failUnless(isinstance(connection, gio.TcpConnection))
- finally:
- loop.quit()
-
- address = gio.inet_address_new_from_string("127.0.0.1")
- inetsock = gio.InetSocketAddress(address, 1024)
-
- listener = gio.SocketListener()
- listener.add_address(inetsock,
- gio.SOCKET_TYPE_STREAM,
- gio.SOCKET_PROTOCOL_TCP)
-
- client = gio.SocketClient()
- client.connect_to_host("127.0.0.1:1024", 1024)
-
- listener.accept_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
-
- def test_socket_listener_accept_socket_async(self):
- def callback(listener, result):
- try:
- socket, source = listener.accept_socket_finish(result)
- self.failUnless(isinstance(socket, gio.Socket))
- finally:
- loop.quit()
-
- address = gio.inet_address_new_from_string("127.0.0.1")
- inetsock = gio.InetSocketAddress(address, 1024)
-
- listener = gio.SocketListener()
- listener.add_address(inetsock,
- gio.SOCKET_TYPE_STREAM,
- gio.SOCKET_PROTOCOL_TCP)
-
- client = gio.SocketClient()
- client.connect_to_host("127.0.0.1:1024", 1024)
-
- listener.accept_socket_async(callback)
-
- loop = glib.MainLoop()
- loop.run()
diff --git a/tests/test_interface.py b/tests/test_interface.py
index fbc0586..7893c85 100644
--- a/tests/test_interface.py
+++ b/tests/test_interface.py
@@ -2,16 +2,16 @@
import unittest
-import gobject
+from gi.repository import GObject
import testhelper
-GUnknown = gobject.type_from_name("TestUnknown")
+GUnknown = GObject.type_from_name("TestUnknown")
Unknown = GUnknown.pytype
class MyUnknown(Unknown, testhelper.Interface):
- some_property = gobject.property(type=str)
+ some_property = GObject.property(type=str)
def __init__(self):
Unknown.__init__(self)
@@ -20,19 +20,19 @@ class MyUnknown(Unknown, testhelper.Interface):
def do_iface_method(self):
self.called = True
Unknown.do_iface_method(self)
-gobject.type_register(MyUnknown)
+GObject.type_register(MyUnknown)
-class MyObject(gobject.GObject, testhelper.Interface):
- some_property = gobject.property(type=str)
+class MyObject(GObject.GObject, testhelper.Interface):
+ some_property = GObject.property(type=str)
def __init__(self):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.called = False
def do_iface_method(self):
self.called = True
-gobject.type_register(MyObject)
+GObject.type_register(MyObject)
class TestIfaceImpl(unittest.TestCase):
diff --git a/tests/test_mainloop.py b/tests/test_mainloop.py
index 80e2aec..937ecaf 100644
--- a/tests/test_mainloop.py
+++ b/tests/test_mainloop.py
@@ -5,7 +5,7 @@ import sys
import select
import unittest
-import glib
+from gi.repository import GLib
from compathelper import _bytes
@@ -24,8 +24,8 @@ class TestMainLoop(unittest.TestCase):
loop.quit()
raise Exception("deadbabe")
- loop = glib.MainLoop()
- glib.child_watch_add(pid, child_died, loop)
+ loop = GLib.MainLoop()
+ GLib.child_watch_add(pid, child_died, loop)
os.close(pipe_r)
os.write(pipe_w, _bytes("Y"))
diff --git a/tests/test_option.py b/tests/test_option.py
index a6ecc98..9233eed 100644
--- a/tests/test_option.py
+++ b/tests/test_option.py
@@ -9,7 +9,8 @@ try:
except ImportError:
from io import StringIO
-from glib.option import OptionParser, OptionGroup, OptionValueError, \
+# FIXME: we need a way to import the options module from a public module
+from gi._glib.option import OptionParser, OptionGroup, OptionValueError, \
make_option, BadOptionError
from compathelper import _bytes
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 47f38a3..14114b7 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -248,8 +248,7 @@ class TestGLib(unittest.TestCase):
self.assertEqual(res, (-1, 'hello'))
# array
- vb = GLib.VariantBuilder()
- vb.init(gi._gi.variant_type_from_string('ai'))
+ vb = GLib.VariantBuilder.new(gi._gi.variant_type_from_string('ai'))
vb.add_value(GLib.Variant.new_int32(-1))
vb.add_value(GLib.Variant.new_int32(3))
res = vb.end().unpack()
@@ -261,8 +260,7 @@ class TestGLib(unittest.TestCase):
def test_gvariant_iteration(self):
# array index access
- vb = GLib.VariantBuilder()
- vb.init(gi._gi.variant_type_from_string('ai'))
+ vb = GLib.VariantBuilder.new(gi._gi.variant_type_from_string('ai'))
vb.add_value(GLib.Variant.new_int32(-1))
vb.add_value(GLib.Variant.new_int32(3))
v = vb.end()
@@ -536,8 +534,8 @@ class TestGtk(unittest.TestCase):
class SignalTest(GObject.GObject):
__gtype_name__ = "GIOverrideSignalTest"
__gsignals__ = {
- "test-signal": (GObject.SIGNAL_RUN_FIRST,
- GObject.TYPE_NONE,
+ "test-signal": (GObject.SignalFlags.RUN_FIRST,
+ None,
[]),
}
@@ -709,6 +707,7 @@ class TestGtk(unittest.TestCase):
tree_store = Gtk.TreeStore(int,
'gchararray',
TestGtk.TestClass,
+ GObject.TYPE_PYOBJECT,
object,
object,
object,
@@ -722,24 +721,86 @@ class TestGtk(unittest.TestCase):
GObject.TYPE_CHAR)
parent = None
- for i in range(100):
+ for i in range(97):
label = 'this is child #%d' % i
testobj = TestGtk.TestClass(self, i, label)
parent = tree_store.append(parent, (i,
label,
testobj,
+ testobj,
test_pyobj,
test_pydict,
test_pylist,
i % 2,
bool(i % 2),
i,
- 9223372036854775808,
- -9223372036854775808,
+ GObject.G_MAXULONG,
+ GObject.G_MININT64,
0xffffffffffffffff,
254,
_bytes('a')
))
+ # test set
+ parent = tree_store.append(parent)
+ i = 97
+ label = 'this is child #%d' % i
+ testobj = TestGtk.TestClass(self, i, label)
+ tree_store.set(parent, 0, i,
+ 2, testobj,
+ 1, label,
+ 3, testobj,
+ 4, test_pyobj,
+ 5, test_pydict,
+ 6, test_pylist,
+ 7, i % 2,
+ 8, bool(i % 2),
+ 9, i,
+ 10, GObject.G_MAXULONG,
+ 11, GObject.G_MININT64,
+ 12, 0xffffffffffffffff,
+ 13, 254,
+ 14, _bytes('a'))
+
+ parent = tree_store.append(parent)
+ i = 98
+ label = 'this is child #%d' % i
+ testobj = TestGtk.TestClass(self, i, label)
+ tree_store.set(parent, {0: i,
+ 2: testobj,
+ 1: label,
+ 3: testobj,
+ 4: test_pyobj,
+ 5: test_pydict,
+ 6: test_pylist,
+ 7: i % 2,
+ 8: bool(i % 2),
+ 9: i,
+ 10: GObject.G_MAXULONG,
+ 11: GObject.G_MININT64,
+ 12: 0xffffffffffffffff,
+ 13: 254,
+ 14: _bytes('a')})
+
+ parent = tree_store.append(parent)
+ i = 99
+ label = 'this is child #%d' % i
+ testobj = TestGtk.TestClass(self, i, label)
+ tree_store.set(parent, (0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14),
+ (i,
+ testobj,
+ label,
+ testobj,
+ test_pyobj,
+ test_pydict,
+ test_pylist,
+ i % 2,
+ bool(i % 2),
+ i,
+ GObject.G_MAXULONG,
+ GObject.G_MININT64,
+ 0xffffffffffffffff,
+ 254,
+ _bytes('a')))
# len gets the number of children in the root node
# since we kept appending to the previous node
@@ -756,31 +817,33 @@ class TestGtk(unittest.TestCase):
s = tree_store.get_value(treeiter, 1)
obj = tree_store.get_value(treeiter, 2)
obj.check(i, s)
+ obj2 = tree_store.get_value(treeiter, 3)
+ self.assertEquals(obj, obj2);
- pyobj = tree_store.get_value(treeiter, 3)
+ pyobj = tree_store.get_value(treeiter, 4)
self.assertEquals(pyobj, test_pyobj)
- pydict = tree_store.get_value(treeiter, 4)
+ pydict = tree_store.get_value(treeiter, 5)
self.assertEquals(pydict, test_pydict)
- pylist = tree_store.get_value(treeiter, 5)
+ pylist = tree_store.get_value(treeiter, 6)
self.assertEquals(pylist, test_pylist)
- bool_1 = tree_store.get_value(treeiter, 6)
- bool_2 = tree_store.get_value(treeiter, 7)
+ bool_1 = tree_store.get_value(treeiter, 7)
+ bool_2 = tree_store.get_value(treeiter, 8)
self.assertEquals(bool_1, bool_2)
self.assertTrue(isinstance(bool_1, bool))
self.assertTrue(isinstance(bool_2, bool))
- uint_ = tree_store.get_value(treeiter, 8)
+ uint_ = tree_store.get_value(treeiter, 9)
self.assertEquals(uint_, i)
- ulong_ = tree_store.get_value(treeiter, 9)
- self.assertEquals(ulong_, 9223372036854775808)
- int64_ = tree_store.get_value(treeiter, 10)
- self.assertEquals(int64_, -9223372036854775808)
- uint64_ = tree_store.get_value(treeiter, 11)
+ ulong_ = tree_store.get_value(treeiter, 10)
+ self.assertEquals(ulong_, GObject.G_MAXULONG)
+ int64_ = tree_store.get_value(treeiter, 11)
+ self.assertEquals(int64_, GObject.G_MININT64)
+ uint64_ = tree_store.get_value(treeiter, 12)
self.assertEquals(uint64_, 0xffffffffffffffff)
- uchar_ = tree_store.get_value(treeiter, 12)
+ uchar_ = tree_store.get_value(treeiter, 13)
self.assertEquals(ord(uchar_), 254)
- char_ = tree_store.get_value(treeiter, 13)
+ char_ = tree_store.get_value(treeiter, 14)
self.assertEquals(char_, 'a')
parent = treeiter
@@ -792,21 +855,14 @@ class TestGtk(unittest.TestCase):
class TestPyObject(object):
pass
- class TestPyGObject(GObject.Object):
- __gtype_name__ = 'TestPyGObject'
- def __init__(self, i):
- GObject.Object.__init__(self)
- self.sentinal = i + 5
-
test_pyobj = TestPyObject()
test_pydict = {1:1, "2":2, "3":"3"}
test_pylist = [1,"2", "3"]
- list_store = Gtk.ListStore(int, str, 'GIOverrideTreeAPITest', object, object, object, bool, bool, object)
- for i in range(93):
+ list_store = Gtk.ListStore(int, str, 'GIOverrideTreeAPITest', object, object, object, bool, bool)
+ for i in range(1, 93):
label = 'this is row #%d' % i
testobj = TestGtk.TestClass(self, i, label)
- testpygobj = TestPyGObject(i)
parent = list_store.append((i,
label,
testobj,
@@ -814,8 +870,7 @@ class TestGtk(unittest.TestCase):
test_pydict,
test_pylist,
i % 2,
- bool(i % 2),
- testpygobj))
+ bool(i % 2)))
i = 93
label = _unicode('this is row #93')
@@ -828,7 +883,17 @@ class TestGtk(unittest.TestCase):
list_store.set_value(treeiter, 5, test_pylist)
list_store.set_value(treeiter, 6, 1)
list_store.set_value(treeiter, 7, True)
- list_store.set_value(treeiter, 8, TestPyGObject(i))
+
+ # test prepend
+ label = 'this is row #0'
+ list_store.prepend((0,
+ label,
+ TestGtk.TestClass(self, 0, label),
+ test_pyobj,
+ test_pydict,
+ test_pylist,
+ 0,
+ False))
# test automatic unicode->str conversion
i = 94
@@ -840,8 +905,7 @@ class TestGtk(unittest.TestCase):
test_pydict,
test_pylist,
0,
- False,
- TestPyGObject(i)))
+ False))
# add sorted items out of order to test insert* apis
# also test sending in None to not set a column
@@ -854,8 +918,7 @@ class TestGtk(unittest.TestCase):
None,
test_pylist,
1,
- None,
- TestPyGObject(i)))
+ None))
list_store.set_value(treeiter, 0, i)
list_store.set_value(treeiter, 1, label)
@@ -873,8 +936,7 @@ class TestGtk(unittest.TestCase):
test_pydict,
test_pylist,
1,
- True,
- TestPyGObject(i)))
+ True))
i = 96
label = 'this is row #96'
@@ -885,8 +947,7 @@ class TestGtk(unittest.TestCase):
test_pydict,
test_pylist,
0,
- False,
- TestPyGObject(i)))
+ False))
i = 98
label = 'this is row #98'
@@ -897,8 +958,7 @@ class TestGtk(unittest.TestCase):
test_pydict,
test_pylist,
0,
- False,
- TestPyGObject(i)))
+ False))
i = 95
@@ -910,10 +970,44 @@ class TestGtk(unittest.TestCase):
test_pydict,
test_pylist,
1,
- True,
- TestPyGObject(i)))
+ True))
- self.assertEquals(len(list_store), 100)
+ i = 100
+ label = 'this is row #100'
+ treeiter = list_store.append()
+ list_store.set(treeiter, 1, label,
+ 0, i,
+ 2, TestGtk.TestClass(self, i, label),
+ 3, test_pyobj,
+ 4, test_pydict,
+ 5, test_pylist,
+ 6, 0,
+ 7, False)
+ i = 101
+ label = 'this is row #101'
+ treeiter = list_store.append()
+ list_store.set(treeiter, {1: label,
+ 0: i,
+ 2: TestGtk.TestClass(self, i, label),
+ 3: test_pyobj,
+ 4: test_pydict,
+ 5: test_pylist,
+ 6: 1,
+ 7: True})
+ i = 102
+ label = 'this is row #102'
+ treeiter = list_store.append()
+ list_store.set(treeiter, (1, 0, 2, 3, 4, 5, 6, 7),
+ (label,
+ i,
+ TestGtk.TestClass(self, i, label),
+ test_pyobj,
+ test_pydict,
+ test_pylist,
+ 0,
+ False))
+
+ self.assertEquals(len(list_store), 103)
# walk the list to see if the values were stored correctly
i = 0
@@ -940,14 +1034,11 @@ class TestGtk(unittest.TestCase):
self.assertTrue(isinstance(bool_1, bool))
self.assertTrue(isinstance(bool_2, bool))
- pygobj = list_store.get_value(treeiter, 8)
- self.assertEquals(pygobj.sentinal, i + 5)
-
treeiter = list_store.iter_next(treeiter)
counter += 1
- self.assertEquals(i, 99)
+ self.assertEquals(i, 102)
def test_tree_path(self):
p1 = Gtk.TreePath()
@@ -1298,7 +1389,7 @@ class TestGtk(unittest.TestCase):
self.assertEquals('Hello World', text)
def test_label(self):
- label = Gtk.Label('Hello')
+ label = Gtk.Label(label='Hello')
self.assertEquals(label.get_text(), 'Hello')
def adjustment_check(self, adjustment, value=0.0, lower=0.0, upper=0.0,
@@ -1349,7 +1440,7 @@ class TestGtk(unittest.TestCase):
self.assertEquals(table.get_size(), (2,3))
self.assertEquals(table.get_homogeneous(), True)
- label = Gtk.Label('Hello')
+ label = Gtk.Label(label='Hello')
table.attach(label, 0, 1, 0, 1)
self.assertEquals(label, table.get_children()[0])
@@ -1495,11 +1586,3 @@ class TestGio(unittest.TestCase):
self.assertEqual(len(empty), 0)
self.assertEqual(bool(empty), True)
self.assertEqual(empty.keys(), [])
-
- def test_closures(self):
- # make sure this doesn't crash
- def fake_cb(*args):
- pass
-
- ag = Gtk.AccelGroup()
- ag.connect(Gdk.KEY_l, Gdk.ModifierType.CONTROL_MASK, 0, fake_cb)
diff --git a/tests/test_properties.py b/tests/test_properties.py
index 54afd11..d02dac9 100644
--- a/tests/test_properties.py
+++ b/tests/test_properties.py
@@ -4,16 +4,18 @@ import sys
import struct
import unittest
-import gobject
-from gobject import GObject, GType, GEnum, new, PARAM_READWRITE, \
+from gi.repository import GObject
+from gi.repository.GObject import GType, GEnum, new, PARAM_READWRITE, \
PARAM_CONSTRUCT, PARAM_READABLE, PARAM_WRITABLE, PARAM_CONSTRUCT_ONLY
-from gobject.constants import \
+from gi.repository.GObject import \
TYPE_INT, TYPE_UINT, TYPE_LONG, \
TYPE_ULONG, TYPE_INT64, TYPE_UINT64
-from gobject.constants import \
+from gi.repository.GObject import \
G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
G_MAXULONG
+from gi.repository import Gio
+
if sys.version_info < (3, 0):
TEST_UTF8 = "\xe2\x99\xa5"
UNICODE_UTF8 = unicode(TEST_UTF8, 'UTF-8')
@@ -23,17 +25,20 @@ else:
from compathelper import _long
-class PropertyObject(GObject):
- normal = gobject.property(type=str)
- construct = gobject.property(
+class PropertyObject(GObject.GObject):
+ normal = GObject.property(type=str)
+ construct = GObject.property(
type=str,
flags=PARAM_READWRITE|PARAM_CONSTRUCT, default='default')
- construct_only = gobject.property(
+ construct_only = GObject.property(
type=str,
flags=PARAM_READWRITE|PARAM_CONSTRUCT_ONLY)
- uint64 = gobject.property(
+ uint64 = GObject.property(
type=TYPE_UINT64, flags=PARAM_READWRITE|PARAM_CONSTRUCT)
+ enum = GObject.property(
+ type=Gio.SocketType, default=Gio.SocketType.STREAM)
+
class TestProperties(unittest.TestCase):
def testGetSet(self):
obj = PropertyObject()
@@ -61,8 +66,9 @@ class TestProperties(unittest.TestCase):
self.failUnless(pspec.name in ['normal',
'construct',
'construct-only',
- 'uint64'])
- self.assertEqual(len(obj), 4)
+ 'uint64',
+ 'enum'])
+ self.assertEqual(len(obj), 5)
def testNormal(self):
obj = new(PropertyObject, normal="123")
@@ -117,7 +123,7 @@ class TestProperties(unittest.TestCase):
def testUInt64DefaultValue(self):
try:
- class TimeControl(GObject):
+ class TimeControl(GObject.GObject):
__gproperties__ = {
'time': (TYPE_UINT64, 'Time', 'Time',
_long(0), (1<<64) - 1, _long(0),
@@ -127,6 +133,34 @@ class TestProperties(unittest.TestCase):
(etype, ex) = sys.exc_info()[2:]
self.fail(str(ex))
+ def testEnum(self):
+ obj = new(PropertyObject)
+ self.assertEqual(obj.props.enum, Gio.SocketType.STREAM)
+ self.assertEqual(obj.enum, Gio.SocketType.STREAM)
+ obj.enum = Gio.SocketType.DATAGRAM
+ self.assertEqual(obj.props.enum, Gio.SocketType.DATAGRAM)
+ self.assertEqual(obj.enum, Gio.SocketType.DATAGRAM)
+ obj.props.enum = Gio.SocketType.STREAM
+ self.assertEqual(obj.props.enum, Gio.SocketType.STREAM)
+ self.assertEqual(obj.enum, Gio.SocketType.STREAM)
+ obj.props.enum = 2
+ self.assertEqual(obj.props.enum, Gio.SocketType.DATAGRAM)
+ self.assertEqual(obj.enum, Gio.SocketType.DATAGRAM)
+ obj.enum = 1
+ self.assertEqual(obj.props.enum, Gio.SocketType.STREAM)
+ self.assertEqual(obj.enum, Gio.SocketType.STREAM)
+
+ self.assertRaises(TypeError, setattr, obj, 'enum', 'foo')
+ self.assertRaises(TypeError, setattr, obj, 'enum', object())
+
+ self.assertRaises(TypeError, GObject.property, type=Gio.SocketType)
+ self.assertRaises(TypeError, GObject.property, type=Gio.SocketType,
+ default=Gio.SocketProtocol.TCP)
+ self.assertRaises(TypeError, GObject.property, type=Gio.SocketType,
+ default=object())
+ self.assertRaises(TypeError, GObject.property, type=Gio.SocketType,
+ default=1)
+
def testRange(self):
# kiwi code
def max(c):
@@ -158,12 +192,12 @@ class TestProperties(unittest.TestCase):
PARAM_READABLE | PARAM_WRITABLE)
return d
- class RangeCheck(GObject):
+ class RangeCheck(GObject.GObject):
__gproperties__ = build_gproperties(types)
def __init__(self):
self.values = {}
- GObject.__init__(self)
+ GObject.GObject.__init__(self)
def do_set_property(self, pspec, value):
self.values[pspec.name] = value
@@ -206,11 +240,11 @@ class TestProperties(unittest.TestCase):
class TestProperty(unittest.TestCase):
def testSimple(self):
- class C(gobject.GObject):
- str = gobject.property(type=str)
- int = gobject.property(type=int)
- float = gobject.property(type=float)
- long = gobject.property(type=_long)
+ class C(GObject.GObject):
+ str = GObject.property(type=str)
+ int = GObject.property(type=int)
+ float = GObject.property(type=float)
+ long = GObject.property(type=_long)
self.failUnless(hasattr(C.props, 'str'))
self.failUnless(hasattr(C.props, 'int'))
@@ -235,24 +269,24 @@ class TestProperty(unittest.TestCase):
self.assertEqual(o.long, _long(100))
def testCustomGetter(self):
- class C(gobject.GObject):
+ class C(GObject.GObject):
def get_prop(self):
return 'value'
- prop = gobject.property(getter=get_prop)
+ prop = GObject.property(getter=get_prop)
o = C()
self.assertEqual(o.prop, 'value')
self.assertRaises(TypeError, setattr, o, 'prop', 'xxx')
def testCustomSetter(self):
- class C(gobject.GObject):
+ class C(GObject.GObject):
def set_prop(self, value):
self._value = value
- prop = gobject.property(setter=set_prop)
+ prop = GObject.property(setter=set_prop)
def __init__(self):
self._value = None
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
o = C()
self.assertEquals(o._value, None)
@@ -261,28 +295,26 @@ class TestProperty(unittest.TestCase):
self.assertRaises(TypeError, getattr, o, 'prop')
def testErrors(self):
- self.assertRaises(TypeError, gobject.property, type='str')
- self.assertRaises(TypeError, gobject.property, nick=False)
- self.assertRaises(TypeError, gobject.property, blurb=False)
+ self.assertRaises(TypeError, GObject.property, type='str')
+ self.assertRaises(TypeError, GObject.property, nick=False)
+ self.assertRaises(TypeError, GObject.property, blurb=False)
# this never fail while bool is a subclass of int
# >>> bool.__bases__
# (<type 'int'>,)
- # self.assertRaises(TypeError, gobject.property, type=bool, default=0)
- self.assertRaises(TypeError, gobject.property, type=bool, default='ciao mamma')
- self.assertRaises(TypeError, gobject.property, type=bool)
- self.assertRaises(TypeError, gobject.property, type=GEnum)
- self.assertRaises(TypeError, gobject.property, type=GEnum, default=0)
- self.assertRaises(TypeError, gobject.property, type=object, default=0)
- self.assertRaises(TypeError, gobject.property, type=complex)
- self.assertRaises(TypeError, gobject.property, flags=-10)
+ # self.assertRaises(TypeError, GObject.property, type=bool, default=0)
+ self.assertRaises(TypeError, GObject.property, type=bool, default='ciao mamma')
+ self.assertRaises(TypeError, GObject.property, type=bool)
+ self.assertRaises(TypeError, GObject.property, type=object, default=0)
+ self.assertRaises(TypeError, GObject.property, type=complex)
+ self.assertRaises(TypeError, GObject.property, flags=-10)
def testDefaults(self):
- p1 = gobject.property(type=bool, default=True)
- p2 = gobject.property(type=bool, default=False)
+ p1 = GObject.property(type=bool, default=True)
+ p2 = GObject.property(type=bool, default=False)
def testNameWithUnderscore(self):
- class C(gobject.GObject):
- prop_name = gobject.property(type=int)
+ class C(GObject.GObject):
+ prop_name = GObject.property(type=int)
o = C()
o.prop_name = 10
self.assertEqual(o.prop_name, 10)
@@ -303,25 +335,25 @@ class TestProperty(unittest.TestCase):
for gtype, min, max in types:
# Normal, everything is alright
- prop = gobject.property(type=gtype, minimum=min, maximum=max)
- subtype = type('', (gobject.GObject,),
+ prop = GObject.property(type=gtype, minimum=min, maximum=max)
+ subtype = type('', (GObject.GObject,),
dict(prop=prop))
self.assertEqual(subtype.props.prop.minimum, min)
self.assertEqual(subtype.props.prop.maximum, max)
# Lower than minimum
self.assertRaises(TypeError,
- gobject.property, type=gtype, minimum=min-1,
+ GObject.property, type=gtype, minimum=min-1,
maximum=max)
# Higher than maximum
self.assertRaises(TypeError,
- gobject.property, type=gtype, minimum=min,
+ GObject.property, type=gtype, minimum=min,
maximum=max+1)
def testMultipleInstances(self):
- class C(gobject.GObject):
- prop = gobject.property(type=str, default='default')
+ class C(GObject.GObject):
+ prop = GObject.property(type=str, default='default')
o1 = C()
o2 = C()
@@ -332,8 +364,8 @@ class TestProperty(unittest.TestCase):
self.assertEqual(o2.prop, 'default')
def testObjectProperty(self):
- class PropertyObject(GObject):
- obj = gobject.property(type=GObject)
+ class PropertyObject(GObject.GObject):
+ obj = GObject.property(type=GObject.GObject)
pobj1 = PropertyObject()
obj1_hash = hash(pobj1)
@@ -345,21 +377,21 @@ class TestProperty(unittest.TestCase):
self.assertEqual(hash(pobj1), obj1_hash)
def testObjectSubclassProperty(self):
- class ObjectSubclass(GObject):
+ class ObjectSubclass(GObject.GObject):
__gtype_name__ = 'ObjectSubclass'
- class PropertyObjectSubclass(GObject):
- obj = gobject.property(type=ObjectSubclass)
+ class PropertyObjectSubclass(GObject.GObject):
+ obj = GObject.property(type=ObjectSubclass)
obj1 = PropertyObjectSubclass(obj=ObjectSubclass())
def testPropertySubclass(self):
# test for #470718
- class A(GObject):
- prop1 = gobject.property(type=int)
+ class A(GObject.GObject):
+ prop1 = GObject.property(type=int)
class B(A):
- prop2 = gobject.property(type=int)
+ prop2 = GObject.property(type=int)
b = B()
b.prop2 = 10
@@ -369,15 +401,15 @@ class TestProperty(unittest.TestCase):
def testPropertySubclassCustomSetter(self):
# test for #523352
- class A(GObject):
+ class A(GObject.GObject):
def get_first(self):
return 'first'
- first = gobject.property(type=str, getter=get_first)
+ first = GObject.property(type=str, getter=get_first)
class B(A):
def get_second(self):
return 'second'
- second = gobject.property(type=str, getter=get_second)
+ second = GObject.property(type=str, getter=get_second)
a = A()
self.assertEquals(a.first, 'first')
@@ -391,10 +423,10 @@ class TestProperty(unittest.TestCase):
def testPropertySubclassCustomSetterError(self):
try:
- class A(GObject):
+ class A(GObject.GObject):
def get_first(self):
return 'first'
- first = gobject.property(type=str, getter=get_first)
+ first = GObject.property(type=str, getter=get_first)
def do_get_property(self, pspec):
pass
@@ -405,9 +437,9 @@ class TestProperty(unittest.TestCase):
# Bug 587637.
def test_float_min(self):
- gobject.property(type=float, minimum=-1)
- gobject.property(type=gobject.TYPE_FLOAT, minimum=-1)
- gobject.property(type=gobject.TYPE_DOUBLE, minimum=-1)
+ GObject.property(type=float, minimum=-1)
+ GObject.property(type=GObject.TYPE_FLOAT, minimum=-1)
+ GObject.property(type=GObject.TYPE_DOUBLE, minimum=-1)
# Bug 644039
def testReferenceCount(self):
diff --git a/tests/test_signal.py b/tests/test_signal.py
index d68cb5b..8486adb 100644
--- a/tests/test_signal.py
+++ b/tests/test_signal.py
@@ -4,13 +4,13 @@ import gc
import unittest
import sys
-import gobject
+from gi.repository import GObject
import testhelper
from compathelper import _long
-class C(gobject.GObject):
- __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- (gobject.TYPE_INT,)) }
+class C(GObject.GObject):
+ __gsignals__ = { 'my_signal': (GObject.SignalFlags.RUN_FIRST, None,
+ (GObject.TYPE_INT,)) }
def do_my_signal(self, arg):
self.arg = arg
@@ -22,11 +22,11 @@ class D(C):
class TestSignalCreation(unittest.TestCase):
# Bug 540376.
def test_illegals(self):
- self.assertRaises(TypeError, lambda: gobject.signal_new('test',
+ self.assertRaises(TypeError, lambda: GObject.signal_new('test',
None,
0,
- gobject.TYPE_NONE,
- (gobject.TYPE_LONG,)))
+ None,
+ (GObject.TYPE_LONG,)))
class TestChaining(unittest.TestCase):
@@ -58,14 +58,14 @@ class TestChaining(unittest.TestCase):
class TestGSignalsError(unittest.TestCase):
def testInvalidType(self, *args):
def foo():
- class Foo(gobject.GObject):
+ class Foo(GObject.GObject):
__gsignals__ = None
self.assertRaises(TypeError, foo)
gc.collect()
def testInvalidName(self, *args):
def foo():
- class Foo(gobject.GObject):
+ class Foo(GObject.GObject):
__gsignals__ = {'not-exists' : 'override'}
self.assertRaises(TypeError, foo)
gc.collect()
@@ -73,14 +73,14 @@ class TestGSignalsError(unittest.TestCase):
class TestGPropertyError(unittest.TestCase):
def testInvalidType(self, *args):
def foo():
- class Foo(gobject.GObject):
+ class Foo(GObject.GObject):
__gproperties__ = None
self.assertRaises(TypeError, foo)
gc.collect()
def testInvalidName(self, *args):
def foo():
- class Foo(gobject.GObject):
+ class Foo(GObject.GObject):
__gproperties__ = { None: None }
self.assertRaises(TypeError, foo)
@@ -88,7 +88,7 @@ class TestGPropertyError(unittest.TestCase):
class TestList(unittest.TestCase):
def testListObject(self):
- self.assertEqual(gobject.signal_list_names(C), ('my-signal',))
+ self.assertEqual(GObject.signal_list_names(C), ('my-signal',))
def my_accumulator(ihint, return_accu, handler_return, user_data):
@@ -99,12 +99,12 @@ def my_accumulator(ihint, return_accu, handler_return, user_data):
return False, return_accu
return True, return_accu + handler_return
-class Foo(gobject.GObject):
+class Foo(GObject.GObject):
__gsignals__ = {
- 'my-acc-signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_INT,
+ 'my-acc-signal': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_INT,
(), my_accumulator, "accum data"),
- 'my-other-acc-signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN,
- (), gobject.signal_accumulator_true_handled)
+ 'my-other-acc-signal': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_BOOLEAN,
+ (), GObject.signal_accumulator_true_handled)
}
class TestAccumulator(unittest.TestCase):
@@ -141,22 +141,22 @@ class TestAccumulator(unittest.TestCase):
self.__true_val = 3
return False
-class E(gobject.GObject):
- __gsignals__ = { 'signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+class E(GObject.GObject):
+ __gsignals__ = { 'signal': (GObject.SignalFlags.RUN_FIRST, None,
()) }
def __init__(self):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.status = 0
def do_signal(self):
assert self.status == 0
self.status = 1
-class F(gobject.GObject):
- __gsignals__ = { 'signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+class F(GObject.GObject):
+ __gsignals__ = { 'signal': (GObject.SignalFlags.RUN_FIRST, None,
()) }
def __init__(self):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.status = 0
def do_signal(self):
@@ -167,7 +167,7 @@ class TestEmissionHook(unittest.TestCase):
self.hook = True
e = E()
e.connect('signal', self._callback)
- gobject.add_emission_hook(E, "signal", self._emission_hook)
+ GObject.add_emission_hook(E, "signal", self._emission_hook)
e.emit('signal')
self.assertEqual(e.status, 3)
@@ -175,8 +175,8 @@ class TestEmissionHook(unittest.TestCase):
self.hook = False
e = E()
e.connect('signal', self._callback)
- hook_id = gobject.add_emission_hook(E, "signal", self._emission_hook)
- gobject.remove_emission_hook(E, "signal", hook_id)
+ hook_id = GObject.add_emission_hook(E, "signal", self._emission_hook)
+ GObject.remove_emission_hook(E, "signal", hook_id)
e.emit('signal')
self.assertEqual(e.status, 3)
@@ -197,7 +197,7 @@ class TestEmissionHook(unittest.TestCase):
def _emission_hook(obj):
obj.status += 1
return False
- hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+ hook_id = GObject.add_emission_hook(obj, "signal", _emission_hook)
obj.emit('signal')
obj.emit('signal')
self.assertEqual(obj.status, 3)
@@ -208,10 +208,10 @@ class TestEmissionHook(unittest.TestCase):
def _emission_hook(obj):
obj.status += 1
return True
- hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+ hook_id = GObject.add_emission_hook(obj, "signal", _emission_hook)
obj.emit('signal')
obj.emit('signal')
- gobject.remove_emission_hook(obj, "signal", hook_id)
+ GObject.remove_emission_hook(obj, "signal", hook_id)
self.assertEqual(obj.status, 4)
def testCallbackReturnTrueButRemove(self):
@@ -220,9 +220,9 @@ class TestEmissionHook(unittest.TestCase):
def _emission_hook(obj):
obj.status += 1
return True
- hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+ hook_id = GObject.add_emission_hook(obj, "signal", _emission_hook)
obj.emit('signal')
- gobject.remove_emission_hook(obj, "signal", hook_id)
+ GObject.remove_emission_hook(obj, "signal", hook_id)
obj.emit('signal')
self.assertEqual(obj.status, 3)
@@ -273,11 +273,11 @@ class TestClosures(unittest.TestCase):
gc.collect()
def testGString(self):
- class C(gobject.GObject):
- __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_GSTRING,
- (gobject.TYPE_GSTRING,)) }
+ class C(GObject.GObject):
+ __gsignals__ = { 'my_signal': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_GSTRING,
+ (GObject.TYPE_GSTRING,)) }
def __init__(self, test):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.test = test
def do_my_signal(self, data):
self.data = data
@@ -287,12 +287,12 @@ class TestClosures(unittest.TestCase):
data = c.emit("my_signal", "\01\00\02")
self.assertEqual(data, "\02\00\01")
-class SigPropClass(gobject.GObject):
- __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- (gobject.TYPE_INT,)) }
+class SigPropClass(GObject.GObject):
+ __gsignals__ = { 'my_signal': (GObject.SignalFlags.RUN_FIRST, None,
+ (GObject.TYPE_INT,)) }
__gproperties__ = {
- 'foo': (str, None, None, '', gobject.PARAM_WRITABLE|gobject.PARAM_CONSTRUCT),
+ 'foo': (str, None, None, '', GObject.PARAM_WRITABLE|GObject.PARAM_CONSTRUCT),
}
signal_emission_failed = False
@@ -316,14 +316,14 @@ class TestSigProp(unittest.TestCase):
obj = SigPropClass()
self.failIf(obj.signal_emission_failed)
-f = gobject.SIGNAL_RUN_FIRST
-l = gobject.SIGNAL_RUN_LAST
-float = gobject.TYPE_FLOAT
-double = gobject.TYPE_DOUBLE
-uint = gobject.TYPE_UINT
-ulong = gobject.TYPE_ULONG
+f = GObject.SignalFlags.RUN_FIRST
+l = GObject.SignalFlags.RUN_LAST
+float = GObject.TYPE_FLOAT
+double = GObject.TYPE_DOUBLE
+uint = GObject.TYPE_UINT
+ulong = GObject.TYPE_ULONG
-class CM(gobject.GObject):
+class CM(GObject.GObject):
__gsignals__ = dict(
test1=(f, None, ()),
test2=(l, None, (str,)),
@@ -369,7 +369,7 @@ class _TestCMarshaller:
rv = self.obj.emit("test-object", self)
self.assertEqual(rv, self)
-if 'generic-c-marshaller' in gobject.features:
+if 'generic-c-marshaller' in GObject.features:
class TestCMarshaller(_TestCMarshaller, unittest.TestCase):
pass
else:
@@ -380,10 +380,10 @@ else:
# Test for 374653
class TestPyGValue(unittest.TestCase):
def testNoneNULLBoxedConversion(self):
- class C(gobject.GObject):
+ class C(GObject.GObject):
__gsignals__ = dict(my_boxed_signal=(
- gobject.SIGNAL_RUN_LAST,
- gobject.type_from_name('GStrv'), ()))
+ GObject.SignalFlags.RUN_LAST,
+ GObject.type_from_name('GStrv'), ()))
obj = C()
obj.connect('my-boxed-signal', lambda obj: None)
diff --git a/tests/test_source.py b/tests/test_source.py
index 339fb32..ad052cc 100644
--- a/tests/test_source.py
+++ b/tests/test_source.py
@@ -2,12 +2,11 @@
import unittest
-import glib
+from gi.repository import GLib
-
-class Idle(glib.Idle):
+class Idle(GLib.Idle):
def __init__(self, loop):
- glib.Idle.__init__(self)
+ GLib.Idle.__init__(self)
self.count = 0
self.set_callback(self.callback, loop)
@@ -16,9 +15,9 @@ class Idle(glib.Idle):
return True
-class MySource(glib.Source):
+class MySource(GLib.Source):
def __init__(self):
- glib.Source.__init__(self)
+ GLib.Source.__init__(self)
def prepare(self):
return True, 0
@@ -39,12 +38,12 @@ class TestSource(unittest.TestCase):
return True
def setup_timeout(self, loop):
- timeout = glib.Timeout(500)
+ timeout = GLib.Timeout(500)
timeout.set_callback(self.timeout_callback, loop)
timeout.attach()
def testSources(self):
- loop = glib.MainLoop()
+ loop = GLib.MainLoop()
self.setup_timeout(loop)
@@ -64,9 +63,9 @@ class TestSource(unittest.TestCase):
def testSourcePrepare(self):
# this test may not terminate if prepare() is wrapped incorrectly
dispatched = [False]
- loop = glib.MainLoop()
+ loop = GLib.MainLoop()
- class CustomTimeout(glib.Source):
+ class CustomTimeout(GLib.Source):
def prepare(self):
return (False, 10)
@@ -92,8 +91,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__':
diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py
index c90d1d6..14c6283 100644
--- a/tests/test_subprocess.py
+++ b/tests/test_subprocess.py
@@ -3,8 +3,7 @@
import sys
import unittest
-import glib
-
+from gi.repository import GLib
class TestProcess(unittest.TestCase):
@@ -14,11 +13,11 @@ class TestProcess(unittest.TestCase):
def testChildWatch(self):
self.data = None
- self.loop = glib.MainLoop()
+ self.loop = GLib.MainLoop()
argv = [sys.executable, '-c', 'import sys']
- pid, stdin, stdout, stderr = glib.spawn_async(
- argv, flags=glib.SPAWN_DO_NOT_REAP_CHILD)
+ pid, stdin, stdout, stderr = GLib.spawn_async(
+ argv, flags=GLib.SPAWN_DO_NOT_REAP_CHILD)
pid.close()
- glib.child_watch_add(pid, self._child_watch_cb, 12345)
+ GLib.child_watch_add(pid, self._child_watch_cb, 12345)
self.loop.run()
self.assertEqual(self.data, 12345)
diff --git a/tests/test_thread.py b/tests/test_thread.py
index be746a4..fa52dfa 100644
--- a/tests/test_thread.py
+++ b/tests/test_thread.py
@@ -1,14 +1,13 @@
# -*- Mode: Python -*-
import unittest
-
-import glib
import testhelper
+from gi.repository import GLib
class TestThread(unittest.TestCase):
def setUp(self):
- self.main = glib.MainLoop()
+ self.main = GLib.MainLoop()
def from_thread_cb(self, test, enum):
assert test == self.obj
@@ -21,8 +20,8 @@ class TestThread(unittest.TestCase):
self.obj.emit('emit-signal')
def testExtensionModule(self):
- glib.idle_add(self.idle_cb)
- glib.timeout_add(50, self.timeout_cb)
+ GLib.idle_add(self.idle_cb)
+ GLib.timeout_add(50, self.timeout_cb)
self.main.run()
def timeout_cb(self):
diff --git a/tests/test_uris.py b/tests/test_uris.py
index ee24215..8174324 100644
--- a/tests/test_uris.py
+++ b/tests/test_uris.py
@@ -1,6 +1,6 @@
import unittest
-import glib
+from gi.repository import GLib
class TestUris(unittest.TestCase):
def testExtractUris(self):
@@ -8,7 +8,7 @@ class TestUris(unittest.TestCase):
"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)
+ uri_list = GLib.uri_list_extract_uris(uri_list_text)
assert uri_list[0] == "http://www.huh.org/books/foo.html"
assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
index 4d1b44d..b242a34 100644
--- a/tests/testhelpermodule.c
+++ b/tests/testhelpermodule.c
@@ -531,7 +531,7 @@ PYGLIB_MODULE_START(testhelper, "testhelper")
d = PyModule_GetDict(module);
- if ((m = PyImport_ImportModule("gobject")) != NULL) {
+ if ((m = PyImport_ImportModule("gi._gobject")) != NULL) {
PyObject *moddict = PyModule_GetDict(m);
_PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
diff --git a/tests/testmodule.py b/tests/testmodule.py
index 5fc29b3..c4132c5 100644
--- a/tests/testmodule.py
+++ b/tests/testmodule.py
@@ -1,17 +1,17 @@
-import gobject
+from gi.repository import GObject
-class PyGObject(gobject.GObject):
+class PyGObject(GObject.GObject):
__gtype_name__ = 'PyGObject'
__gproperties__ = {
- 'label': (gobject.TYPE_STRING,
+ 'label': (GObject.TYPE_STRING,
'label property',
'the label of the object',
- 'default', gobject.PARAM_READWRITE),
+ 'default', GObject.PARAM_READWRITE),
}
def __init__(self):
self._props = {}
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.set_property('label', 'hello')
def do_set_property(self, name, value):