gobject-introspection 2.2.4-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +129 -0
- data/ext/gobject-introspection/depend +10 -0
- data/ext/gobject-introspection/extconf.rb +94 -0
- data/ext/gobject-introspection/gobject_introspection.def +5 -0
- data/ext/gobject-introspection/rb-gi-arg-info.c +151 -0
- data/ext/gobject-introspection/rb-gi-argument.c +2053 -0
- data/ext/gobject-introspection/rb-gi-base-info.c +218 -0
- data/ext/gobject-introspection/rb-gi-boxed-info.c +48 -0
- data/ext/gobject-introspection/rb-gi-callable-info.c +104 -0
- data/ext/gobject-introspection/rb-gi-callback-info.c +48 -0
- data/ext/gobject-introspection/rb-gi-constant-info.c +77 -0
- data/ext/gobject-introspection/rb-gi-constructor-info.c +133 -0
- data/ext/gobject-introspection/rb-gi-conversions.h +145 -0
- data/ext/gobject-introspection/rb-gi-enum-info.c +155 -0
- data/ext/gobject-introspection/rb-gi-field-info.c +153 -0
- data/ext/gobject-introspection/rb-gi-flags-info.c +48 -0
- data/ext/gobject-introspection/rb-gi-function-info.c +841 -0
- data/ext/gobject-introspection/rb-gi-interface-info.c +222 -0
- data/ext/gobject-introspection/rb-gi-loader.c +224 -0
- data/ext/gobject-introspection/rb-gi-method-info.c +83 -0
- data/ext/gobject-introspection/rb-gi-object-info.c +345 -0
- data/ext/gobject-introspection/rb-gi-private.h +105 -0
- data/ext/gobject-introspection/rb-gi-property-info.c +77 -0
- data/ext/gobject-introspection/rb-gi-registered-type-info.c +86 -0
- data/ext/gobject-introspection/rb-gi-repository.c +246 -0
- data/ext/gobject-introspection/rb-gi-signal-info.c +77 -0
- data/ext/gobject-introspection/rb-gi-struct-info.c +202 -0
- data/ext/gobject-introspection/rb-gi-type-info.c +143 -0
- data/ext/gobject-introspection/rb-gi-type-tag.c +43 -0
- data/ext/gobject-introspection/rb-gi-types.h +71 -0
- data/ext/gobject-introspection/rb-gi-union-info.c +206 -0
- data/ext/gobject-introspection/rb-gi-unresolved-info.c +48 -0
- data/ext/gobject-introspection/rb-gi-value-info.c +57 -0
- data/ext/gobject-introspection/rb-gi-vfunc-info.c +91 -0
- data/ext/gobject-introspection/rb-gobject-introspection.c +44 -0
- data/ext/gobject-introspection/rb-gobject-introspection.h +60 -0
- data/extconf.rb +71 -0
- data/lib/2.0/gobject_introspection.so +0 -0
- data/lib/2.1/gobject_introspection.so +0 -0
- data/lib/2.2/gobject_introspection.so +0 -0
- data/lib/gobject-introspection.rb +53 -0
- data/lib/gobject-introspection/boxed-info.rb +28 -0
- data/lib/gobject-introspection/callable-info.rb +100 -0
- data/lib/gobject-introspection/collection-reader.rb +34 -0
- data/lib/gobject-introspection/interface-info.rb +32 -0
- data/lib/gobject-introspection/loader.rb +465 -0
- data/lib/gobject-introspection/object-info.rb +33 -0
- data/lib/gobject-introspection/repository.rb +32 -0
- data/lib/gobject-introspection/struct-info.rb +28 -0
- data/lib/gobject-introspection/union-info.rb +28 -0
- data/test/gobject-introspection-test-utils.rb +26 -0
- data/test/run-test.rb +45 -0
- data/test/test-arg-info.rb +68 -0
- data/test/test-base-info.rb +31 -0
- data/test/test-boxed-info.rb +21 -0
- data/test/test-callable-info.rb +49 -0
- data/test/test-callback-info.rb +29 -0
- data/test/test-constant-info.rb +24 -0
- data/test/test-enum-info.rb +61 -0
- data/test/test-field-type.rb +42 -0
- data/test/test-flags-info.rb +27 -0
- data/test/test-function-info.rb +39 -0
- data/test/test-interface-info.rb +97 -0
- data/test/test-loader.rb +30 -0
- data/test/test-object-info.rb +131 -0
- data/test/test-property-info.rb +38 -0
- data/test/test-registered-type-info.rb +35 -0
- data/test/test-repository.rb +62 -0
- data/test/test-signal-info.rb +40 -0
- data/test/test-struct-info.rb +57 -0
- data/test/test-type-info.rb +62 -0
- data/test/test-type-tag.rb +29 -0
- data/test/test-union-info.rb +21 -0
- data/test/test-value-info.rb +28 -0
- data/test/test-vfunc-info.rb +42 -0
- data/vendor/local/bin/g-ir-compiler.exe +0 -0
- data/vendor/local/bin/g-ir-generate.exe +0 -0
- data/vendor/local/bin/libgirepository-1.0-1.dll +0 -0
- data/vendor/local/include/gobject-introspection-1.0/giarginfo.h +82 -0
- data/vendor/local/include/gobject-introspection-1.0/gibaseinfo.h +120 -0
- data/vendor/local/include/gobject-introspection-1.0/gicallableinfo.h +110 -0
- data/vendor/local/include/gobject-introspection-1.0/giconstantinfo.h +58 -0
- data/vendor/local/include/gobject-introspection-1.0/gienuminfo.h +82 -0
- data/vendor/local/include/gobject-introspection-1.0/gifieldinfo.h +71 -0
- data/vendor/local/include/gobject-introspection-1.0/gifunctioninfo.h +100 -0
- data/vendor/local/include/gobject-introspection-1.0/giinterfaceinfo.h +106 -0
- data/vendor/local/include/gobject-introspection-1.0/giobjectinfo.h +207 -0
- data/vendor/local/include/gobject-introspection-1.0/gipropertyinfo.h +56 -0
- data/vendor/local/include/gobject-introspection-1.0/giregisteredtypeinfo.h +64 -0
- data/vendor/local/include/gobject-introspection-1.0/girepository.h +239 -0
- data/vendor/local/include/gobject-introspection-1.0/girffi.h +104 -0
- data/vendor/local/include/gobject-introspection-1.0/gisignalinfo.h +57 -0
- data/vendor/local/include/gobject-introspection-1.0/gistructinfo.h +77 -0
- data/vendor/local/include/gobject-introspection-1.0/gitypeinfo.h +87 -0
- data/vendor/local/include/gobject-introspection-1.0/gitypelib.h +80 -0
- data/vendor/local/include/gobject-introspection-1.0/gitypes.h +524 -0
- data/vendor/local/include/gobject-introspection-1.0/giunioninfo.h +84 -0
- data/vendor/local/include/gobject-introspection-1.0/giversionmacros.h +128 -0
- data/vendor/local/include/gobject-introspection-1.0/givfuncinfo.h +73 -0
- data/vendor/local/lib/girepository-1.0/DBus-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/DBusGLib-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/GIRepository-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/GL-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/GLib-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/GModule-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/GObject-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/Gio-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/cairo-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/fontconfig-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/freetype2-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/libxml2-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/win32-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/xfixes-4.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/xft-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/xlib-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/xrandr-1.3.typelib +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.py +24 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.py +76 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.py +2161 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.py +1139 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.py +203 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.py +202 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.py +173 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.py +23 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.py +305 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.py +120 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.py +72 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/callback.tmpl +4 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/class.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/constructor.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/default.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/enum.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/field.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/function.tmpl +60 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/interface.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/method.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/namespace.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/property.tmpl +5 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/record.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/signal.tmpl +5 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/vfunc.tmpl +4 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/callback.tmpl +27 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/class.tmpl +30 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/constructor.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/default.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/enum.tmpl +21 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/field.tmpl +9 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/function.tmpl +47 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/interface.tmpl +17 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/method.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/namespace.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/property.tmpl +9 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/record.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/signal.tmpl +38 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/vfunc.tmpl +27 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/callback.tmpl +27 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/class.tmpl +18 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/constructor.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/default.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/enum.tmpl +13 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/field.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/function.tmpl +47 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/interface.tmpl +16 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/method.tmpl +1 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/namespace.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/property.tmpl +9 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/record.tmpl +2 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/signal.tmpl +41 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/vfunc.tmpl +27 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/base.tmpl +20 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/class.tmpl +61 -0
- data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/namespace.tmpl +16 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.py +958 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.py +338 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.py +529 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.py +593 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.py +612 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.py +240 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.py +76 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.py +1366 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.py +203 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.py +561 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.py +152 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.py +140 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.py +329 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.py +136 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.py +971 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.py +211 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.py +156 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
- data/vendor/local/lib/libgirepository-1.0.a +0 -0
- data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
- data/vendor/local/lib/libgirepository-1.0.la +41 -0
- data/vendor/local/lib/pkgconfig/gobject-introspection-1.0.pc +26 -0
- data/vendor/local/lib/pkgconfig/gobject-introspection-no-export-1.0.pc +23 -0
- data/vendor/local/lib/pkgconfig/patched +0 -0
- data/vendor/local/share/aclocal/introspection.m4 +96 -0
- data/vendor/local/share/gir-1.0/DBus-1.0.gir +32 -0
- data/vendor/local/share/gir-1.0/DBusGLib-1.0.gir +18 -0
- data/vendor/local/share/gir-1.0/GIRepository-2.0.gir +4042 -0
- data/vendor/local/share/gir-1.0/GL-1.0.gir +31 -0
- data/vendor/local/share/gir-1.0/GLib-2.0.gir +47221 -0
- data/vendor/local/share/gir-1.0/GModule-2.0.gir +301 -0
- data/vendor/local/share/gir-1.0/GObject-2.0.gir +14733 -0
- data/vendor/local/share/gir-1.0/Gio-2.0.gir +82459 -0
- data/vendor/local/share/gir-1.0/cairo-1.0.gir +70 -0
- data/vendor/local/share/gir-1.0/fontconfig-2.0.gir +18 -0
- data/vendor/local/share/gir-1.0/freetype2-2.0.gir +22 -0
- data/vendor/local/share/gir-1.0/libxml2-2.0.gir +25 -0
- data/vendor/local/share/gir-1.0/win32-1.0.gir +19 -0
- data/vendor/local/share/gir-1.0/xfixes-4.0.gir +10 -0
- data/vendor/local/share/gir-1.0/xft-2.0.gir +23 -0
- data/vendor/local/share/gir-1.0/xlib-2.0.gir +67 -0
- data/vendor/local/share/gir-1.0/xrandr-1.3.gir +16 -0
- data/vendor/local/share/gobject-introspection-1.0/Makefile.introspection +166 -0
- data/vendor/local/share/gobject-introspection-1.0/gdump.c +569 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/annotation.c +831 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/annotation.h +301 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/drawable.c +57 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/drawable.h +44 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/everything.c +1579 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/everything.h +535 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/foo.c +790 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/foo.h +582 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.c +5426 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.h +1948 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/gitestmacros.h +10 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/regress.c +4068 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +1415 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/utility.c +47 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/utility.h +102 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.c +47 -0
- data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.h +46 -0
- data/vendor/local/share/license/gobject-introspection/AUTHORS +9 -0
- data/vendor/local/share/license/gobject-introspection/COPYING +12 -0
- data/vendor/local/share/man/man1/g-ir-compiler.1 +42 -0
- data/vendor/local/share/man/man1/g-ir-generate.1 +29 -0
- metadata +363 -0
Binary file
|
Binary file
|
@@ -0,0 +1,612 @@
|
|
1
|
+
# -*- Mode: Python -*-
|
2
|
+
# GObject-Introspection - a framework for introspecting GObject libraries
|
3
|
+
# Copyright (C) 2008 Johan Dahlin
|
4
|
+
# Copyright (C) 2008, 2009 Red Hat, Inc.
|
5
|
+
#
|
6
|
+
# This library is free software; you can redistribute it and/or
|
7
|
+
# modify it under the terms of the GNU Lesser General Public
|
8
|
+
# License as published by the Free Software Foundation; either
|
9
|
+
# version 2 of the License, or (at your option) any later version.
|
10
|
+
#
|
11
|
+
# This library is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
# Lesser General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU Lesser General Public
|
17
|
+
# License along with this library; if not, write to the
|
18
|
+
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
19
|
+
# Boston, MA 02111-1307, USA.
|
20
|
+
#
|
21
|
+
|
22
|
+
from __future__ import with_statement
|
23
|
+
|
24
|
+
from . import ast
|
25
|
+
from .xmlwriter import XMLWriter
|
26
|
+
|
27
|
+
# Bump this for *incompatible* changes to the .gir.
|
28
|
+
# Compatible changes we just make inline
|
29
|
+
COMPATIBLE_GIR_VERSION = '1.2'
|
30
|
+
|
31
|
+
|
32
|
+
class GIRWriter(XMLWriter):
|
33
|
+
|
34
|
+
def __init__(self, namespace):
|
35
|
+
super(GIRWriter, self).__init__()
|
36
|
+
self.write_comment(
|
37
|
+
'This file was automatically generated from C sources - DO NOT EDIT!\n'
|
38
|
+
'To affect the contents of this file, edit the original C definitions,\n'
|
39
|
+
'and/or use gtk-doc annotations. ')
|
40
|
+
self._write_repository(namespace)
|
41
|
+
|
42
|
+
def _write_repository(self, namespace):
|
43
|
+
attrs = [
|
44
|
+
('version', COMPATIBLE_GIR_VERSION),
|
45
|
+
('xmlns', 'http://www.gtk.org/introspection/core/1.0'),
|
46
|
+
('xmlns:c', 'http://www.gtk.org/introspection/c/1.0'),
|
47
|
+
('xmlns:glib', 'http://www.gtk.org/introspection/glib/1.0')]
|
48
|
+
with self.tagcontext('repository', attrs):
|
49
|
+
for include in sorted(namespace.includes):
|
50
|
+
self._write_include(include)
|
51
|
+
for pkg in sorted(set(namespace.exported_packages)):
|
52
|
+
self._write_pkgconfig_pkg(pkg)
|
53
|
+
for c_include in sorted(set(namespace.c_includes)):
|
54
|
+
self._write_c_include(c_include)
|
55
|
+
self._namespace = namespace
|
56
|
+
self._write_namespace(namespace)
|
57
|
+
self._namespace = None
|
58
|
+
|
59
|
+
def _write_include(self, include):
|
60
|
+
attrs = [('name', include.name), ('version', include.version)]
|
61
|
+
self.write_tag('include', attrs)
|
62
|
+
|
63
|
+
def _write_pkgconfig_pkg(self, package):
|
64
|
+
attrs = [('name', package)]
|
65
|
+
self.write_tag('package', attrs)
|
66
|
+
|
67
|
+
def _write_c_include(self, c_include):
|
68
|
+
attrs = [('name', c_include)]
|
69
|
+
self.write_tag('c:include', attrs)
|
70
|
+
|
71
|
+
def _write_namespace(self, namespace):
|
72
|
+
attrs = [('name', namespace.name),
|
73
|
+
('version', namespace.version),
|
74
|
+
('shared-library', ','.join(namespace.shared_libraries)),
|
75
|
+
('c:identifier-prefixes', ','.join(namespace.identifier_prefixes)),
|
76
|
+
('c:symbol-prefixes', ','.join(namespace.symbol_prefixes))]
|
77
|
+
with self.tagcontext('namespace', attrs):
|
78
|
+
# We define a custom sorting function here because
|
79
|
+
# we want aliases to be first. They're a bit
|
80
|
+
# special because the typelib compiler expands them.
|
81
|
+
def nscmp(a, b):
|
82
|
+
if isinstance(a, ast.Alias):
|
83
|
+
if isinstance(b, ast.Alias):
|
84
|
+
return cmp(a.name, b.name)
|
85
|
+
else:
|
86
|
+
return -1
|
87
|
+
elif isinstance(b, ast.Alias):
|
88
|
+
return 1
|
89
|
+
else:
|
90
|
+
return cmp(a, b)
|
91
|
+
for node in sorted(namespace.itervalues(), cmp=nscmp):
|
92
|
+
self._write_node(node)
|
93
|
+
|
94
|
+
def _write_node(self, node):
|
95
|
+
if isinstance(node, ast.Function):
|
96
|
+
self._write_function(node)
|
97
|
+
elif isinstance(node, ast.Enum):
|
98
|
+
self._write_enum(node)
|
99
|
+
elif isinstance(node, ast.Bitfield):
|
100
|
+
self._write_bitfield(node)
|
101
|
+
elif isinstance(node, (ast.Class, ast.Interface)):
|
102
|
+
self._write_class(node)
|
103
|
+
elif isinstance(node, ast.Callback):
|
104
|
+
self._write_callback(node)
|
105
|
+
elif isinstance(node, ast.Record):
|
106
|
+
self._write_record(node)
|
107
|
+
elif isinstance(node, ast.Union):
|
108
|
+
self._write_union(node)
|
109
|
+
elif isinstance(node, ast.Boxed):
|
110
|
+
self._write_boxed(node)
|
111
|
+
elif isinstance(node, ast.Member):
|
112
|
+
# FIXME: atk_misc_instance singleton
|
113
|
+
pass
|
114
|
+
elif isinstance(node, ast.Alias):
|
115
|
+
self._write_alias(node)
|
116
|
+
elif isinstance(node, ast.Constant):
|
117
|
+
self._write_constant(node)
|
118
|
+
else:
|
119
|
+
print 'WRITER: Unhandled node', node
|
120
|
+
|
121
|
+
def _append_version(self, node, attrs):
|
122
|
+
if node.version:
|
123
|
+
attrs.append(('version', node.version))
|
124
|
+
|
125
|
+
def _write_generic(self, node):
|
126
|
+
for key, value in node.attributes.items():
|
127
|
+
self.write_tag('attribute', [('name', key), ('value', value)])
|
128
|
+
|
129
|
+
if hasattr(node, 'doc') and node.doc:
|
130
|
+
self.write_tag('doc', [('xml:space', 'preserve')],
|
131
|
+
node.doc)
|
132
|
+
|
133
|
+
if hasattr(node, 'version_doc') and node.version_doc:
|
134
|
+
self.write_tag('doc-version', [('xml:space', 'preserve')],
|
135
|
+
node.version_doc)
|
136
|
+
|
137
|
+
if hasattr(node, 'deprecated_doc') and node.deprecated_doc:
|
138
|
+
self.write_tag('doc-deprecated', [('xml:space', 'preserve')],
|
139
|
+
node.deprecated_doc)
|
140
|
+
|
141
|
+
if hasattr(node, 'stability_doc') and node.stability_doc:
|
142
|
+
self.write_tag('doc-stability', [('xml:space', 'preserve')],
|
143
|
+
node.stability_doc)
|
144
|
+
|
145
|
+
def _append_node_generic(self, node, attrs):
|
146
|
+
if node.skip or not node.introspectable:
|
147
|
+
attrs.append(('introspectable', '0'))
|
148
|
+
|
149
|
+
if node.deprecated or node.deprecated_doc:
|
150
|
+
# The deprecated attribute used to contain node.deprecated_doc as an attribute. As
|
151
|
+
# an xml attribute cannot preserve whitespace, deprecated_doc has been moved into
|
152
|
+
# it's own tag, written in _write_generic() above. We continue to write the deprecated
|
153
|
+
# attribute for backwards compatibility
|
154
|
+
attrs.append(('deprecated', '1'))
|
155
|
+
|
156
|
+
if node.deprecated:
|
157
|
+
attrs.append(('deprecated-version', node.deprecated))
|
158
|
+
|
159
|
+
if node.stability:
|
160
|
+
attrs.append(('stability', node.stability))
|
161
|
+
|
162
|
+
def _append_throws(self, func, attrs):
|
163
|
+
if func.throws:
|
164
|
+
attrs.append(('throws', '1'))
|
165
|
+
|
166
|
+
def _write_alias(self, alias):
|
167
|
+
attrs = [('name', alias.name)]
|
168
|
+
if alias.ctype is not None:
|
169
|
+
attrs.append(('c:type', alias.ctype))
|
170
|
+
self._append_node_generic(alias, attrs)
|
171
|
+
with self.tagcontext('alias', attrs):
|
172
|
+
self._write_generic(alias)
|
173
|
+
self._write_type_ref(alias.target)
|
174
|
+
|
175
|
+
def _write_callable(self, callable, tag_name, extra_attrs):
|
176
|
+
attrs = [('name', callable.name)]
|
177
|
+
attrs.extend(extra_attrs)
|
178
|
+
self._append_version(callable, attrs)
|
179
|
+
self._append_node_generic(callable, attrs)
|
180
|
+
self._append_throws(callable, attrs)
|
181
|
+
with self.tagcontext(tag_name, attrs):
|
182
|
+
self._write_generic(callable)
|
183
|
+
self._write_return_type(callable.retval, parent=callable)
|
184
|
+
self._write_parameters(callable)
|
185
|
+
|
186
|
+
def _write_function(self, func, tag_name='function'):
|
187
|
+
if func.internal_skipped:
|
188
|
+
return
|
189
|
+
attrs = []
|
190
|
+
if hasattr(func, 'symbol'):
|
191
|
+
attrs.append(('c:identifier', func.symbol))
|
192
|
+
if func.shadowed_by:
|
193
|
+
attrs.append(('shadowed-by', func.shadowed_by))
|
194
|
+
elif func.shadows:
|
195
|
+
attrs.append(('shadows', func.shadows))
|
196
|
+
if func.moved_to is not None:
|
197
|
+
attrs.append(('moved-to', func.moved_to))
|
198
|
+
self._write_callable(func, tag_name, attrs)
|
199
|
+
|
200
|
+
def _write_method(self, method):
|
201
|
+
self._write_function(method, tag_name='method')
|
202
|
+
|
203
|
+
def _write_static_method(self, method):
|
204
|
+
self._write_function(method, tag_name='function')
|
205
|
+
|
206
|
+
def _write_constructor(self, method):
|
207
|
+
self._write_function(method, tag_name='constructor')
|
208
|
+
|
209
|
+
def _write_return_type(self, return_, parent=None):
|
210
|
+
if not return_:
|
211
|
+
return
|
212
|
+
|
213
|
+
attrs = []
|
214
|
+
if return_.transfer:
|
215
|
+
attrs.append(('transfer-ownership', return_.transfer))
|
216
|
+
if return_.skip:
|
217
|
+
attrs.append(('skip', '1'))
|
218
|
+
if return_.nullable:
|
219
|
+
attrs.append(('nullable', '1'))
|
220
|
+
with self.tagcontext('return-value', attrs):
|
221
|
+
self._write_generic(return_)
|
222
|
+
self._write_type(return_.type, parent=parent)
|
223
|
+
|
224
|
+
def _write_parameters(self, callable):
|
225
|
+
if not callable.parameters and callable.instance_parameter is None:
|
226
|
+
return
|
227
|
+
with self.tagcontext('parameters'):
|
228
|
+
if callable.instance_parameter:
|
229
|
+
self._write_parameter(callable, callable.instance_parameter, 'instance-parameter')
|
230
|
+
for parameter in callable.parameters:
|
231
|
+
self._write_parameter(callable, parameter)
|
232
|
+
|
233
|
+
def _write_parameter(self, parent, parameter, nodename='parameter'):
|
234
|
+
attrs = []
|
235
|
+
if parameter.argname is not None:
|
236
|
+
attrs.append(('name', parameter.argname))
|
237
|
+
if (parameter.direction is not None) and (parameter.direction != 'in'):
|
238
|
+
attrs.append(('direction', parameter.direction))
|
239
|
+
attrs.append(('caller-allocates',
|
240
|
+
'1' if parameter.caller_allocates else '0'))
|
241
|
+
if parameter.transfer:
|
242
|
+
attrs.append(('transfer-ownership',
|
243
|
+
parameter.transfer))
|
244
|
+
if parameter.nullable:
|
245
|
+
attrs.append(('nullable', '1'))
|
246
|
+
if parameter.direction != ast.PARAM_DIRECTION_OUT:
|
247
|
+
attrs.append(('allow-none', '1'))
|
248
|
+
if parameter.optional:
|
249
|
+
attrs.append(('optional', '1'))
|
250
|
+
if parameter.direction == ast.PARAM_DIRECTION_OUT:
|
251
|
+
attrs.append(('allow-none', '1'))
|
252
|
+
if parameter.scope:
|
253
|
+
attrs.append(('scope', parameter.scope))
|
254
|
+
if parameter.closure_name is not None:
|
255
|
+
idx = parent.get_parameter_index(parameter.closure_name)
|
256
|
+
attrs.append(('closure', '%d' % (idx, )))
|
257
|
+
if parameter.destroy_name is not None:
|
258
|
+
idx = parent.get_parameter_index(parameter.destroy_name)
|
259
|
+
attrs.append(('destroy', '%d' % (idx, )))
|
260
|
+
if parameter.skip:
|
261
|
+
attrs.append(('skip', '1'))
|
262
|
+
with self.tagcontext(nodename, attrs):
|
263
|
+
self._write_generic(parameter)
|
264
|
+
self._write_type(parameter.type, parent=parent)
|
265
|
+
|
266
|
+
def _type_to_name(self, typeval):
|
267
|
+
if not typeval.resolved:
|
268
|
+
raise AssertionError("Caught unresolved type %r (ctype=%r)" % (typeval, typeval.ctype))
|
269
|
+
assert typeval.target_giname is not None
|
270
|
+
prefix = self._namespace.name + '.'
|
271
|
+
if typeval.target_giname.startswith(prefix):
|
272
|
+
return typeval.target_giname[len(prefix):]
|
273
|
+
return typeval.target_giname
|
274
|
+
|
275
|
+
def _write_type_ref(self, ntype):
|
276
|
+
""" Like _write_type, but only writes the type name rather than the full details """
|
277
|
+
assert isinstance(ntype, ast.Type), ntype
|
278
|
+
attrs = []
|
279
|
+
if ntype.ctype:
|
280
|
+
attrs.append(('c:type', ntype.ctype))
|
281
|
+
if isinstance(ntype, ast.Array):
|
282
|
+
if ntype.array_type != ast.Array.C:
|
283
|
+
attrs.insert(0, ('name', ntype.array_type))
|
284
|
+
elif isinstance(ntype, ast.List):
|
285
|
+
if ntype.name:
|
286
|
+
attrs.insert(0, ('name', ntype.name))
|
287
|
+
elif isinstance(ntype, ast.Map):
|
288
|
+
attrs.insert(0, ('name', 'GLib.HashTable'))
|
289
|
+
else:
|
290
|
+
if ntype.target_giname:
|
291
|
+
attrs.insert(0, ('name', self._type_to_name(ntype)))
|
292
|
+
elif ntype.target_fundamental:
|
293
|
+
attrs.insert(0, ('name', ntype.target_fundamental))
|
294
|
+
|
295
|
+
self.write_tag('type', attrs)
|
296
|
+
|
297
|
+
def _write_type(self, ntype, relation=None, parent=None):
|
298
|
+
assert isinstance(ntype, ast.Type), ntype
|
299
|
+
attrs = []
|
300
|
+
if ntype.complete_ctype:
|
301
|
+
attrs.append(('c:type', ntype.complete_ctype))
|
302
|
+
elif ntype.ctype:
|
303
|
+
attrs.append(('c:type', ntype.ctype))
|
304
|
+
if isinstance(ntype, ast.Varargs):
|
305
|
+
self.write_tag('varargs', [])
|
306
|
+
elif isinstance(ntype, ast.Array):
|
307
|
+
if ntype.array_type != ast.Array.C:
|
308
|
+
attrs.insert(0, ('name', ntype.array_type))
|
309
|
+
# we insert an explicit 'zero-terminated' attribute
|
310
|
+
# when it is false, or when it would not be implied
|
311
|
+
# by the absence of length and fixed-size
|
312
|
+
if not ntype.zeroterminated:
|
313
|
+
attrs.insert(0, ('zero-terminated', '0'))
|
314
|
+
elif (ntype.zeroterminated
|
315
|
+
and (ntype.size is not None or ntype.length_param_name is not None)):
|
316
|
+
attrs.insert(0, ('zero-terminated', '1'))
|
317
|
+
if ntype.size is not None:
|
318
|
+
attrs.append(('fixed-size', '%d' % (ntype.size, )))
|
319
|
+
if ntype.length_param_name is not None:
|
320
|
+
if isinstance(parent, ast.Callable):
|
321
|
+
length = parent.get_parameter_index(ntype.length_param_name)
|
322
|
+
elif isinstance(parent, ast.Compound):
|
323
|
+
length = parent.get_field_index(ntype.length_param_name)
|
324
|
+
else:
|
325
|
+
assert False, "parent not a callable or compound: %r" % parent
|
326
|
+
attrs.insert(0, ('length', '%d' % (length, )))
|
327
|
+
|
328
|
+
with self.tagcontext('array', attrs):
|
329
|
+
self._write_type(ntype.element_type)
|
330
|
+
elif isinstance(ntype, ast.List):
|
331
|
+
if ntype.name:
|
332
|
+
attrs.insert(0, ('name', ntype.name))
|
333
|
+
with self.tagcontext('type', attrs):
|
334
|
+
self._write_type(ntype.element_type)
|
335
|
+
elif isinstance(ntype, ast.Map):
|
336
|
+
attrs.insert(0, ('name', 'GLib.HashTable'))
|
337
|
+
with self.tagcontext('type', attrs):
|
338
|
+
self._write_type(ntype.key_type)
|
339
|
+
self._write_type(ntype.value_type)
|
340
|
+
else:
|
341
|
+
# REWRITEFIXME - enable this for 1.2
|
342
|
+
if ntype.target_giname:
|
343
|
+
attrs.insert(0, ('name', self._type_to_name(ntype)))
|
344
|
+
elif ntype.target_fundamental:
|
345
|
+
# attrs = [('fundamental', ntype.target_fundamental)]
|
346
|
+
attrs.insert(0, ('name', ntype.target_fundamental))
|
347
|
+
elif ntype.target_foreign:
|
348
|
+
attrs.insert(0, ('foreign', '1'))
|
349
|
+
self.write_tag('type', attrs)
|
350
|
+
|
351
|
+
def _append_registered(self, node, attrs):
|
352
|
+
assert isinstance(node, ast.Registered)
|
353
|
+
if node.get_type:
|
354
|
+
attrs.extend([('glib:type-name', node.gtype_name),
|
355
|
+
('glib:get-type', node.get_type)])
|
356
|
+
|
357
|
+
def _write_enum(self, enum):
|
358
|
+
attrs = [('name', enum.name)]
|
359
|
+
self._append_version(enum, attrs)
|
360
|
+
self._append_node_generic(enum, attrs)
|
361
|
+
self._append_registered(enum, attrs)
|
362
|
+
attrs.append(('c:type', enum.ctype))
|
363
|
+
if enum.error_domain:
|
364
|
+
attrs.append(('glib:error-domain', enum.error_domain))
|
365
|
+
|
366
|
+
with self.tagcontext('enumeration', attrs):
|
367
|
+
self._write_generic(enum)
|
368
|
+
for member in enum.members:
|
369
|
+
self._write_member(member)
|
370
|
+
for method in sorted(enum.static_methods):
|
371
|
+
self._write_static_method(method)
|
372
|
+
|
373
|
+
def _write_bitfield(self, bitfield):
|
374
|
+
attrs = [('name', bitfield.name)]
|
375
|
+
self._append_version(bitfield, attrs)
|
376
|
+
self._append_node_generic(bitfield, attrs)
|
377
|
+
self._append_registered(bitfield, attrs)
|
378
|
+
attrs.append(('c:type', bitfield.ctype))
|
379
|
+
with self.tagcontext('bitfield', attrs):
|
380
|
+
self._write_generic(bitfield)
|
381
|
+
for member in bitfield.members:
|
382
|
+
self._write_member(member)
|
383
|
+
for method in sorted(bitfield.static_methods):
|
384
|
+
self._write_static_method(method)
|
385
|
+
|
386
|
+
def _write_member(self, member):
|
387
|
+
attrs = [('name', member.name),
|
388
|
+
('value', str(member.value)),
|
389
|
+
('c:identifier', member.symbol)]
|
390
|
+
if member.nick is not None:
|
391
|
+
attrs.append(('glib:nick', member.nick))
|
392
|
+
with self.tagcontext('member', attrs):
|
393
|
+
self._write_generic(member)
|
394
|
+
|
395
|
+
def _write_constant(self, constant):
|
396
|
+
attrs = [('name', constant.name),
|
397
|
+
('value', constant.value),
|
398
|
+
('c:type', constant.ctype)]
|
399
|
+
self._append_version(constant, attrs)
|
400
|
+
self._append_node_generic(constant, attrs)
|
401
|
+
with self.tagcontext('constant', attrs):
|
402
|
+
self._write_generic(constant)
|
403
|
+
self._write_type(constant.value_type)
|
404
|
+
|
405
|
+
def _write_class(self, node):
|
406
|
+
attrs = [('name', node.name),
|
407
|
+
('c:symbol-prefix', node.c_symbol_prefix),
|
408
|
+
('c:type', node.ctype)]
|
409
|
+
self._append_version(node, attrs)
|
410
|
+
self._append_node_generic(node, attrs)
|
411
|
+
if isinstance(node, ast.Class):
|
412
|
+
tag_name = 'class'
|
413
|
+
if node.parent_type is not None:
|
414
|
+
attrs.append(('parent',
|
415
|
+
self._type_to_name(node.parent_type)))
|
416
|
+
if node.is_abstract:
|
417
|
+
attrs.append(('abstract', '1'))
|
418
|
+
else:
|
419
|
+
assert isinstance(node, ast.Interface)
|
420
|
+
tag_name = 'interface'
|
421
|
+
attrs.append(('glib:type-name', node.gtype_name))
|
422
|
+
if node.get_type is not None:
|
423
|
+
attrs.append(('glib:get-type', node.get_type))
|
424
|
+
if node.glib_type_struct is not None:
|
425
|
+
attrs.append(('glib:type-struct',
|
426
|
+
self._type_to_name(node.glib_type_struct)))
|
427
|
+
if isinstance(node, ast.Class):
|
428
|
+
if node.fundamental:
|
429
|
+
attrs.append(('glib:fundamental', '1'))
|
430
|
+
if node.ref_func:
|
431
|
+
attrs.append(('glib:ref-func', node.ref_func))
|
432
|
+
if node.unref_func:
|
433
|
+
attrs.append(('glib:unref-func', node.unref_func))
|
434
|
+
if node.set_value_func:
|
435
|
+
attrs.append(('glib:set-value-func', node.set_value_func))
|
436
|
+
if node.get_value_func:
|
437
|
+
attrs.append(('glib:get-value-func', node.get_value_func))
|
438
|
+
with self.tagcontext(tag_name, attrs):
|
439
|
+
self._write_generic(node)
|
440
|
+
if isinstance(node, ast.Class):
|
441
|
+
for iface in sorted(node.interfaces):
|
442
|
+
self.write_tag('implements',
|
443
|
+
[('name', self._type_to_name(iface))])
|
444
|
+
if isinstance(node, ast.Interface):
|
445
|
+
for iface in sorted(node.prerequisites):
|
446
|
+
self.write_tag('prerequisite',
|
447
|
+
[('name', self._type_to_name(iface))])
|
448
|
+
if isinstance(node, ast.Class):
|
449
|
+
for method in sorted(node.constructors):
|
450
|
+
self._write_constructor(method)
|
451
|
+
for method in sorted(node.static_methods):
|
452
|
+
self._write_static_method(method)
|
453
|
+
for vfunc in sorted(node.virtual_methods):
|
454
|
+
self._write_vfunc(vfunc)
|
455
|
+
for method in sorted(node.methods):
|
456
|
+
self._write_method(method)
|
457
|
+
for prop in sorted(node.properties):
|
458
|
+
self._write_property(prop)
|
459
|
+
for field in node.fields:
|
460
|
+
self._write_field(field, node)
|
461
|
+
for signal in sorted(node.signals):
|
462
|
+
self._write_signal(signal)
|
463
|
+
|
464
|
+
def _write_boxed(self, boxed):
|
465
|
+
attrs = [('glib:name', boxed.name)]
|
466
|
+
if boxed.c_symbol_prefix is not None:
|
467
|
+
attrs.append(('c:symbol-prefix', boxed.c_symbol_prefix))
|
468
|
+
self._append_registered(boxed, attrs)
|
469
|
+
with self.tagcontext('glib:boxed', attrs):
|
470
|
+
self._write_generic(boxed)
|
471
|
+
for method in sorted(boxed.constructors):
|
472
|
+
self._write_constructor(method)
|
473
|
+
for method in sorted(boxed.methods):
|
474
|
+
self._write_method(method)
|
475
|
+
for method in sorted(boxed.static_methods):
|
476
|
+
self._write_static_method(method)
|
477
|
+
|
478
|
+
def _write_property(self, prop):
|
479
|
+
attrs = [('name', prop.name)]
|
480
|
+
self._append_version(prop, attrs)
|
481
|
+
self._append_node_generic(prop, attrs)
|
482
|
+
# Properties are assumed to be readable (see also generate.c)
|
483
|
+
if not prop.readable:
|
484
|
+
attrs.append(('readable', '0'))
|
485
|
+
if prop.writable:
|
486
|
+
attrs.append(('writable', '1'))
|
487
|
+
if prop.construct:
|
488
|
+
attrs.append(('construct', '1'))
|
489
|
+
if prop.construct_only:
|
490
|
+
attrs.append(('construct-only', '1'))
|
491
|
+
if prop.transfer:
|
492
|
+
attrs.append(('transfer-ownership', prop.transfer))
|
493
|
+
with self.tagcontext('property', attrs):
|
494
|
+
self._write_generic(prop)
|
495
|
+
self._write_type(prop.type)
|
496
|
+
|
497
|
+
def _write_vfunc(self, vf):
|
498
|
+
attrs = []
|
499
|
+
if vf.invoker:
|
500
|
+
attrs.append(('invoker', vf.invoker))
|
501
|
+
self._write_callable(vf, 'virtual-method', attrs)
|
502
|
+
|
503
|
+
def _write_callback(self, callback):
|
504
|
+
attrs = []
|
505
|
+
if callback.ctype != callback.name:
|
506
|
+
attrs.append(('c:type', callback.ctype))
|
507
|
+
self._write_callable(callback, 'callback', attrs)
|
508
|
+
|
509
|
+
def _write_record(self, record, extra_attrs=[]):
|
510
|
+
is_gtype_struct = False
|
511
|
+
attrs = list(extra_attrs)
|
512
|
+
if record.name is not None:
|
513
|
+
attrs.append(('name', record.name))
|
514
|
+
if record.ctype is not None: # the record might be anonymous
|
515
|
+
attrs.append(('c:type', record.ctype))
|
516
|
+
if record.disguised:
|
517
|
+
attrs.append(('disguised', '1'))
|
518
|
+
if record.foreign:
|
519
|
+
attrs.append(('foreign', '1'))
|
520
|
+
if record.is_gtype_struct_for is not None:
|
521
|
+
is_gtype_struct = True
|
522
|
+
attrs.append(('glib:is-gtype-struct-for',
|
523
|
+
self._type_to_name(record.is_gtype_struct_for)))
|
524
|
+
self._append_version(record, attrs)
|
525
|
+
self._append_node_generic(record, attrs)
|
526
|
+
self._append_registered(record, attrs)
|
527
|
+
if record.c_symbol_prefix:
|
528
|
+
attrs.append(('c:symbol-prefix', record.c_symbol_prefix))
|
529
|
+
with self.tagcontext('record', attrs):
|
530
|
+
self._write_generic(record)
|
531
|
+
if record.fields:
|
532
|
+
for field in record.fields:
|
533
|
+
self._write_field(field, record, is_gtype_struct)
|
534
|
+
for method in sorted(record.constructors):
|
535
|
+
self._write_constructor(method)
|
536
|
+
for method in sorted(record.methods):
|
537
|
+
self._write_method(method)
|
538
|
+
for method in sorted(record.static_methods):
|
539
|
+
self._write_static_method(method)
|
540
|
+
|
541
|
+
def _write_union(self, union):
|
542
|
+
attrs = []
|
543
|
+
if union.name is not None:
|
544
|
+
attrs.append(('name', union.name))
|
545
|
+
if union.ctype is not None: # the union might be anonymous
|
546
|
+
attrs.append(('c:type', union.ctype))
|
547
|
+
self._append_version(union, attrs)
|
548
|
+
self._append_node_generic(union, attrs)
|
549
|
+
self._append_registered(union, attrs)
|
550
|
+
if union.c_symbol_prefix:
|
551
|
+
attrs.append(('c:symbol-prefix', union.c_symbol_prefix))
|
552
|
+
with self.tagcontext('union', attrs):
|
553
|
+
self._write_generic(union)
|
554
|
+
if union.fields:
|
555
|
+
for field in union.fields:
|
556
|
+
self._write_field(field, union)
|
557
|
+
for method in sorted(union.constructors):
|
558
|
+
self._write_constructor(method)
|
559
|
+
for method in sorted(union.methods):
|
560
|
+
self._write_method(method)
|
561
|
+
for method in sorted(union.static_methods):
|
562
|
+
self._write_static_method(method)
|
563
|
+
|
564
|
+
def _write_field(self, field, parent, is_gtype_struct=False):
|
565
|
+
if field.anonymous_node:
|
566
|
+
if isinstance(field.anonymous_node, ast.Callback):
|
567
|
+
attrs = [('name', field.name)]
|
568
|
+
self._append_node_generic(field, attrs)
|
569
|
+
with self.tagcontext('field', attrs):
|
570
|
+
self._write_callback(field.anonymous_node)
|
571
|
+
elif isinstance(field.anonymous_node, ast.Record):
|
572
|
+
self._write_record(field.anonymous_node)
|
573
|
+
elif isinstance(field.anonymous_node, ast.Union):
|
574
|
+
self._write_union(field.anonymous_node)
|
575
|
+
else:
|
576
|
+
raise AssertionError("Unknown field anonymous: %r" % (field.anonymous_node, ))
|
577
|
+
else:
|
578
|
+
attrs = [('name', field.name)]
|
579
|
+
self._append_node_generic(field, attrs)
|
580
|
+
# Fields are assumed to be read-only
|
581
|
+
# (see also girparser.c and generate.c)
|
582
|
+
if not field.readable:
|
583
|
+
attrs.append(('readable', '0'))
|
584
|
+
if field.writable:
|
585
|
+
attrs.append(('writable', '1'))
|
586
|
+
if field.bits:
|
587
|
+
attrs.append(('bits', str(field.bits)))
|
588
|
+
if field.private:
|
589
|
+
attrs.append(('private', '1'))
|
590
|
+
with self.tagcontext('field', attrs):
|
591
|
+
self._write_generic(field)
|
592
|
+
self._write_type(field.type, parent=parent)
|
593
|
+
|
594
|
+
def _write_signal(self, signal):
|
595
|
+
attrs = [('name', signal.name)]
|
596
|
+
if signal.when:
|
597
|
+
attrs.append(('when', signal.when))
|
598
|
+
if signal.no_recurse:
|
599
|
+
attrs.append(('no-recurse', '1'))
|
600
|
+
if signal.detailed:
|
601
|
+
attrs.append(('detailed', '1'))
|
602
|
+
if signal.action:
|
603
|
+
attrs.append(('action', '1'))
|
604
|
+
if signal.no_hooks:
|
605
|
+
attrs.append(('no-hooks', '1'))
|
606
|
+
|
607
|
+
self._append_version(signal, attrs)
|
608
|
+
self._append_node_generic(signal, attrs)
|
609
|
+
with self.tagcontext('glib:signal', attrs):
|
610
|
+
self._write_generic(signal)
|
611
|
+
self._write_return_type(signal.retval)
|
612
|
+
self._write_parameters(signal)
|