From 0c71eb0d62ed72700f38b67e4d75e0b62be8749e Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 12 Jul 2017 08:37:17 +0900 Subject: [PATCH] Imported Upstream version 2.90.2 Change-Id: Ic589bde4a220ca70927f90d377aaa2da70b920fd Signed-off-by: DongHun Kwak --- ChangeLog | 112 +++++++++++++++++++++++++ NEWS | 10 +++ PKG-INFO | 4 +- configure | 26 +++--- configure.ac | 2 +- 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/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 +- examples/properties.py | 14 ++-- examples/signal.py | 9 +- gi/_gobject/Makefile.am | 5 +- gi/_gobject/Makefile.in | 56 +++++++++---- gi/overrides/GLib.py | 50 +++++++++++ gi/pygi-info.c | 8 +- pygobject-3.0-uninstalled.pc.in | 4 +- pygobject-3.0.pc.in | 6 +- tests/test_gi.py | 11 --- tests/test_overrides.py | 22 +++++ 26 files changed, 306 insertions(+), 99 deletions(-) diff --git a/ChangeLog b/ChangeLog index 126c4cd..bec9ed8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,115 @@ +commit e51efc50835a14e0418cc27cc928c52d1aa6a3cf +Author: John (J5) Palmieri +Date: Thu Aug 18 14:02:30 2011 -0400 + + release 2.90.2 + + NEWS | 10 ++++++++++ + 1 files changed, 10 insertions(+), 0 deletions(-) + +commit 74c727b53fcf64f465ee77b5a1ea04a69ca90968 +Author: John (J5) Palmieri +Date: Thu Aug 18 13:50:51 2011 -0400 + + remove tests that were removed from gi + + tests/test_gi.py | 11 ----------- + 1 files changed, 0 insertions(+), 11 deletions(-) + +commit 11ea24dd30d8eeca11c8433c6bd75b06e52ae1ef +Author: John (J5) Palmieri +Date: Thu Aug 18 13:48:57 2011 -0400 + + don't calculate item_size using is_pointer + + * is_pointer is poorly defined and cacluating item_size for + arrays causes a crash in the tests because of this + * disregaurd is_pointer when cacluating item sizes + + gi/pygi-info.c | 8 ++------ + 1 files changed, 2 insertions(+), 6 deletions(-) + +commit 493b4a21dd162d78cf572b548b58ba6a9ff22971 +Author: Timo Vanwynsberghe +Date: Wed Jul 6 01:50:31 2011 +0200 + + Updated signal example to use GObject introspection + + https://bugzilla.gnome.org/show_bug.cgi?id=654162 + + examples/signal.py | 9 ++++----- + 1 files changed, 4 insertions(+), 5 deletions(-) + +commit 0332010e704e253380e993874eab9dd122e59a7e +Author: Timo Vanwynsberghe +Date: Wed Jul 6 01:54:50 2011 +0200 + + Updated properties example to use GObject introspection + + https://bugzilla.gnome.org/show_bug.cgi?id=654162 + + examples/properties.py | 14 +++++++------- + 1 files changed, 7 insertions(+), 7 deletions(-) + +commit c39f4555ebd703651eca6f978ed9870655b737f0 +Author: Martin Pitt +Date: Fri Aug 12 22:55:02 2011 +0200 + + Add override for GLib.Variant.split_signature() + + This is useful for e. g. iterating over method parameters which are + passed as a + single Variant. In particular we will need it for automatically + generating + introspection XML for exported DBus server objects. + + gi/overrides/GLib.py | 50 + +++++++++++++++++++++++++++++++++++++++++++++++ + tests/test_overrides.py | 22 ++++++++++++++++++++ + 2 files changed, 72 insertions(+), 0 deletions(-) + +commit 735f98d83c1c19df7457aa32a378e8c80cf2831f +Author: Timo Vanwynsberghe +Date: Mon Aug 15 18:58:31 2011 +0200 + + [pygi-convert.sh] Handle the import of pygtk and require Gtk 3.0 + + https://bugzilla.gnome.org/show_bug.cgi?id=654001 + + pygi-convert.sh | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit d0a96a0a75f2bc969522abce2d326ef440cf143a +Author: Ignacio Casal Quinteiro +Date: Mon Aug 15 13:12:49 2011 +0200 + + Install pygobject.h again. + + This is needed by libpeas. + + gi/_gobject/Makefile.am | 5 ++++- + pygobject-3.0-uninstalled.pc.in | 4 ++-- + pygobject-3.0.pc.in | 6 +++--- + 3 files changed, 9 insertions(+), 6 deletions(-) + +commit 081dc2eb03b677eac9f08d3ad05deecc7c51554c +Author: John (J5) Palmieri +Date: Sun Aug 14 11:20:15 2011 -0400 + + update the doap file + + pygobject.doap | 26 ++++++++++++++------------ + 1 files changed, 14 insertions(+), 12 deletions(-) + +commit 762a36d2343bc39a502507d600fd1b9db9649dae +Author: John (J5) Palmieri +Date: Sun Aug 14 11:13:25 2011 -0400 + + prerelease bump + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + commit d3f85a61ec4b1a1d04838f73dc8d862258150048 Author: John (J5) Palmieri Date: Sun Aug 14 10:13:37 2011 -0400 diff --git a/NEWS b/NEWS index c0ce9f3..7c6d823 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,13 @@ +2.90.2 18-Aug-2011 (3.0 pre-release) + - remove tests that were removed from gi (John (J5) Palmieri) + - don't calculate item_size using is_pointer (John (J5) Palmieri) + - Updated signal example to use GObject introspection (Timo Vanwynsberghe) + - Updated properties example to use GObject introspection (Timo Vanwynsberghe) + - Add override for GLib.Variant.split_signature() (Martin Pitt) + - [pygi-convert.sh] Handle the import of pygtk and require Gtk 3.0 (Timo Vanwynsberghe) + - Install pygobject.h again. (Ignacio Casal Quinteiro) + - update the doap file (John (J5) Palmieri) + 2.90.1 14-Aug-2011 (3.0 pre-release) - pass exta keywords to the Box constructor (John (J5) Palmieri) - add (Tree|List)Store set method override (John (J5) Palmieri) diff --git a/PKG-INFO b/PKG-INFO index 9bd4bca..18b9123 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: PyGObject -Version: 2.90.1 +Version: 2.90.2 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.90/pygobject-2.90.1.tar.gz +Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.90/pygobject-2.90.2.tar.gz Description: Python bindings for GLib and GObject Platform: POSIX, Windows Classifier: Development Status :: 5 - Production/Stable diff --git a/configure b/configure index 744bde9..9a559f5 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.90.1. +# Generated by GNU Autoconf 2.68 for pygobject 2.90.2. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pygobject' PACKAGE_TARNAME='pygobject' -PACKAGE_VERSION='2.90.1' -PACKAGE_STRING='pygobject 2.90.1' +PACKAGE_VERSION='2.90.2' +PACKAGE_STRING='pygobject 2.90.2' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject' PACKAGE_URL='' @@ -1360,7 +1360,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pygobject 2.90.1 to adapt to many kinds of systems. +\`configure' configures pygobject 2.90.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1430,7 +1430,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pygobject 2.90.1:";; + short | recursive ) echo "Configuration of pygobject 2.90.2:";; esac cat <<\_ACEOF @@ -1556,7 +1556,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pygobject configure 2.90.1 +pygobject configure 2.90.2 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1834,7 +1834,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pygobject $as_me 2.90.1, which was +It was created by pygobject $as_me 2.90.2, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2198,9 +2198,9 @@ $as_echo "#define PYGOBJECT_MINOR_VERSION 90" >>confdefs.h PYGOBJECT_MINOR_VERSION=90 -$as_echo "#define PYGOBJECT_MICRO_VERSION 1" >>confdefs.h +$as_echo "#define PYGOBJECT_MICRO_VERSION 2" >>confdefs.h -PYGOBJECT_MICRO_VERSION=1 +PYGOBJECT_MICRO_VERSION=2 ac_config_headers="$ac_config_headers config.h" @@ -2684,7 +2684,7 @@ fi # Define the identity of the package. PACKAGE='pygobject' - VERSION='2.90.1' + VERSION='2.90.2' cat >>confdefs.h <<_ACEOF @@ -12020,7 +12020,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -pygobject config.lt 2.90.1 +pygobject config.lt 2.90.2 configured by $0, generated by GNU Autoconf 2.68. Copyright (C) 2010 Free Software Foundation, Inc. @@ -16746,7 +16746,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pygobject $as_me 2.90.1, which was +This file was extended by pygobject $as_me 2.90.2, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16812,7 +16812,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -pygobject config.status 2.90.1 +pygobject config.status 2.90.2 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d6832c3..4296111 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, 90) -m4_define(pygobject_micro_version, 1) +m4_define(pygobject_micro_version, 2) 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-glibmaincontext.html b/docs/html/class-glibmaincontext.html index 48cf28b..65e7a00 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 38df43a..27de53a 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 e8eae25..7b1ec0d 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 0d4a4cb..077bcd5 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 ab948f4..26a7cb7 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 2d01e39..d6e506b 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/glib-constants.html b/docs/html/glib-constants.html index 4589a6b..6d8e31c 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 d59f6ec..793d7de 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 e7d56e1..97eabc1 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 c1cc6fc..55f75ab 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 a8a36bf..9abc306 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.90.1

