From 188514abf089f6c3bf73469e83525f3519f15ede Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 12 Jul 2017 08:36:58 +0900 Subject: Imported Upstream version 2.28.6 Change-Id: Ic975e9ed81a8d0c60fea3fadf17e4172a6c19009 Signed-off-by: DongHun Kwak --- ChangeLog | 198 +++++++++++++++++++++++++++ NEWS | 14 ++ PKG-INFO | 4 +- configure | 26 ++-- configure.ac | 2 +- docs/html/class-gioappinfo.html | 12 +- docs/html/class-gioapplaunchcontext.html | 8 +- docs/html/class-gioasyncresult.html | 12 +- docs/html/class-giobufferedinputstream.html | 10 +- docs/html/class-giobufferedoutputstream.html | 10 +- docs/html/class-giocancellable.html | 10 +- docs/html/class-giodatainputstream.html | 8 +- docs/html/class-giodataoutputstream.html | 8 +- docs/html/class-giodrive.html | 10 +- docs/html/class-gioemblem.html | 12 +- docs/html/class-gioemblemedicon.html | 10 +- docs/html/class-giofile.html | 12 +- docs/html/class-giofileattributeinfo.html | 6 +- docs/html/class-giofileenumerator.html | 8 +- docs/html/class-giofileicon.html | 8 +- docs/html/class-giofileinfo.html | 8 +- docs/html/class-giofileinputstream.html | 10 +- docs/html/class-giofilemonitor.html | 8 +- docs/html/class-giofileoutputstream.html | 10 +- docs/html/class-giofilterinputstream.html | 8 +- docs/html/class-giofilteroutputstream.html | 8 +- docs/html/class-gioicon.html | 14 +- docs/html/class-gioinputstream.html | 8 +- docs/html/class-gioloadableicon.html | 12 +- docs/html/class-giomemoryinputstream.html | 12 +- docs/html/class-giomemoryoutputstream.html | 10 +- docs/html/class-giomount.html | 12 +- docs/html/class-giomountoperation.html | 10 +- docs/html/class-giooutputstream.html | 8 +- docs/html/class-gioseekable.html | 10 +- docs/html/class-giosimpleasyncresult.html | 10 +- docs/html/class-giothemedicon.html | 8 +- docs/html/class-giounixinputstream.html | 8 +- docs/html/class-giounixoutputstream.html | 8 +- docs/html/class-giovolume.html | 12 +- docs/html/class-giovolumemonitor.html | 12 +- docs/html/class-glibmaincontext.html | 8 +- docs/html/class-glibmainloop.html | 8 +- docs/html/class-gobject.html | 12 +- docs/html/class-gobjectgboxed.html | 8 +- docs/html/class-gobjectginterface.html | 6 +- docs/html/class-gobjectgpointer.html | 6 +- docs/html/gio-constants.html | 2 +- docs/html/gio-functions.html | 4 +- docs/html/glib-constants.html | 2 +- docs/html/glib-functions.html | 6 +- docs/html/gobject-constants.html | 2 +- docs/html/gobject-functions.html | 6 +- docs/html/index.html | 2 +- gi/gimodule.c | 6 +- gi/module.py | 13 +- gi/overrides/GLib.py | 14 +- gi/overrides/Gdk.py | 6 + gi/pygi-argument.c | 10 +- gi/pygi-closure.c | 15 +- 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 ++-- glib/pygsource.c | 6 +- gobject/pygobject.c | 8 +- tests/test_everything.py | 1 - tests/test_gi.py | 30 ++++ tests/test_overrides.py | 4 + 71 files changed, 586 insertions(+), 303 deletions(-) diff --git a/ChangeLog b/ChangeLog index ffd9cf8..8a72a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,201 @@ +commit 42970db5949c615078c38a039da4745eeb194ac1 +Author: Ignacio Casal Quinteiro +Date: Fri Jun 10 14:01:32 2011 +0200 + + closure: avoid double free crash + + gi/pygi-closure.c | 12 ++++-------- + 1 files changed, 4 insertions(+), 8 deletions(-) + +commit 78366697d8f7fc53f20d9f52f9f39552c5e99bd1 +Author: John (J5) Palmieri +Date: Fri Jun 10 16:48:28 2011 -0400 + + [gi] backport of "GVariant has a GType" fe386a + + * backport the switch to using GIInterfaceInfo instead of GITypeInfo + for foreign types to support this patch - 01596a + + gi/pygi-argument.c | 10 +++++----- + gi/pygi-foreign-cairo.c | 18 ++++++++++-------- + gi/pygi-foreign-gvariant.c | 15 +++++++-------- + gi/pygi-foreign-gvariant.h | 14 ++++++-------- + gi/pygi-foreign.c | 21 +++++++++------------ + gi/pygi-foreign.h | 16 ++++++++-------- + gi/pygi-invoke.c | 26 ++++++++++++++++---------- + 7 files changed, 61 insertions(+), 59 deletions(-) + +commit 0c348da3d974f63629c44e75067b8056dacc60d3 +Author: John (J5) Palmieri +Date: Fri Jun 10 16:46:20 2011 -0400 + + [gi] fixes to backport commit 6b5a65 - in older glib GVariants are + still structs + + gi/gimodule.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +commit 6b5a656a3b77438c9bbb897c65343634b981c0e5 +Author: Tomeu Vizoso +Date: Mon Jun 6 19:05:07 2011 +0200 + + GVariantType is a boxed struct + + https://bugzilla.gnome.org/show_bug.cgi?id=647509 + + gi/gimodule.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 3f6bba909486d0ad1a27592fcf09c7ac8744fded +Author: Tomeu Vizoso +Date: Mon Jun 6 17:38:21 2011 +0200 + + Use _gi.Struct to wrap fundamentals + + https://bugzilla.gnome.org/show_bug.cgi?id=647509 + + gi/module.py | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +commit b7f5ce021bf16a422dc410b3ff44303e0757dc6e +Author: Jason Siefken +Date: Fri Jun 3 23:11:17 2011 -0700 + + Added __eq__ method for Gdk.Color and Gdk.RGBA + + Call Gdk.Color.equal and Gdk.RGBA.equal when + == equality testing is used. + + gi/overrides/Gdk.py | 6 ++++++ + tests/test_overrides.py | 4 ++++ + 2 files changed, 10 insertions(+), 0 deletions(-) + +commit c016c27f545f398f1b57cf31f37392c97d2b5e50 +Author: Ignacio Casal Quinteiro +Date: Wed Jun 8 19:21:23 2011 +0200 + + Remove useless import + + tests/test_everything.py | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +commit 1598047c0ddd6a1d04d41e59dd182f3c0524f3c4 +Author: Ignacio Casal Quinteiro +Date: Wed Jun 8 19:18:23 2011 +0200 + + Revert "[gi] Removed hack to avoid using GLib.Variant.new_variant." + + This reverts commit dfe95b9ec598b57deaabd98ab488ab054a44ec09. + + gi/overrides/GLib.py | 14 +++++++++++++- + 1 files changed, 13 insertions(+), 1 deletions(-) + +commit ae9e098c14de3d2364c8b16c862aa77570c06a4a +Author: Ignacio Casal Quinteiro +Date: Wed Jun 8 19:13:48 2011 +0200 + + closure: Check the out arg is not null. Fixes bug #651812 + + gi/pygi-closure.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit eca590a3ff6bbfb78eef7b88d36cee59eb51b1d0 +Author: Daniel Drake +Date: Fri Jun 3 16:59:15 2011 +0100 + + Fix GC-related crash during PyGObject deallocation + + Python-2.7.1's GC source has the following comment: + + /* Python's cyclic gc should never see an incoming refcount + * of 0: if something decref'ed to 0, it should have been + * deallocated immediately at that time. + * Possible cause (if the assert triggers): a tp_dealloc + * routine left a gc-aware object tracked during its teardown + * phase, and did something-- or allowed something to + happen -- + * that called back into Python. gc can trigger then, and may + * see the still-tracked dying object. Before this assert + * was added, such mistakes went on to allow gc to try to + * delete the object again. In a debug build, that caused + * a mysterious segfault, when _Py_ForgetReference tried + * to remove the object from the doubly-linked list of all + * objects a second time. In a release build, an actual + * double deallocation occurred, which leads to corruption + * of the allocator's internal bookkeeping pointers. That's + * so serious that maybe this should be a release-build + * check instead of an assert? + */ + + As shown in a backtrace at + https://bugzilla.redhat.com/show_bug.cgi?id=640972 , pygobject + is making + this exact mistake. Before untracking its object, pygobject_dealloc + calls PyObject_ClearWeakRefs() which can call back into python, create + new allocations, and trigger the GC. + + This is causing Sugar (based on pygobject2 + pygtk2 static bindings) + to + crash on a regular basis while interacting with widgets or launching + applications. + + Fix this by untracking the object early. Also fix the same issue + spotted + in the GSource wrapper. + + Thanks to Bernie Innocenti for initial diagnosis. + + glib/pygsource.c | 6 ++++-- + gobject/pygobject.c | 8 +++++++- + 2 files changed, 11 insertions(+), 3 deletions(-) + +commit ad96a3f1d187a640ec0a463b766fd5e027f3c16a +Author: Martin Pitt +Date: Mon May 2 15:49:52 2011 +0200 + + Fix symbol names to be locale independent + + We currently use upper() to present enum values, which are usually + defined in + lower case in the typelib, in upper cases. However, upper() is locale + dependent, so that e. g. in tr_TR.UTF-8, "invalid" becomes "iNVALiD" + because Turkish has some extra variants of "i". + + Use a local ASCII-only translate() call instead to avoid this. Thanks + to Nils + Philippsen for the idea! + + This also adds a test locale "te_ST@nouppera" which defines + toupper('a') == 'a'. + Run the Enum tests under this locale to reproduce the bug and verify + the fix. + + https://bugzilla.gnome.org/show_bug.cgi?id=649165 + + gi/module.py | 9 ++++++++- + tests/te_ST@nouppera | 50 + ++++++++++++++++++++++++++++++++++++++++++++++++++ + tests/test_gi.py | 30 ++++++++++++++++++++++++++++++ + 3 files changed, 88 insertions(+), 1 deletions(-) + +commit 90530b52f6eaa30bb704e413c01bb94ee511a0bb +Author: Sebastian Pölsterl +Date: Mon Apr 18 18:36:25 2011 +0200 + + Updated DOAP file + + pygobject.doap | 15 +++++++++++++++ + 1 files changed, 15 insertions(+), 0 deletions(-) + +commit 996e5676a00e8d8fc55ef7400d15ccf5a4d904eb +Author: Sebastian Pölsterl +Date: Mon Apr 18 18:16:42 2011 +0200 + + Post release version bump to 2.28.5 + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + commit afbcc71b71343b5a16dc8873c2ac7b9ca7dd801a Author: Sebastian Pölsterl Date: Mon Apr 18 18:06:56 2011 +0200 diff --git a/NEWS b/NEWS index d9b1e14..eeae929 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +2.28.6 11-Jun-1011 + - closure: avoid double free crash (Ignacio Casal Quinteiro) + - [gi] backport of "GVariant has a GType" fe386a (John (J5) Palmieri) + - [gi] fixes to backport commit 6b5a65 - in older glib GVariants are still structs (John (J5) Palmieri) + - GVariantType is a boxed struct (Tomeu Vizoso) + - Use _gi.Struct to wrap fundamentals (Tomeu Vizoso) + - Added __eq__ method for Gdk.Color and Gdk.RGBA (Jason Siefken) + - Remove useless import (Ignacio Casal Quinteiro) + - Revert "[gi] Removed hack to avoid using GLib.Variant.new_variant." (Ignacio Casal Quinteiro) + - closure: Check the out arg is not null. Fixes bug #651812 (Ignacio Casal Quinteiro) + - Fix GC-related crash during PyGObject deallocation (Daniel Drake) + - Fix symbol names to be locale independent (Martin Pitt) + - Updated DOAP file (Sebastian Pölsterl) + 2.28.4 18-Apr-2011 - Version bump to 2.24.4 (Sebastian Pölsterl) - [gi] Don't create variant twice (Sebastian Pölsterl) diff --git a/PKG-INFO b/PKG-INFO index 368d1ac..bfad894 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: PyGObject -Version: 2.28.4 +Version: 2.28.6 Summary: Python bindings for GObject Home-page: http://www.pygtk.org/ Author: James Henstridge @@ -8,7 +8,7 @@ Author-email: james@daa.com.au Maintainer: Johan Dahlin Maintainer-email: johan@gnome.org License: GNU LGPL -Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.4.tar.gz +Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.tar.gz Description: Python bindings for GLib, GObject and GIO Platform: POSIX, Windows Classifier: Development Status :: 5 - Production/Stable diff --git a/configure b/configure index 6338d34..927e918 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.4. +# Generated by GNU Autoconf 2.68 for pygobject 2.28.6. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pygobject' PACKAGE_TARNAME='pygobject' -PACKAGE_VERSION='2.28.4' -PACKAGE_STRING='pygobject 2.28.4' +PACKAGE_VERSION='2.28.6' +PACKAGE_STRING='pygobject 2.28.6' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject' PACKAGE_URL='' @@ -1372,7 +1372,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.4 to adapt to many kinds of systems. +\`configure' configures pygobject 2.28.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1442,7 +1442,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pygobject 2.28.4:";; + short | recursive ) echo "Configuration of pygobject 2.28.6:";; esac cat <<\_ACEOF @@ -1573,7 +1573,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pygobject configure 2.28.4 +pygobject configure 2.28.6 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1851,7 +1851,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.4, which was +It was created by pygobject $as_me 2.28.6, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2215,9 +2215,9 @@ $as_echo "#define PYGOBJECT_MINOR_VERSION 28" >>confdefs.h PYGOBJECT_MINOR_VERSION=28 -$as_echo "#define PYGOBJECT_MICRO_VERSION 4" >>confdefs.h +$as_echo "#define PYGOBJECT_MICRO_VERSION 6" >>confdefs.h -PYGOBJECT_MICRO_VERSION=4 +PYGOBJECT_MICRO_VERSION=6 ac_config_headers="$ac_config_headers config.h" @@ -2701,7 +2701,7 @@ fi # Define the identity of the package. PACKAGE='pygobject' - VERSION='2.28.4' + VERSION='2.28.6' cat >>confdefs.h <<_ACEOF @@ -12037,7 +12037,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -pygobject config.lt 2.28.4 +pygobject config.lt 2.28.6 configured by $0, generated by GNU Autoconf 2.68. Copyright (C) 2010 Free Software Foundation, Inc. @@ -16773,7 +16773,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.4, which was +This file was extended by pygobject $as_me 2.28.6, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16839,7 +16839,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.4 +pygobject config.status 2.28.6 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 20a80ac..1b923b4 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ 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, 4) +m4_define(pygobject_micro_version, 6) m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version) dnl versions of packages we require ... diff --git a/docs/html/class-gioappinfo.html b/docs/html/class-gioappinfo.html index 31beee0..e8d134f 100644 --- a/docs/html/class-gioappinfo.html +++ b/docs/html/class-gioappinfo.html @@ -1,13 +1,13 @@ -gio.AppInfo

gio.AppInfo

gio.AppInfo — Information about an installed application and methods to launch it (with file arguments).

Synopsis

class gio.AppInfo(gobject.GInterface):
+gio.AppInfo

gio.AppInfo

gio.AppInfo — Information about an installed application and methods to launch it (with file arguments).

Synopsis

class gio.AppInfo(gobject.GInterface):
     gio.AppInfo(commandline, application_name=None, flags=gio.APP_INFO_CREATE_NONE)
