summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:41:08 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:41:11 +0900
commit8132ac313c4bb9f1ac8c5d1a72de7befd0ce3a6c (patch)
tree27b8edbd4b08e644caa2f8092358a364f1be7a0f /gi
parentd515c550b1574ab0bdd751ebf31600347ecc396b (diff)
downloadpygobject2-8132ac313c4bb9f1ac8c5d1a72de7befd0ce3a6c.tar.gz
pygobject2-8132ac313c4bb9f1ac8c5d1a72de7befd0ce3a6c.tar.bz2
pygobject2-8132ac313c4bb9f1ac8c5d1a72de7befd0ce3a6c.zip
Imported Upstream version 3.11.92
Change-Id: I029df9efeebb8d07fe5316e68bcc7c70b37e29b0 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi')
-rw-r--r--gi/Makefile.in305
-rw-r--r--gi/_constants.py4
-rw-r--r--gi/_gobject/Makefile.in134
-rw-r--r--gi/_gobject/__init__.py4
-rw-r--r--gi/_option.py71
-rw-r--r--gi/_propertyhelper.py90
-rw-r--r--gi/_signalhelper.py121
-rw-r--r--gi/docstring.py17
-rw-r--r--gi/glibmodule.c7
-rw-r--r--gi/gobjectmodule.c4
-rw-r--r--gi/overrides/GLib.py20
-rw-r--r--gi/overrides/GObject.py39
-rw-r--r--gi/overrides/Gtk.py28
-rw-r--r--gi/overrides/Makefile.in136
-rw-r--r--gi/overrides/__init__.py68
-rw-r--r--gi/overrides/keysyms.py4
-rw-r--r--gi/pygboxed.c4
-rw-r--r--gi/pygboxed.h4
-rw-r--r--gi/pygenum.c4
-rw-r--r--gi/pygenum.h4
-rw-r--r--gi/pygflags.c4
-rw-r--r--gi/pygflags.h4
-rw-r--r--gi/pygi-argument.c4
-rw-r--r--gi/pygi-argument.h4
-rw-r--r--gi/pygi-boxed.c4
-rw-r--r--gi/pygi-boxed.h4
-rw-r--r--gi/pygi-cache.c4
-rw-r--r--gi/pygi-cache.h4
-rw-r--r--gi/pygi-ccallback.c4
-rw-r--r--gi/pygi-ccallback.h4
-rw-r--r--gi/pygi-foreign-cairo.c32
-rw-r--r--gi/pygi-foreign.c3
-rw-r--r--gi/pygi-foreign.h1
-rw-r--r--gi/pygi-info.c4
-rw-r--r--gi/pygi-info.h4
-rw-r--r--gi/pygi-invoke.c5
-rw-r--r--gi/pygi-invoke.h4
-rw-r--r--gi/pygi-marshal-cleanup.c4
-rw-r--r--gi/pygi-marshal-cleanup.h4
-rw-r--r--gi/pygi-repository.c4
-rw-r--r--gi/pygi-repository.h4
-rw-r--r--gi/pygi-signal-closure.c4
-rw-r--r--gi/pygi-struct-marshal.c1
-rw-r--r--gi/pygi-struct.c4
-rw-r--r--gi/pygi-struct.h4
-rw-r--r--gi/pygi-type.c4
-rw-r--r--gi/pygi-type.h4
-rw-r--r--gi/pygi.h5
-rw-r--r--gi/pyginterface.c4
-rw-r--r--gi/pyginterface.h4
-rw-r--r--gi/pyglib-private.h4
-rw-r--r--gi/pyglib-python-compat.h4
-rw-r--r--gi/pyglib.c4
-rw-r--r--gi/pyglib.h4
-rw-r--r--gi/pygobject-external.h4
-rw-r--r--gi/pygobject.c4
-rw-r--r--gi/pygoptioncontext.c4
-rw-r--r--gi/pygoptioncontext.h4
-rw-r--r--gi/pygoptiongroup.c4
-rw-r--r--gi/pygoptiongroup.h4
-rw-r--r--gi/pygparamspec.c4
-rw-r--r--gi/pygparamspec.h4
-rw-r--r--gi/pygpointer.c4
-rw-r--r--gi/pygpointer.h4
-rw-r--r--gi/pygspawn.c4
-rw-r--r--gi/pygspawn.h4
-rw-r--r--gi/pygtype.c4
-rw-r--r--gi/pygtype.h4
-rw-r--r--gi/repository/Makefile.in136
-rw-r--r--gi/types.py9
70 files changed, 767 insertions, 661 deletions
diff --git a/gi/Makefile.in b/gi/Makefile.in
index 0f6fa1f..17cc7f9 100644
--- a/gi/Makefile.in
+++ b/gi/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -56,8 +83,8 @@ host_triplet = @host@
@ENABLE_CAIRO_TRUE@am__append_2 = _gi_cairo.la
subdir = gi
-DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp $(am__pkginclude_HEADERS_DIST)
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 \
@@ -125,6 +152,7 @@ _gi_la_OBJECTS = $(am__gi_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
_gi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gi_la_CFLAGS) $(CFLAGS) \
$(_gi_la_LDFLAGS) $(LDFLAGS) -o $@
@@ -136,6 +164,18 @@ _gi_cairo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gi_cairo_la_CFLAGS) \
$(CFLAGS) $(_gi_cairo_la_LDFLAGS) $(LDFLAGS) -o $@
@ENABLE_CAIRO_TRUE@am__gi_cairo_la_rpath = -rpath $(pygidir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -148,29 +188,26 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(_gi_la_SOURCES) $(_gi_cairo_la_SOURCES)
DIST_SOURCES = $(_gi_la_SOURCES) $(_gi_cairo_la_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -180,9 +217,29 @@ am__pkginclude_HEADERS_DIST = pygobject.h
HEADERS = $(pkginclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -554,6 +611,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+
install-pygiLTLIBRARIES: $(pygi_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(pygi_LTLIBRARIES)'; test -n "$(pygidir)" || list=; \
@@ -580,14 +638,18 @@ uninstall-pygiLTLIBRARIES:
clean-pygiLTLIBRARIES:
-test -z "$(pygi_LTLIBRARIES)" || rm -f $(pygi_LTLIBRARIES)
- @list='$(pygi_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(pygi_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
_gi.la: $(_gi_la_OBJECTS) $(_gi_la_DEPENDENCIES) $(EXTRA__gi_la_DEPENDENCIES)
$(AM_V_CCLD)$(_gi_la_LINK) -rpath $(pygidir) $(_gi_la_OBJECTS) $(_gi_la_LIBADD) $(LIBS)
+
_gi_cairo.la: $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_DEPENDENCIES) $(EXTRA__gi_cairo_la_DEPENDENCIES)
$(AM_V_CCLD)$(_gi_cairo_la_LINK) $(am__gi_cairo_la_rpath) $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_LIBADD) $(LIBS)
@@ -967,22 +1029,25 @@ uninstall-pkgincludeHEADERS:
dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -997,57 +1062,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -1063,12 +1083,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1080,15 +1095,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1097,6 +1108,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -1266,24 +1292,23 @@ ps-am:
uninstall-am: uninstall-pkgincludeHEADERS uninstall-pygiLTLIBRARIES
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
- ctags-recursive install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am all-local check check-am check-local clean \
- clean-generic clean-libtool clean-local clean-pygiLTLIBRARIES \
- ctags ctags-recursive distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-pkgincludeHEADERS install-ps \
- install-ps-am install-pygiLTLIBRARIES install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ check check-am check-local clean clean-generic clean-libtool \
+ clean-local clean-pygiLTLIBRARIES cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-pkgincludeHEADERS install-ps install-ps-am \
+ install-pygiLTLIBRARIES install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am \
uninstall-pkgincludeHEADERS uninstall-pygiLTLIBRARIES
diff --git a/gi/_constants.py b/gi/_constants.py
index 495c6e1..cec8d17 100644
--- a/gi/_constants.py
+++ b/gi/_constants.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
from ._gi import _gobject
diff --git a/gi/_gobject/Makefile.in b/gi/_gobject/Makefile.in
index 39c07e3..a746eea 100644
--- a/gi/_gobject/Makefile.in
+++ b/gi/_gobject/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,23 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -51,8 +78,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = gi/_gobject
-DIST_COMMON = $(pygobject_PYTHON) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(pygobject_PYTHON) $(top_srcdir)/py-compile
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -65,12 +92,18 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
@@ -107,7 +140,10 @@ am__uninstall_files_from_dir = { \
}
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
am__installdirs = "$(DESTDIR)$(pygobjectdir)"
+am__pep3147_tweak = \
+ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
py_compile = $(top_srcdir)/py-compile
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -340,32 +376,38 @@ install-pygobjectPYTHON: $(pygobject_PYTHON)
$(INSTALL_DATA) $$files "$(DESTDIR)$(pygobjectdir)" || exit $$?; \
done || exit $$?; \
if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- $(am__py_compile) --basedir "$(pygobjectdir)" $$dlist; \
- else \
- $(am__py_compile) --destdir "$(DESTDIR)" \
- --basedir "$(pygobjectdir)" $$dlist; \
- fi; \
+ $(am__py_compile) --destdir "$(DESTDIR)" \
+ --basedir "$(pygobjectdir)" $$dlist; \
else :; fi
uninstall-pygobjectPYTHON:
@$(NORMAL_UNINSTALL)
@list='$(pygobject_PYTHON)'; test -n "$(pygobjectdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
+ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$py_files" || exit 0; \
dir='$(DESTDIR)$(pygobjectdir)'; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
+ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
+ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
+ echo "$$py_files_pep3147";\
+ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
+ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
st=0; \
- for files in "$$files" "$$filesc" "$$fileso"; do \
+ for files in \
+ "$$py_files" \
+ "$$pyc_files" \
+ "$$pyo_files" \
+ "$$pyc_files_pep3147" \
+ "$$pyo_files_pep3147" \
+ ; do \
$(am__uninstall_files_from_dir) || st=$$?; \
done; \
exit $$st
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -505,17 +547,17 @@ uninstall-am: uninstall-pygobjectPYTHON
.MAKE: check-am install-am install-strip
.PHONY: all all-am check check-am check-local clean clean-generic \
- clean-libtool distclean distclean-generic distclean-libtool \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-pygobjectPYTHON install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-pygobjectPYTHON install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-pygobjectPYTHON
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-pygobjectPYTHON
# if we build in a separate tree, we need to symlink the *.py files from the
diff --git a/gi/_gobject/__init__.py b/gi/_gobject/__init__.py
index dd5217d..523a102 100644
--- a/gi/_gobject/__init__.py
+++ b/gi/_gobject/__init__.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
# Needed for compatibility with "pygobject.h"
import gi._gi
diff --git a/gi/_option.py b/gi/_option.py
index 0649081..422c53f 100644
--- a/gi/_option.py
+++ b/gi/_option.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
"""GOption command line parser
@@ -70,17 +68,20 @@ class Option(optparse.Option):
filename The supplied arguments are read as filename, GOption
parses this type in with the GLib filename encoding.
- Attributes:
- optional_arg This does not need a arguement, but it can be supplied.
- hidden The help list does not show this option
- in_main This option apears in the main group, this should only
- be used for backwards compatibility.
+ :ivar optional_arg:
+ This does not need a arguement, but it can be supplied.
+ :ivar hidden:
+ The help list does not show this option
+ :ivar in_main:
+ This option apears in the main group, this should only
+ be used for backwards compatibility.
Use Option.REMAINING as option name to get all positional arguments.
- NOTE: Every argument to an option is passed as utf-8 coded string, the only
- exception are options which use the 'filename' type, its arguments
- are passed as strings in the GLib filename encoding.
+ .. NOTE::
+ Every argument to an option is passed as utf-8 coded string, the only
+ exception are options which use the 'filename' type, its arguments
+ are passed as strings in the GLib filename encoding.
For further help, see optparse.Option.
"""
@@ -144,19 +145,24 @@ class Option(optparse.Option):
class OptionGroup(optparse.OptionGroup):
"""A group of command line options.
- Arguements:
- name: The groups name, used to create the
- --help-{name} option
- description: Shown as title of the groups help view
- help_description: Shown as help to the --help-{name} option
- option_list: The options used in this group, must be option.Option()
- defaults: A dicitionary of default values
- translation_domain: Sets the translation domain for gettext().
-
- NOTE: This OptionGroup does not exactly map the optparse.OptionGroup
- interface. There is no parser object to supply, but it is possible
- to set default values and option_lists. Also the default values and
- values are not shared with the OptionParser.
+ :param str name:
+ The groups name, used to create the --help-{name} option
+ :param str description:
+ Shown as title of the groups help view
+ :param str help_description:
+ Shown as help to the --help-{name} option
+ :param list option_list:
+ The options used in this group, must be option.Option()
+ :param dict defaults:
+ A dicitionary of default values
+ :param translation_domain:
+ Sets the translation domain for gettext().
+
+ .. NOTE::
+ This OptionGroup does not exactly map the optparse.OptionGroup
+ interface. There is no parser object to supply, but it is possible
+ to set default values and option_lists. Also the default values and
+ values are not shared with the OptionParser.
To pass a OptionGroup into a function which expects a GOptionGroup (e.g.
gnome_program_init() ). OptionGroup.get_option_group() can be used.
@@ -236,15 +242,16 @@ class OptionGroup(optparse.OptionGroup):
class OptionParser(optparse.OptionParser):
"""Command line parser with GOption support.
- NOTE: The OptionParser interface is not the exactly the same as the
- optparse.OptionParser interface. Especially the usage parameter
- is only used to show the metavar of the arguements.
+ :param bool help_enabled:
+ The --help, --help-all and --help-{group} options are enabled (default).
+ :param bool ignore_unknown_options:
+ Do not throw a exception when a option is not knwon, the option
+ will be in the result list.
- Attribues:
- help_enabled: The --help, --help-all and --help-{group}
- options are enabled (default).
- ignore_unknown_options: Do not throw a exception when a option is not
- knwon, the option will be in the result list.
+ .. NOTE::
+ The OptionParser interface is not the exactly the same as the
+ optparse.OptionParser interface. Especially the usage parameter
+ is only used to show the metavar of the arguements.
OptionParser.add_option_group() does not only accept OptionGroup instances
but also glib.OptionGroup, which is returned by gtk_get_option_group().
diff --git a/gi/_propertyhelper.py b/gi/_propertyhelper.py
index ddc81cc..1b27f58 100644
--- a/gi/_propertyhelper.py
+++ b/gi/_propertyhelper.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
import sys
@@ -50,34 +48,59 @@ else:
class Property(object):
- """
- Creates a new property which in conjunction with GObject subclass will
- create a property proxy:
-
- class MyObject(GObject.GObject):
- ... prop = GObject.Property(type=str)
+ """Creates a new Property which when used in conjunction with
+ GObject subclass will create a Python property accessor for the
+ GObject ParamSpec.
+
+ :param callable getter:
+ getter to get the value of the property
+ :param callable setter:
+ setter to set the value of the property
+ :param type type:
+ type of property
+ :param default:
+ default value, must match the property type.
+ :param str nick:
+ short description
+ :param str blurb:
+ long description
+ :param GObject.ParamFlags flags:
+ parameter flags
+ :keyword minimum:
+ minimum allowed value (int, float, long only)
+ :keyword maximum:
+ maximum allowed value (int, float, long only)
+
+ .. code-block:: python
+
+ class MyObject(GObject.Object):
+ prop = GObject.Property(type=str)
obj = MyObject()
obj.prop = 'value'
obj.prop # now is 'value'
- The API is similar to the builtin property:
+ The API is similar to the builtin :py:func:`property`:
+
+ .. code-block:: python
- class AnotherObject(GObject.GObject):
- @GObject.Property
- def prop(self):
- '''Read only property.'''
- return ...
+ class AnotherObject(GObject.Object):
+ value = 0
- @GObject.Property(type=int)
- def propInt(self):
- '''Read-write integer property.'''
- return ...
+ @GObject.Property
+ def prop(self):
+ 'Read only property.'
+ return 1
- @propInt.setter
- def propInt(self, value):
- ...
+ @GObject.Property(type=int)
+ def propInt(self):
+ 'Read-write integer property.'
+ return self.value
+
+ @propInt.setter
+ def propInt(self, value):
+ self.value = value
"""
_type_from_pytype_lookup = {
# Put long_ first in case long_ and int are the same so int clobbers long_
@@ -131,29 +154,6 @@ class Property(object):
def __init__(self, getter=None, setter=None, type=None, default=None,
nick='', blurb='', flags=_gobject.PARAM_READWRITE,
minimum=None, maximum=None):
- """
- @param getter: getter to get the value of the property
- @type getter: callable
- @param setter: setter to set the value of the property
- @type setter: callable
- @param type: type of property
- @type type: type
- @param default: default value
- @param nick: short description
- @type nick: string
- @param blurb: long description
- @type blurb: string
- @param flags: parameter flags, one of:
- - gobject.PARAM_READABLE
- - gobject.PARAM_READWRITE
- - gobject.PARAM_WRITABLE
- - gobject.PARAM_CONSTRUCT
- - gobject.PARAM_CONSTRUCT_ONLY
- - gobject.PARAM_LAX_VALIDATION
- @keyword minimum: minimum allowed value (int, float, long only)
- @keyword maximum: maximum allowed value (int, float, long only)
- """
-
self.name = None
if type is None:
diff --git a/gi/_signalhelper.py b/gi/_signalhelper.py
index 79de301..47e6e2f 100644
--- a/gi/_signalhelper.py
+++ b/gi/_signalhelper.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
import sys
import inspect
@@ -34,33 +32,54 @@ if (3, 0) <= sys.version_info < (3, 2):
class Signal(str):
- """
- Object which gives a nice API for creating and binding signals.
-
- Example:
- class Spam(GObject.GObject):
- velocity = 0
-
- @GObject.Signal
- def pushed(self):
- self.velocity += 1
-
- @GObject.Signal(flags=GObject.SignalFlags.RUN_LAST)
- def pulled(self):
- self.velocity -= 1
-
- stomped = GObject.Signal('stomped', arg_types=(int,))
-
- @GObject.Signal
- def annotated_signal(self, a:int, b:str):
- "Python3 annotation support for parameter types.
-
- def on_pushed(obj):
- print(obj)
-
- spam = Spam()
- spam.pushed.connect(on_pushed)
- spam.pushed.emit()
+ """Object which gives a nice API for creating and binding signals.
+
+ :param name:
+ Name of signal or callable closure when used as a decorator.
+ :type name: str or callable
+ :param callable func:
+ Callable closure method.
+ :param GObject.SignalFlags flags:
+ Flags specifying when to run closure.
+ :param type return_type:
+ Return type of the Signal.
+ :param list arg_types:
+ List of argument types specifying the signals function signature
+ :param str doc:
+ Documentation of signal object.
+ :param callable accumulator:
+ Accumulator method with the signature:
+ func(ihint, return_accu, handler_return, accu_data) -> boolean
+ :param object accu_data:
+ User data passed to the accumulator.
+
+ :Example:
+
+ .. code-block:: python
+
+ class Spam(GObject.Object):
+ velocity = 0
+
+ @GObject.Signal
+ def pushed(self):
+ self.velocity += 1
+
+ @GObject.Signal(flags=GObject.SignalFlags.RUN_LAST)
+ def pulled(self):
+ self.velocity -= 1
+
+ stomped = GObject.Signal('stomped', arg_types=(int,))
+
+ @GObject.Signal
+ def annotated_signal(self, a:int, b:str):
+ "Python3 annotation support for parameter types.
+
+ def on_pushed(obj):
+ print(obj)
+
+ spam = Spam()
+ spam.pushed.connect(on_pushed)
+ spam.pushed.emit()
"""
class BoundSignal(str):
"""
@@ -83,12 +102,12 @@ class Signal(str):
return self.signal.func(self.gobj, *args, **kargs)
def connect(self, callback, *args, **kargs):
- """Same as GObject.GObject.connect except there is no need to specify
+ """Same as GObject.Object.connect except there is no need to specify
the signal name."""
return self.gobj.connect(self, callback, *args, **kargs)
def connect_detailed(self, callback, detail, *args, **kargs):
- """Same as GObject.GObject.connect except there is no need to specify
+ """Same as GObject.Object.connect except there is no need to specify
the signal name. In addition concats "::<detail>" to the signal name
when connecting; for use with notifications like "notify" when a property
changes.
@@ -96,11 +115,11 @@ class Signal(str):
return self.gobj.connect(self + '::' + detail, callback, *args, **kargs)
def disconnect(self, handler_id):
- """Same as GObject.GObject.disconnect."""
+ """Same as GObject.Object.disconnect."""
self.instance.disconnect(handler_id)
def emit(self, *args, **kargs):
- """Same as GObject.GObject.emit except there is no need to specify
+ """Same as GObject.Object.emit except there is no need to specify
the signal name."""
return self.gobj.emit(str(self), *args, **kargs)
@@ -111,25 +130,6 @@ class Signal(str):
def __init__(self, name='', func=None, flags=_gobject.SIGNAL_RUN_FIRST,
return_type=None, arg_types=None, doc='', accumulator=None, accu_data=None):
- """
- @param name: name of signal or closure method when used as direct decorator.
- @type name: string or callable
- @param func: closure method.
- @type func: callable
- @param flags: flags specifying when to run closure
- @type flags: GObject.SignalFlags
- @param return_type: return type
- @type return_type: type
- @param arg_types: list of argument types specifying the signals function signature
- @type arg_types: None
- @param doc: documentation of signal object
- @type doc: string
- @param accumulator: accumulator method with the signature:
- func(ihint, return_accu, handler_return, accu_data) -> boolean
- @type accumulator: function
- @param accu_data: user data passed to the accumulator
- @type accu_data: object
- """
if func and not name:
name = func.__name__
elif callable(name):
@@ -193,14 +193,17 @@ class Signal(str):
class SignalOverride(Signal):
- """Specialized sub-class of signal which can be used as a decorator for overriding
+ """Specialized sub-class of Signal which can be used as a decorator for overriding
existing signals on GObjects.
- Example:
- class MyWidget(Gtk.Widget):
- @GObject.SignalOverride
- def configure_event(self):
- pass
+ :Example:
+
+ .. code-block:: python
+
+ class MyWidget(Gtk.Widget):
+ @GObject.SignalOverride
+ def configure_event(self):
+ pass
"""
def get_signal_args(self):
"""Returns the string 'override'."""
diff --git a/gi/docstring.py b/gi/docstring.py
index a1b8a51..80bb022 100644
--- a/gi/docstring.py
+++ b/gi/docstring.py
@@ -37,21 +37,26 @@ _generate_doc_string_func = None
def set_doc_string_generator(func):
"""Set doc string generator function
- :Parameters:
- func : callable
- Function which takes a GIInfoStruct and returns
- documentation for it.
+ :param callable func:
+ Callable which takes a GIInfoStruct and returns documentation for it.
"""
global _generate_doc_string_func
_generate_doc_string_func = func
def get_doc_string_generator():
+ """Returns the currently registered doc string generator."""
return _generate_doc_string_func
def generate_doc_string(info):
- """Generator a doc string given a GIInfoStruct
+ """Generate a doc string given a GIInfoStruct.
+
+ :param gi.types.BaseInfo info:
+ GI info instance to generate documentation for.
+ :returns:
+ Generated documentation as a string.
+ :rtype: str
This passes the info struct to the currently registered doc string
generator and returns the result.
@@ -166,7 +171,7 @@ def _generate_callable_info_doc(info):
def _generate_class_info_doc(info):
- doc = '\n:Constructors:\n' # start with \n to avoid auto indent of other lines
+ doc = '\n:Constructors:\n\n::\n\n' # start with \n to avoid auto indent of other lines
if isinstance(info, StructInfo):
# Don't show default constructor for disguised (0 length) structs
diff --git a/gi/glibmodule.c b/gi/glibmodule.c
index c11f08b..e859158 100644
--- a/gi/glibmodule.c
+++ b/gi/glibmodule.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
@@ -44,8 +42,9 @@ static PyMethodDef _glib_functions[] = {
" flags=0, child_setup=None, user_data=None,\n"
" standard_input=None, standard_output=None,\n"
" standard_error=None) -> (pid, stdin, stdout, stderr)\n"
+ "\n"
"Execute a child program asynchronously within a glib.MainLoop()\n"
- "See the reference manual for a complete reference." },
+ "See the reference manual for a complete reference.\n" },
{ NULL, NULL, 0 }
};
diff --git a/gi/gobjectmodule.c b/gi/gobjectmodule.c
index b156190..a20d93a 100644
--- a/gi/gobjectmodule.c
+++ b/gi/gobjectmodule.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
index b17c69b..c541004 100644
--- a/gi/overrides/GLib.py
+++ b/gi/overrides/GLib.py
@@ -76,7 +76,7 @@ class _VariantCreator(object):
}
def _create(self, format, args):
- '''Create a GVariant object from given format and argument list.
+ """Create a GVariant object from given format and argument list.
This method recursively calls itself for complex structures (arrays,
dictionaries, boxed).
@@ -88,7 +88,7 @@ class _VariantCreator(object):
If args is None, then this won't actually consume any arguments, and
just parse the format string and generate empty GVariant structures.
This is required for creating empty dictionaries or arrays.
- '''
+ """
# leaves (simple types)
constructor = self._LEAF_CONSTRUCTORS.get(format[0])
if constructor:
@@ -112,7 +112,7 @@ class _VariantCreator(object):
raise NotImplementedError('cannot handle GVariant type ' + format)
def _create_tuple(self, format, args):
- '''Handle the case where the outermost type of format is a tuple.'''
+ """Handle the case where the outermost type of format is a tuple."""
format = format[1:] # eat the '('
if args is None:
@@ -146,7 +146,7 @@ class _VariantCreator(object):
return (builder.end(), rest_format, args)
def _create_dict(self, format, args):
- '''Handle the case where the outermost type of format is a dict.'''
+ """Handle the case where the outermost type of format is a dict."""
builder = None
if args is None or not args[0]:
@@ -179,7 +179,7 @@ class _VariantCreator(object):
return (builder.end(), rest_format, args)
def _create_array(self, format, args):
- '''Handle the case where the outermost type of format is an array.'''
+ """Handle the case where the outermost type of format is an array."""
builder = None
if args is None or not args[0]:
@@ -200,7 +200,7 @@ class _VariantCreator(object):
class Variant(GLib.Variant):
def __new__(cls, format_string, value):
- '''Create a GVariant from a native Python object.
+ """Create a GVariant from a native Python object.
format_string is a standard GVariant type signature, value is a Python
object whose structure has to match the signature.
@@ -210,7 +210,7 @@ class Variant(GLib.Variant):
GLib.Variant('(is)', (1, 'hello'))
GLib.Variant('(asa{sv})', ([], {'foo': GLib.Variant('b', True),
'bar': GLib.Variant('i', 2)}))
- '''
+ """
creator = _VariantCreator()
(v, rest_format, _) = creator._create(format_string, [value])
if rest_format:
@@ -250,7 +250,7 @@ class Variant(GLib.Variant):
return hash((self.get_type_string(), self.unpack()))
def unpack(self):
- '''Decompose a GVariant into a native Python object.'''
+ """Decompose a GVariant into a native Python object."""
LEAF_ACCESSORS = {
'b': self.get_boolean,
@@ -305,14 +305,14 @@ class Variant(GLib.Variant):
@classmethod
def split_signature(klass, signature):
- '''Return a list of the element signatures of the topmost signature tuple.
+ """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 []
diff --git a/gi/overrides/GObject.py b/gi/overrides/GObject.py
index 8c22ac5..33f5007 100644
--- a/gi/overrides/GObject.py
+++ b/gi/overrides/GObject.py
@@ -435,13 +435,21 @@ class _HandlerBlockManager(object):
def signal_handler_block(obj, handler_id):
- """Blocks the signal handler from being invoked until handler_unblock() is called.
+ """Blocks the signal handler from being invoked until
+ handler_unblock() is called.
- Returns a context manager which optionally can be used to
- automatically unblock the handler:
+ :param GObject.Object obj:
+ Object instance to block handlers for.
+ :param int handler_id:
+ Id of signal to block.
+ :returns:
+ A context manager which optionally can be used to
+ automatically unblock the handler:
- with GObject.signal_handler_block(obj, id):
- pass
+ .. code-block:: python
+
+ with GObject.signal_handler_block(obj, id):
+ pass
"""
GObjectModule.signal_handler_block(obj, handler_id)
return _HandlerBlockManager(obj, handler_id)
@@ -452,11 +460,13 @@ __all__.append('signal_handler_block')
def signal_parse_name(detailed_signal, itype, force_detail_quark):
"""Parse a detailed signal name into (signal_id, detail).
- :Raises ValueError:
- If the given signal is unknown.
-
- :Returns:
+ :param str detailed_signal:
+ Signal name which can include detail.
+ For example: "notify:prop_name"
+ :returns:
Tuple of (signal_id, detail)
+ :raises ValueError:
+ If the given signal is unknown.
"""
res, signal_id, detail = GObjectModule.signal_parse_name(detailed_signal, itype,
force_detail_quark)
@@ -584,14 +594,17 @@ class Object(GObjectModule.Object):
def freeze_notify(self):
"""Freezes the object's property-changed notification queue.
+ :returns:
+ A context manager which optionally can be used to
+ automatically thaw notifications.
+
This will freeze the object so that "notify" signals are blocked until
the thaw_notify() method is called.
- Returns a context manager which optionally can be used to
- automatically thaw notifications:
+ .. code-block:: python
- with obj.freeze_notify():
- pass
+ with obj.freeze_notify():
+ pass
"""
super(Object, self).freeze_notify()
return _FreezeNotifyManager(self)
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 4d16a68..ff9aea1 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -394,6 +394,9 @@ class Builder(Gtk.Builder):
the given mapping "obj_or_map". The handler/value aspect of the mapping
can also contain a tuple in the form of (handler [,arg1 [,argN]])
allowing for extra arguments to be passed to the handler. For example:
+
+ .. code-block:: python
+
builder.connect_signals({'on_clicked': (on_clicked, arg1, arg2)})
"""
def _full_callback(builder, gobj, signal_name, handler_name, connect_obj, flags, obj_or_map):
@@ -510,7 +513,9 @@ class Dialog(Gtk.Dialog, Container):
pairs - button text (or stock ID) and a response ID integer are passed
individually. For example:
- dialog.add_buttons(Gtk.STOCK_OPEN, 42, "Close", Gtk.ResponseType.CLOSE)
+ .. code-block:: python
+
+ dialog.add_buttons(Gtk.STOCK_OPEN, 42, "Close", Gtk.ResponseType.CLOSE)
will add "Open" and "Close" buttons to dialog.
"""
@@ -635,24 +640,27 @@ class TextBuffer(Gtk.TextBuffer):
return table
def create_tag(self, tag_name=None, **properties):
- """
- @tag_name: name of the new tag, or None
- @properties: keyword list of properties and their values
+ """Creates a tag and adds it to the tag table of the TextBuffer.
+
+ :param str tag_name:
+ Name of the new tag, or None
+ :param **properties:
+ Keyword list of properties and their values
- Creates a tag and adds it to the tag table of the TextBuffer.
- Equivalent to creating a Gtk.TextTag and then adding the
+ This is equivalent to creating a Gtk.TextTag and then adding the
tag to the buffer's tag table. The returned tag is owned by
the buffer's tag table.
- If @tag_name is None, the tag is anonymous.
+ If ``tag_name`` is None, the tag is anonymous.
- If @tag_name is not None, a tag called @tag_name must not already
+ If ``tag_name`` is not None, a tag called ``tag_name`` must not already
exist in the tag table for this buffer.
Properties are passed as a keyword list of names and values (e.g.
- foreground = 'DodgerBlue', weight = Pango.Weight.BOLD)
+ foreground='DodgerBlue', weight=Pango.Weight.BOLD)
- Return value: a new tag
+ :returns:
+ A new tag.
"""
tag = Gtk.TextTag(name=tag_name, **properties)
diff --git a/gi/overrides/Makefile.in b/gi/overrides/Makefile.in
index 2d5e808..793ec13 100644
--- a/gi/overrides/Makefile.in
+++ b/gi/overrides/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,23 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -51,8 +78,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = gi/overrides
-DIST_COMMON = $(pygioverrides_PYTHON) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(pygioverrides_PYTHON) $(top_srcdir)/py-compile
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -65,12 +92,18 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
@@ -107,7 +140,10 @@ am__uninstall_files_from_dir = { \
}
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
am__installdirs = "$(DESTDIR)$(pygioverridesdir)"
+am__pep3147_tweak = \
+ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
py_compile = $(top_srcdir)/py-compile
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -346,32 +382,38 @@ install-pygioverridesPYTHON: $(pygioverrides_PYTHON)
$(INSTALL_DATA) $$files "$(DESTDIR)$(pygioverridesdir)" || exit $$?; \
done || exit $$?; \
if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- $(am__py_compile) --basedir "$(pygioverridesdir)" $$dlist; \
- else \
- $(am__py_compile) --destdir "$(DESTDIR)" \
- --basedir "$(pygioverridesdir)" $$dlist; \
- fi; \
+ $(am__py_compile) --destdir "$(DESTDIR)" \
+ --basedir "$(pygioverridesdir)" $$dlist; \
else :; fi
uninstall-pygioverridesPYTHON:
@$(NORMAL_UNINSTALL)
@list='$(pygioverrides_PYTHON)'; test -n "$(pygioverridesdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
+ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$py_files" || exit 0; \
dir='$(DESTDIR)$(pygioverridesdir)'; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
+ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
+ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
+ echo "$$py_files_pep3147";\
+ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
+ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
st=0; \
- for files in "$$files" "$$filesc" "$$fileso"; do \
+ for files in \
+ "$$py_files" \
+ "$$pyc_files" \
+ "$$pyo_files" \
+ "$$pyc_files_pep3147" \
+ "$$pyo_files_pep3147" \
+ ; do \
$(am__uninstall_files_from_dir) || st=$$?; \
done; \
exit $$st
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -511,17 +553,17 @@ uninstall-am: uninstall-pygioverridesPYTHON
.MAKE: check-am install-am install-strip
.PHONY: all all-am all-local check check-am check-local clean \
- clean-generic clean-libtool distclean distclean-generic \
- distclean-libtool distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-pygioverridesPYTHON install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-pygioverridesPYTHON
+ clean-generic clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-pygioverridesPYTHON \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am uninstall-pygioverridesPYTHON
# if we build in a separate tree, we need to symlink the *.py files from the
diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py
index 2cd1345..35e14ea 100644
--- a/gi/overrides/__init__.py
+++ b/gi/overrides/__init__.py
@@ -24,14 +24,14 @@ def wraps(wrapped):
class _Registry(dict):
def __setitem__(self, key, value):
- '''We do checks here to make sure only submodules of the override
+ """We do checks here to make sure only submodules of the override
module are added. Key and value should be the same object and come
from the gi.override module.
We add the override to the dict as "override_module.name". For instance
if we were overriding Gtk.Button you would retrive it as such:
registry['Gtk.Button']
- '''
+ """
if not key == value:
raise KeyError('You have tried to modify the registry. This should only be done by the override decorator')
@@ -59,7 +59,7 @@ class _Registry(dict):
class overridefunc(object):
- '''decorator for overriding a function'''
+ """decorator for overriding a function"""
def __init__(self, func):
if not isinstance(func, CallableInfo):
raise TypeError("func must be a gi function, got %s" % func)
@@ -75,7 +75,7 @@ registry = _Registry()
def override(type_):
- '''Decorator for registering an override'''
+ """Decorator for registering an override"""
if isinstance(type_, (types.FunctionType, CallableInfo)):
return overridefunc(type_)
else:
@@ -84,7 +84,7 @@ def override(type_):
def deprecated(fn, replacement):
- '''Decorator for marking methods and classes as deprecated'''
+ """Decorator for marking methods and classes as deprecated"""
@wraps(fn)
def wrapped(*args, **kwargs):
warnings.warn('%s is deprecated; use %s instead' % (fn.__name__, replacement),
@@ -97,44 +97,40 @@ def deprecated_init(super_init_func, arg_names, ignore=tuple(),
deprecated_aliases={}, deprecated_defaults={},
category=PyGIDeprecationWarning,
stacklevel=2):
- '''Wrapper for deprecating GObject based __init__ methods which specify defaults
- already available or non-standard defaults.
-
- :Parameters:
- super_init_func : callable
- Initializer to wrap.
- arg_names : list
- Ordered argument name list.
- ignore : list
- List of argument names to ignore when calling the wrapped function.
- This is useful for function which take a non-standard keyword that
- is munged elsewhere.
- deprecated_aliases : dict
- Dictionary mapping a keyword alias to the actual g_object_newv
- keyword.
- deprecated_defaults : dict
- Dictionary of non-standard defaults that will be used when the
- keyword is not explicitly passed.
- category : Exception
- Exception category of the error.
- stacklevel : int
- Stack level for the deprecation passed on to warnings.warn
-
- :Returns:
- Wrapped version of super_init_func which gives a deprecation
+ """Wrapper for deprecating GObject based __init__ methods which specify
+ defaults already available or non-standard defaults.
+
+ :param callable super_init_func:
+ Initializer to wrap.
+ :param list arg_names:
+ Ordered argument name list.
+ :param list ignore:
+ List of argument names to ignore when calling the wrapped function.
+ This is useful for function which take a non-standard keyword that is munged elsewhere.
+ :param dict deprecated_aliases:
+ Dictionary mapping a keyword alias to the actual g_object_newv keyword.
+ :param dict deprecated_defaults:
+ Dictionary of non-standard defaults that will be used when the
+ keyword is not explicitly passed.
+ :param Exception category:
+ Exception category of the error.
+ :param int stacklevel:
+ Stack level for the deprecation passed on to warnings.warn
+ :returns: Wrapped version of ``super_init_func`` which gives a deprecation
warning when non-keyword args or aliases are used.
- '''
+ :rtype: callable
+ """
# We use a list of argument names to maintain order of the arguments
# being deprecated. This allows calls with positional arguments to
# continue working but with a deprecation message.
def new_init(self, *args, **kwargs):
- '''Initializer for a GObject based classes with support for property
+ """Initializer for a GObject based classes with support for property
sets through the use of explicit keyword arguments.
- '''
+ """
# Print warnings for calls with positional arguments.
if args:
warnings.warn('Using positional arguments with the GObject constructor has been deprecated. '
- 'Please specify keywords for %s or use a class specific constructor. '
+ 'Please specify keyword(s) for "%s" or use a class specific constructor. '
'See: https://wiki.gnome.org/PyGObject/InitializerDeprecations' %
', '.join(arg_names[:len(args)]),
category, stacklevel=stacklevel)
@@ -182,12 +178,12 @@ def deprecated_init(super_init_func, arg_names, ignore=tuple(),
def strip_boolean_result(method, exc_type=None, exc_str=None, fail_ret=None):
- '''Translate method's return value for stripping off success flag.
+ """Translate method's return value for stripping off success flag.
There are a lot of methods which return a "success" boolean and have
several out arguments. Translate such a method to return the out arguments
on success and None on failure.
- '''
+ """
@wraps(method)
def wrapped(*args, **kwargs):
ret = method(*args, **kwargs)
diff --git a/gi/overrides/keysyms.py b/gi/overrides/keysyms.py
index 35ee8eb..bb75c32 100644
--- a/gi/overrides/keysyms.py
+++ b/gi/overrides/keysyms.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-# USA
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
VoidSymbol = 0xFFFFFF
BackSpace = 0xFF08
diff --git a/gi/pygboxed.c b/gi/pygboxed.c
index 541e77b..35716a2 100644
--- a/gi/pygboxed.c
+++ b/gi/pygboxed.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygboxed.h b/gi/pygboxed.h
index 8433b9d..86f72d5 100644
--- a/gi/pygboxed.h
+++ b/gi/pygboxed.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_BOXED_H__
diff --git a/gi/pygenum.c b/gi/pygenum.c
index 89e3a06..1b9b50e 100644
--- a/gi/pygenum.c
+++ b/gi/pygenum.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygenum.h b/gi/pygenum.h
index 0558831..6c01ec9 100644
--- a/gi/pygenum.h
+++ b/gi/pygenum.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_ENUM_H__
diff --git a/gi/pygflags.c b/gi/pygflags.c
index bdeaae7..c14bf7d 100644
--- a/gi/pygflags.c
+++ b/gi/pygflags.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygflags.h b/gi/pygflags.h
index e93265c..3c7b0e8 100644
--- a/gi/pygflags.h
+++ b/gi/pygflags.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_FLAGS_H__
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 63149b0..4094c3d 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-argument.h b/gi/pygi-argument.h
index d32bd99..04888ba 100644
--- a/gi/pygi-argument.h
+++ b/gi/pygi-argument.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_ARGUMENT_H__
diff --git a/gi/pygi-boxed.c b/gi/pygi-boxed.c
index a9b39c1..06324fd 100644
--- a/gi/pygi-boxed.c
+++ b/gi/pygi-boxed.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-boxed.h b/gi/pygi-boxed.h
index 38ac928..8177588 100644
--- a/gi/pygi-boxed.h
+++ b/gi/pygi-boxed.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_BOXED_H__
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index c29733f..c8da66f 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <girepository.h>
diff --git a/gi/pygi-cache.h b/gi/pygi-cache.h
index 407e38c..cb8a2e7 100644
--- a/gi/pygi-cache.h
+++ b/gi/pygi-cache.h
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_CACHE_H__
diff --git a/gi/pygi-ccallback.c b/gi/pygi-ccallback.c
index 2a6c520..9f63ea0 100644
--- a/gi/pygi-ccallback.c
+++ b/gi/pygi-ccallback.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-ccallback.h b/gi/pygi-ccallback.h
index c796092..f286171 100644
--- a/gi/pygi-ccallback.h
+++ b/gi/pygi-ccallback.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_CCLOSURE_H__
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index 3fe6a39..8261a07 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -56,11 +56,14 @@ cairo_context_to_arg (PyObject *value,
}
static PyObject *
-cairo_context_from_arg (GIInterfaceInfo *interface_info, gpointer data)
+cairo_context_from_arg (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ gpointer data)
{
cairo_t *context = (cairo_t*) data;
- cairo_reference (context);
+ if (transfer == GI_TRANSFER_NOTHING)
+ cairo_reference (context);
return PycairoContext_FromContext (context, &PycairoContext_Type, NULL);
}
@@ -95,11 +98,14 @@ cairo_surface_to_arg (PyObject *value,
}
static PyObject *
-cairo_surface_from_arg (GIInterfaceInfo *interface_info, gpointer data)
+cairo_surface_from_arg (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ gpointer data)
{
cairo_surface_t *surface = (cairo_surface_t*) data;
- cairo_surface_reference (surface);
+ if (transfer == GI_TRANSFER_NOTHING)
+ cairo_surface_reference (surface);
return PycairoSurface_FromSurface (surface, NULL);
}
@@ -134,10 +140,17 @@ cairo_path_to_arg (PyObject *value,
}
static PyObject *
-cairo_path_from_arg (GIInterfaceInfo *interface_info, gpointer data)
+cairo_path_from_arg (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ gpointer data)
{
cairo_path_t *path = (cairo_path_t*) data;
+ if (transfer == GI_TRANSFER_NOTHING) {
+ PyErr_SetString(PyExc_TypeError, "Unsupported annotation (transfer none) for cairo.Path return");
+ return NULL;
+ }
+
return PycairoPath_FromPath (path);
}
@@ -170,11 +183,16 @@ cairo_font_options_to_arg (PyObject *value,
}
static PyObject *
-cairo_font_options_from_arg (GIInterfaceInfo *interface_info, gpointer data)
+cairo_font_options_from_arg (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ gpointer data)
{
cairo_font_options_t *font_options = (cairo_font_options_t*) data;
- return PycairoFontOptions_FromFontOptions (cairo_font_options_copy (font_options));
+ if (transfer == GI_TRANSFER_NOTHING)
+ font_options = cairo_font_options_copy (font_options);
+
+ return PycairoFontOptions_FromFontOptions (font_options);
}
static PyObject *
diff --git a/gi/pygi-foreign.c b/gi/pygi-foreign.c
index c046d0f..f3c1a34 100644
--- a/gi/pygi-foreign.c
+++ b/gi/pygi-foreign.c
@@ -123,6 +123,7 @@ pygi_struct_foreign_convert_to_g_argument (PyObject *value,
PyObject *
pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
GIArgument *arg)
{
GIBaseInfo *base_info = (GIBaseInfo *) interface_info;
@@ -131,7 +132,7 @@ pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *interface_info,
if (foreign_struct == NULL)
return NULL;
- return foreign_struct->from_func (interface_info, arg);
+ return foreign_struct->from_func (interface_info, transfer, arg);
}
PyObject *
diff --git a/gi/pygi-foreign.h b/gi/pygi-foreign.h
index dd5f896..478d759 100644
--- a/gi/pygi-foreign.h
+++ b/gi/pygi-foreign.h
@@ -35,6 +35,7 @@ PyObject *pygi_struct_foreign_convert_to_g_argument (PyObject *value,
GITransfer transfer,
GIArgument *arg);
PyObject *pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
GIArgument *arg);
PyObject *pygi_struct_foreign_release (GITypeInfo *type_info,
gpointer struct_);
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index ffc9d4f..065d470 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -17,9 +17,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-info.h b/gi/pygi-info.h
index d550d8d..a0c6680 100644
--- a/gi/pygi-info.h
+++ b/gi/pygi-info.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_INFO_H__
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index 3bb4dc6..4af2e72 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -17,9 +17,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <pyglib.h>
@@ -401,6 +399,7 @@ _caller_alloc (PyGIArgCache *arg_cache, GIArgument *arg)
PyObject *foreign_struct =
pygi_struct_foreign_convert_from_g_argument (
iface_cache->interface_info,
+ GI_TRANSFER_NOTHING,
NULL);
pygi_struct_foreign_convert_to_g_argument (foreign_struct,
diff --git a/gi/pygi-invoke.h b/gi/pygi-invoke.h
index a481be3..b6bb4b9 100644
--- a/gi/pygi-invoke.h
+++ b/gi/pygi-invoke.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_INVOKE_H__
diff --git a/gi/pygi-marshal-cleanup.c b/gi/pygi-marshal-cleanup.c
index 169e149..0f6fee3 100644
--- a/gi/pygi-marshal-cleanup.c
+++ b/gi/pygi-marshal-cleanup.c
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-marshal-cleanup.h"
diff --git a/gi/pygi-marshal-cleanup.h b/gi/pygi-marshal-cleanup.h
index e895f37..56bf383 100644
--- a/gi/pygi-marshal-cleanup.h
+++ b/gi/pygi-marshal-cleanup.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_MARSHAL_CLEANUP_H__
diff --git a/gi/pygi-repository.c b/gi/pygi-repository.c
index d7c65f5..30890ba 100644
--- a/gi/pygi-repository.c
+++ b/gi/pygi-repository.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-repository.h b/gi/pygi-repository.h
index d8eb8cf..6f0928b 100644
--- a/gi/pygi-repository.h
+++ b/gi/pygi-repository.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_REPOSITORY_H__
diff --git a/gi/pygi-signal-closure.c b/gi/pygi-signal-closure.c
index 60f6657..c5f51af 100644
--- a/gi/pygi-signal-closure.c
+++ b/gi/pygi-signal-closure.c
@@ -13,9 +13,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-struct-marshal.c b/gi/pygi-struct-marshal.c
index 338f2be..7346eae 100644
--- a/gi/pygi-struct-marshal.c
+++ b/gi/pygi-struct-marshal.c
@@ -352,6 +352,7 @@ _pygi_marshal_to_py_interface_struct (GIArgument *arg,
py_obj = pyg_value_as_pyobject (arg->v_pointer, FALSE);
} else if (is_foreign) {
py_obj = pygi_struct_foreign_convert_from_g_argument (interface_info,
+ transfer,
arg->v_pointer);
} else if (g_type_is_a (g_type, G_TYPE_BOXED)) {
if (py_type) {
diff --git a/gi/pygi-struct.c b/gi/pygi-struct.c
index 40bfb6d..b1db8a4 100644
--- a/gi/pygi-struct.c
+++ b/gi/pygi-struct.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-struct.h b/gi/pygi-struct.h
index 963d05a..ab303e0 100644
--- a/gi/pygi-struct.h
+++ b/gi/pygi-struct.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_STRUCT_H__
diff --git a/gi/pygi-type.c b/gi/pygi-type.c
index 95f3c2c..b8d4c65 100644
--- a/gi/pygi-type.c
+++ b/gi/pygi-type.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pygi-private.h"
diff --git a/gi/pygi-type.h b/gi/pygi-type.h
index 1d225f0..822a441 100644
--- a/gi/pygi-type.h
+++ b/gi/pygi-type.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_TYPE_H__
diff --git a/gi/pygi.h b/gi/pygi.h
index 3a1591f..a67696e 100644
--- a/gi/pygi.h
+++ b/gi/pygi.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGI_H__
@@ -85,6 +83,7 @@ typedef PyObject * (*PyGIArgOverrideToGIArgumentFunc) (PyObject *value,
GITransfer transfer,
GIArgument *arg);
typedef PyObject * (*PyGIArgOverrideFromGIArgumentFunc) (GIInterfaceInfo *interface_info,
+ GITransfer transfer,
gpointer data);
typedef PyObject * (*PyGIArgOverrideReleaseFunc) (GITypeInfo *type_info,
gpointer struct_);
diff --git a/gi/pyginterface.c b/gi/pyginterface.c
index eb76ba0..40d54f7 100644
--- a/gi/pyginterface.c
+++ b/gi/pyginterface.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pyginterface.h b/gi/pyginterface.h
index 0f390c2..d6d8b9d 100644
--- a/gi/pyginterface.h
+++ b/gi/pyginterface.h
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_INTERFACE_H__
diff --git a/gi/pyglib-private.h b/gi/pyglib-private.h
index 9f05816..3569c6b 100644
--- a/gi/pyglib-private.h
+++ b/gi/pyglib-private.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGLIB_PRIVATE_H__
diff --git a/gi/pyglib-python-compat.h b/gi/pyglib-python-compat.h
index 40e79b4..58c8cf9 100644
--- a/gi/pyglib-python-compat.h
+++ b/gi/pyglib-python-compat.h
@@ -13,9 +13,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGLIB_PYTHON_COMPAT_H__
diff --git a/gi/pyglib.c b/gi/pyglib.c
index 15109fd..6c52f31 100644
--- a/gi/pyglib.c
+++ b/gi/pyglib.c
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pyglib.h b/gi/pyglib.h
index 9c7b22b..544bada 100644
--- a/gi/pyglib.h
+++ b/gi/pyglib.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGLIB_H__
diff --git a/gi/pygobject-external.h b/gi/pygobject-external.h
index 8299864..49313a5 100644
--- a/gi/pygobject-external.h
+++ b/gi/pygobject-external.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_EXTERN_H__
diff --git a/gi/pygobject.c b/gi/pygobject.c
index 215376b..04fd6a5 100644
--- a/gi/pygobject.c
+++ b/gi/pygobject.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygoptioncontext.c b/gi/pygoptioncontext.c
index 8ecbff8..f6bb223 100644
--- a/gi/pygoptioncontext.c
+++ b/gi/pygoptioncontext.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygoptioncontext.h b/gi/pygoptioncontext.h
index efe5ffa..2beee78 100644
--- a/gi/pygoptioncontext.h
+++ b/gi/pygoptioncontext.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYG_OPTIONCONTEXT_H__
diff --git a/gi/pygoptiongroup.c b/gi/pygoptiongroup.c
index 2990342..613232f 100644
--- a/gi/pygoptiongroup.c
+++ b/gi/pygoptiongroup.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygoptiongroup.h b/gi/pygoptiongroup.h
index 872b9c6..f410c92 100644
--- a/gi/pygoptiongroup.h
+++ b/gi/pygoptiongroup.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYG_OPTIONGROUP_H__
diff --git a/gi/pygparamspec.c b/gi/pygparamspec.c
index 938f797..9e6c467 100644
--- a/gi/pygparamspec.c
+++ b/gi/pygparamspec.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygparamspec.h b/gi/pygparamspec.h
index b3ba8ca..db83e59 100644
--- a/gi/pygparamspec.h
+++ b/gi/pygparamspec.h
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_PARAMSPEC_H__
diff --git a/gi/pygpointer.c b/gi/pygpointer.c
index 575c751..2729695 100644
--- a/gi/pygpointer.c
+++ b/gi/pygpointer.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygpointer.h b/gi/pygpointer.h
index f2923da..792846e 100644
--- a/gi/pygpointer.h
+++ b/gi/pygpointer.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_POINTER_H__
diff --git a/gi/pygspawn.c b/gi/pygspawn.c
index 72746b8..8f3ff51 100644
--- a/gi/pygspawn.c
+++ b/gi/pygspawn.c
@@ -16,9 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <Python.h>
diff --git a/gi/pygspawn.h b/gi/pygspawn.h
index 2e8dd3c..3cc9680 100644
--- a/gi/pygspawn.h
+++ b/gi/pygspawn.h
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYG_PID_H__
diff --git a/gi/pygtype.c b/gi/pygtype.c
index fb21282..131a271 100644
--- a/gi/pygtype.c
+++ b/gi/pygtype.c
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
diff --git a/gi/pygtype.h b/gi/pygtype.h
index 204c146..f21cf1f 100644
--- a/gi/pygtype.h
+++ b/gi/pygtype.h
@@ -15,9 +15,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PYGOBJECT_TYPE_H__
diff --git a/gi/repository/Makefile.in b/gi/repository/Makefile.in
index 6134f6b..9865c87 100644
--- a/gi/repository/Makefile.in
+++ b/gi/repository/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,23 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -51,8 +78,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = gi/repository
-DIST_COMMON = $(pygirepository_PYTHON) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(pygirepository_PYTHON) $(top_srcdir)/py-compile
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -65,12 +92,18 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
@@ -107,7 +140,10 @@ am__uninstall_files_from_dir = { \
}
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
am__installdirs = "$(DESTDIR)$(pygirepositorydir)"
+am__pep3147_tweak = \
+ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
py_compile = $(top_srcdir)/py-compile
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -338,32 +374,38 @@ install-pygirepositoryPYTHON: $(pygirepository_PYTHON)
$(INSTALL_DATA) $$files "$(DESTDIR)$(pygirepositorydir)" || exit $$?; \
done || exit $$?; \
if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- $(am__py_compile) --basedir "$(pygirepositorydir)" $$dlist; \
- else \
- $(am__py_compile) --destdir "$(DESTDIR)" \
- --basedir "$(pygirepositorydir)" $$dlist; \
- fi; \
+ $(am__py_compile) --destdir "$(DESTDIR)" \
+ --basedir "$(pygirepositorydir)" $$dlist; \
else :; fi
uninstall-pygirepositoryPYTHON:
@$(NORMAL_UNINSTALL)
@list='$(pygirepository_PYTHON)'; test -n "$(pygirepositorydir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
+ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$py_files" || exit 0; \
dir='$(DESTDIR)$(pygirepositorydir)'; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
+ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
+ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
+ echo "$$py_files_pep3147";\
+ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
+ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
st=0; \
- for files in "$$files" "$$filesc" "$$fileso"; do \
+ for files in \
+ "$$py_files" \
+ "$$pyc_files" \
+ "$$pyo_files" \
+ "$$pyc_files_pep3147" \
+ "$$pyo_files_pep3147" \
+ ; do \
$(am__uninstall_files_from_dir) || st=$$?; \
done; \
exit $$st
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -503,17 +545,17 @@ uninstall-am: uninstall-pygirepositoryPYTHON
.MAKE: check-am install-am install-strip
.PHONY: all all-am all-local check check-am check-local clean \
- clean-generic clean-libtool distclean distclean-generic \
- distclean-libtool distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-pygirepositoryPYTHON install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-pygirepositoryPYTHON
+ clean-generic clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-pygirepositoryPYTHON \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am uninstall-pygirepositoryPYTHON
# if we build in a separate tree, we need to symlink the *.py files from the
diff --git a/gi/types.py b/gi/types.py
index 4f0d76e..e6e3903 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -174,7 +174,7 @@ def find_vfunc_conflict_in_bases(vfunc, bases):
class _GObjectMetaBase(type):
- "Metaclass for automatically registering GObject classes"
+ """Metaclass for automatically registering GObject classes."""
def __init__(cls, name, bases, dict_):
type.__init__(cls, name, bases, dict_)
propertyhelper.install_properties(cls)
@@ -197,7 +197,7 @@ _gobject._install_metaclass(_GObjectMetaBase)
class GObjectMeta(_GObjectMetaBase, MetaClassHelper):
-
+ """Meta class used for GI GObject based types."""
def __init__(cls, name, bases, dict_):
super(GObjectMeta, cls).__init__(name, bases, dict_)
is_gi_defined = False
@@ -225,6 +225,8 @@ class GObjectMeta(_GObjectMetaBase, MetaClassHelper):
@property
def __doc__(cls):
+ if cls == GObjectMeta:
+ return ''
return generate_doc_string(cls.__info__)
@@ -289,6 +291,7 @@ def mro(C):
class StructMeta(type, MetaClassHelper):
+ """Meta class used for GI Struct based types."""
def __init__(cls, name, bases, dict_):
super(StructMeta, cls).__init__(name, bases, dict_)
@@ -310,4 +313,6 @@ class StructMeta(type, MetaClassHelper):
@property
def __doc__(cls):
+ if cls == StructMeta:
+ return ''
return generate_doc_string(cls.__info__)