2011-08-14 +PyGObject Reference Manual

PyGObject Reference Manual

for PyGObject version 2.90.2

2011-08-18

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/examples/properties.py b/examples/properties.py index cc05920..f71ea83 100644 --- a/examples/properties.py +++ b/examples/properties.py @@ -1,18 +1,18 @@ -import gobject +from gi.repository import GObject -class MyObject(gobject.GObject): +class MyObject(GObject.GObject): - foo = gobject.property(type=str, default='bar') - boolprop = gobject.property(type=bool, default=False) + foo = GObject.property(type=str, default='bar') + boolprop = GObject.property(type=bool, default=False) def __init__(self): - gobject.GObject.__init__(self) + GObject.GObject.__init__(self) - @gobject.property + @GObject.property def readonly(self): return 'readonly' -gobject.type_register(MyObject) +GObject.type_register(MyObject) print "MyObject properties: ", list(MyObject.props) diff --git a/examples/signal.py b/examples/signal.py index 26ddae9..d06fb02 100644 --- a/examples/signal.py +++ b/examples/signal.py @@ -1,10 +1,9 @@ -import pygtk; pygtk.require("2.0") -import gobject +from gi.repository import GObject -class C(gobject.GObject): +class C(GObject.GObject): __gsignals__ = { - 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, - (gobject.TYPE_INT,)) + 'my_signal': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, + (GObject.TYPE_INT,)) } def __init__(self): self.__gobject_init__() # default constructor using our new GType diff --git a/gi/_gobject/Makefile.am b/gi/_gobject/Makefile.am index 7e15d4c..a31085f 100644 --- a/gi/_gobject/Makefile.am +++ b/gi/_gobject/Makefile.am @@ -1,5 +1,8 @@ AUTOMAKE_OPTIONS = 1.7 -PLATFORM_VERSION = 2.0 +PLATFORM_VERSION = 3.0 + +pkgincludedir = $(includedir)/pygobject-$(PLATFORM_VERSION) +pkginclude_HEADERS = pygobject.h pkgpyexecdir = $(pyexecdir) diff --git a/gi/_gobject/Makefile.in b/gi/_gobject/Makefile.in index 5412d0c..c16a340 100644 --- a/gi/_gobject/Makefile.in +++ b/gi/_gobject/Makefile.in @@ -15,9 +15,9 @@ @SET_MAKE@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd @@ -38,8 +38,8 @@ host_triplet = @host@ @HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h @PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32 subdir = gi/_gobject -DIST_COMMON = $(pygobject_PYTHON) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(pkginclude_HEADERS) $(pygobject_PYTHON) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -74,7 +74,7 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pygobjectdir)" \ - "$(DESTDIR)$(pygobjectdir)" + "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(pygobject_LTLIBRARIES) am__DEPENDENCIES_1 = _gobject_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @@ -127,9 +127,11 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(_gobject_la_SOURCES) DIST_SOURCES = $(am___gobject_la_SOURCES_DIST) py_compile = $(top_srcdir)/py-compile +HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgincludedir = $(includedir)/pygobject-$(PLATFORM_VERSION) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ @@ -286,7 +288,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.7 -PLATFORM_VERSION = 2.0 +PLATFORM_VERSION = 3.0 +pkginclude_HEADERS = pygobject.h # gobject python scripts pygobjectdir = $(pkgpyexecdir)/gi/_gobject @@ -544,6 +547,26 @@ uninstall-pygobjectPYTHON: cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$fileso +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -630,9 +653,9 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)"; do \ + for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -683,7 +706,8 @@ info: info-am info-am: -install-data-am: install-pygobjectLTLIBRARIES install-pygobjectPYTHON +install-data-am: install-pkgincludeHEADERS \ + install-pygobjectLTLIBRARIES install-pygobjectPYTHON install-dvi: install-dvi-am @@ -729,7 +753,8 @@ ps: ps-am ps-am: -uninstall-am: uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON +uninstall-am: uninstall-pkgincludeHEADERS \ + uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON .MAKE: check-am install-am install-strip @@ -741,12 +766,13 @@ uninstall-am: uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am \ - install-pygobjectLTLIBRARIES install-pygobjectPYTHON \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-pygobjectLTLIBRARIES \ + install-pygobjectPYTHON install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS \ uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py index e42f854..f3abe28 100644 --- a/gi/overrides/GLib.py +++ b/gi/overrides/GLib.py @@ -221,6 +221,56 @@ class Variant(GLib.Variant): raise NotImplementedError('unsupported GVariant type ' + self.get_type_string()) + @classmethod + def split_signature(klass, signature): + '''Return a list of the element signatures of the topmost signature tuple. + + If the signature is not a tuple, it returns one element with the entire + signature. If the signature is an empty tuple, the result is []. + + This is useful for e. g. iterating over method parameters which are + passed as a single Variant. + ''' + if signature == '()': + return [] + + if not signature.startswith('('): + return [signature] + + result = [] + head = '' + tail = signature[1:-1] # eat the surrounding ( ) + while tail: + c = tail[0] + head += c + tail = tail[1:] + + if c in ('m', 'a'): + # prefixes, keep collecting + continue + if c in ('(', '{'): + # consume until corresponding )/} + level = 1 + up = c + if up == '(': + down = ')' + else: + down = '}' + while level > 0: + c = tail[0] + head += c + tail = tail[1:] + if c == up: + level += 1 + elif c == down: + level -= 1 + + # otherwise we have a simple type + result.append(head) + head = '' + + return result + # # Pythonic iterators # diff --git a/gi/pygi-info.c b/gi/pygi-info.c index 007b609..30e1956 100644 --- a/gi/pygi-info.c +++ b/gi/pygi-info.c @@ -430,12 +430,8 @@ _pygi_g_type_info_size (GITypeInfo *type_info) case GI_TYPE_TAG_DOUBLE: case GI_TYPE_TAG_GTYPE: case GI_TYPE_TAG_UNICHAR: - if (g_type_info_is_pointer (type_info)) { - size = sizeof (gpointer); - } else { - size = _pygi_g_type_tag_size (type_tag); - g_assert (size > 0); - } + size = _pygi_g_type_tag_size (type_tag); + g_assert (size > 0); break; case GI_TYPE_TAG_INTERFACE: { diff --git a/pygobject-3.0-uninstalled.pc.in b/pygobject-3.0-uninstalled.pc.in index 8dd5f38..5d96925 100644 --- a/pygobject-3.0-uninstalled.pc.in +++ b/pygobject-3.0-uninstalled.pc.in @@ -5,10 +5,10 @@ Requires.private: @LIBFFI_PC@ Version: @VERSION@ Cflags: -I${pc_top_builddir}/${pcfiledir}/gobject -# you can use the --variable=pygtkincludedir argument to +# you can use the --variable=pygobjectincludedir argument to # pkg-config to get this value. You might want to use this to # install additional headers. -pygtkincludedir=${pc_top_builddir}/${pcfiledir}/gobject +pygobjectincludedir=${pc_top_builddir}/${pcfiledir}/gobject xslfiles=${pc_top_builddir}/${pcfiledir}/docs/xsl # same here. Useful when calling the code generator in addon packages. diff --git a/pygobject-3.0.pc.in b/pygobject-3.0.pc.in index 2ae8ebf..15672de 100644 --- a/pygobject-3.0.pc.in +++ b/pygobject-3.0.pc.in @@ -5,10 +5,10 @@ datarootdir=@datarootdir@ datadir=@datadir@ libdir=@libdir@ -# you can use the --variable=pygtkincludedir argument to +# you can use the --variable=pygobjectincludedir argument to # pkg-config to get this value. You might want to use this to # install additional headers. -pygtkincludedir=${includedir}/pygtk-2.0 +pygobjectincludedir=${includedir}/pygobject-3.0 fixxref=${datadir}/pygobject/xsl/fixxref.py pygdocs=${datadir}/gtk-doc/html/pygobject defsdir=${datadir}/pygobject/2.0/defs @@ -19,4 +19,4 @@ Description: Python bindings for GObject Requires: gobject-2.0 Requires.private: @LIBFFI_PC@ Version: @VERSION@ -Cflags: -I${pygtkincludedir} +Cflags: -I${pygobjectincludedir} diff --git a/tests/test_gi.py b/tests/test_gi.py index 2e7f2dd..dddc6fb 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -778,9 +778,6 @@ class TestGArray(unittest.TestCase): class TestGPtrArray(unittest.TestCase): - def test_gptrarray_int_none_return(self): - self.assertEquals([0, 1, 2, 3], GIMarshallingTests.gptrarray_int_none_return()) - def test_gptrarray_utf8_none_return(self): self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_none_return()) @@ -790,14 +787,6 @@ class TestGPtrArray(unittest.TestCase): def test_gptrarray_utf8_full_return(self): self.assertEquals(['0', '1', '2'], GIMarshallingTests.gptrarray_utf8_full_return()) - def test_gptrarray_int_none_in(self): - GIMarshallingTests.gptrarray_int_none_in(Sequence([0, 1, 2, 3])) - - self.assertRaises(TypeError, GIMarshallingTests.gptrarray_int_none_in, Sequence([-1, '0', 1, 2])) - - self.assertRaises(TypeError, GIMarshallingTests.gptrarray_int_none_in, 42) - self.assertRaises(TypeError, GIMarshallingTests.gptrarray_int_none_in, None) - def test_gptrarray_utf8_none_in(self): GIMarshallingTests.gptrarray_utf8_none_in(Sequence(['0', '1', '2'])) diff --git a/tests/test_overrides.py b/tests/test_overrides.py index 14114b7..427f4d1 100644 --- a/tests/test_overrides.py +++ b/tests/test_overrides.py @@ -325,6 +325,28 @@ class TestGLib(unittest.TestCase): # string iteration self.assertEqual([x for x in v], ['h', 'e', 'l', 'l', 'o']) + def test_variant_split_signature(self): + self.assertEqual(GLib.Variant.split_signature('()'), []) + + self.assertEqual(GLib.Variant.split_signature('s'), ['s']) + + self.assertEqual(GLib.Variant.split_signature('as'), ['as']) + + self.assertEqual(GLib.Variant.split_signature('(s)'), ['s']) + + self.assertEqual(GLib.Variant.split_signature('(iso)'), ['i', 's', 'o']) + + self.assertEqual(GLib.Variant.split_signature('(s(ss)i(ii))'), + ['s', '(ss)', 'i', '(ii)']) + + self.assertEqual(GLib.Variant.split_signature('(as)'), ['as']) + + self.assertEqual(GLib.Variant.split_signature('(s(ss)iaiaasa(ii))'), + ['s', '(ss)', 'i', 'ai', 'aas', 'a(ii)']) + + self.assertEqual(GLib.Variant.split_signature('(a{iv}(ii)((ss)a{s(ss)}))'), + ['a{iv}', '(ii)', '((ss)a{s(ss)})']) + class TestPango(unittest.TestCase): def test_default_font_description(self): -- 2.34.1