def add_supports_type(content_type)
def can_delete()
def can_remove_supports_type()
def delete()
def dup()
def equal(appinfo2)
def get_commandline()
def get_description()
def get_executable()
def get_icon()
def get_id()
def get_name()
def launch(files, launch_context)
def launch_uris(uris, launch_context)
def remove_supports_type(content_type)
def set_as_default_for_extension(extension)
def set_as_default_for_type(content_type)
def should_show()
def supports_files()
def supports_uris()
 Functions
  
-    def gio.app_info_get_all()
def gio.app_info_get_all_for_type(content_type)
def gio.app_info_get_default_for_type(content_type, must_support_uris)
def gio.app_info_get_default_for_uri_scheme(uri_scheme)
def gio.app_info_reset_type_association(content_type)

Known Implementation

+

Known Implementation

gio.AppInfo is implemented by gio.DesktopAppInfo -

Description

+

Description

gio.AppInfo and gio.AppLaunchContext are used for describing and launching applications installed on the system. @@ -43,7 +43,7 @@

Creates a new gio.AppInfo from the given information. -

Methods

gio.AppInfo.add_supports_type

    def add_supports_type(content_type)

content_type :

A string.

+

Methods

gio.AppInfo.add_supports_type

    def add_supports_type(content_type)

content_type :

A string.

The add_supports_type() method adds a content type to the application information to indicate the application is capable of opening files with the given content type. @@ -166,7 +166,7 @@

The supports_uris() method checks if the application accepts uris as arguments. -

Functions

gio.app_info_get_all

    def app_info_get_all()

Returns :

A list of gio.AppInfos. +

Functions

gio.app_info_get_all

    def app_info_get_all()

Returns :

A list of gio.AppInfos.

The app_info_get_all() function gets a list of all of the applications currently registered on this system. diff --git a/docs/html/class-gioapplaunchcontext.html b/docs/html/class-gioapplaunchcontext.html index 72906fc..2d1d3df 100644 --- a/docs/html/class-gioapplaunchcontext.html +++ b/docs/html/class-gioapplaunchcontext.html @@ -1,7 +1,7 @@ -gio.AppLaunchContext

gio.AppLaunchContext

gio.AppLaunchContext — Application launch context.

Synopsis

class gio.AppLaunchContext(gobject.GObject):
-    gio.AppLaunchContext()
def get_display(info, files)
def get_startup_notify_id(info, files)
def launch_failed(startup_notify_id)

Ancestry

+-- gobject.GObject
+gio.AppLaunchContext

gio.AppLaunchContext

gio.AppLaunchContext — Application launch context.

Synopsis

class gio.AppLaunchContext(gobject.GObject):
+    gio.AppLaunchContext()
def get_display(info, files)
def get_startup_notify_id(info, files)
def launch_failed(startup_notify_id)

Description

+

Description

The gio.AppLaunchContext is used for integrating the launch with the launching application. This is used to handle for instance startup notification and launching the new application on the same screen as the launching window. @@ -11,7 +11,7 @@ Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as gtk.gdk.AppLaunchContext. -

Methods

gio.AppLaunchContext.get_display

    def get_display(info, files)

info :

a +

Methods

gio.AppLaunchContext.get_display

    def get_display(info, files)

info :

a gio.AppInfo

files :

a list of gio.File diff --git a/docs/html/class-gioasyncresult.html b/docs/html/class-gioasyncresult.html index c9c3e68..ea06247 100644 --- a/docs/html/class-gioasyncresult.html +++ b/docs/html/class-gioasyncresult.html @@ -1,13 +1,13 @@ -gio.AsyncResult

gio.AsyncResult

gio.AsyncResult — Asynchronous Function Results.

Synopsis

class gio.AsyncResult(gobject.GInterface):
-    def get_source_object()

Ancestry

+-- gobject.GInterface
+gio.AsyncResult

gio.AsyncResult

gio.AsyncResult — Asynchronous Function Results.

Synopsis

class gio.AsyncResult(gobject.GInterface):
+    def get_source_object()

Prerequisites

+

Prerequisites

gio.AsyncResult is required by gobject.GObject. -

Known Implementation

+

Known Implementation

gio.AsyncResult is implemented by gio.SimpleAsyncResult. -

Description

+

Description

gio.AsyncResult provides a base class for implementing asynchronous function results.

@@ -37,7 +37,7 @@ separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event Loop and processed in an idle function. So, if you truly need asynchronous operations, make sure to initialize GThread. -

Methods

gio.AsyncResult.get_source_object

    def get_source_object()

Returns :

the source object for the res. +

Methods

gio.AsyncResult.get_source_object

    def get_source_object()

Returns :

the source object for the res.

The get_source_object() method gets the source object from a gio.AsyncResult diff --git a/docs/html/class-giobufferedinputstream.html b/docs/html/class-giobufferedinputstream.html index f8415ad..7fc25b4 100644 --- a/docs/html/class-giobufferedinputstream.html +++ b/docs/html/class-giobufferedinputstream.html @@ -1,12 +1,12 @@ -gio.BufferedInputStream

gio.BufferedInputStream

gio.BufferedInputStream — Buffered Input Stream

Synopsis

class gio.BufferedInputStream(gio.FilterInputStream):
+gio.BufferedInputStream

gio.BufferedInputStream

gio.BufferedInputStream — Buffered Input Stream

Synopsis

class gio.BufferedInputStream(gio.FilterInputStream):
     gio.BufferedInputStream(base_stream)
def fill(count, cancellable=None)
def fill_async(count, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def fill_finish(result)
def get_available()
def get_buffer_size()
def read_byte(cancellable=None)
def set_buffer_size(size)
 Functions
  
-    def gio.buffered_input_stream_new_sized(size)

gio.BufferedInputStream Properties

"buffer-size"Read - Write - ConstructThe size of the backend buffer. Allowed values: >= 1. Default value: 4096.

Description

+

gio.BufferedInputStream Properties

"buffer-size"Read - Write - ConstructThe size of the backend buffer. Allowed values: >= 1. Default value: 4096.

Description

gio.BufferedInputStream implements gio.FilterInputStream and provides for buffered reads. @@ -33,7 +33,7 @@

Creates a new gio.InputStream from the given base_stream, with a buffer set to the default size (4 kilobytes). -

Methods

gio.BufferedInputStream.fill

    def fill(count, cancellable=None)

count :

the number of bytes that will be read from the stream. +

Methods

gio.BufferedInputStream.fill

    def fill(count, cancellable=None)

count :

the number of bytes that will be read from the stream.

cancellable :

optional gio.Cancellable object, None to ignore. @@ -123,7 +123,7 @@ The set_buffer_size() 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. -

Functions

gio.buffered_input_stream_new_sized

    def buffered_input_stream_new_sized(size)

size :

the requested buffer size. +

Functions

gio.buffered_input_stream_new_sized

    def buffered_input_stream_new_sized(size)

size :

the requested buffer size.

Returns :

A new gio.InputStream.

diff --git a/docs/html/class-giobufferedoutputstream.html b/docs/html/class-giobufferedoutputstream.html index 4cfac93..a77139f 100644 --- a/docs/html/class-giobufferedoutputstream.html +++ b/docs/html/class-giobufferedoutputstream.html @@ -1,12 +1,12 @@ -gio.BufferedOutputStream

gio.BufferedOutputStream

gio.BufferedOutputStream — Buffered Output Stream

Synopsis

class gio.BufferedOutputStream(gio.FilterOutputStream):
+gio.BufferedOutputStream

gio.BufferedOutputStream

gio.BufferedOutputStream — Buffered Output Stream

Synopsis

class gio.BufferedOutputStream(gio.FilterOutputStream):
     gio.BufferedOutputStream(base_stream)
def get_auto_grow()
def get_buffer_size()
def set_auto_grow(auto_grow)
def set_buffer_size(size)
 Functions
  
-    def gio.buffered_output_stream_new_sized(size)

gio.BufferedOutputStream Properties

"auto-grow"Read - WriteWhether the buffer should automatically grow. Default value: False.
"buffer-size"Read - Write - ConstructThe size of the backend buffer. Allowed values: >= 1. Default value: 4096.

Description

+

gio.BufferedOutputStream Properties

"auto-grow"Read - WriteWhether the buffer should automatically grow. Default value: False.
"buffer-size"Read - Write - ConstructThe size of the backend buffer. Allowed values: >= 1. Default value: 4096.

Description

gio.BufferedOutputStream implements gio.FilterOutputStream and provides for buffered writes. @@ -32,7 +32,7 @@ for the given base_stream.

Creates a new buffered output stream for a base stream. -

Methods

gio.BufferedOutputStream.get_auto_grow

    def get_auto_grow()

Returns :

True if the stream's +

Methods

gio.BufferedOutputStream.get_auto_grow

    def get_auto_grow()

Returns :

True if the stream's buffer automatically grows, False otherwise.

The get_auto_grow() method checks if the @@ -51,7 +51,7 @@

The set_buffer_size() method sets the size of the internal buffer to size. -

Functions

gio.buffered_output_stream_new_sized

    def buffered_output_stream_new_sized(size)

size :

the requested buffer size. +

Functions

gio.buffered_output_stream_new_sized

    def buffered_output_stream_new_sized(size)

size :

the requested buffer size.

Returns :

A new gio.OutputStream with an internal buffer set to size.. diff --git a/docs/html/class-giocancellable.html b/docs/html/class-giocancellable.html index 81b1ebf..54c8bf5 100644 --- a/docs/html/class-giocancellable.html +++ b/docs/html/class-giocancellable.html @@ -1,10 +1,10 @@ -gio.Cancellable

gio.Cancellable

gio.Cancellable — Thread-safe Operation Cancellation Stack.

Synopsis

class gio.Cancellable(gobject.GObject):
+gio.Cancellable

gio.Cancellable

gio.Cancellable — Thread-safe Operation Cancellation Stack.

Synopsis

class gio.Cancellable(gobject.GObject):
     gio.Cancellable()
def cancel()
def get_fd()
def is_cancelled()
def pop_current()
def push_current()
def reset()
def set_error_if_cancelled()
 Functions
  
-    def gio.cancellable_get_current()

Description

+

Description

The gio.Cancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations. @@ -19,7 +19,7 @@

One gio.Cancellable can be used in multiple consecutive operations, but not in multiple concurrent operations. -

Methods

gio.Cancellable.cancel

    def cancel()

+

Methods

gio.Cancellable.cancel

    def cancel()

The cancel() method will set cancellable to cancelled, and will emit the "cancelled" signal. (However, see the warning about race conditions in the documentation for that signal if you are planning to connect to it.) @@ -55,7 +55,7 @@ False if it was not.

The set_error_if_cancelled() method, if the cancellable is cancelled, sets the error to notify that the operation was cancelled. -

Functions

gio.cancellable_get_current

    def cancellable_get_current()

Returns :

A gio.Cancellable +

Functions

gio.cancellable_get_current

    def cancellable_get_current()

Returns :

A gio.Cancellable from the top of the stack, or None if the stack is empty.

The cancellable_get_current() function gets the top cancellable from the stack.

diff --git a/docs/html/class-giodatainputstream.html b/docs/html/class-giodatainputstream.html index a0266f9..67fb819 100644 --- a/docs/html/class-giodatainputstream.html +++ b/docs/html/class-giodatainputstream.html @@ -1,10 +1,10 @@ -gio.DataInputStream

gio.DataInputStream

gio.DataInputStream — Data Input Stream

Synopsis

class gio.DataInputStream(gio.BufferedInputStream):
-    gio.DataInputStream(base_stream)
def get_byte_order()
def get_newline_type()
def read_byte(cancellable=None)
def read_int16(cancellable=None)
def read_int32(cancellable=None)
def read_int64(cancellable=None)
def read_line(cancellable=None)
def read_line_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_line_finish(result)
def read_uint16(cancellable=None)
def read_uint32(cancellable=None)
def read_uint64(cancellable=None)
def read_until(stop_chars, cancellable=None)
def read_until_async(stop_chars, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_until_finish(result)
def set_byte_order(order)
def set_newline_type(type)

Ancestry

+-- gobject.GObject
+gio.DataInputStream

gio.DataInputStream

gio.DataInputStream — Data Input Stream

Synopsis

class gio.DataInputStream(gio.BufferedInputStream):
+    gio.DataInputStream(base_stream)
def get_byte_order()
def get_newline_type()
def read_byte(cancellable=None)
def read_int16(cancellable=None)
def read_int32(cancellable=None)
def read_int64(cancellable=None)
def read_line(cancellable=None)
def read_line_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_line_finish(result)
def read_uint16(cancellable=None)
def read_uint32(cancellable=None)
def read_uint64(cancellable=None)
def read_until(stop_chars, cancellable=None)
def read_until_async(stop_chars, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_until_finish(result)
def set_byte_order(order)
def set_newline_type(type)

gio.DataInputStream Properties

"byte-order"Read - WriteThe byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.
"newline-type"Read - WriteThe accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.

Description

+

gio.DataInputStream Properties

"byte-order"Read - WriteThe byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.
"newline-type"Read - WriteThe accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.

Description

gio.DataInputStream implements gio.InputStream and includes functions for reading structured data directly from a binary input stream. @@ -15,7 +15,7 @@

Creates a new gio.DataInputStream from the given base_stream. -

Methods

gio.DataInputStream.get_byte_order

    def get_byte_order()

Returns :

the stream's current +

Methods

gio.DataInputStream.get_byte_order

    def get_byte_order()

Returns :

the stream's current Gio Data Stream Byte Order Constants.

The get_byte_order() method gets the byte diff --git a/docs/html/class-giodataoutputstream.html b/docs/html/class-giodataoutputstream.html index 6bdbaad..a681efe 100644 --- a/docs/html/class-giodataoutputstream.html +++ b/docs/html/class-giodataoutputstream.html @@ -1,12 +1,12 @@ -gio.DataOutputStream

gio.DataOutputStream

gio.DataOutputStream — Data Output Stream

Synopsis

class gio.DataOutputStream(gio.BufferedOutputStream):
-    gio.DataOutputStream(base_stream)
def get_byte_order()
def put_byte(cancellable=None)
def put_int16(cancellable=None)
def put_int32(cancellable=None)
def put_int64(cancellable=None)
def put_string(cancellable=None)
def put_uint16(cancellable=None)
def put_uint32(cancellable=None)
def put_uint64(cancellable=None)
def set_byte_order(order)

Ancestry

+-- gobject.GObject
+gio.DataOutputStream

gio.DataOutputStream

gio.DataOutputStream — Data Output Stream

Synopsis

class gio.DataOutputStream(gio.BufferedOutputStream):
+    gio.DataOutputStream(base_stream)
def get_byte_order()
def put_byte(cancellable=None)
def put_int16(cancellable=None)
def put_int32(cancellable=None)
def put_int64(cancellable=None)
def put_string(cancellable=None)
def put_uint16(cancellable=None)
def put_uint32(cancellable=None)
def put_uint64(cancellable=None)
def set_byte_order(order)

gio.DataOutputStream Properties

"byte-order"Read - WriteDetermines 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.

Description

+ Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.

Description

gio.DataOutputStream implements gio.InputStream and includes functions for writing data directly to an output stream. @@ -17,7 +17,7 @@

Creates a new gio.DataOutputStream from the given base_stream. -

Methods

gio.DataOutputStream.get_byte_order

    def get_byte_order()

Returns :

the stream's current +

Methods

gio.DataOutputStream.get_byte_order

    def get_byte_order()

Returns :

the stream's current Gio Data Stream Byte Order Constants.

The get_byte_order() method gets the byte diff --git a/docs/html/class-giodrive.html b/docs/html/class-giodrive.html index beed77f..be54893 100644 --- a/docs/html/class-giodrive.html +++ b/docs/html/class-giodrive.html @@ -1,10 +1,10 @@ -gio.Drive

gio.Drive

gio.Drive — Virtual File System drive management.

Synopsis

class gio.Drive(gobject.GInterface):
-    def can_eject()
def can_poll_for_media()
def eject(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def eject_finish(result)
def enumerate_identifiers()
def get_icon()
def get_identifier()
def get_name()
def get_volumes()
def has_media()
def has_volumes()
def is_media_check_automatic()
def is_media_removable()
def poll_for_media(callback, cancellable=None, user_data=None)
def poll_for_media_finish(result)

Ancestry

+-- gobject.GInterface
+gio.Drive

gio.Drive

gio.Drive — Virtual File System drive management.

Synopsis

class gio.Drive(gobject.GInterface):
+    def can_eject()
def can_poll_for_media()
def eject(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def eject_finish(result)
def enumerate_identifiers()
def get_icon()
def get_identifier()
def get_name()
def get_volumes()
def has_media()
def has_volumes()
def is_media_check_automatic()
def is_media_removable()
def poll_for_media(callback, cancellable=None, user_data=None)
def poll_for_media_finish(result)

Ancestry

+-- gobject.GInterface
   +-- gio.Drive
-

Prerequisites

+

Prerequisites

gio.Drive requires gobject.GObject -

Description

+

Description

gio.Drive - this represent a piece of hardware connected to the machine. Its generally only created for removable hardware or hardware with removable media. @@ -24,7 +24,7 @@ For porting from GnomeVFS note that there is no equivalent of gio.Drive in that API. -

Methods

gio.Drive.can_eject

    def can_eject()

Returns :

True if the drive can be ejected, +

Methods

gio.Drive.can_eject

    def can_eject()

Returns :

True if the drive can be ejected, False otherwise.

The can_eject() method checks if a drive can be ejected. diff --git a/docs/html/class-gioemblem.html b/docs/html/class-gioemblem.html index bc77867..451f288 100644 --- a/docs/html/class-gioemblem.html +++ b/docs/html/class-gioemblem.html @@ -1,14 +1,14 @@ -gio.Emblem

gio.Emblem

gio.Emblem — An object for emblems.

Synopsis

class gio.Emblem(gobject.GObject, gio.Icon):
+gio.Emblem

gio.Emblem

gio.Emblem — An object for emblems.

Synopsis

class gio.Emblem(gobject.GObject, gio.Icon):
     gio.Emblem(icon, origin=gio.EMBLEM_ORIGIN_UNKNOWN)
def get_icon()
def get_origin()
 Functions
  
-    def gio.emblem_new_with_origin(icon, origin)

Ancestry

+-- gobject.GObject
+    def gio.emblem_new_with_origin(icon, origin)

Ancestry

+-- gobject.GObject
   +-- gio.Emblem
-

Implemented Interfaces

+

Implemented Interfaces

gio.Emblem implements gio.Icon -

gio.Emblem Properties

"icon"Read - Write - Construct OnlyThe actual icon of the emblem.
"origin"Read - Write - Construct OnlyTells which origin the emblem is derived from.

Description

+

gio.Emblem Properties

"icon"Read - Write - Construct OnlyThe actual icon of the emblem.
"origin"Read - Write - Construct OnlyTells which origin the emblem is derived from.

Description

The gio.Emblem class is an implementation of gio.Icon that supports having an emblem, which is an icon with additional properties. @@ -27,14 +27,14 @@ Parameter origin is available since PyGObject 2.20.

Creates a new gio.Emblem for icon. -

Methods

gio.Emblem.get_icon

    def get_icon()

Returns :

a +

Methods

gio.Emblem.get_icon

    def get_icon()

Returns :

a gio.Icon.

The get_icon() method gives back the icon from emblem.

gio.Emblem.get_origin

    def get_origin()

Returns :

the origin of the emblem.

The get_origin() method gets the origin of the emblem. -

Functions

gio.emblem_new_with_origin

    def emblem_new_with_origin(icon, origin)

origin :

a Gio Emblem Origin Constants +

Functions

gio.emblem_new_with_origin

    def emblem_new_with_origin(icon, origin)

origin :

a Gio Emblem Origin Constants defining the emblem's origin.

Returns :

A gio.Emblem.

Note

diff --git a/docs/html/class-gioemblemedicon.html b/docs/html/class-gioemblemedicon.html index 4079d02..12b7277 100644 --- a/docs/html/class-gioemblemedicon.html +++ b/docs/html/class-gioemblemedicon.html @@ -1,11 +1,11 @@ -gio.EmblemedIcon

gio.EmblemedIcon

gio.EmblemedIcon — Icon with emblems.

Synopsis

class gio.EmblemedIcon(gobject.GObject, gio.Icon):
-    gio.EmblemedIcon(icon, emblem)
def add_emblem(emblem)
def get_icon()

Ancestry

+-- gobject.GObject
+gio.EmblemedIcon

gio.EmblemedIcon

gio.EmblemedIcon — Icon with emblems.

Synopsis

class gio.EmblemedIcon(gobject.GObject, gio.Icon):
+    gio.EmblemedIcon(icon, emblem)
def add_emblem(emblem)
def get_icon()

Implemented Interfaces

+

Implemented Interfaces

gio.EmblemedIcon implements gio.Icon -

Description

+

Description

The gio.EmblemedIcon class is an implementation of gio.Icon that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via @@ -25,7 +25,7 @@

Creates a new gio.Icon for icon with the emblem emblem. -

Methods

gio.EmblemedIcon.add_emblem

    def add_emblem(emblem)

emblem :

a +

Methods

gio.EmblemedIcon.add_emblem

    def add_emblem(emblem)

emblem :

a gio.Emblem

The add_emblem() method adds emblem to the diff --git a/docs/html/class-giofile.html b/docs/html/class-giofile.html index 5fcc1cc..9f40126 100644 --- a/docs/html/class-giofile.html +++ b/docs/html/class-giofile.html @@ -1,12 +1,12 @@ -gio.File

gio.File

gio.File — File and Directory Handling.

Synopsis

class gio.File(gobject.GInterface):
+gio.File

gio.File

gio.File — File and Directory Handling.

Synopsis

class gio.File(gobject.GInterface):
     gio.File(commandline, path=None, uri=None)
def append_to(flags=gio.FILE_CREATE_NONE, cancellable=None)
def append_to_async(callback, flags=gio.FILE_CREATE_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def append_to_finish(result)
def copy(destination, progress_callback, flags=gio.FILE_COPY_NONE, cancellable=None, user_data=None)
def copy_async(destination, callback, progress_callback=None, flags=gio.FILE_CREATE_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None, progress_callback_data=None)
def copy_attributes(destination, flags=gio.FILE_COPY_NONE, cancellable=None)
def copy_finish(result)
def create(flags=gio.FILE_CREATE_NONE, cancellable=None)
def create_async(callback, flags=gio.FILE_CREATE_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def create_finish(result)
def delete(cancellable=None)
def dup()
def eject_mountable(callback, flags=gio.FILE_CREATE_NONE, cancellable=None, user_data=None)
def eject_mountable_finish(result)
def enumerate_children(attributes, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def enumerate_children_async(attributes, callback, flags=gio.FILE_QUERY_INFO_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def enumerate_children_finish(result)
def equal(file2)
def find_enclosing_mount(cancellable)
def find_enclosing_mount_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def find_enclosing_mount_finish(result)
def get_basename()
def get_child(name)
def get_child_for_display_name(display_name)
def get_parent()
def get_parse_name()
def get_path()
def get_relative_path(descendant)
def get_uri()
def get_uri_scheme()
def has_prefix(prefix)
def has_uri_scheme(uri_scheme)
def is_native()
def load_contents(cancellable)
def load_contents_async(callback, cancellable=None, user_data=None)
def load_contents_finish(result)
def make_directory(cancellable=None)
def make_directory_with_parents(cancellable=None)
def make_symbolic_link(symlink_value, cancellable)
def monitor(flags=gio.FILE_MONITOR_NONE, cancellable=None)
def monitor_directory(flags, cancellable=None)
def monitor_file(flags, cancellable=None)
def mount_enclosing_volume(mount_operation, callback, flags=gio.MOUNT_MOUNT_NONE, cancellable=None, user_data=None)
def mount_enclosing_volume_finish(result)
def mount_mountable(mount_operation, callback, flags=gio.MOUNT_MOUNT_NONE, cancellable=None, user_data=None)
def mount_mountable_finish(result)
def move(destination, progress_callback, flags=gio.FILE_COPY_NONE, cancellable=None, user_data=None)
def query_default_handler(cancellable)
def query_exists(cancellable)
def query_file_type(flags, cancellable)
def query_filesystem_info(attributes, cancellable)
def query_filesystem_info_async(attributes, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def query_filesystem_info_finish(result)
def query_info(attributes, flags, cancellable)
def query_info_async(attributes, callback, flags=gio.FILE_QUERY_INFO_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def query_info_finish(result)
def query_settable_attributes(cancellable=None)
def query_writable_namespace(cancellable=None)
def read(cancellable=None)
def read_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_finish(result=None)
def replace(etag, make_backup, flags=gio.FILE_CREATE_NONE, cancellable=None)
def replace_async(callback, etag=None, make_backup=True, flags=gio.FILE_CREATE_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def replace_contents(contents, etag=None, make_backup=True, flags=gio.FILE_CREATE_NONE, cancellable=None)
def replace_contents_async(contents, callback, etag=None, make_backup=True, flags=gio.FILE_CREATE_NONE, cancellable=None, user_data=None)
def replace_contents_finish(result=None)
def replace_finish(result=None)
def resolve_relative_path(relative_path)
def set_attribute(attribute, type, value_p, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attribute_byte_string(attribute, value, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attribute_int32(attribute, value, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attribute_int64(attribute, value, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attribute_string(attribute, value, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attribute_uint32(attribute, value, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attribute_uint64(attribute, value, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_attributes_async(info, callback, flags=gio.FILE_QUERY_INFO_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def set_attributes_finish(result)
def set_attributes_from_info(info, flags=gio.FILE_QUERY_INFO_NONE, cancellable=None)
def set_dispay_name(display_name, cancellable=None)
def set_display_name_async(display_name, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def set_display_name_finish(result)
def trash(cancellable=None)
def unmount_mountable(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def unmount_mountable_finish(cancellable=None)
 Functions
-    def gio.file_parse_name(parse_name)

Ancestry

+-- gobject.GInterface
+    def gio.file_parse_name(parse_name)

Ancestry

+-- gobject.GInterface
   +-- gio.File
-

Prerequisites

+

Prerequisites

gio.File is implemented by gobject.GObject -

Description

+

Description

gio.File is a high level abstraction for manipulating files on a virtual file system. gio.Files are lightweight, @@ -91,7 +91,7 @@

Creates a new gio.File either from a commandline, a path or an uri. -

Methods

gio.File.append_to

    def append_to(flags=gio.FILE_CREATE_NONE, cancellable=None)

flags :

a set of +

Methods

gio.File.append_to

    def append_to(flags=gio.FILE_CREATE_NONE, cancellable=None)

flags :

a set of Gio File Create Flags Constants

cancellable :

optional gio.Cancellable @@ -1425,7 +1425,7 @@ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] The unmount_mountable_finish() method finishes an asynchronous copy operation started with gio.File.unmount_mountable(). -

Functions

gio.file_parse_name

    def file_parse_name(parse_name)

parse_name :

a file name or path to be parsed. +

Functions

gio.file_parse_name

    def file_parse_name(parse_name)

parse_name :

a file name or path to be parsed.

Returns :

a new gio.File.

The parse_name() function constructs a diff --git a/docs/html/class-giofileattributeinfo.html b/docs/html/class-giofileattributeinfo.html index 7de7a22..8e69c3a 100644 --- a/docs/html/class-giofileattributeinfo.html +++ b/docs/html/class-giofileattributeinfo.html @@ -1,7 +1,7 @@ -gio.FileAttributeInfo

gio.FileAttributeInfo

gio.FileAttributeInfo — Information about a specific attribute.

Synopsis

class gio.FileAttributeInfo(__builtin__.object):
-

Ancestry

+-- __builtin__.object
+gio.FileAttributeInfo

gio.FileAttributeInfo

gio.FileAttributeInfo — Information about a specific attribute.

Synopsis

class gio.FileAttributeInfo(__builtin__.object):
+

Ancestry

+-- __builtin__.object
   +-- gio.FileAttributeInfo
-

Description

+

Description

The gio.FileAttributeInfo contains information about a specific attribute.

gio.FileAttributeInfo Attributes

"name"ReadThe name of the attribute.
"type"Readthe diff --git a/docs/html/class-giofileenumerator.html b/docs/html/class-giofileenumerator.html index ed796f9..d50118e 100644 --- a/docs/html/class-giofileenumerator.html +++ b/docs/html/class-giofileenumerator.html @@ -1,7 +1,7 @@ -gio.FileEnumerator

gio.FileEnumerator

gio.FileEnumerator — Enumerated Files Routines.

Synopsis

class gio.FileEnumerator(gobject.GObject):
-    def close(cancellable=None)
def close_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def close_finish(result)
def get_container()
def has_pending()
def is_closed()
def next_file(cancellable=None)
def next_files_async(num_files, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def next_files_finish(result)
def set_pending(pending)

Ancestry

+-- gobject.GObject
+gio.FileEnumerator

gio.FileEnumerator

gio.FileEnumerator — Enumerated Files Routines.

Synopsis

class gio.FileEnumerator(gobject.GObject):
+    def close(cancellable=None)
def close_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def close_finish(result)
def get_container()
def has_pending()
def is_closed()
def next_file(cancellable=None)
def next_files_async(num_files, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def next_files_finish(result)
def set_pending(pending)

gio.FileEnumerator Properties

"container"Write - Construct onlyThe container that is being enumerated.

Description

+

gio.FileEnumerator Properties

"container"Write - Construct onlyThe container that is being enumerated.

Description

The gio.FileEnumerator allows you to operate on a set of gio.Files @@ -27,7 +27,7 @@ close_async. Once a gio.FileEnumerator is closed, no further actions may be performed on it. -

Methods

gio.FileEnumerator.close

    def close(cancellable=None)

cancellable :

Optional +

Methods

gio.FileEnumerator.close

    def close(cancellable=None)

cancellable :

Optional gio.Cancellable object, None to ignore.

Returns :

True on success or diff --git a/docs/html/class-giofileicon.html b/docs/html/class-giofileicon.html index b8d87f0..72c0dba 100644 --- a/docs/html/class-giofileicon.html +++ b/docs/html/class-giofileicon.html @@ -1,7 +1,7 @@ -gio.FileIcon

gio.FileIcon

gio.FileIcon — Icons pointing to an image file.

Synopsis

class gio.FileIcon(gobject.GObject, gio.Icon, gio.LoadableIcon):
-    gio.FileIcon(file)
def get_file()

Ancestry

+-- gobject.GObject
+gio.FileIcon

gio.FileIcon

gio.FileIcon — Icons pointing to an image file.

Synopsis

class gio.FileIcon(gobject.GObject, gio.Icon, gio.LoadableIcon):
+    gio.FileIcon(file)
def get_file()

Ancestry

+-- gobject.GObject
   +-- gio.FileIcon
-

Description

+

Description

The gio.FileIcon specifies an icon by pointing to an image file to be used as icon.

Constructor

    gio.FileIcon(file)

file :

a @@ -11,7 +11,7 @@ for the given file, or None on error.

Creates a new icon for a file. -

Methods

gio.FileIcon.get_file

    def get_file()

Returns :

a +

Methods

gio.FileIcon.get_file

    def get_file()

Returns :

a gio.File or None.

diff --git a/docs/html/class-giofileinfo.html b/docs/html/class-giofileinfo.html index ad9cdb3..d82427c 100644 --- a/docs/html/class-giofileinfo.html +++ b/docs/html/class-giofileinfo.html @@ -1,7 +1,7 @@ -gio.FileInfo

gio.FileInfo

gio.FileInfo — File Information and Attributes

Synopsis

class gio.FileInfo(gobject.GObject):
-    gio.FileInfo()
def clear_status()
def copy_into()
def dup()
def get_attribute_as_string(attribute)
def get_attribute_boolean(attribute)
def get_attribute_byte_string(attribute)
def get_attribute_data(attribute)
def get_attribute_int32(attribute)
def get_attribute_int64(attribute)
def get_attribute_object(attribute)
def get_attribute_status(attribute)
def get_attribute_string(attribute)
def get_attribute_type(attribute)
def get_attribute_uint32(attribute)
def get_attribute_uint64(attribute)
def get_content_type()
def get_display_name()
def get_edit_name()
def get_etag()
def get_file_type()
def get_icon()
def get_is_backup()
def get_is_hidden()
def get_is_symlink()
def get_modification_time()
def get_name()
def get_size()
def get_sort_order()
def get_symlink_target()
def has_attribute(attribute)
def list_attributes(name_space)
def remove_attribute(attribute)
def set_attribute(attribute, type, value_p)
def set_attribute_boolean(attribute, attr_value)
def set_attribute_byte_string(attribute, attr_value)
def set_attribute_data(attribute, attr_value)
def set_attribute_int32(attribute, attr_value)
def set_attribute_int64(attribute, attr_value)
def set_attribute_mask(mask)
def set_attribute_object(attribute, attr_value)
def set_attribute_status(attribute, attr_value)
def set_attribute_string(attribute, attr_value)
def set_attribute_uint32(attribute)
def set_attribute_uint64(attribute)
def set_content_type(content_type)
def set_display_name(display_name)
def set_edit_name(edit_name)
def set_file_type(type)
def set_icon(icon)
def set_is_hidden(is_hidden)
def set_is_symlink(is_symlink)
def set_modification_time(mtime)
def set_name(name)
def set_size(size)
def set_sort_order(sort_order)
def set_symlink_tarset(symlink_target)
def unset_attribute_mask()

Ancestry

+-- gobject.GObject
+gio.FileInfo

gio.FileInfo

gio.FileInfo — File Information and Attributes

Synopsis

class gio.FileInfo(gobject.GObject):
+    gio.FileInfo()
def clear_status()
def copy_into()
def dup()
def get_attribute_as_string(attribute)
def get_attribute_boolean(attribute)
def get_attribute_byte_string(attribute)
def get_attribute_data(attribute)
def get_attribute_int32(attribute)
def get_attribute_int64(attribute)
def get_attribute_object(attribute)
def get_attribute_status(attribute)
def get_attribute_string(attribute)
def get_attribute_type(attribute)
def get_attribute_uint32(attribute)
def get_attribute_uint64(attribute)
def get_content_type()
def get_display_name()
def get_edit_name()
def get_etag()
def get_file_type()
def get_icon()
def get_is_backup()
def get_is_hidden()
def get_is_symlink()
def get_modification_time()
def get_name()
def get_size()
def get_sort_order()
def get_symlink_target()
def has_attribute(attribute)
def list_attributes(name_space)
def remove_attribute(attribute)
def set_attribute(attribute, type, value_p)
def set_attribute_boolean(attribute, attr_value)
def set_attribute_byte_string(attribute, attr_value)
def set_attribute_data(attribute, attr_value)
def set_attribute_int32(attribute, attr_value)
def set_attribute_int64(attribute, attr_value)
def set_attribute_mask(mask)
def set_attribute_object(attribute, attr_value)
def set_attribute_status(attribute, attr_value)
def set_attribute_string(attribute, attr_value)
def set_attribute_uint32(attribute)
def set_attribute_uint64(attribute)
def set_content_type(content_type)
def set_display_name(display_name)
def set_edit_name(edit_name)
def set_file_type(type)
def set_icon(icon)
def set_is_hidden(is_hidden)
def set_is_symlink(is_symlink)
def set_modification_time(mtime)
def set_name(name)
def set_size(size)
def set_sort_order(sort_order)
def set_symlink_tarset(symlink_target)
def unset_attribute_mask()

Ancestry

+-- gobject.GObject
   +-- gio.FileInfo
-

Description

+

Description

Functionality for manipulating basic metadata for files. gio.FileInfo implements methods for getting information that all files should contain, @@ -39,4 +39,4 @@ gio.FileInfo

Creates a new gio.FileInfo -

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.

+

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.

diff --git a/docs/html/class-giofileinputstream.html b/docs/html/class-giofileinputstream.html index 69d8601..a4aedc7 100644 --- a/docs/html/class-giofileinputstream.html +++ b/docs/html/class-giofileinputstream.html @@ -1,12 +1,12 @@ -gio.FileInputStream

gio.FileInputStream

gio.FileInputStream — Base class for implementing streaming input

Synopsis

class gio.FileInputStream(gio.InputStream):
-    def query_info(attributes, cancellable=None)
def query_info_async(attributes, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def query_info_finish(result)

Ancestry

+-- gobject.GObject
+gio.FileInputStream

gio.FileInputStream

gio.FileInputStream — Base class for implementing streaming input

Synopsis

class gio.FileInputStream(gio.InputStream):
+    def query_info(attributes, cancellable=None)
def query_info_async(attributes, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def query_info_finish(result)

Implemented Interfaces

+

Implemented Interfaces

gio.FileInputStream implements gio.Seekable -

Description

+

Description

gio.FileInputStream provides input streams that take their content from a file.

@@ -21,7 +21,7 @@ gio.Seekable.can_seek(). To position a file input stream, use gio.Seekable.seek(). -

Methods

gio.FileInputStream.query_info

    def query_info(attributes, cancellable=None)

attributes :

a file attribute query string. +

Methods

gio.FileInputStream.query_info

    def query_info(attributes, cancellable=None)

attributes :

a file attribute query string.

cancellable :

optional gio.Cancellable object, None to ignore. diff --git a/docs/html/class-giofilemonitor.html b/docs/html/class-giofilemonitor.html index fe5ebc3..187d822 100644 --- a/docs/html/class-giofilemonitor.html +++ b/docs/html/class-giofilemonitor.html @@ -1,12 +1,12 @@ -gio.FileMonitor

gio.FileMonitor

gio.FileMonitor — File Monitor

Synopsis

class gio.FileMonitor(gobject.GObject):
-    def cancel()
def emit_event(child, other_file, event_type)
def is_cancelled()
def set_rate_limit(limit_msecs)

Ancestry

+-- gobject.GObject
+gio.FileMonitor

gio.FileMonitor

gio.FileMonitor — File Monitor

Synopsis

class gio.FileMonitor(gobject.GObject):
+    def cancel()
def emit_event(child, other_file, event_type)
def is_cancelled()
def set_rate_limit(limit_msecs)

gio.FileMonitor Properties

"cancelled"Read Whether the monitor has been cancelled. Default value: False.
"rate-limit"Read/Write The limit of the monitor to watch for changes, in milliseconds. Allowed values: >= 0. Default value: 800. -

gio.FileMonitor Signal Prototypes

gobject.GObject Signal Prototypes

"changed"

def callback(filemonitor, file, other_file, event_type, user_param1, ...)

Description

+

gio.FileMonitor Signal Prototypes

gobject.GObject Signal Prototypes

"changed"

def callback(filemonitor, file, other_file, event_type, user_param1, ...)

Description

The gio.FileMonitor monitors a file or directory for changes.

@@ -18,4 +18,4 @@

To get informed about changes to the file or directory you are monitoring, connect to the "changed" signal. -

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.

+

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.

diff --git a/docs/html/class-giofileoutputstream.html b/docs/html/class-giofileoutputstream.html index 990c42d..f69c100 100644 --- a/docs/html/class-giofileoutputstream.html +++ b/docs/html/class-giofileoutputstream.html @@ -1,12 +1,12 @@ -gio.FileOutputStream

gio.FileOutputStream

gio.FileOutputStream — Base class for implementing streaming input

Synopsis

class gio.FileOutputStream(gio.OutputStream):
-    def get_etag()
def query_info(attributes, cancellable=None)
def query_info_async(attributes, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def query_info_finish(result)

Ancestry

+-- gobject.GObject
+gio.FileOutputStream

gio.FileOutputStream

gio.FileOutputStream — Base class for implementing streaming input

Synopsis

class gio.FileOutputStream(gio.OutputStream):
+    def get_etag()
def query_info(attributes, cancellable=None)
def query_info_async(attributes, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def query_info_finish(result)

Implemented Interfaces

+

Implemented Interfaces

gio.FileOutputStream implements gio.Seekable -

Description

+

Description

gio.FileOutputStream provides output streams that write their content to a file.

@@ -26,7 +26,7 @@ gio.FileOutputStream.can_truncate(). To truncate a file output stream, use gio.Seekable.truncate(). -

Methods

gio.FileOutputStream.get_etag

    def get_etag()

Returns :

the entity tag for the stream. +

Methods

gio.FileOutputStream.get_etag

    def get_etag()

Returns :

the entity tag for the stream.

The get_etag() method gets the entity tag for the file when it has been written. This must be called after the diff --git a/docs/html/class-giofilterinputstream.html b/docs/html/class-giofilterinputstream.html index 8e40660..0cfcee6 100644 --- a/docs/html/class-giofilterinputstream.html +++ b/docs/html/class-giofilterinputstream.html @@ -1,11 +1,11 @@ -gio.FilterInputStream

gio.FilterInputStream

gio.FilterInputStream — Filter Input Stream

Synopsis

class gio.FilterInputStream(gio.InputStream):
-    def get_base_stream()
def get_close_base_stream()
def set_close_base_stream(close_base)

Ancestry

+-- gobject.GObject
+gio.FilterInputStream

gio.FilterInputStream

gio.FilterInputStream — Filter Input Stream

Synopsis

class gio.FilterInputStream(gio.InputStream):
+    def get_base_stream()
def get_close_base_stream()
def set_close_base_stream(close_base)

gio.FilterInputStream Properties

"base-stream"Read - Write - Construct onlyThe underlying base stream on which the io ops will be done.
"close-base-stream"Read - Write - Construct onlyIf the base stream should be closed when the filter stream is closed. - Default value: True.

Description

+ Default value: True.

Description

Filter Input Stream. -

Methods

gio.FilterInputStream.get_base_stream

    def get_base_stream()

Returns :

A +

Methods

gio.FilterInputStream.get_base_stream

    def get_base_stream()

Returns :

A gio.InputStream

The get_base_stream() method gets the base diff --git a/docs/html/class-giofilteroutputstream.html b/docs/html/class-giofilteroutputstream.html index a616e35..e8781a5 100644 --- a/docs/html/class-giofilteroutputstream.html +++ b/docs/html/class-giofilteroutputstream.html @@ -1,11 +1,11 @@ -gio.FilterOutputStream

gio.FilterOutputStream

gio.FilterOutputStream — Filter Output Stream

Synopsis

class gio.FilterOutputStream(gio.OutputStream):
-    def get_base_stream()
def get_close_base_stream()
def set_close_base_stream(close_base)

Ancestry

+-- gobject.GObject
+gio.FilterOutputStream

gio.FilterOutputStream

gio.FilterOutputStream — Filter Output Stream

Synopsis

class gio.FilterOutputStream(gio.OutputStream):
+    def get_base_stream()
def get_close_base_stream()
def set_close_base_stream(close_base)

gio.FilterOutputStream Properties

"base-stream"Read - Write - Construct onlyThe underlying base stream on which the io ops will be done.
"close-base-stream"Read - Write - Construct onlyIf the base stream should be closed when the filter stream is closed. - Default value: True.

Description

+ Default value: True.

Description

Filter Output Stream. -

Methods

gio.FilterOutputStream.get_base_stream

    def get_base_stream()

Returns :

A +

Methods

gio.FilterOutputStream.get_base_stream

    def get_base_stream()

Returns :

A gio.OutputStream

The get_base_stream() method gets the base diff --git a/docs/html/class-gioicon.html b/docs/html/class-gioicon.html index cb781b5..4a15c7e 100644 --- a/docs/html/class-gioicon.html +++ b/docs/html/class-gioicon.html @@ -1,19 +1,19 @@ -gio.Icon

gio.Icon

gio.Icon — Interface for icons.

Synopsis

class gio.Icon(gobject.GInterface):
+gio.Icon

gio.Icon

gio.Icon — Interface for icons.

Synopsis

class gio.Icon(gobject.GInterface):
     def equal(icon2)
def to_string()
 Functions
  
-    def gio.icon_new_from_string()

Ancestry

+-- gobject.GInterface
   +-- gio.Icon
-

Known Derived Interfaces

+

Known Derived Interfaces

gio.Icon is required by gio.LoadableIcon. -

Known Implementation

+

Known Implementation

gio.Icon is implemented by gio.ThemedIcon, gio.FileIcon, gio.Emblem, gio.EmblemedIcon. -

Description

+

Description

gio.Icon is a very minimal interface for icons. It provides functions for checking the equality of two icons, hashing of icons and serializing an icon to and from strings. @@ -39,7 +39,7 @@ implementations you need to ensure that each GType is registered with the type system prior to calling gio.icon_new_from_string(). -

Methods

gio.Icon.equal

    def equal(icon2)

icon2 :

the second +

Methods

gio.Icon.equal

    def equal(icon2)

icon2 :

the second gio.Icon

The equal() method checks if two icons are equal. @@ -63,7 +63,7 @@

If icon is a gio.ThemedIcon with exactly one name, the encoding is simply the name (such as network-server). -

Functions

gio.icon_new_from_string

    def icon_new_from_string(str)

str :

A string obtained via +

Functions

gio.icon_new_from_string

    def icon_new_from_string(str)

str :

A string obtained via gio.Icon.to_string().

Returns :

An object implementing the gio.Icon diff --git a/docs/html/class-gioinputstream.html b/docs/html/class-gioinputstream.html index a411cff..7a4ee27 100644 --- a/docs/html/class-gioinputstream.html +++ b/docs/html/class-gioinputstream.html @@ -1,7 +1,7 @@ -gio.InputStream

gio.InputStream

gio.InputStream — Base class for implementing streaming input

Synopsis

class gio.InputStream(gobject.GObject):
-    def clear_pending()
def close(cancellable=None)
def close_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def close_finish(result)
def has_pending()
def is_closed()
def read(count=-1, cancellable=None)
def read_async(count, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_finish(result)
def read_part(count=-1, cancellable=None)
def set_pending()
def skip(count, cancellable=None)
def skip_async(count, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def skip_finish(result)

Ancestry

+-- gobject.GObject
+gio.InputStream

gio.InputStream

gio.InputStream — Base class for implementing streaming input

Synopsis

class gio.InputStream(gobject.GObject):
+    def clear_pending()
def close(cancellable=None)
def close_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def close_finish(result)
def has_pending()
def is_closed()
def read(count=-1, cancellable=None)
def read_async(count, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def read_finish(result)
def read_part(count=-1, cancellable=None)
def set_pending()
def skip(count, cancellable=None)
def skip_async(count, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def skip_finish(result)

Description

+

Description

gio.InputStream has functions to read from a stream ( gio.InputStream.read() @@ -16,7 +16,7 @@ gio.OutputStream.splice().

All of these functions have async variants too. -

Methods

gio.InputStream.clear_pending

    def clear_pending()

+

Methods

gio.InputStream.clear_pending

    def clear_pending()

The clear_pending() method clears the pending flag on stream.

gio.InputStream.close

    def close(cancellable=None)

cancellable :

optional gio.Cancellable diff --git a/docs/html/class-gioloadableicon.html b/docs/html/class-gioloadableicon.html index 8ac9dff..8f84331 100644 --- a/docs/html/class-gioloadableicon.html +++ b/docs/html/class-gioloadableicon.html @@ -1,18 +1,18 @@ -gio.LoadableIcon

gio.LoadableIcon

gio.LoadableIcon — Interface for icons.

Synopsis

class gio.LoadableIcon(gobject.GInterface):
-    def load(size=0, cancellable=None)
def load_async(callback, size=0, cancellable=None, user_data=None)
def load_finish(res)

Ancestry

+-- gobject.GInterface
+gio.LoadableIcon

gio.LoadableIcon

gio.LoadableIcon — Interface for icons.

Synopsis

class gio.LoadableIcon(gobject.GInterface):
+    def load(size=0, cancellable=None)
def load_async(callback, size=0, cancellable=None, user_data=None)
def load_finish(res)

Prerequisites

+

Prerequisites

gio.LoadableIcon requires gio.Icon. and gobject.GObject -

Known Implementation

+

Known Implementation

gio.LoadableIcon is implemented by gio.FileIcon -

Description

+

Description

gio.LoadableIcon extends the gio.Icon interface and adds the ability to load icons from streams. -

Methods

gio.LoadableIcon.load

    def load(size=0, cancellable=None)

size :

an integer +

Methods

gio.LoadableIcon.load

    def load(size=0, cancellable=None)

size :

an integer

cancellable :

optional gio.Cancellable object, None to ignore. diff --git a/docs/html/class-giomemoryinputstream.html b/docs/html/class-giomemoryinputstream.html index 534dc24..5068dea 100644 --- a/docs/html/class-giomemoryinputstream.html +++ b/docs/html/class-giomemoryinputstream.html @@ -1,15 +1,15 @@ -gio.MemoryInputStream

gio.MemoryInputStream

gio.MemoryInputStream — Base class for implementing streaming input

Synopsis

class gio.MemoryInputStream(gio.InputStream):
+gio.MemoryInputStream

gio.MemoryInputStream

gio.MemoryInputStream — Base class for implementing streaming input

Synopsis

class gio.MemoryInputStream(gio.InputStream):
     gio.MemoryInputStream()
def add_data(data)
 Functions
  
-    def gio.memory_input_stream_new_from_data(data)

Implemented Interfaces

+

Implemented Interfaces

gio.MemoryInputStream implements gio.Seekable -

Description

+

Description

gio.MemoryInputStream is a class for using arbitrary memory chunks as input for GIO streaming input operations.

Constructor

    gio.MemoryInputStream(icon)

Returns :

a new @@ -17,11 +17,11 @@

Creates an empty gio.MemoryInputStream. -

Methods

gio.MemoryInputStream.add_data

    def add_data(data)

data :

input data. +

Methods

gio.MemoryInputStream.add_data

    def add_data(data)

data :

input data.

The add_data() method appends data to data that can be read from the input stream -

Functions

gio.memory_input_stream_new_from_data

    def memory_input_stream_new_from_data(data)

data :

input data. +

Functions

gio.memory_input_stream_new_from_data

    def memory_input_stream_new_from_data(data)

data :

input data.

Returns :

A new gio.MemoryInputStream read from data diff --git a/docs/html/class-giomemoryoutputstream.html b/docs/html/class-giomemoryoutputstream.html index d272b48..115bba7 100644 --- a/docs/html/class-giomemoryoutputstream.html +++ b/docs/html/class-giomemoryoutputstream.html @@ -1,12 +1,12 @@ -gio.MemoryOutputStream

gio.MemoryOutputStream

gio.MemoryOutputStream — Streaming output operations on memory chunks

Synopsis

class gio.MemoryOutputStream(gio.OutputStream):
-    gio.MemoryOutputStream()
def get_contents()
def get_data_size()
def get_size()

Ancestry

+-- gobject.GObject
+gio.MemoryOutputStream

gio.MemoryOutputStream

gio.MemoryOutputStream — Streaming output operations on memory chunks

Synopsis

class gio.MemoryOutputStream(gio.OutputStream):
+    gio.MemoryOutputStream()
def get_contents()
def get_data_size()
def get_size()

Implemented Interfaces

+

Implemented Interfaces

gio.MemoryOutputStream implements gio.Seekable -

Description

+

Description

gio.MemoryOutputStream is a class for using arbitrary memory chunks as output for GIO streaming output operations.

Constructor

    gio.MemoryOutputStream()

Returns :

a new @@ -14,7 +14,7 @@

Creates a new gio.MemoryOutputStream. -

Methods

gio.MemoryOutputStream.get_contents

    def get_contents()

Returns :

the stream's data +

Methods

gio.MemoryOutputStream.get_contents

    def get_contents()

Returns :

the stream's data

The get_contents() method gets any loaded data from the ostream. diff --git a/docs/html/class-giomount.html b/docs/html/class-giomount.html index f05f9a0..574ebfd 100644 --- a/docs/html/class-giomount.html +++ b/docs/html/class-giomount.html @@ -1,10 +1,10 @@ -gio.Mount

gio.Mount

gio.Mount — Mount management

Synopsis

class gio.Mount(gobject.GInterface):
-    def can_eject()
def can_unmount()
def eject(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def eject_finish(result)
def get_drive()
def get_icon()
def get_name()
def get_root()
def get_uuid()
def get_volume()
def guess_content_type(callback, force_rescan, cancellable=None, user_data=None)
def guess_content_type_finish(result)
def guess_content_type_sync(force_rescan, cancellable=None)
def is_shadowed()
def remount(callback, flags=gio.MOUNT_UNMOUNT_NONE, mount_operation=None, cancellable=None, user_data=None)
def remount_finish(result)
def shadow()
def unmount(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def unmount_finish(result)
def unshadow()

Ancestry

+-- gobject.GInterface
+gio.Mount

gio.Mount

gio.Mount — Mount management

Synopsis

class gio.Mount(gobject.GInterface):
+    def can_eject()
def can_unmount()
def eject(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def eject_finish(result)
def get_drive()
def get_icon()
def get_name()
def get_root()
def get_uuid()
def get_volume()
def guess_content_type(callback, force_rescan, cancellable=None, user_data=None)
def guess_content_type_finish(result)
def guess_content_type_sync(force_rescan, cancellable=None)
def is_shadowed()
def remount(callback, flags=gio.MOUNT_UNMOUNT_NONE, mount_operation=None, cancellable=None, user_data=None)
def remount_finish(result)
def shadow()
def unmount(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def unmount_finish(result)
def unshadow()

Ancestry

+-- gobject.GInterface
   +-- gio.Mount
-

Prerequisites

+

Prerequisites

gio.Mount requires gobject.GObject -

gio.Mount Signal Prototypes

gobject.GObject Signal Prototypes

"aborted"

def callback(mount, user_param1, ...)

"changed"

def callback(mount, user_param1, ...)

"unmounted"

def callback(mount, user_param1, ...)

Description

+

gio.Mount Signal Prototypes

gobject.GObject Signal Prototypes

"aborted"

def callback(mount, user_param1, ...)

"changed"

def callback(mount, user_param1, ...)

"unmounted"

def callback(mount, user_param1, ...)

Description

The gio.Mount interface represents user-visible mounts. Note, when porting from GnomeVFS, gio.Mount @@ -28,7 +28,7 @@ with the GMount and the GAsyncReady data to see if the operation was completed successfully. If an error is present when g_mount_unmount_finish() is called, then it will be filled with any error information. -

Methods

gio.Mount.can_eject

    def can_eject()

Returns :

True if the mount can be ejected, +

Methods

gio.Mount.can_eject

    def can_eject()

Returns :

True if the mount can be ejected, False otherwise.

The can_eject() method checks if a mount can be ejected. @@ -221,7 +221,7 @@ gio.Mount.is_shadowed() for more information. The caller will need to emit the "changed" signal on mount manually. -

Signals

The "aborted" gio.Mount Signal

    def callback(mount, user_param1, ...)

mount :

the mount

user_param1 :

the first user parameter (if any) specified +

Signals

The "aborted" gio.Mount Signal

    def callback(mount, user_param1, ...)

mount :

the mount

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Emitted by the backend when e.g. a device becomes unavailable while a diff --git a/docs/html/class-giomountoperation.html b/docs/html/class-giomountoperation.html index 8d65a41..fddc13b 100644 --- a/docs/html/class-giomountoperation.html +++ b/docs/html/class-giomountoperation.html @@ -1,5 +1,5 @@ -gio.MountOperation

gio.MountOperation

gio.MountOperation — Authentication methods for mountable locations.

Synopsis

class gio.MountOperation(gobject.GObject):
-    gio.MountOperation()
def get_anonymous()
def get_choice()
def get_domain()
def get_password()
def get_password_save()
def get_username()
def replay(result)
def set_anonymous(anonymous)
def set_choice(choice)
def set_domain(domain)
def set_password(password)
def set_password_save(save)
def set_username(username)

Ancestry

+-- gobject.GObject
+gio.MountOperation

gio.MountOperation

gio.MountOperation — Authentication methods for mountable locations.

Synopsis

class gio.MountOperation(gobject.GObject):
+    gio.MountOperation()
def get_anonymous()
def get_choice()
def get_domain()
def get_password()
def get_password_save()
def get_username()
def replay(result)
def set_anonymous(anonymous)
def set_choice(choice)
def set_domain(domain)
def set_password(password)
def set_password_save(save)
def set_username(username)

gio.MountOperation Properties

"anonymous"Read/Write Whether to use an anonymous user when authenticating. @@ -19,7 +19,7 @@
"username"Read/Write The user name that is used for authentication when carrying out the mount operation. Default value: None -

gio.MountOperation Signal Prototypes

gobject.GObject Signal Prototypes

"aborted"

def callback(mountoperation, user_param1, ...)

"ask-password"

def callback(mountoperation, message, default_user, default_domain, flags, user_param1, ...)

"ask-question"

def callback(mountoperation, message, choices, user_param1, ...)

"reply"

def callback(mountoperation, result, user_param1, ...)

Description

+

gio.MountOperation Signal Prototypes

gobject.GObject Signal Prototypes

"aborted"

def callback(mountoperation, user_param1, ...)

"ask-password"

def callback(mountoperation, message, default_user, default_domain, flags, user_param1, ...)

"ask-question"

def callback(mountoperation, message, choices, user_param1, ...)

"reply"

def callback(mountoperation, result, user_param1, ...)

Description

The gio.MountOperation provides a mechanism for authenticating mountable operations, such as loop mounting files, hard drive partitions or server locations. @@ -37,7 +37,7 @@ gio.MountOperation.

Creates a new mount operation. -

Methods

gio.MountOperation.get_anonymous

    def get_anonymous()

Returns :

True if mount operation is anonymous. +

Methods

gio.MountOperation.get_anonymous

    def get_anonymous()

Returns :

True if mount operation is anonymous.

The get_anonymous() method check to see whether the mount operation is being used for an anonymous user @@ -92,7 +92,7 @@

The set_anonymous() method sets the user name within op to username. -

Signals

The "aborted" gio.MountOperation Signal

    def callback(mountoperation, user_param1, ...)

mountoperation :

the mountoperation

user_param1 :

the first user parameter (if any) specified +

Signals

The "aborted" gio.MountOperation Signal

    def callback(mountoperation, user_param1, ...)

mountoperation :

the mountoperation

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress. diff --git a/docs/html/class-giooutputstream.html b/docs/html/class-giooutputstream.html index 8145d1f..d4df1ab 100644 --- a/docs/html/class-giooutputstream.html +++ b/docs/html/class-giooutputstream.html @@ -1,7 +1,7 @@ -gio.OutputStream

gio.OutputStream

gio.OutputStream — Base class for implementing streaming input

Synopsis

class gio.OutputStream(gobject.GObject):
-    def clear_pending()
def close(cancellable=None)
def close_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def close_finish(result)
def flush(cancellable=None)
def flush_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def flush_finish(result)
def has_pending()
def is_closed()
def set_pending()
def splice(cancellable=None, flags=gio.OUTPUT_STREAM_SPLICE_NONE)
def splice_async(source, callback, flags=gio.OUTPUT_STREAM_SPLICE_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def splice_finish(result)
def write(buffer, cancellable=None)
def write_async(buffer, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def write_finish(result)

Ancestry

+-- gobject.GObject
+gio.OutputStream

gio.OutputStream

gio.OutputStream — Base class for implementing streaming input

Synopsis

class gio.OutputStream(gobject.GObject):
+    def clear_pending()
def close(cancellable=None)
def close_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def close_finish(result)
def flush(cancellable=None)
def flush_async(callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def flush_finish(result)
def has_pending()
def is_closed()
def set_pending()
def splice(cancellable=None, flags=gio.OUTPUT_STREAM_SPLICE_NONE)
def splice_async(source, callback, flags=gio.OUTPUT_STREAM_SPLICE_NONE, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def splice_finish(result)
def write(buffer, cancellable=None)
def write_async(buffer, callback, io_priority=glib.PRIORITY_DEFAULT, cancellable=None, user_data=None)
def write_finish(result)

Description

+

Description

gio.OutputStream has functions to write from a stream ( gio.OutputStream.write() @@ -16,4 +16,4 @@ gio.OutputStream.splice().

All of these functions have async variants too. -

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.

+

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.

diff --git a/docs/html/class-gioseekable.html b/docs/html/class-gioseekable.html index 45fe8c9..e7fdf1b 100644 --- a/docs/html/class-gioseekable.html +++ b/docs/html/class-gioseekable.html @@ -1,19 +1,19 @@ -gio.Seekable

gio.Seekable

gio.Seekable — Stream seeking interface.

Synopsis

class gio.Seekable(gobject.GInterface):
-    def tell()
def can_seek()
def seek(offset, type=0, cancellable=None)
def can_truncate()
def truncate(offset, cancellable=None)

Ancestry

+-- gobject.GInterface
+gio.Seekable

gio.Seekable

gio.Seekable — Stream seeking interface.

Synopsis

class gio.Seekable(gobject.GInterface):
+    def tell()
def can_seek()
def seek(offset, type=0, cancellable=None)
def can_truncate()
def truncate(offset, cancellable=None)

Known Implementation

+

Description

+

Description

gio.Seekable is implemented by streams (implementations of gio.InputStream or gio.OutputStream) that support seeking. -

Methods

gio.Seekable.tell

    def tell()

Returns :

+

Methods

gio.Seekable.tell

    def tell()

Returns :

the offset from the beginning of the buffer

Tells the current position within the stream. diff --git a/docs/html/class-giosimpleasyncresult.html b/docs/html/class-giosimpleasyncresult.html index 4e075fe..6119618 100644 --- a/docs/html/class-giosimpleasyncresult.html +++ b/docs/html/class-giosimpleasyncresult.html @@ -1,10 +1,10 @@ -gio.SimpleAsyncResult

gio.SimpleAsyncResult

gio.SimpleAsyncResult — Simple asynchronous results implementation.

Synopsis

class gio.SimpleAsyncResult(gobject.GObject):
-    def complete()
def complete_in_idle()
def get_op_res_gboolean()
def get_op_res_gssize()
def propagate_error()
def set_handle_cancellation(handle_cancellation)
def set_op_res_gboolean(op_res)
def set_op_res_gssize(op_res)

Ancestry

+-- gobject.GObject
+gio.SimpleAsyncResult

gio.SimpleAsyncResult

gio.SimpleAsyncResult — Simple asynchronous results implementation.

Synopsis

class gio.SimpleAsyncResult(gobject.GObject):
+    def complete()
def complete_in_idle()
def get_op_res_gboolean()
def get_op_res_gssize()
def propagate_error()
def set_handle_cancellation(handle_cancellation)
def set_op_res_gboolean(op_res)
def set_op_res_gssize(op_res)

Implemented Interface

+

Implemented Interface

gio.SimpleAsyncResult implements gio.AsyncResult. -

Description

+

Description

Implements gio.AsyncResult for simple cases. Most of the time, this will be all an application needs, and will be used transparently Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions. @@ -49,7 +49,7 @@ gio.SimpleAsyncResult.get_op_res_gboolean() and gio.SimpleAsyncResult.get_op_res_gssize() are provided, getting the operation's result as a gboolean and gssize, respectively. -

Methods

gio.SimpleAsyncResult.complete

    def complete()

+

Methods

gio.SimpleAsyncResult.complete

    def complete()

The complete() 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 diff --git a/docs/html/class-giothemedicon.html b/docs/html/class-giothemedicon.html index fa8b182..83d24de 100644 --- a/docs/html/class-giothemedicon.html +++ b/docs/html/class-giothemedicon.html @@ -1,5 +1,5 @@ -gio.ThemedIcon

gio.ThemedIcon

gio.ThemedIcon — Icon theming support.

Synopsis

class gio.ThemedIcon(gobject.GObject):
-    gio.ThemedIcon()
def append_name()
def get_names()
def prepend_name()

Ancestry

+-- gobject.GObject
+gio.ThemedIcon

gio.ThemedIcon

gio.ThemedIcon — Icon theming support.

Synopsis

class gio.ThemedIcon(gobject.GObject):
+    gio.ThemedIcon()
def append_name()
def get_names()
def prepend_name()

gio.ThemedIcon Properties

"name"Write/Contruct Only The icon name. Default value: None @@ -9,7 +9,7 @@ Whether to use the default fallbacks found by shortening the icon name at '-' characters. If the "names" array has more than one element, ignores any past the first. -

Description

+

Description

gio.ThemedIcon is an implementation of gio.Icon that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon @@ -27,7 +27,7 @@ Creates a new themed icon from icon name, if instead of an icon name you provide a list of icon names, the gio.ThemedIcon will be constructed using the items in the list. -

Methods

gio.ThemedIcon.append_name

    def append_name()

name :

name of icon to append to list of icons from within icon. +

Methods

gio.ThemedIcon.append_name

    def append_name()

name :

name of icon to append to list of icons from within icon.

The append_name() method appends a name to the list of icons from within icon. diff --git a/docs/html/class-giounixinputstream.html b/docs/html/class-giounixinputstream.html index bcb3a3b..4059661 100644 --- a/docs/html/class-giounixinputstream.html +++ b/docs/html/class-giounixinputstream.html @@ -1,9 +1,9 @@ -gio.unix.InputStream

gio.unix.InputStream

gio.unix.InputStream — Streaming input operations for UNIX file descriptors.

Synopsis

class gio.unix.InputStream(gio.InputStream):
-    gio.unix.InputStream(fd, close_fd)
def get_close_fd()
def get_fd()
def set_close_fd(close_fd)

Ancestry

+-- gobject.GObject
+gio.unix.InputStream

gio.unix.InputStream

gio.unix.InputStream — Streaming input operations for UNIX file descriptors.

Synopsis

class gio.unix.InputStream(gio.InputStream):
+    gio.unix.InputStream(fd, close_fd)
def get_close_fd()
def get_fd()
def set_close_fd(close_fd)

gio.unix.InputStream Properties

"close-fd"Read - WriteWhether to close the file descriptor when the stream is closed. - Default value: True.
"fd"Read - Write - Construct onlyThe file descriptor that the stream reads from. Default value: -1.

Description

+ Default value: True.

"fd"Read - Write - Construct onlyThe file descriptor that the stream reads from. Default value: -1.

Description

gio.unix.InputStream implements gio.InputStream for reading from a UNIX file descriptor, including asynchronous operations. @@ -22,7 +22,7 @@ from the given fd.

If close_fd is True, the file descriptor will be closed when the stream is closed. -

Methods

gio.unix.InputStream.get_close_fd

    def get_close_fd()

Returns :

True if the file descriptor is closed when done. +

Methods

gio.unix.InputStream.get_close_fd

    def get_close_fd()

Returns :

True if the file descriptor is closed when done.

The get_close_fd() method returns whether the file descriptor of stream will be closed when the stream is closed. diff --git a/docs/html/class-giounixoutputstream.html b/docs/html/class-giounixoutputstream.html index ec88f35..8b9b647 100644 --- a/docs/html/class-giounixoutputstream.html +++ b/docs/html/class-giounixoutputstream.html @@ -1,9 +1,9 @@ -gio.unix.OutputStream

gio.unix.OutputStream

gio.unix.OutputStream — Streaming output operations for UNIX file descriptors.

Synopsis

class gio.unix.OutputStream(gio.OutputStream):
-    gio.unix.OutputStream(fd, close_fd)
def get_close_fd()
def get_fd()
def set_close_fd(close_fd)

Ancestry

+-- gobject.GObject
+gio.unix.OutputStream

gio.unix.OutputStream

gio.unix.OutputStream — Streaming output operations for UNIX file descriptors.

Synopsis

class gio.unix.OutputStream(gio.OutputStream):
+    gio.unix.OutputStream(fd, close_fd)
def get_close_fd()
def get_fd()
def set_close_fd(close_fd)

gio.unix.OutputStream Properties

"close-fd"Read - WriteWhether to close the file descriptor when the stream is closed. - Default value: True.
"fd"Read - Write - Construct onlyThe file descriptor that the stream writes to. Default value: -1.

Description

+ Default value: True.

"fd"Read - Write - Construct onlyThe file descriptor that the stream writes to. Default value: -1.

Description

gio.unix.OutputStream implements gio.OutputStream for writing to a UNIX file descriptor, including asynchronous operations. @@ -22,7 +22,7 @@ from the given fd.

If close_fd is True, the file descriptor will be closed when the stream is closed. -

Methods

gio.unix.OutputStream.get_close_fd

    def get_close_fd()

Returns :

True if the file descriptor is closed when done. +

Methods

gio.unix.OutputStream.get_close_fd

    def get_close_fd()

Returns :

True if the file descriptor is closed when done.

The get_close_fd() method returns whether the file descriptor of stream will be closed when the stream is closed. diff --git a/docs/html/class-giovolume.html b/docs/html/class-giovolume.html index 5070819..ff6512a 100644 --- a/docs/html/class-giovolume.html +++ b/docs/html/class-giovolume.html @@ -1,10 +1,10 @@ -gio.Volume

gio.Volume

gio.Volume — Volume management.

Synopsis

class gio.Volume(gobject.GInterface):
-    def can_eject()
def can_mount()
def eject(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def eject_finish(result)
def enumerate_identifiers()
def get_activation_root()
def get_drive()
def get_icon()
def get_identifier()
def get_mount()
def get_name()
def get_uuid()
def mount(mount_operation, callback, flags=gio.MOUNT_MOUNT_NONE, cancellable=None, user_data=None)
def mount_finish(result)
def should_automount()

Ancestry

+-- gobject.GInterface
+gio.Volume

gio.Volume

gio.Volume — Volume management.

Synopsis

class gio.Volume(gobject.GInterface):
+    def can_eject()
def can_mount()
def eject(callback, flags=gio.MOUNT_UNMOUNT_NONE, cancellable=None, user_data=None)
def eject_finish(result)
def enumerate_identifiers()
def get_activation_root()
def get_drive()
def get_icon()
def get_identifier()
def get_mount()
def get_name()
def get_uuid()
def mount(mount_operation, callback, flags=gio.MOUNT_MOUNT_NONE, cancellable=None, user_data=None)
def mount_finish(result)
def should_automount()

Ancestry

+-- gobject.GInterface
   +-- gio.Volume
-

Prerequisites

+

Prerequisites

gio.Volume requires gobject.GObject -

gio.Volume Signal Prototypes

gobject.GObject Signal Prototypes

"changed"

def callback(volume, user_param1, ...)

"removed"

def callback(volume, user_param1, ...)

Description

+

gio.Volume Signal Prototypes

gobject.GObject Signal Prototypes

"changed"

def callback(volume, user_param1, ...)

"removed"

def callback(volume, user_param1, ...)

Description

The gio.Volume interface represents user-visible objects that can be mounted. Note, when porting from GnomeVFS, gio.Volume @@ -39,7 +39,7 @@ "hal-udi", "label", etc. Use gio.Volume.get_identifier() to obtain an identifier for a volume. -

Methods

gio.Volume.can_eject

    def can_eject()

Returns :

True if the volume can be ejected, +

Methods

gio.Volume.can_eject

    def can_eject()

Returns :

True if the volume can be ejected, False otherwise.

The can_eject() method checks if a volume can be ejected. @@ -162,7 +162,7 @@ volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mo

The should_automount() method returns whether the volume should be automatically mounted. -

Signals

The "changed" gio.Volume Signal

    def callback(volume, user_param1, ...)

volume :

the volume

user_param1 :

the first user parameter (if any) specified +

Signals

The "changed" gio.Volume Signal

    def callback(volume, user_param1, ...)

volume :

the volume

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Emitted when the volume has been changed. diff --git a/docs/html/class-giovolumemonitor.html b/docs/html/class-giovolumemonitor.html index e8ea03f..bd59ccc 100644 --- a/docs/html/class-giovolumemonitor.html +++ b/docs/html/class-giovolumemonitor.html @@ -1,13 +1,13 @@ -gio.VolumeMonitor

gio.VolumeMonitor

gio.VolumeMonitor — Volume Monitor.

Synopsis

class gio.VolumeMonitor(gobject.GObject):
+gio.VolumeMonitor

gio.VolumeMonitor

gio.VolumeMonitor — Volume Monitor.

Synopsis

class gio.VolumeMonitor(gobject.GObject):
     def get_connected_drives()
def get_mount_for_uuid(uuid)
def get_mounts()
def get_volume_for_uuid(uuid)
def get_volumes()
 Functions
-    def gio.volume_monitor_adopt_orphan_mount()
def gio.volume_monitor_get()

gio.VolumeMonitor Signal Prototypes

gobject.GObject Signal Prototypes

"drive-changed"

def callback(volume_monitor, drive, user_param1, ...)

"drive-connected"

def callback(volume_monitor, drive, user_param1, ...)

"drive-disconnected"

def callback(volume_monitor, drive, user_param1, ...)

"drive-eject-button"

def callback(volume_monitor, drive, user_param1, ...)

"mount-added"

def callback(volume_monitor, mount, user_param1, ...)

"mount-changed"

def callback(volume_monitor, mount, user_param1, ...)

"mount-pre-unmount"

def callback(volume_monitor, mount, user_param1, ...)

"mount-removed"

def callback(volume_monitor, mount, user_param1, ...)

"volume-added"

def callback(volume_monitor, volume, user_param1, ...)

"volume-changed"

def callback(volume_monitor, volume, user_param1, ...)

"volume-removed"

def callback(volume_monitor, volume, user_param1, ...)

Description

+

gio.VolumeMonitor Signal Prototypes

gobject.GObject Signal Prototypes

"drive-changed"

def callback(volume_monitor, drive, user_param1, ...)

"drive-connected"

def callback(volume_monitor, drive, user_param1, ...)

"drive-disconnected"

def callback(volume_monitor, drive, user_param1, ...)

"drive-eject-button"

def callback(volume_monitor, drive, user_param1, ...)

"mount-added"

def callback(volume_monitor, mount, user_param1, ...)

"mount-changed"

def callback(volume_monitor, mount, user_param1, ...)

"mount-pre-unmount"

def callback(volume_monitor, mount, user_param1, ...)

"mount-removed"

def callback(volume_monitor, mount, user_param1, ...)

"volume-added"

def callback(volume_monitor, volume, user_param1, ...)

"volume-changed"

def callback(volume_monitor, volume, user_param1, ...)

"volume-removed"

def callback(volume_monitor, volume, user_param1, ...)

Description

The gio.VolumeMonitor 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. -

Methods

gio.VolumeMonitor.get_connected_drives

    def get_connected_drives()

Returns :

a list of connected +

Methods

gio.VolumeMonitor.get_connected_drives

    def get_connected_drives()

Returns :

a list of connected gio.Drive objects.

The get_connected_drives() method gets a list @@ -40,7 +40,7 @@ objects.

The get_volumes() method gets a list of the volumes on the system. -

Functions

gio.volume_monitor_adopt_orphan_mount

    def volume_monitor_adopt_orphan_mount()

Returns :

The gio.Volume +

Functions

gio.volume_monitor_adopt_orphan_mount

    def volume_monitor_adopt_orphan_mount()

Returns :

The gio.Volume object that is the parent for mount or None if no wants to adopt the gio.Mount.

Warning

This method will be deprecated starting from GIO 2.20

@@ -88,7 +88,7 @@

The volume_monitor_get() function gets the volume monitor used by gio. -

Signals

The "drive-changed" gio.Volume Signal

    def callback(volume_monitor, drive, user_param1, ...)

volume_monitor :

the volume monitor

drive :

the drive that changed

user_param1 :

the first user parameter (if any) specified +

Signals

The "drive-changed" gio.Volume Signal

    def callback(volume_monitor, drive, user_param1, ...)

volume_monitor :

the volume monitor

drive :

the drive that changed

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Emitted when a drive changes. diff --git a/docs/html/class-glibmaincontext.html b/docs/html/class-glibmaincontext.html index 30015db..9f815f6 100644 --- a/docs/html/class-glibmaincontext.html +++ b/docs/html/class-glibmaincontext.html @@ -1,7 +1,7 @@ glib.MainContext

glib.MainContext

glib.MainContext — an object representing a set of event sources to be handled -in a glib.MainLoop.

Synopsis

class glib.MainContext:
-    glib.MainContext()
def iteration(may_block)
def pending()

Ancestry

+-- glib.MainContext
-

Description

A glib.MainContext +in a glib.MainLoop.

Synopsis

class glib.MainContext:
+    glib.MainContext()
def iteration(may_block)
def pending()

Ancestry

+-- glib.MainContext
+

Description

A glib.MainContext 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 GTK and PyGTK though @@ -13,7 +13,7 @@ events from lower priority sources. Single iterations of a iteration() method.

Constructor

    glib.MainContext()

Returns :

a new glib.MainContext object.

Creates a new glib.MainContext -object.

Methods

glib.MainContext.iteration

    def iteration()

may_block :

if True the call may block +object.

Methods

glib.MainContext.iteration

    def iteration()

may_block :

if True the call may block waiting for an event.

Returns :

True if events were dispatched.

The iteration() method runs a single iteration. This involves:

  • 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 6a074f6..f5ba208 100644 --- a/docs/html/class-glibmainloop.html +++ b/docs/html/class-glibmainloop.html @@ -1,7 +1,7 @@ glib.MainLoop

    glib.MainLoop

    glib.MainLoop — an object representing the main event loop of a PyGTK - application.

    Synopsis

    class glib.MainLoop:
    -    glib.MainLoop(context=None, is_running=0)
    def get_context()
    def is_running()
    def quit()
    def run()

    Ancestry

    +-- glib.MainLoop
    -

    Description

    glib.MainLoop + application.

    Synopsis

    class glib.MainLoop:
    +    glib.MainLoop(context=None, is_running=0)
    def get_context()
    def is_running()
    def quit()
    def run()

    Ancestry

    +-- glib.MainLoop
    +

    Description

    glib.MainLoop represents a main event loop. A glib.MainLoop is created with the glib.MainLoop() constructor. After adding the initial event sources, the run() @@ -24,7 +24,7 @@ functions.

Returns :

a new glib.MainLoop object.

Creates a new glib.MainLoop -object.

Methods

glib.MainLoop.get_context

    def get_context()

Returns :

the glib.MainContext +object.

Methods

glib.MainLoop.get_context

    def get_context()

Returns :

the glib.MainContext the mainloop is associated with

The get_context() method returns the glib.MainContext that the mainloop was created with.

glib.MainLoop.is_running

    def is_running()

Returns :

True if the mainloop is diff --git a/docs/html/class-gobject.html b/docs/html/class-gobject.html index d4c7603..1a71df7 100644 --- a/docs/html/class-gobject.html +++ b/docs/html/class-gobject.html @@ -1,6 +1,6 @@ -gobject.GObject

gobject.GObject

gobject.GObject — the base class

Synopsis

class gobject.GObject:
-    def get_property(property_name)
def get_properties(first_property_name, ...)
def set_property(property_name, value)
def set_properties(property_name=value, ...)
def freeze_notify()
def notify(property_name)
def thaw_notify()
def get_data(key)
def set_data(key, data)
def connect(detailed_signal, handler)
def connect_after(detailed_signal, handler)
def connect_object(detailed_signal, handler)
def connect_object_after(detailed_signal, handler)
def disconnect(handler_id)
def handler_disconnect(handler_id)
def handler_is_connected(handler_id)
def handler_block(handler_id)
def handler_unblock(handler_id)
def handler_block_by_func(callable)
def handler_unblock_by_func(callable)
def emit(detailed_signal)
def stop_emission(detailed_signal)
def emit_stop_by_name(detailed_signal)
def chain()

Ancestry

+-- gobject.GObject
-

Attributes

"props"Read/Write +gobject.GObject

gobject.GObject

gobject.GObject — the base class

Synopsis

class gobject.GObject:
+    def get_property(property_name)
def get_properties(first_property_name, ...)
def set_property(property_name, value)
def set_properties(property_name=value, ...)
def freeze_notify()
def notify(property_name)
def thaw_notify()
def get_data(key)
def set_data(key, data)
def connect(detailed_signal, handler)
def connect_after(detailed_signal, handler)
def connect_object(detailed_signal, handler)
def connect_object_after(detailed_signal, handler)
def disconnect(handler_id)
def handler_disconnect(handler_id)
def handler_is_connected(handler_id)
def handler_block(handler_id)
def handler_unblock(handler_id)
def handler_block_by_func(callable)
def handler_unblock_by_func(callable)
def emit(detailed_signal)
def stop_emission(detailed_signal)
def emit_stop_by_name(detailed_signal)
def chain()

Ancestry

+-- gobject.GObject
+

Attributes

"props"Read/Write

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.

@@ -17,12 +17,12 @@ button_label = button.get_property(label_pspec.name)
"__doc__"ReadThe documentation for the object type. Uses "__gdoc__" if no specific documentation set.
"__gdoc__"ReadThe generated documentation for the underlying GObject - type.
"__gtype__"ReadThe underlying GObject type.
"__grefcount__"ReadThe reference count for the underlying GObject.

gobject.GObject Signal Prototypes

"notify"

def callback(gobject, property_spec, user_param1, ...)

Description

The gobject.GObject + type.

"__gtype__"ReadThe underlying GObject type.
"__grefcount__"ReadThe reference count for the underlying GObject.

gobject.GObject Signal Prototypes

"notify"

def callback(gobject, property_spec, user_param1, ...)

Description

The gobject.GObject class is the base class providing the common attributes and methods for the PyGTK classes. The gobject.GObject class is not a user interface widget class.

The gobject.GObject class provides the signal management methods, the object property access - methods and the object data management methods.

Methods

gobject.GObject.get_property

    def get_property(property_name)

property_name :

a string containing the property name for the + methods and the object data management methods.

Methods

gobject.GObject.get_property

    def get_property(property_name)

property_name :

a string containing the property name for the GObject

Returns :

a Python object containing the value of the property

The get_property() method returns the value of the property specified by property_name or @@ -161,7 +161,7 @@ still to be run will not be invoked.

emit_stop_by_name() method stops the current emission of the signal specified by detailed_signal. Any signal handlers in the list -still to be run will not be invoked.

gobject.GObject.chain

    def chain(...)

... :

additional parameters

Returns :

a Python object

The chain() method does something.

Signals

The GObject "notify" Signal

    def callback(gobject, property_spec, user_param1, ...)

gobject :

the gobject that received the +still to be run will not be invoked.

gobject.GObject.chain

    def chain(...)

... :

additional parameters

Returns :

a Python object

The chain() method does something.

Signals

The GObject "notify" Signal

    def callback(gobject, property_spec, user_param1, ...)

gobject :

the gobject that received the signal

property_spec :

the gobject.GParamSpec of the property that was changed

user_param1 :

the first user parameter (if any) specified with the connect() diff --git a/docs/html/class-gobjectgboxed.html b/docs/html/class-gobjectgboxed.html index ffc26a7..30b7dc5 100644 --- a/docs/html/class-gobjectgboxed.html +++ b/docs/html/class-gobjectgboxed.html @@ -1,9 +1,9 @@ -gobject.GBoxed

gobject.GBoxed

gobject.GBoxed — an object containing an opaque chunk of data

Synopsis

class gobject.GBoxed:
-    def copy()

Ancestry

+-- gobject.GBoxed
-

Description

gobject.GBoxed +gobject.GBoxed

gobject.GBoxed

gobject.GBoxed — an object containing an opaque chunk of data

Synopsis

class gobject.GBoxed:
+    def copy()

Ancestry

+-- gobject.GBoxed
+

Description

gobject.GBoxed 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 GLIB 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.

Methods

gobject.GBoxed.copy

    def copy()

Returns :

a copy of the gobject.GBoxed +structure - this allows PyGTK to encapsulate these as Python objects.

Methods

gobject.GBoxed.copy

    def copy()

Returns :

a copy of the gobject.GBoxed object

The copy() method makes and returns a copy of the boxed object.

diff --git a/docs/html/class-gobjectginterface.html b/docs/html/class-gobjectginterface.html index 18615a6..5156c43 100644 --- a/docs/html/class-gobjectginterface.html +++ b/docs/html/class-gobjectginterface.html @@ -1,4 +1,4 @@ -gobject.GInterface

gobject.GInterface

gobject.GInterface — an object representing a GInterface

Synopsis

class gobject.GInterface:
-

Ancestry

+-- gobject.GInterface
-

Description

gobject.GInterface +gobject.GInterface

gobject.GInterface

gobject.GInterface — an object representing a GInterface

Synopsis

class gobject.GInterface:
+

Ancestry

+-- gobject.GInterface
+

Description

gobject.GInterface is an abstract base class that encapsulates a GInterface.

diff --git a/docs/html/class-gobjectgpointer.html b/docs/html/class-gobjectgpointer.html index d9294a0..258a160 100644 --- a/docs/html/class-gobjectgpointer.html +++ b/docs/html/class-gobjectgpointer.html @@ -1,7 +1,7 @@ gobject.GPointer

gobject.GPointer

gobject.GPointer — an object containing a completely opaque chunk of - data

Synopsis

class gobject.GPointer:
-

Ancestry

+-- gobject.GPointer
-

Description

gobject.GPointer + data

Synopsis

class gobject.GPointer:
+

Ancestry

+-- gobject.GPointer
+

Description

gobject.GPointer is an abstract base class that encapsulates an opaque chunk of data and registers it with the GLIB type system. A pointer type has no methods and generic ways of copying and freeing the data. It diff --git a/docs/html/gio-constants.html b/docs/html/gio-constants.html index f602c9d..074b1d4 100644 --- a/docs/html/gio-constants.html +++ b/docs/html/gio-constants.html @@ -1,4 +1,4 @@ -gio Constants

gio Constants

gio Constants — the built-in constants of the gio module

Synopsis

+gio Constants

gio Constants

gio Constants — the built-in constants of the gio module

Synopsis

 Gio AppInfo Create Flags Constants
 Gio Ask Password Flags Constants
 Gio Data Stream Byte Order Constants
diff --git a/docs/html/gio-functions.html b/docs/html/gio-functions.html
index 484665b..77a4ff7 100644
--- a/docs/html/gio-functions.html
+++ b/docs/html/gio-functions.html
@@ -1,7 +1,7 @@
-gio Functions

gio Functions

gio Functions

Description

+gio Functions

gio Functions

gio Functions

Description

These functions are part of the PyGObject gio module but are not directly associated with a specific class -

Functions

gio.content_type_can_be_executable

    def content_type_can_be_executable(type)

type :

a content type string. +

Functions

gio.content_type_can_be_executable

    def content_type_can_be_executable(type)

type :

a content type string.

Returns :

True if the file type corresponds to a type that can be executable, False otherwise.

diff --git a/docs/html/glib-constants.html b/docs/html/glib-constants.html index c359b01..4e56956 100644 --- a/docs/html/glib-constants.html +++ b/docs/html/glib-constants.html @@ -1,4 +1,4 @@ -glib Constants

glib Constants

glib Constants — the built-in constants of the glib module

Synopsis

+glib Constants

glib Constants

glib Constants — the built-in constants of the glib module

Synopsis

 Glib IO Condition Constants
 Glib Priority Constants
 Glib Spawn Flag Constants
diff --git a/docs/html/glib-functions.html b/docs/html/glib-functions.html
index 2f267fc..ffb796f 100644
--- a/docs/html/glib-functions.html
+++ b/docs/html/glib-functions.html
@@ -1,6 +1,6 @@
-glib Functions

glib Functions

glib Functions — miscellaneous functions

Synopsis

-    def glib.idle_add(callback, ...)
def glib.timeout_add(interval, callback, ...)
def glib.timeout_add_seconds(interval, callback, ...)
def glib.io_add_watch(fd, condition, callback, ...)
def glib.source_remove(tag)
def glib.main_context_default()
def glib.markup_escape_text(text)
def glib.child_watch_add(pid, function, data=None, priority=glib.PRIORITY_DEFAULT)
def glib.spawn_async(argv, envp=None, working_directory=None, flags=0, child_setup=None, user_data=None, standard_input=None, standard_output=None, standard_error=None)
def glib.get_current_time()
def glib.get_user_cache_dir()
def glib.get_user_config_dir()
def glib.get_user_data_dir()
def glib.get_user_special_dir(directory)
def glib.main_depth()
def glib.threads_init()
def glib.filename_display_name(filename)
def glib.filename_display_basename(filename)
def glib.filename_from_utf8(utf8string)

Description

These functions are part of the PyGObject glib -module but are not directly associated with a specific class.

Functions

glib.idle_add

    def glib.idle_add(callback, ...)

callback :

a function to call when +glib Functions

glib Functions

glib Functions — miscellaneous functions

Synopsis

+    def glib.idle_add(callback, ...)
def glib.timeout_add(interval, callback, ...)
def glib.timeout_add_seconds(interval, callback, ...)
def glib.io_add_watch(fd, condition, callback, ...)
def glib.source_remove(tag)
def glib.main_context_default()
def glib.markup_escape_text(text)
def glib.child_watch_add(pid, function, data=None, priority=glib.PRIORITY_DEFAULT)
def glib.spawn_async(argv, envp=None, working_directory=None, flags=0, child_setup=None, user_data=None, standard_input=None, standard_output=None, standard_error=None)
def glib.get_current_time()
def glib.get_user_cache_dir()
def glib.get_user_config_dir()
def glib.get_user_data_dir()
def glib.get_user_special_dir(directory)
def glib.main_depth()
def glib.threads_init()
def glib.filename_display_name(filename)
def glib.filename_display_basename(filename)
def glib.filename_from_utf8(utf8string)

Description

These functions are part of the PyGObject glib +module but are not directly associated with a specific class.

Functions

glib.idle_add

    def glib.idle_add(callback, ...)

callback :

a function to call when PyGTK is idle

... :

optionals arguments to be passed to callback

Returns :

an integer ID

The glib.idle_add() function adds a function (specified by callback) to be called diff --git a/docs/html/gobject-constants.html b/docs/html/gobject-constants.html index c78649a..6ff3ee5 100644 --- a/docs/html/gobject-constants.html +++ b/docs/html/gobject-constants.html @@ -1,4 +1,4 @@ -gobject Constants

gobject Constants

gobject Constants — the built-in constants of the gobject module

Synopsis

+gobject Constants

gobject Constants

gobject Constants — the built-in constants of the gobject module

Synopsis

 GObject Param Flag Constants
 GObject Signal Flag Constants
 GObject Built-in Type Constants
diff --git a/docs/html/gobject-functions.html b/docs/html/gobject-functions.html
index d59e69d..3853a06 100644
--- a/docs/html/gobject-functions.html
+++ b/docs/html/gobject-functions.html
@@ -1,12 +1,12 @@
-gobject Functions

gobject Functions

gobject Functions — miscellaneous functions

Synopsis

+gobject Functions

gobject Functions

gobject Functions — miscellaneous functions

Synopsis

     def gobject.type_name(type)
def gobject.type_from_name(type_name)
def gobject.type_parent(type)
def gobject.type_is_a(type, parent_type)
def gobject.type_children(type)
def gobject.type_interfaces(type)
def gobject.type_register(class)
def gobject.signal_new(signal_name, type, flags, return_type, param_types)
def gobject.signal_list_names(type)
def gobject.signal_list_ids(type)
def gobject.signal_lookup(name, type)
def gobject.signal_name(signal_id)
def gobject.signal_query(name, type)
def gobject.signal_query(signal_id)
def gobject.list_properties(type)
def gobject.new(type, ...)
def gobject.signal_accumulator_true_handled()
def gobject.add_emission_hook(type, name, callback, ...)
def gobject.remove_emission_hook(type, name, hook_id)
def gobject._install_metaclass(metaclass) -

Description

These functions are part of the PyGTK gobject +

Description

These functions are part of the PyGTK gobject module but are not directly associated with a specific class.

Note

Many functions that previously were in this namespace got moved to glib namespace instead. They are still available in gobject for backward compatibility, but not documented here. If you miss documentation for some function, be sure to check glib first. -

Functions

gobject.type_name

    def gobject.type_name(type)

type :

a GObject type, type ID or +

Functions

gobject.type_name

    def gobject.type_name(type)

type :

a GObject type, type ID or instance

Returns :

The gobject.type_name() function returns the unique name that is assigned to the specified type. type can be a GObject diff --git a/docs/html/index.html b/docs/html/index.html index 05d2596..f5b135d 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -1,4 +1,4 @@ -PyGObject Reference Manual

PyGObject Reference Manual

for PyGObject version 2.28.4

2011-04-18 +PyGObject Reference Manual

PyGObject Reference Manual

for PyGObject version 2.28.6

2011-06-13

Abstract

This reference describes the classes of the python gobject module.


Table of Contents

Introduction
Reference Page Format
PyGlibClass Reference
glib.MainContext — an object representing a set of event sources to be handled in a glib.MainLoop.
glib.MainLoop — an object representing the main event loop of a PyGTK diff --git a/gi/gimodule.c b/gi/gimodule.c index 2c4c335..5ef166f 100644 --- a/gi/gimodule.c +++ b/gi/gimodule.c @@ -475,8 +475,10 @@ _wrap_pyg_variant_type_from_string (PyObject *self, PyObject *args) py_type = _pygi_type_import_by_name ("GLib", "VariantType"); - py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE); - + if (PyType_IsSubtype (py_type, &PyGIBoxed_Type)) + py_variant = _pygi_boxed_new ( (PyTypeObject *) py_type, type_string, FALSE); + else + py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE); return py_variant; } diff --git a/gi/module.py b/gi/module.py index 3e2b59e..70df76c 100644 --- a/gi/module.py +++ b/gi/module.py @@ -24,6 +24,7 @@ from __future__ import absolute_import import os import gobject +import string import gi from .overrides import registry @@ -120,8 +121,14 @@ class IntrospectionModule(object): wrapper.__info__ = info wrapper.__module__ = 'gi.repository.' + info.get_namespace() + # Don't use upper() here to avoid locale specific + # identifier conversion (e. g. in Turkish 'i'.upper() == 'i') + # see https://bugzilla.gnome.org/show_bug.cgi?id=649165 + ascii_upper_trans = string.maketrans( + 'abcdefgjhijklmnopqrstuvwxyz', + 'ABCDEFGJHIJKLMNOPQRSTUVWXYZ') for value_info in info.get_values(): - value_name = value_info.get_name().upper() + 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: @@ -150,7 +157,9 @@ class IntrospectionModule(object): elif isinstance(info, (StructInfo, UnionInfo)): if g_type.is_a(gobject.TYPE_BOXED): bases = (Boxed,) - elif g_type.is_a(gobject.TYPE_POINTER) or g_type == gobject.TYPE_NONE: + elif g_type.is_a(gobject.TYPE_POINTER) or \ + g_type == gobject.TYPE_NONE or \ + g_type.fundamental == g_type: bases = (Struct,) else: raise TypeError("unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name())) diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py index ad9f235..2caf205 100644 --- a/gi/overrides/GLib.py +++ b/gi/overrides/GLib.py @@ -25,6 +25,17 @@ 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 = { @@ -41,7 +52,8 @@ 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': GLib.Variant.new_variant, + 'v': _create_variant, } def _create(self, format, args): diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py index e346f55..7b86e1f 100644 --- a/gi/overrides/Gdk.py +++ b/gi/overrides/Gdk.py @@ -39,6 +39,9 @@ class Color(Gdk.Color): def __new__(cls, *args, **kwargs): return Gdk.Color.__new__(cls) + def __eq__(self, other): + return self.equal(other) + def __repr__(self): return '' % (self.red, self.green, self.blue) @@ -57,6 +60,9 @@ if Gdk._version == '3.0': def __new__(cls, *args, **kwargs): return Gdk.RGBA.__new__(cls) + def __eq__(self, other): + return self.equal(other) + def __repr__(self): return '' % (self.red, self.green, self.blue, self.alpha) diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c index ad02ff7..a9b5b60 100644 --- a/gi/pygi-argument.c +++ b/gi/pygi-argument.c @@ -1084,15 +1084,15 @@ array_success: } arg.v_pointer = closure; + } else if (g_struct_info_is_foreign (info)) { + PyObject *result; + result = pygi_struct_foreign_convert_to_g_argument ( + object, info, transfer, &arg); } else if (g_type_is_a (type, G_TYPE_BOXED)) { arg.v_pointer = pyg_boxed_get (object, void); if (transfer == GI_TRANSFER_EVERYTHING) { arg.v_pointer = g_boxed_copy (type, arg.v_pointer); } - } else if ( (type == G_TYPE_NONE) && (g_struct_info_is_foreign (info))) { - PyObject *result; - result = pygi_struct_foreign_convert_to_g_argument ( - object, type_info, transfer, &arg); } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) { g_warn_if_fail (!g_type_info_is_pointer (type_info) || transfer == GI_TRANSFER_NOTHING); arg.v_pointer = pyg_pointer_get (object, void); @@ -1581,7 +1581,7 @@ _pygi_argument_to_object (GIArgument *arg, if (g_type_is_a (type, G_TYPE_VALUE)) { object = pyg_value_as_pyobject (arg->v_pointer, FALSE); } else if (g_struct_info_is_foreign (info)) { - object = pygi_struct_foreign_convert_from_g_argument (type_info, arg->v_pointer); + object = pygi_struct_foreign_convert_from_g_argument (info, arg->v_pointer); } else if (g_type_is_a (type, G_TYPE_BOXED)) { PyObject *py_type; diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c index 56ddc8b..35281a2 100644 --- a/gi/pygi-closure.c +++ b/gi/pygi-closure.c @@ -35,6 +35,9 @@ _pygi_closure_assign_pyobj_to_out_argument (gpointer out_arg, PyObject *object, GIArgument arg = _pygi_argument_from_object (object, type_info, transfer); GITypeTag type_tag = g_type_info_get_tag (type_info); + if (out_arg == NULL) + return; + switch (type_tag) { case GI_TYPE_TAG_BOOLEAN: *((gboolean *) out_arg) = arg.v_boolean; @@ -250,12 +253,9 @@ _pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args, error: Py_CLEAR (*py_args); - - if (*out_args != NULL) - g_free (*out_args); - - if (g_args != NULL) - g_free (g_args); + g_free (*out_args); + *out_args = NULL; + g_free (g_args); return FALSE; } @@ -364,8 +364,7 @@ _pygi_closure_handle (ffi_cif *cif, _pygi_closure_set_out_arguments (closure->info, retval, out_args, result); end: - if (out_args != NULL) - g_free (out_args); + g_free (out_args); g_base_info_unref ( (GIBaseInfo*) return_type); PyGILState_Release (state); diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c index 0264b71..e332a22 100644 --- a/gi/pygi-foreign-cairo.c +++ b/gi/pygi-foreign-cairo.c @@ -37,9 +37,9 @@ Pycairo_CAPI_t *Pycairo_CAPI; #include PyObject * -cairo_context_to_arg (PyObject *value, - GITypeInfo *type_info, - GITransfer transfer, +cairo_context_to_arg (PyObject *value, + GIInterfaceInfo *iface_info, + GITransfer transfer, GIArgument *arg) { cairo_t *cr; @@ -56,7 +56,8 @@ cairo_context_to_arg (PyObject *value, } PyObject * -cairo_context_from_arg (GITypeInfo *type_info, gpointer data) +cairo_context_from_arg (GIInterfaceInfo *iface_info, + gpointer data) { cairo_t *context = (cairo_t*) data; @@ -75,9 +76,9 @@ cairo_context_release (GIBaseInfo *base_info, PyObject * -cairo_surface_to_arg (PyObject *value, - GITypeInfo *type_info, - GITransfer transfer, +cairo_surface_to_arg (PyObject *value, + GIInterfaceInfo *iface_info, + GITransfer transfer, GIArgument *arg) { cairo_surface_t *surface; @@ -95,7 +96,8 @@ cairo_surface_to_arg (PyObject *value, } PyObject * -cairo_surface_from_arg (GITypeInfo *type_info, gpointer data) +cairo_surface_from_arg (GIInterfaceInfo *iface_info, + gpointer data) { cairo_surface_t *surface = (cairo_surface_t*) data; diff --git a/gi/pygi-foreign-gvariant.c b/gi/pygi-foreign-gvariant.c index 3c8ae8d..9249d44 100644 --- a/gi/pygi-foreign-gvariant.c +++ b/gi/pygi-foreign-gvariant.c @@ -27,9 +27,9 @@ #include "pygi-foreign-gvariant.h" PyObject * -g_variant_to_arg (PyObject *value, - GITypeInfo *type_info, - GITransfer transfer, +g_variant_to_arg (PyObject *value, + GIInterfaceInfo *type_info, + GITransfer transfer, GIArgument *arg) { g_assert (transfer == GI_TRANSFER_NOTHING); @@ -41,12 +41,11 @@ g_variant_to_arg (PyObject *value, } PyObject * -g_variant_from_arg (GITypeInfo *type_info, - gpointer data) +g_variant_from_arg (GIInterfaceInfo *iface_info, + gpointer data) { GVariant *variant = (GVariant *) data; - GITypeInfo *interface_info = g_type_info_get_interface (type_info); - PyObject *type = _pygi_type_import_by_gi_info (interface_info); + PyObject *type = _pygi_type_import_by_gi_info (iface_info); g_variant_ref_sink (variant); @@ -55,7 +54,7 @@ g_variant_from_arg (GITypeInfo *type_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 b0c9781..8ebc4cd 100644 --- a/gi/pygi-foreign-gvariant.h +++ b/gi/pygi-foreign-gvariant.h @@ -26,14 +26,12 @@ #include "pygi-foreign.h" -PyObject *g_variant_to_arg(PyObject *value, - GITypeInfo *type_info, - GITransfer transfer, - GIArgument *arg); - -PyObject *g_variant_from_arg(GITypeInfo *type_info, - gpointer data); - +PyObject *g_variant_to_arg (PyObject *value, + GIInterfaceInfo *iface_info, + GITransfer transfer, + GIArgument *arg); +PyObject *g_variant_from_arg (GIInterfaceInfo *iface_info, + gpointer data); PyObject *g_variant_release_foreign (GIBaseInfo *base_info, gpointer struct_); diff --git a/gi/pygi-foreign.c b/gi/pygi-foreign.c index 5c9a88a..eafaca3 100644 --- a/gi/pygi-foreign.c +++ b/gi/pygi-foreign.c @@ -107,37 +107,34 @@ pygi_struct_foreign_lookup (GIBaseInfo *base_info) } PyObject * -pygi_struct_foreign_convert_to_g_argument (PyObject *value, - GITypeInfo *type_info, - GITransfer transfer, +pygi_struct_foreign_convert_to_g_argument (PyObject *value, + GIInterfaceInfo *iface_info, + GITransfer transfer, GIArgument *arg) { - GIBaseInfo *base_info = g_type_info_get_interface (type_info); + GIBaseInfo *base_info = (GIBaseInfo *) iface_info; PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info); - g_base_info_unref (base_info); if (foreign_struct == NULL) return NULL; - if (!foreign_struct->to_func (value, type_info, transfer, arg)) + if (!foreign_struct->to_func (value, iface_info, transfer, arg)) return NULL; Py_RETURN_NONE; } PyObject * -pygi_struct_foreign_convert_from_g_argument (GITypeInfo *type_info, - GIArgument *arg) +pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *iface_info, + GIArgument *arg) { - GIBaseInfo *base_info = g_type_info_get_interface (type_info); + GIBaseInfo *base_info = (GIBaseInfo *) iface_info; PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info); - g_base_info_unref (base_info); - if (foreign_struct == NULL) return NULL; - return foreign_struct->from_func (type_info, arg); + return foreign_struct->from_func (iface_info, arg); } PyObject * diff --git a/gi/pygi-foreign.h b/gi/pygi-foreign.h index b57f892..b07f682 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, - GITypeInfo *type_info, - GITransfer transfer, - GIArgument *arg); -PyObject *pygi_struct_foreign_convert_from_g_argument (GITypeInfo *type_info, - GIArgument *arg); -PyObject *pygi_struct_foreign_release (GITypeInfo *type_info, - gpointer struct_); +PyObject *pygi_struct_foreign_convert_to_g_argument (PyObject *value, + GIInterfaceInfo *iface_info, + GITransfer transfer, + GIArgument *arg); +PyObject *pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *iface_info, + GIArgument *arg); +PyObject *pygi_struct_foreign_release (GIBaseInfo *base_info, + gpointer struct_); void pygi_register_foreign_struct_real (const char* namespace_, const char* name, diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c index 78984e5..f9e09bb 100644 --- a/gi/pygi-invoke.c +++ b/gi/pygi-invoke.c @@ -378,19 +378,19 @@ _prepare_invocation_state (struct invocation_state *state, /* 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_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 if (g_struct_info_is_foreign((GIStructInfo *) info) ) { + if (g_struct_info_is_foreign((GIStructInfo *) info) ) { PyObject *foreign_struct = - pygi_struct_foreign_convert_from_g_argument(state->arg_type_infos[i], NULL); + pygi_struct_foreign_convert_from_g_argument(info, NULL); pygi_struct_foreign_convert_to_g_argument( foreign_struct, - state->arg_type_infos[i], + 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); @@ -457,6 +457,12 @@ _prepare_invocation_state (struct invocation_state *state, 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); @@ -688,13 +694,13 @@ _process_invocation_state (struct invocation_state *state, type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info); - if (g_type_is_a (type, G_TYPE_BOXED)) { - g_warn_if_fail (transfer == GI_TRANSFER_EVERYTHING); - state->return_value = _pygi_boxed_new (py_type, state->return_arg.v_pointer, transfer == GI_TRANSFER_EVERYTHING); - } else if (type == G_TYPE_NONE && g_struct_info_is_foreign (info)) { + if (g_struct_info_is_foreign (info)) { state->return_value = pygi_struct_foreign_convert_from_g_argument ( - state->return_type_info, state->return_arg.v_pointer); + 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 " diff --git a/glib/pygsource.c b/glib/pygsource.c index 684711e..d0176ab 100644 --- a/glib/pygsource.c +++ b/glib/pygsource.c @@ -387,10 +387,12 @@ pyg_source_clear(PyGSource *self) static void pyg_source_dealloc(PyGSource *self) { - PyObject_ClearWeakRefs((PyObject *)self); - + /* Must be done first, so that there is no chance of Python's GC being + * called while tracking this half-deallocated object */ PyObject_GC_UnTrack((PyObject *)self); + PyObject_ClearWeakRefs((PyObject *)self); + pyg_source_clear(self); PyObject_GC_Del(self); diff --git a/gobject/pygobject.c b/gobject/pygobject.c index e6dfbc4..6c2f06c 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -1039,8 +1039,14 @@ PYGLIB_DEFINE_TYPE("gobject.GObject", PyGObject_Type, PyGObject); static void pygobject_dealloc(PyGObject *self) { - PyObject_ClearWeakRefs((PyObject *)self); + /* Untrack must be done first. This is because followup calls such as + * ClearWeakRefs could call into Python and cause new allocations to + * happen, which could in turn could trigger the garbage collector, + * which would then get confused as it is tracking this half-deallocated + * object. */ PyObject_GC_UnTrack((PyObject *)self); + + PyObject_ClearWeakRefs((PyObject *)self); /* this forces inst_data->type to be updated, which could prove * important if a new wrapper has to be created and it is of a * unregistered type */ diff --git a/tests/test_everything.py b/tests/test_everything.py index 74d917a..5fadc36 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -11,7 +11,6 @@ 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): diff --git a/tests/test_gi.py b/tests/test_gi.py index 4aa5532..6990225 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -5,6 +5,11 @@ import sys import unittest +import tempfile +import shutil +import os +import locale +import subprocess from gi.repository import GObject import gobject @@ -960,6 +965,31 @@ class TestPointer(unittest.TestCase): class TestEnum(unittest.TestCase): + @classmethod + def setUpClass(cls): + '''Run tests under a test locale. + + Upper case conversion of member names should not be locale specific; + e. g. in Turkish, "i".upper() == "i", which gives results like "iNVALiD" + + Run test under a locale which defines toupper('a') == 'a' + ''' + cls.locale_dir = tempfile.mkdtemp() + subprocess.check_call(['localedef', '-i', + os.path.join(os.path.dirname(os.path.realpath(__file__)), 'te_ST@nouppera'), + '-c', '-f', 'UTF-8', os.path.join(cls.locale_dir, 'te_ST.UTF-8@nouppera')]) + os.environ['LOCPATH'] = cls.locale_dir + locale.setlocale(locale.LC_ALL, 'te_ST.UTF-8@nouppera') + + @classmethod + def tearDownClass(cls): + locale.setlocale(locale.LC_ALL, 'C') + shutil.rmtree(cls.locale_dir) + try: + del os.environ['LOCPATH'] + except KeyError: + pass + def test_enum(self): self.assertTrue(issubclass(GIMarshallingTests.Enum, int)) self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE1, GIMarshallingTests.Enum)) diff --git a/tests/test_overrides.py b/tests/test_overrides.py index 57abdfd..47f38a3 100644 --- a/tests/test_overrides.py +++ b/tests/test_overrides.py @@ -359,10 +359,14 @@ class TestGdk(unittest.TestCase): self.assertEquals(color.red, 100) self.assertEquals(color.green, 200) self.assertEquals(color.blue, 300) + self.assertEquals(color, Gdk.Color(100, 200, 300)) + self.assertNotEquals(color, Gdk.Color(1, 2, 3)) def test_rgba(self): self.assertEquals(Gdk.RGBA, overrides.Gdk.RGBA) rgba = Gdk.RGBA(0.1, 0.2, 0.3, 0.4) + self.assertEquals(rgba, Gdk.RGBA(0.1, 0.2, 0.3, 0.4)) + self.assertNotEquals(rgba, Gdk.RGBA(0.0, 0.2, 0.3, 0.4)) self.assertEquals(rgba.red, 0.1) self.assertEquals(rgba.green, 0.2) self.assertEquals(rgba.blue, 0.3) -- cgit v1.2.3